/* La vitrine publique (mlkoach.com) et ses guides.
 *
 * Mêmes couleurs, mêmes polices, mêmes arrondis que l'application
 * (`front/src/index.css`) : passer de la vitrine au site ne doit pas donner
 * l'impression de changer de produit. Une seule couleur d'accent, le turquoise
 * de la marque ; le vert et le rouge disent mieux ou moins bien, rien d'autre.
 *
 * Les animations n'utilisent que `opacity` et `transform`.
 */

@font-face {
  font-family: "Geist";
  src: url("/static/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  src: url("/static/fonts/geist-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/static/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}

:root {
  --ground: #090d12; --panel: #0f151c; --panel-2: #141c25;
  --edge: #1d2732; --edge-2: #2a3644;
  --ink: #e8eef4; --mute: #93a3b4; --faint: #66778a;
  --accent: #34c3b8; --accent-dim: #1d6f69;
  --up: #5fd38a; --down: #f07a7a; --gold: #f2c94c;
  --sans: "Geist", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #5fe0d5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.enveloppe { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Le grain du site, posé une fois sur une couche fixe. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- la barre du haut ------------------------------------------------------- */
.haut {
  position: sticky; top: 0; z-index: 40;
  background: rgb(9 13 18 / .8); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.haut.defile { border-bottom-color: var(--edge); }
.haut .enveloppe { display: flex; align-items: center; gap: 24px; height: 64px; }
.haut .logo img { width: 150px; height: auto; }
.haut nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.haut nav a:not(.bouton) { color: var(--mute); text-decoration: none; font-size: 14px; transition: color .2s; }
.haut nav a:not(.bouton):hover { color: var(--ink); }
.haut .langue {
  font-size: 12px !important; font-weight: 600; letter-spacing: .04em;
  border: 1px solid var(--edge-2); border-radius: 8px; padding: 4px 8px;
}
@media (max-width: 860px) {
  .haut nav a.ancre { display: none; }
  .haut .logo img { width: 124px; }
  .haut nav { gap: 12px; }
}

/* --- les boutons ---------------------------------------------------------- */
.bouton {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #04110f; font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 12px; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s;
}
.bouton:hover { background: #4fd6cb; color: #04110f; transform: translateY(-1px); }
.bouton:active { transform: translateY(0) scale(.98); }
.bouton.creux { background: transparent; color: var(--ink); border: 1px solid var(--edge-2); }
.bouton.creux:hover { border-color: var(--accent); color: var(--ink); }
.bouton .fleche { transition: transform .2s var(--ease); }
.bouton:hover .fleche { transform: translateX(3px); }

/* --- l'accroche ------------------------------------------------------------- */
.accroche {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 48px; align-items: center; padding: 72px 0 56px;
}
.accroche h1 {
  font-size: clamp(36px, 5.2vw, 64px); line-height: 1.04; letter-spacing: -.035em;
  font-weight: 650; margin: 0 0 22px;
}
.accroche h1 em { font-style: normal; color: var(--accent); }
.accroche .chapeau { font-size: 18px; color: var(--mute); max-width: 56ch; margin: 0 0 30px; }
.accroche .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.accroche .pied { margin-top: 26px; font-size: 12.5px; color: var(--faint); font-family: var(--mono); }
@media (max-width: 920px) {
  .accroche { grid-template-columns: 1fr; padding-top: 48px; gap: 36px; }
}

/* La frise d'un match, dessinée : chaque barre est un round, vers le haut quand
   il a rapproché la victoire, vers le bas quand il l'a éloignée. */
.frise {
  position: relative; margin: 0; background: var(--panel); border: 1px solid var(--edge);
  border-radius: 16px; padding: 20px 20px 16px; overflow: hidden;
}
.frise::before {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; height: 90%;
  background: radial-gradient(closest-side, rgb(52 195 184 / .14), transparent);
  pointer-events: none;
}
.frise .entete { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.frise .entete b { font-size: 14px; }
.frise .entete span { font-size: 12px; color: var(--faint); }
.frise .score { font-family: var(--mono); font-size: 40px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.frise .score .eux { color: var(--down); }
.frise .barres { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 150px; align-items: center; margin-top: 16px; }
.frise .barres i {
  display: block; border-radius: 2px; transform-origin: center bottom;
  animation: pousse .9s var(--ease) both; animation-delay: calc(var(--n) * 35ms + .3s);
}
.frise .barres i.h { background: var(--up); align-self: end; margin-bottom: 75px; transform-origin: bottom; }
.frise .barres i.b { background: var(--down); align-self: start; margin-top: 75px; transform-origin: top; }
.frise .axe { position: absolute; left: 20px; right: 20px; height: 1px; background: var(--edge-2); }
.frise .legende { display: flex; gap: 16px; margin-top: 14px; font-size: 12px; color: var(--mute); }
.frise .legende span::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px;
  background: var(--c);
}
@keyframes pousse { from { transform: scaleY(0); opacity: 0; } }

/* --- la bande de chiffres ------------------------------------------------- */
.bande {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--edge); border-radius: 16px; background: var(--panel);
  margin-bottom: 40px;
}
.bande > div { padding: 22px 22px 20px; }
.bande > div + div { border-left: 1px solid var(--edge); }
.bande .n { font-family: var(--mono); font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.bande .k { font-size: 13px; color: var(--mute); margin-top: 4px; }
@media (max-width: 760px) {
  .bande { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bande > div:nth-child(3) { border-left: 0; }
  .bande > div:nth-child(n+3) { border-top: 1px solid var(--edge); }
}

/* --- les sections ----------------------------------------------------------- */
.section { padding: 88px 0 24px; }
.oeil {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.oeil::before { content: ""; width: 18px; height: 1px; background: var(--accent); }
.section h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -.03em; font-weight: 650; margin: 0 0 14px; max-width: 24ch; }
.section .chapeau { color: var(--mute); max-width: 62ch; margin: 0 0 40px; font-size: 17px; }

/* La grille des mesures : six cases, deux larges, en damier. */
.damier { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.damier .case { grid-column: span 2; }
.damier .case.large { grid-column: span 3; }
@media (max-width: 980px) { .damier { grid-template-columns: repeat(2, minmax(0, 1fr)); } .damier .case, .damier .case.large { grid-column: span 1; } }
@media (max-width: 620px) { .damier { grid-template-columns: 1fr; } }
.case {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--panel); border: 1px solid var(--edge); border-radius: 16px; padding: 22px;
  transition: border-color .3s, transform .3s var(--ease), background .3s;
}
.case:hover { border-color: var(--edge-2); background: var(--panel-2); transform: translateY(-2px); }
.case h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.case p { margin: 0; color: var(--mute); font-size: 14.5px; line-height: 1.6; }
.case .exemple {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--edge);
  font-family: var(--mono); font-size: 12.5px; color: var(--faint);
}
.case .exemple b { color: var(--ink); font-weight: 600; }
.case .exemple b.bas { color: var(--down); }
.case .exemple b.haut { color: var(--up); }

/* Avant / après. */
.face { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 820px) { .face { grid-template-columns: 1fr; } }
.face > div { border-radius: 16px; padding: 26px; border: 1px solid var(--edge); background: var(--panel); }
.face .apres { border-color: rgb(52 195 184 / .35); background: linear-gradient(180deg, rgb(52 195 184 / .06), transparent 60%), var(--panel); }
.face h3 { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 12px; color: var(--faint); }
.face .apres h3 { color: var(--accent); }
.face ul { margin: 0; padding: 0; list-style: none; }
.face li { position: relative; padding: 11px 0 11px 30px; border-bottom: 1px solid var(--edge); font-size: 15px; }
.face li:last-child { border-bottom: 0; }
.face li::before { position: absolute; left: 0; top: 12px; font-family: var(--mono); font-size: 13px; }
.face .avant li { color: var(--mute); }
.face .avant li::before { content: "—"; color: var(--faint); }
.face .apres li::before { content: "✓"; color: var(--up); }

/* La méthode : trois étapes reliées par un trait qui se dessine. */
.etapes { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.etapes::before {
  content: ""; position: absolute; top: 19px; left: 20px; right: 20px; height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--edge-2));
  transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease) .2s;
}
.etapes.vu::before { transform: scaleX(1); }
.etape .rang {
  position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--edge-2); color: var(--accent);
  font-family: var(--mono); font-size: 13px; font-weight: 600; margin-bottom: 18px;
}
.etape h3 { font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.etape p { margin: 0; color: var(--mute); font-size: 14.5px; }
@media (max-width: 860px) { .etapes { grid-template-columns: 1fr; gap: 24px; } .etapes::before { display: none; } }

/* L'aperçu : l'application elle-même, dans un cadre. */
.apercu .onglets { display: inline-flex; gap: 4px; padding: 5px; border: 1px solid var(--edge); border-radius: 16px; background: var(--panel); margin-bottom: 16px; }
.apercu .onglets button {
  font: inherit; font-size: 14px; font-weight: 500; color: var(--mute); background: none; border: 0;
  padding: 8px 16px; border-radius: 11px; cursor: pointer; transition: color .2s, background .2s;
}
.apercu .onglets button[aria-selected="true"] { background: var(--accent); color: #04110f; }
.apercu .cadre {
  position: relative; border: 1px solid var(--edge-2); border-radius: 16px; overflow: hidden; background: var(--ground);
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / .7), 0 0 0 1px rgb(52 195 184 / .06);
}
.apercu .cadre .chrome { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--edge); background: var(--panel); }
.apercu .cadre .chrome i { width: 9px; height: 9px; border-radius: 50%; background: var(--edge-2); }
.apercu .cadre .chrome span { margin-left: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.apercu iframe { display: block; width: 100%; height: 900px; border: 0; background: var(--ground); }
.apercu .note { font-size: 13px; color: var(--faint); margin-top: 12px; }
.apercu noscript p { padding: 40px; color: var(--mute); }

/* Les guides. */
.fiches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .fiches { grid-template-columns: 1fr; } }
.fiche {
  display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--edge); color: inherit; text-decoration: none;
  transition: border-color .3s, transform .3s var(--ease);
}
.fiche:hover { border-color: rgb(52 195 184 / .5); transform: translateY(-3px); color: inherit; }
.fiche h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.fiche p { margin: 0; color: var(--mute); font-size: 14.5px; }
.fiche .lire { margin-top: auto; padding-top: 8px; font-size: 13.5px; color: var(--accent); font-weight: 500; }

/* L'appel final. */
.appel-final {
  margin: 96px 0 0; padding: 56px 40px; border-radius: 24px; text-align: left;
  border: 1px solid rgb(52 195 184 / .3);
  background: radial-gradient(120% 140% at 100% 0%, rgb(52 195 184 / .14), transparent 55%), var(--panel);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end;
}
.appel-final h2 { font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -.03em; font-weight: 650; line-height: 1.1; margin: 0 0 12px; }
.appel-final p { color: var(--mute); margin: 0; max-width: 60ch; }
@media (max-width: 760px) { .appel-final { grid-template-columns: 1fr; padding: 36px 24px; } }

/* --- le pied ------------------------------------------------------------------ */
.pied-de-page { border-top: 1px solid var(--edge); margin-top: 96px; padding: 28px 0 40px; color: var(--faint); font-size: 13px; }
.pied-de-page .enveloppe { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.pied-de-page a { color: var(--mute); text-decoration: none; }
.pied-de-page a:hover { color: var(--ink); }
.pied-de-page .mention { margin-left: auto; }

/* --- les guides : un article ------------------------------------------------- */
.article { max-width: 760px; margin: 0 auto; padding: 56px 20px 0; }
.article .fil { font-size: 13px; color: var(--faint); margin-bottom: 18px; }
.article .fil a { color: var(--mute); text-decoration: none; }
.article h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.08; letter-spacing: -.03em; font-weight: 650; margin: 0 0 16px; }
.article .chapeau { font-size: 18.5px; color: var(--mute); margin: 0 0 32px; line-height: 1.6; }
.article h2 { font-size: 24px; letter-spacing: -.02em; font-weight: 600; margin: 48px 0 14px; padding-top: 28px; border-top: 1px solid var(--edge); }
.article h3 { font-size: 17px; font-weight: 600; margin: 30px 0 8px; }
.article p, .article li { font-size: 16.5px; line-height: 1.75; color: #cdd7e1; }
.article p { margin: 0 0 16px; }
.article ul { margin: 0 0 18px; padding-left: 20px; }
.article li { margin: 0 0 8px; }
.article li::marker { color: var(--accent); }
.article strong { color: var(--ink); font-weight: 600; }
.article code { font-family: var(--mono); font-size: 14px; color: var(--accent); background: var(--panel-2); padding: 1px 6px; border-radius: 6px; }
.article .date { font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.article table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 12px 0 10px;
  font-size: 14.5px; font-variant-numeric: tabular-nums;
  border: 1px solid var(--edge); border-radius: 16px; overflow: hidden; background: var(--panel);
}
.article th, .article td { text-align: right; padding: 11px 14px; border-bottom: 1px solid var(--edge); }
.article th:first-child, .article td:first-child { text-align: left; }
.article thead th { font-size: 11.5px; font-weight: 500; color: var(--faint); background: var(--panel-2); }
.article td { font-family: var(--mono); }
.article td:first-child { font-family: var(--sans); font-weight: 500; }
.article tbody tr:last-child td, .article table tr:last-child td { border-bottom: 0; }
.article tbody tr { transition: background .2s; }
.article tbody tr:hover { background: var(--panel-2); }
.article .barre {
  display: inline-block; height: 6px; border-radius: 3px; background: var(--accent);
  vertical-align: middle; margin-right: 10px; transform-origin: left;
}
.article table.vu .barre { animation: pousse-l 1s var(--ease) both; }
@keyframes pousse-l { from { transform: scaleX(0); } }
.article .barre { background: var(--up); }
.article .faible .barre { background: var(--down); }
.article td.v-haut { color: var(--up); }
.article td.v-bas { color: var(--down); }
/* La bande de compteurs d'un guide : un peu plus compacte que celle de l'accueil. */
.article .bande { margin: 8px 0 36px; }
.article .bande .n { font-size: 26px; }
@media (max-width: 420px) { .bande .n, .article .bande .n { font-size: 22px; } .bande > div { padding: 16px 14px; } }
.article .legende { font-size: 13px; color: var(--faint); margin: 0 0 24px; }
.article .encadre {
  margin: 28px 0; padding: 20px 22px; border-radius: 16px;
  border: 1px solid rgb(52 195 184 / .3);
  background: radial-gradient(100% 140% at 100% 0%, rgb(52 195 184 / .1), transparent 60%), var(--panel);
}
.article .encadre p:last-child { margin-bottom: 0; }
.article .appel {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
  background: var(--accent); color: #04110f; font-weight: 600; font-size: 14.5px;
  padding: 10px 18px; border-radius: 12px; text-decoration: none; transition: transform .2s var(--ease), background .2s;
}
.article .appel:hover { background: #4fd6cb; color: #04110f; transform: translateY(-1px); }

/* --- les apparitions ---------------------------------------------------------
   Un élément `.revele` monte doucement quand il entre à l'écran. Sans
   JavaScript, la classe `js` n'est jamais posée : tout reste visible. */
.js .revele { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .revele.vu { opacity: 1; transform: none; }
.entree { animation: entree .9s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes entree { from { opacity: 0; transform: translateY(14px); } }

/* `prefers-reduced-motion` est volontairement ignoré, comme dans l'application
   (`useCalme`, voir MIGRATION.md) : les effets d'animation de Windows sont
   éteints sur le PC de Malik, Chrome en déduit « moins d'animations » et la
   vitrine restait figée. Les mouvements restent courts et sans clignotement. */
