/* Système de design Optimal Energy, version minisites.
 * Source : fiche « Système de design Optimal Energy » du workspace (Connaissances, n°64028) et le code du site
 * (src/app.css, _variables.scss, _shared.scss). À copier tel quel dans un nouveau site : les jetons sont en tête,
 * les composants ensuite. Aucune valeur inventée : en cas de doute, la fiche fait foi.
 * Graisses et tailles relevées sur www.optimal-energy.fr le 06/10/2026 (accueil, à propos, contact ; ordinateur et
 * téléphone) : texte en Nobel 300 à 17 px, titres de page 30 px / 800, titres de section 24 px / 800, intitulés
 * 18 px / 800, textes de carte 14 px / 300, boutons 12 px / 800.
 */

/* ---- Jetons ---- */
:root {
  --green: #008e37;          /* vert de marque */
  --green-hover: #005b23;
  --green-light: #64b878;    /* soulignements, coches */
  --brown: #c4ad6e;          /* accent secondaire */
  --ink: #161f28;            /* texte, surfaces sombres */
  --error: #ee194e;          /* actions destructrices seulement */
  --white: #ffffff;
  --light: #f8f8f8;
  --lightgrey: #fbfbfb;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;

  --font: nobel, "Jost", system-ui, sans-serif;  /* Nobel (kit Adobe d'OE), Jost en substitut libre */
  --space: 24px;             /* rythme de mise en page, grille de 4 px */
  --radius: 10px;            /* cartes, champs, fenêtres */
  --radius-pill: 24px;       /* bouton du site */
  --shadow: 0 0 7px rgba(0, 0, 0, 0.1);           /* halo signature */
  --shadow-hover: 0 4px 14px rgba(0, 0, 0, 0.12);
  --focus: 0 0 0 3px rgba(0, 142, 55, 0.1);
  --reading: 640px;          /* mesure de lecture */
  --content: 1080px;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.22;
}
strong, b { font-weight: 700; }
img { max-width: 100%; height: auto; }
a { color: var(--green); }
a:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.button:focus-visible { outline: none; box-shadow: var(--focus); }
p { margin: 0 0 12px; }
.wrap { max-width: var(--content); margin: 0 auto; padding: 0 var(--space); }

/* Titres : capitales, graisse 800, barre verte claire de 30 px */
h1, h2, h3 {
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
  position: relative;
  margin: 0 0 var(--space);
}
h1 { font-size: 30px; }                            /* titre de page du site */
h2 { font-size: 24px; margin-top: calc(var(--space) * 2); }
h3 { font-size: 18px; margin-bottom: 12px; }
.is-highlighted { color: var(--green); }           /* partie du titre en vert, comme sur le site */
h1::after, h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: calc(var(--space) / -2 + 2px);
  width: 30px;
  height: 3px;
  border-radius: 2px;
  background: var(--green-light);
}
.centered { text-align: center; }
.centered h2::after { left: 50%; margin-left: -15px; }

code {
  font: 400 0.88em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--light);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 1px 5px;
}
pre {
  background: var(--light);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px var(--space);
  overflow-x: auto;
  margin: 0;
}
pre code { background: none; border: 0; padding: 0; }

/* ---- En-tête collant givré ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: var(--space); }
.topbar .brand img { height: 32px; width: auto; display: block; }

/* ---- Bouton pilule du site : vert, passe à l'encre, reflet oblique ---- */
.button {
  position: relative;
  display: inline-block;
  overflow: hidden;
  min-width: 110px;
  padding: 13px var(--space) 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--green);
  color: var(--white);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  transition: all 0.5s ease-in-out;
}
.button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -20%;
  width: var(--space);
  height: 100%;
  opacity: 0;
  transform: skew(-15deg);
  transition: all 0.6s ease-in-out;
  background: var(--green);
}
.button:hover { background: var(--ink); }
.button:hover::before { left: 120%; opacity: 0.5; background: var(--white); }
.button.is-white { background: var(--white); color: var(--green); }
.button.is-white:hover { background: var(--ink); color: var(--white); }
.button .fa-solid { margin-right: 8px; }

/* ---- Héros ---- */
.hero { background: linear-gradient(180deg, var(--light) 0%, var(--white) 100%); padding: 72px 0 64px; }
.hero .eyebrow { color: var(--green); font-size: 14px; font-weight: 800; text-transform: uppercase; margin-bottom: 16px; }
.hero h1 { max-width: 820px; margin-bottom: 36px; }
.hero .lead { max-width: var(--reading); margin-bottom: 32px; }

/* ---- Cartes ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space); }
.card-step {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card-step:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.card-step .glyph {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0, 142, 55, 0.08); color: var(--green);
  font-size: 18px; margin-bottom: 16px;
}
.card-step .step { color: var(--green); font-size: 13px; font-weight: 900; text-transform: uppercase; margin-bottom: 6px; }
.card-step p { font-size: 14px; line-height: 1.4; margin: 0; }

section.block { padding: 56px 0; }
.wrap > h2:first-child { margin-top: 0; }
section.block.tinted { background: var(--lightgrey); }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: calc(var(--space) * 1.5); align-items: start; }
.columns h2 { margin-top: 0; }

/* ---- Bandeau vert des chiffres clés ---- */
.figures { background: var(--green); color: var(--white); padding: 48px 0; }
.figures .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space); }
.figures .value { font-size: 30px; font-weight: 800; line-height: 1.1; }  /* pas de capitales : « 20 s » est une unité */
.figures .label { font-size: 14px; line-height: 1.4; margin-top: 6px; }

/* ---- Liste à coches ---- */
ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li { position: relative; padding-left: 32px; margin-bottom: 12px; }
ul.checks li .fa-solid { position: absolute; left: 0; top: 3px; color: var(--green-light); }

/* ---- Bandeau encre d'appel à l'action ---- */
.cta { background: var(--ink); color: var(--white); padding: 56px 0; }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space); }
.cta h2 { margin: 0; }
.cta p { margin: 12px 0 0; }

/* ---- Pied de page ---- */
footer.site { padding: 28px 0; font-size: 16px; border-top: 1px solid var(--gray-200); }
footer.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
footer.site a { color: var(--ink); }
footer.site .credit { font-size: 11px; font-weight: 400; }

/* ---- Page introuvable ---- */
.notfound { min-height: calc(100vh - 160px); display: grid; align-content: center; padding: 72px 0; }

@media (max-width: 640px) {
  .topbar .wrap { height: 60px; }
  .topbar .brand img { height: 26px; }
  .topbar .button { display: none; }
  .hero { padding: 48px 0 40px; }
  h1 { font-size: 25px; }                          /* titre de page du site sur téléphone */
  h2 { font-size: 18px; }
}
