/* ==========================================================================
   site.css — pages du site autour du générateur
   DA « carnet de coach » reprise du générateur : fiche ivoire, encre Bic,
   surligneur, rouge correcteur, fond vert d'eau. La touche « générateur » :
   chiffres en mono, captures du générateur en fond d'accueil.
   Le thème sombre suit la même clé que l'app (natDark → html.dark).
   ========================================================================== */
:root {
  --bg: #D8E5DC;
  --bg-2: #DCE8DF;
  --bg-3: #D2E0D7;
  --paper: #FFFCF5;
  --paper-2: #F5EFE3;
  --paper-3: #ECE4D2;
  --ink: #1A1A1A;
  --ink-2: #3D3933;
  --ink-3: #6E665A;
  --ink-4: #9A8F7E;
  --pen: #1E3A8A;
  --pen-2: #3B5BB5;
  --pen-soft: rgba(30, 58, 138, .10);
  --hl: #FCD53F;
  --hl-soft: rgba(252, 213, 63, .38);
  --red: #C0392B;
  --red-soft: rgba(192, 57, 43, .10);
  --green: #5C8374;
  --green-soft: rgba(92, 131, 116, .14);
  --kraft: #8B6F47;
  --line: rgba(60, 50, 30, .16);
  --line-soft: rgba(60, 50, 30, .08);
  --rule: rgba(30, 58, 138, .09);          /* lignes du cahier */
  --margin: rgba(192, 57, 43, .35);        /* marge rouge */
  --on-ink: #FFFCF5;
  --shadow: 0 1px 2px rgba(60, 80, 70, .06), 0 10px 28px rgba(60, 80, 70, .12);
  --shadow-sm: 0 1px 2px rgba(60, 80, 70, .06), 0 2px 6px rgba(60, 80, 70, .08);

  --f-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --f-sans: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --f-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  --f-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.4rem;
  --fs-2xl: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);
  --fs-3xl: clamp(2.3rem, 1.4rem + 3.6vw, 4rem);
  --r: 12px;
  --r-lg: 20px;
  --wrap: 1180px;
}
html.dark {
  --bg: #1A1612;
  --bg-2: #1F1A14;
  --bg-3: #15110D;
  --paper: #2A241C;
  --paper-2: #322B22;
  --paper-3: #3A3128;
  --ink: #E8DFD0;
  --ink-2: #C9BFAE;
  --ink-3: #968B79;
  --ink-4: #857B6A;
  --pen: #8FB0E8;
  --pen-2: #ADC6F0;
  --pen-soft: rgba(143, 176, 232, .12);
  --hl: #F5C842;
  --hl-soft: rgba(245, 200, 66, .22);
  --red: #E07060;
  --red-soft: rgba(224, 112, 96, .14);
  --green: #8FB39F;
  --green-soft: rgba(143, 179, 159, .15);
  --kraft: #C9A572;
  --line: rgba(232, 223, 208, .14);
  --line-soft: rgba(232, 223, 208, .07);
  --rule: rgba(143, 176, 232, .07);
  --margin: rgba(224, 112, 96, .3);
  --on-ink: #1A1612;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px rgba(0, 0, 0, .35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

/* ---------------- Base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* sinon .stack / .row (display:flex) l'emportent */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--f-sans); font-size: var(--fs-md); line-height: 1.6; color: var(--ink);
  background-color: var(--bg);
  background-image: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-3) 100%);
  background-attachment: fixed;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: var(--pen); text-underline-offset: 3px; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { font-family: var(--f-serif); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: var(--fs-3xl); font-weight: 400; letter-spacing: -.03em; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
p { margin: 0; }
em.it, .it { font-style: italic; font-weight: 500; }
:focus-visible { outline: 3px solid var(--pen-2); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--hl); color: #1A1A1A; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.hand { font-family: var(--f-hand); font-weight: 600; }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.hl { background: linear-gradient(transparent 52%, var(--hl-soft) 52%, var(--hl-soft) 92%, transparent 92%); padding: 0 .1em; }
.kicker {
  display: inline-flex; align-items: center; gap: .5rem; width: fit-content;
  font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.wrap {
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.narrow { max-width: 820px; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-alt { background: color-mix(in srgb, var(--paper) 55%, transparent); border-block: 1px solid var(--line-soft); }
.section-head { display: flex; flex-direction: column; gap: .7rem; max-width: 62ch; margin-bottom: 2.2rem; }
.section-head p { color: var(--ink-2); font-size: var(--fs-lg); }
.stack { display: flex; flex-direction: column; gap: var(--gap, 1rem); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, .75rem); }
.grow { flex: 1 1 auto; min-width: 0; }

/* ---------------- En-tête ---------------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--paper); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  font: italic 500 20px/1 var(--f-serif); color: var(--pen);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--f-serif); font-weight: 500; font-size: 1.15rem; letter-spacing: -.01em; }
.brand-text span { font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.nav { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: var(--fs-sm); padding: .5rem .75rem; border-radius: 8px; }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: linear-gradient(transparent 60%, var(--hl-soft) 60%); border-radius: 0; }
.head-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; flex: none;
  border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  cursor: pointer; font-size: 1rem;
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
.me-chip {
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink);
  padding: .22rem .7rem .22rem .22rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper);
  font-weight: 600; font-size: var(--fs-sm);
}
.me-chip:hover { color: var(--ink); background: var(--paper-2); }
.me-chip[aria-current="page"] { border-color: var(--pen); box-shadow: 0 0 0 1px var(--pen) inset; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none; }
.status-tag {
  font: 700 .62rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem .5rem; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap;
}
.st-free { color: var(--ink-3); }
.st-paid { color: var(--pen); }
.st-mns { color: var(--green); }
.st-admin { color: var(--red); }
.demo-strip { background: var(--ink); color: var(--paper); font-size: var(--fs-xs); }
html.dark .demo-strip { background: var(--paper-3); color: var(--ink); }
.demo-strip .wrap { display: flex; flex-wrap: wrap; gap: .3rem 1rem; padding-block: .4rem; align-items: center; }
.demo-strip b { font-family: var(--f-mono); color: var(--hl); letter-spacing: .08em; }
@media (max-width: 900px) {
  .menu-btn { display: inline-grid; }
  .nav {
    position: fixed; left: 0; right: 0; top: calc(64px + env(safe-area-inset-top, 0px));
    flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: .5rem max(16px, env(safe-area-inset-right, 0px)) 1rem max(16px, env(safe-area-inset-left, 0px));
  }
  .nav:not(.open) { display: none; }
  .nav a { padding: .85rem .5rem; font-size: var(--fs-md); }
  .head-actions { margin-left: auto; }
}
@media (max-width: 520px) {
  .site-header .wrap { gap: .5rem; }
  .head-actions { gap: .35rem; }
  .brand-text span, .me-chip .me-name, .head-actions .status-tag { display: none; }
  .brand-text strong { font-size: 1rem; }
  .me-chip { padding: .22rem; }
  .head-actions .btn-login { display: none; }
}

/* ---------------- Boutons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .7rem 1.2rem; border-radius: 999px;
  border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink);
  font: 600 var(--fs-sm)/1.1 var(--f-sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { color: var(--ink); background: var(--paper-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--pen); }
.btn-primary:hover { background: var(--pen); color: var(--paper); border-color: var(--pen); box-shadow: 3px 3px 0 var(--ink); }
html.dark .btn-primary:hover { color: var(--bg-3); }
.btn-pen { background: var(--pen); border-color: var(--pen); color: #fff; }
html.dark .btn-pen { color: var(--bg-3); }
.btn-pen:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-ghost { border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-danger { border-color: var(--red); color: var(--red); background: transparent; }
.btn-danger:hover { background: var(--red-soft); color: var(--red); }
.btn-sm { min-height: 36px; padding: .45rem .85rem; font-size: var(--fs-xs); }
.btn-lg { min-height: 52px; padding: .9rem 1.6rem; font-size: var(--fs-md); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.loading { pointer-events: none; opacity: .75; }
.btn.loading::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 0; color: var(--pen); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- Fiches et cartes ---------------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.1rem, 2.6vw, 1.6rem); box-shadow: var(--shadow-sm); }
.card-kraft { background: var(--paper-2); }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .28rem .6rem; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.badge-pen { background: var(--pen-soft); color: var(--pen); }
.badge-ok { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-hl { background: var(--hl-soft); color: var(--ink); }
.notice { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--r); background: var(--paper-2); border: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.notice.ok { background: var(--green-soft); }
.notice.warn { background: var(--hl-soft); }
.notice.err { background: var(--red-soft); }
.notice .ico { font-size: 1.05rem; line-height: 1.3; }

/* ---------------- Formulaires ---------------- */
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field label, .field .label { font-weight: 600; font-size: var(--fs-sm); }
.field .hint { font-size: var(--fs-xs); color: var(--ink-3); }
.input {
  width: 100%; min-height: 46px; padding: .7rem .9rem; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  font: 500 var(--fs-md)/1.3 var(--f-sans);
}
.input:focus { outline: none; border-color: var(--pen); box-shadow: 0 0 0 3px var(--pen-soft); }
.input[aria-invalid="true"] { border-color: var(--red); }
.form-msg { font-size: var(--fs-sm); font-weight: 600; min-height: 1.2em; }
.form-msg.err { color: var(--red); }
.form-msg.ok { color: var(--green); }
.check { display: grid; grid-template-columns: 20px 1fr; gap: .6rem; align-items: start; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: .15rem 0 0; accent-color: var(--pen); }
.pw-meter { height: 4px; border-radius: 2px; background: var(--paper-3); overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--red); transition: width .2s, background .2s; }

/* ---------------- Toasts et modale ---------------- */
.toasts { position: fixed; z-index: 100; left: calc(16px + env(safe-area-inset-left, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: .5rem; pointer-events: none; }
.toast { pointer-events: auto; max-width: 460px; background: var(--ink); color: var(--paper); padding: .75rem 1.1rem; border-radius: 12px; box-shadow: var(--shadow); font-size: var(--fs-sm); font-weight: 600; animation: rise .25s ease; border-left: 4px solid var(--hl); }
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.modal-back {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  background: rgba(26, 22, 18, .5);
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal { width: min(500px, 100%); max-height: calc(100% - 2rem); overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }

/* ---------------- Pied de page ---------------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--paper); }
.site-footer .wrap { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding-block: 2.6rem 2rem; }
.site-footer h4 { font: 700 .68rem/1 var(--f-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: var(--fs-sm); }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--pen); text-decoration: underline; }
.foot-note { color: var(--ink-3); font-size: var(--fs-sm); max-width: 38ch; margin-top: .9rem; }
.foot-bottom { border-top: 1px solid var(--line-soft); }
.foot-bottom .wrap { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; padding-block: 1rem; font-size: var(--fs-xs); color: var(--ink-3); grid-template-columns: none; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ==========================================================================
   ACCUEIL
   ========================================================================== */
.hero { padding-block: clamp(2.2rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 38rem); align-items: center; min-height: clamp(30rem, 62vh, 40rem); }
.hero-copy { display: flex; flex-direction: column; gap: 1.4rem; min-width: 0; }
.hero-copy .lead { font-size: var(--fs-lg); color: var(--ink-2); max-width: 46ch; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; min-height: 0; } }

/* Fond du hero : captures réelles du générateur, en perspective, de plus en plus floues,
   avec une tablette et un téléphone au premier plan */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; perspective: 1600px; perspective-origin: 20% 30%; }
.hero-stage {
  position: absolute; top: 190px; left: 40%; width: 1640px; height: 940px;
  transform: rotateX(30deg) rotateY(-8deg) rotateZ(-14deg) scale(.58); transform-origin: 0 0; transform-style: preserve-3d;
}
.shot {
  position: absolute; border-radius: 12px; background: var(--paper) center top / cover no-repeat;
  border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(20, 30, 25, .18), 0 2px 6px rgba(20, 30, 25, .08);
}
html.dark .shot { box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
/* Rangée du fond */
.shot-formulaire { left: 0;      top: -120px; width: 380px; aspect-ratio: 4 / 3; filter: blur(6px);   opacity: .62; }
.shot-programme  { left: 410px;  top: -150px; width: 380px; aspect-ratio: 4 / 3; filter: blur(6.5px); opacity: .6; }
.shot-ppg        { left: 820px;  top: -180px; width: 380px; aspect-ratio: 4 / 3; filter: blur(7px);   opacity: .58; }
.shot-compte     { left: 1230px; top: -210px; width: 380px; aspect-ratio: 4 / 3; filter: blur(7.5px); opacity: .55; }
/* Rangée du milieu */
.shot-triathlon  { left: 20px;   top: 200px; width: 380px; aspect-ratio: 4 / 3; filter: blur(3.2px); opacity: .82; }
.shot-journal    { left: 430px;  top: 160px; width: 250px; aspect-ratio: 7 / 8; filter: blur(3.6px); opacity: .8; }
.shot-circuit    { left: 710px;  top: 150px; width: 380px; aspect-ratio: 4 / 3; filter: blur(4.2px); opacity: .76; }
.shot-seances    { left: 1120px; top: 120px; width: 380px; aspect-ratio: 4 / 3; filter: blur(5px);   opacity: .7; }
/* Rangée de devant */
.shot-seance     { left: 40px;   top: 520px; width: 400px; aspect-ratio: 4 / 3; filter: blur(.6px); }
.shot-editeur    { left: 470px;  top: 500px; width: 380px; aspect-ratio: 4 / 3; filter: blur(1.4px); opacity: .95; }
.shot-historique { left: 1250px; top: 470px; width: 240px; aspect-ratio: 5 / 6; filter: blur(2.4px); opacity: .88; }
/* Appareils : posés sur la scène, nets, légèrement surélevés */
.device {
  position: absolute; background: #121417; border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 28px 70px rgba(20, 30, 25, .32), 0 4px 12px rgba(20, 30, 25, .18);
  transform: translateZ(24px);
}
html.dark .device { background: #0B0C0E; box-shadow: 0 28px 70px rgba(0, 0, 0, .7); }
.device .screen { position: absolute; background-color: var(--paper); background-position: center top; background-size: cover; background-repeat: no-repeat; }
.device-tablet { left: 800px; top: 470px; width: 300px; aspect-ratio: 820 / 1180; border-radius: 22px; }
.device-tablet .screen { inset: 11px; border-radius: 10px; }
.device-phone { left: 560px; top: 680px; width: 150px; aspect-ratio: 390 / 844; border-radius: 24px; transform: translateZ(40px); }
.device-phone .screen { inset: 6px; border-radius: 19px; }
.device-phone::after { content: ""; position: absolute; top: 12px; left: 50%; width: 42px; height: 11px; margin-left: -21px; border-radius: 99px; background: #121417; z-index: 1; }
.shot-seance { background-image: url("img/hero-seance-clair.webp"); }
.shot-journal { background-image: url("img/hero-journal-clair.webp"); }
.shot-programme { background-image: url("img/hero-programme-clair.webp"); }
.shot-formulaire { background-image: url("img/hero-formulaire-clair.webp"); }
.shot-ppg { background-image: url("img/hero-ppg-clair.webp"); }
.shot-historique { background-image: url("img/hero-historique-clair.webp"); }
.shot-triathlon { background-image: url("img/hero-triathlon-clair.webp"); }
.shot-circuit { background-image: url("img/hero-circuit-clair.webp"); }
.shot-seances { background-image: url("img/hero-seances-clair.webp"); }
.shot-compte { background-image: url("img/hero-compte-clair.webp"); }
.shot-editeur { background-image: url("img/hero-editeur-clair.webp"); }
.shot-telephone { background-image: url("img/hero-telephone-clair.webp"); }
.shot-tablette { background-image: url("img/hero-tablette-clair.webp"); }
html.dark .shot-seance { background-image: url("img/hero-seance-sombre.webp"); }
html.dark .shot-journal { background-image: url("img/hero-journal-sombre.webp"); }
html.dark .shot-programme { background-image: url("img/hero-programme-sombre.webp"); }
html.dark .shot-formulaire { background-image: url("img/hero-formulaire-sombre.webp"); }
html.dark .shot-ppg { background-image: url("img/hero-ppg-sombre.webp"); }
html.dark .shot-historique { background-image: url("img/hero-historique-sombre.webp"); }
html.dark .shot-triathlon { background-image: url("img/hero-triathlon-sombre.webp"); }
html.dark .shot-circuit { background-image: url("img/hero-circuit-sombre.webp"); }
html.dark .shot-seances { background-image: url("img/hero-seances-sombre.webp"); }
html.dark .shot-compte { background-image: url("img/hero-compte-sombre.webp"); }
html.dark .shot-editeur { background-image: url("img/hero-editeur-sombre.webp"); }
html.dark .shot-telephone { background-image: url("img/hero-telephone-sombre.webp"); }
html.dark .shot-tablette { background-image: url("img/hero-tablette-sombre.webp"); }
/* Voile : le texte reste lisible, les captures se fondent dans la page */
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, var(--bg) 30%, color-mix(in srgb, var(--bg) 55%, transparent) 50%, transparent 74%),
    linear-gradient(0deg, var(--bg) 0%, transparent 20%);
}
@media (max-width: 1200px) and (min-width: 961px) {
  .hero-stage { left: 36%; top: 210px; transform: rotateX(30deg) rotateY(-8deg) rotateZ(-14deg) scale(.48); }
}
@media (max-width: 960px) {
  .hero-stage { left: 6%; top: 130px; transform: rotateX(30deg) rotateY(-8deg) rotateZ(-14deg) scale(.52); }
  .hero-bg::after {
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 72%, transparent) 0%, color-mix(in srgb, var(--bg) 86%, transparent) 55%, var(--bg) 100%);
  }
}
@media (max-width: 560px) {
  .hero-stage { left: -12%; top: 120px; transform: rotateX(30deg) rotateY(-8deg) rotateZ(-14deg) scale(.4); }
}



/* Promesses / fonctions */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.feat { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.feat .fig { font-family: var(--f-serif); font-size: 2.2rem; line-height: 1; color: var(--pen); }
.feat p { color: var(--ink-2); font-size: var(--fs-sm); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; padding-top: .4rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; counter-reset: s; }
.step { position: relative; padding-top: 2.6rem; display: flex; flex-direction: column; gap: .5rem; }
.step::before { counter-increment: s; content: "— 0" counter(s); position: absolute; top: 0; left: 0; font-family: var(--f-mono); font-weight: 700; color: var(--red); }
.step p { color: var(--ink-2); font-size: var(--fs-sm); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.phases { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 2fr) minmax(4.6rem, 2fr); gap: 4px; margin-top: 1.2rem; }
.phase { padding: .8rem .7rem; border-radius: 8px; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.phase b { font-size: var(--fs-sm); hyphens: auto; overflow-wrap: anywhere; }
.phase span { overflow-wrap: anywhere; }
.phase span { font-size: var(--fs-xs); opacity: .85; }
.phase.p1 { background: var(--green-soft); }
.phase.p2 { background: var(--pen-soft); }
.phase.p3 { background: var(--hl-soft); }
.phase.p4 { background: var(--red-soft); }
@media (max-width: 620px) { .phases { grid-template-columns: 1fr 1fr; } }

.persona { display: flex; flex-direction: column; gap: .7rem; }
.persona .who { font-family: var(--f-hand); font-size: 1.82rem; color: var(--pen); line-height: 1; text-align: center; margin-bottom: .9rem; }
.persona ul { margin: 0; padding-left: 1.1rem; color: var(--ink-2); font-size: var(--fs-sm); display: grid; gap: .3rem; }

.faq { display: flex; flex-direction: column; gap: .5rem; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 0 1.1rem; }
.faq summary { list-style: none; cursor: pointer; padding: 1rem 0; font-weight: 600; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); color: var(--red); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: 1rem; color: var(--ink-2); font-size: var(--fs-sm); display: grid; gap: .5rem; }

.cta-final { text-align: center; }
.cta-final .wrap { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.cta-final p { color: var(--ink-2); max-width: 52ch; }

/* ==========================================================================
   TARIFS
   ========================================================================== */
.cycle { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); gap: 2px; }
.cycle button { border: 0; background: transparent; color: var(--ink-3); font: 600 var(--fs-sm) var(--f-sans); padding: .55rem 1.1rem; border-radius: 999px; cursor: pointer; min-height: 40px; }
.cycle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.cycle .save { font-family: var(--f-hand); font-size: 1.1rem; color: var(--red); margin-left: .3rem; }
.cycle button[aria-pressed="true"] .save { color: var(--hl); }
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: stretch; }
@media (max-width: 960px) { .offers { grid-template-columns: 1fr; max-width: 520px; } }
.offers-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .offers-4 { grid-template-columns: repeat(2, 1fr); max-width: none; } }
@media (max-width: 620px) { .offers-4 { grid-template-columns: 1fr; } }
.price .total { flex-basis: 100%; font-size: var(--fs-sm); color: var(--ink-3); }
.offer { display: flex; flex-direction: column; gap: 1rem; position: relative; min-width: 0; }
.offer.star { border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--pen); }
.offer .flag { position: absolute; top: -14px; right: 1.2rem; background: var(--hl); color: #1A1A1A; font: 700 .68rem/1 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; padding: .4rem .7rem; border-radius: 999px; transform: rotate(2deg); }
.offer.current { outline: 3px solid var(--green); outline-offset: 3px; }
.price { display: flex; align-items: baseline; gap: .35rem; flex-wrap: wrap; }
.price b { font-family: var(--f-serif); font-size: 2.6rem; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.price span { color: var(--ink-3); font-size: var(--fs-sm); }
.offer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: var(--fs-sm); flex: 1; align-content: start; }
.offer li { display: grid; grid-template-columns: 18px 1fr; gap: .5rem; }
.offer li::before { content: ""; width: 15px; height: 15px; margin-top: .22em; background: var(--green);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.offer li.off { color: var(--ink-4); }
.offer li.off::before { content: "–"; color: var(--ink-4); }
.packs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 720px) { .packs { grid-template-columns: 1fr; } }
.pack { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; }
.pack .price b { font-size: 1.8rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
table.compare { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 560px; }
.compare th, .compare td { padding: .75rem 1rem; border-bottom: 1px solid var(--line-soft); text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare thead th { font: 700 .7rem/1.2 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); background: var(--paper-2); }
.compare tr:last-child td { border-bottom: 0; }
.yes { color: var(--green); font-weight: 800; }
.no { color: var(--ink-4); }

/* ==========================================================================
   CONNEXION
   ========================================================================== */
.auth { display: grid; grid-template-columns: 1fr 1fr; flex: 1; }
.auth-side { padding: clamp(2rem, 5vw, 4rem) max(16px, env(safe-area-inset-right, 0px)) clamp(2rem, 5vw, 4rem) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; justify-content: center; gap: 1.4rem; }
.auth-side > * { max-width: 470px; margin-left: auto; margin-right: auto; width: 100%; }
.auth-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.auth-side li { display: grid; grid-template-columns: 36px 1fr; gap: .8rem; align-items: start; }
.auth-side li .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; }
.auth-side li strong { display: block; font-size: var(--fs-sm); }
.auth-side li span { font-size: var(--fs-sm); color: var(--ink-3); }
.auth-main { display: grid; place-items: center; padding-block: 2.5rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.auth-card { width: min(440px, 100%); display: flex; flex-direction: column; gap: 1.1rem; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: 999px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: .6rem; border-radius: 999px; font: 600 var(--fs-sm) var(--f-sans); color: var(--ink-3); cursor: pointer; min-height: 40px; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
@media (max-width: 430px) { .brand-text { display: none; } }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-side { order: 2; padding-top: 0; } }

/* ==========================================================================
   ESPACE COMPTE
   ========================================================================== */
.acc { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.6rem; align-items: start; padding-block: 2rem 3.5rem; }
.acc-nav { position: sticky; top: calc(80px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: .15rem; }
.acc-nav a { display: flex; align-items: center; gap: .6rem; padding: .65rem .8rem; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: var(--fs-sm); }
.acc-nav a:hover { background: var(--paper); color: var(--ink); }
.acc-nav a[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: inset 3px 0 0 var(--pen); }
.acc-nav .ico { width: 20px; text-align: center; }
.acc-nav .n { margin-left: auto; font: 600 var(--fs-xs) var(--f-mono); color: var(--ink-3); }
.acc-main { display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; }
.acc-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.acc-title p { color: var(--ink-3); }
@media (max-width: 860px) {
  .acc { grid-template-columns: 1fr; padding-block: 1rem 3rem; }
  .acc-nav { position: static; flex-direction: row; overflow-x: auto; gap: .35rem; padding-bottom: .3rem; }
  .acc-nav a { white-space: nowrap; background: var(--paper); border: 1px solid var(--line-soft); }
  .acc-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--pen); }
}
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
@media (max-width: 900px) { .kpis { grid-template-columns: 1fr 1fr; } }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.kpi b { font-family: var(--f-serif); font-size: 1.9rem; font-weight: 500; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; }
.meter { height: 6px; border-radius: 3px; background: var(--paper-3); overflow: hidden; margin-top: .5rem; }
.meter i { display: block; height: 100%; background: var(--pen); border-radius: 3px; }
.meter i.full { background: var(--red); }
.list { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .85rem 1rem; border-bottom: 1px solid var(--line-soft); }
.li:last-child { border-bottom: 0; }
.li-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); font-size: 1.1rem; }
.li-title { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-decoration: none; }
a.li-title:hover { color: var(--pen); }
.li-meta { font-size: var(--fs-xs); color: var(--ink-3); }
.li-actions { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.li-actions .icon-btn { width: 36px; height: 36px; }
@media (max-width: 560px) { .li { grid-template-columns: auto minmax(0, 1fr); } .li-actions { grid-column: 1 / -1; justify-content: flex-start; } }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .7rem; padding: 2.4rem 1rem; border: 2px dashed var(--line); border-radius: var(--r-lg); color: var(--ink-3); }
.empty .big { font-size: 2rem; }
.empty h3 { color: var(--ink); font-size: var(--fs-lg); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filters .input { flex: 1 1 220px; width: auto; }
.filters select.input { flex: 0 1 180px; }
.sub-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; }
@media (max-width: 640px) { .sub-box { grid-template-columns: 1fr; } }
.week-bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; padding-top: .5rem; }
.week-bars i { flex: 1; background: var(--pen); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; position: relative; }
.week-bars i.zero { background: var(--paper-3); }
.split-rows { display: grid; gap: .45rem; }
.split-row { display: grid; grid-template-columns: minmax(7rem, 13rem) 1fr 4.5rem; align-items: center; gap: .7rem; font-size: var(--fs-sm); }
.split-row i { height: 8px; border-radius: 4px; background: var(--paper-3); overflow: hidden; }
.split-row b { display: block; height: 100%; background: var(--pen); border-radius: 4px; }
.split-row .mono { text-align: right; }
@media (max-width: 520px) { .split-row { grid-template-columns: 1fr 4.5rem; } .split-row i { grid-column: 1 / -1; grid-row: 2; } }
.week-axis { display: flex; justify-content: space-between; font: 500 .65rem var(--f-mono); color: var(--ink-3); margin-top: .3rem; }
.danger { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--paper-2), var(--paper), var(--paper-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Démarrage du générateur */
.boot { min-height: 60vh; display: grid; place-items: center; text-align: center; gap: .6rem; color: var(--ink-3); }
.boot .lamp { width: 10px; height: 10px; border-radius: 50%; background: var(--pen); margin: 0 auto .6rem; animation: blink .5s steps(2) infinite; }

.notfound { padding-block: 5rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.notfound .big { font-family: var(--f-mono); font-size: clamp(4rem, 14vw, 8rem); font-weight: 700; color: var(--pen); line-height: 1; }

.pin-btn { filter: grayscale(1); opacity: .45; }
.pin-btn.is-on { filter: none; opacity: 1; border-color: var(--pen); color: var(--pen); }

/* ---------------- Bouton principal du hero ----------------
   Bleu encre de la charte, trait d'encre et ombre portée comme la marque « N ».
   En sombre, l'encre devient bleu clair et le texte passe en foncé. */
.hero-cta { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .6rem 1.1rem; }
.cta-stack { display: inline-flex; flex-direction: column; align-items: center; gap: .75rem; }
.cta-main {
  display: inline-flex; align-items: center; gap: 1.1rem;
  min-height: 68px; padding: .6rem .65rem .6rem 1.9rem;
  border-radius: 999px; border: 2px solid #1A1A1A;
  background: var(--pen); color: #fff; text-decoration: none;
  font: 700 1.2rem/1 var(--f-sans); letter-spacing: -.01em;
  box-shadow: 4px 4px 0 #1A1A1A;
  transition: transform .15s ease, box-shadow .15s ease;
}
.cta-main:hover { color: #fff; transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #1A1A1A; }
.cta-main:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #1A1A1A; }
.cta-main:focus-visible { outline: 3px solid var(--pen-2); outline-offset: 4px; border-radius: 999px; }
.cta-arr {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center;
  border-radius: 50%; background: #fff; color: var(--pen);
  transition: transform .2s ease;
}
.cta-arr svg { width: 22px; height: 22px; }
.cta-main:hover .cta-arr { transform: translateX(3px); }
html.dark .cta-main { color: #1A1612; border-color: #0E0C0A; box-shadow: 4px 4px 0 #0E0C0A, 0 10px 30px rgba(143, 176, 232, .16); }
html.dark .cta-main:hover { color: #1A1612; box-shadow: 6px 6px 0 #0E0C0A, 0 12px 34px rgba(143, 176, 232, .22); }
html.dark .cta-arr { background: #1A1612; color: var(--pen); }
.cta-sub { margin: 0; text-align: center; font-size: var(--fs-sm); font-weight: 600; font-style: italic; color: var(--ink-3); }
.cta-note {
  display: inline-flex; align-items: flex-end; gap: .1rem;
  font-family: var(--f-hand); font-weight: 700; font-size: 1.8rem; line-height: 1; color: var(--red);
  margin-top: 1rem; transform: rotate(-5deg);
}
.cta-note svg { width: 46px; height: 31px; margin-bottom: .55rem; }
@media (prefers-reduced-motion: reduce) { .cta-main, .cta-arr { transition: none; } }
@media (max-width: 560px) {
  .cta-stack { flex: 1; align-items: stretch; }
  .cta-main { justify-content: space-between; min-height: 64px; padding-left: 1.5rem; }
  .cta-note { display: none; }
}

/* ---------------- Icônes (assets/icons.js, Phosphor, MIT) ---------------- */
.ni { display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -.14em; }
.ni-wrap { display: inline-flex; align-items: center; justify-content: center; line-height: 0; vertical-align: -.14em; }
.ni-wrap .ni { vertical-align: 0; }
.icon-btn .ni { width: 18px; height: 18px; }
.compare td.yes .ni { width: 1.1em; height: 1.1em; color: var(--green); }
.notice .ico .ni { width: 1.15em; height: 1.15em; }
.empty .big .ni { width: 2.6rem; height: 2.6rem; color: var(--pen); }
.li-ico .ni { width: 1.2em; height: 1.2em; }
.acc-nav .ico .ni { width: 1.05em; height: 1.05em; }
.auth-side li .ico { font-size: 20px; color: var(--pen); }

/* ---------------- Fonctions : bandeau de six panneaux obliques ----------------
   Six photos (assets/img/fonction-*.webp) dans des panneaux penchés à 6,4°.
   La forme oblique vient d'un clip-path : aucun texte n'est transformé, il
   reste net (une inclinaison CSS sur le texte le rend flou au survol).
   Seule la photo est inclinée : elle a été redressée à la découpe, cette
   inclinaison lui rend son aspect d'origine. Le texte est posé sur un dégradé
   de la couleur du panneau (--c). Le premier et le dernier panneau se fondent
   dans le fond, comme sur la maquette. Sous 1100 px : bandeau à faire défiler.
   --h : hauteur, --off : décalage de la diagonale (tan 6,42° × hauteur),
   --g : écart horizontal entre deux panneaux. */
.diag {
  --h: clamp(470px, 39vw, 620px);
  --off: calc(var(--h) * .1125);
  --g: 16px;
  display: flex; height: var(--h);
  /* presque toute la largeur de l'écran (1600 px au plus), centré sans transform */
  width: min(calc(100vw - 16px), 1600px);
  margin: 1.2rem 0 0 calc(50% - min(calc(100vw - 16px), 1600px) / 2);
  padding: 0 24px;
}
.dz {
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden;
  clip-path: polygon(var(--off) 0, 100% 0, calc(100% - var(--off)) 100%, 0 100%);
  background: var(--c);
}
.dz + .dz { margin-left: calc(var(--g) - var(--off)); }
.dz-in { position: absolute; inset: 0; }
.dz-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: skewX(-6.42deg);
  transition: transform .5s ease;
}
.dz-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--c) 0%, color-mix(in srgb, var(--c) 92%, transparent) 34%, transparent 66%);
}
.dz:hover .dz-img { transform: skewX(-6.42deg) scale(1.05); }
.dz:first-child .dz-img { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24%); mask-image: linear-gradient(to right, transparent 0, #000 24%); }
.dz:last-child .dz-img { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 24%); mask-image: linear-gradient(to left, transparent 0, #000 24%); }
.dz:first-child, .dz:last-child { background: transparent; }
.dz-txt {
  position: absolute; left: 0; right: 0; bottom: 0;
  /* à droite, la diagonale rentre de --off en bas : le texte s'arrête avant */
  padding: 0 calc(var(--off) + .5rem) 1.4rem 1.4rem;
  color: #fff; display: flex; flex-direction: column; justify-content: flex-start; gap: .35rem;
  min-height: var(--dz-block, 0px); /* même hauteur partout : les titres partent du même niveau (home.js) */
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}
.dz:first-child .dz-txt { padding-left: 2.4rem; }
.dz:last-child .dz-txt { padding-right: calc(var(--off) + 1.6rem); }
.dz h3 { font-size: 1.12rem; line-height: 1.12; color: #fff; text-align: center; margin-bottom: .4rem; }
.dz p { margin: 0; font-size: .8rem; line-height: 1.45; color: rgba(255, 255, 255, .88); }
/* Fonctions payantes (PPG, triathlon) : pastille en haut de la photo */
.dz-badge {
  position: absolute; top: 16px; right: 14px; z-index: 1;
  max-width: calc(100% - var(--off) - 28px);
  display: inline-flex; align-items: center; gap: .35rem;
  font: 700 .62rem/1.25 var(--f-mono); letter-spacing: .05em; text-transform: uppercase;
  padding: .4rem .65rem .4rem .55rem; border-radius: 999px;
  background: var(--hl); color: #1A1A1A;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}
.dz-badge .ni { width: 1.2em; height: 1.2em; flex: none; }
html.dark .dz-img { filter: brightness(.9) saturate(.95); }
@media (prefers-reduced-motion: reduce) { .dz-img { transition: none; } .dz:hover .dz-img { transform: skewX(-6.42deg); } }
/* Écrans moyens et téléphones : on fait défiler le bandeau */
@media (max-width: 1100px) {
  .diag {
    --h: 480px;
    width: auto; padding: 0 30px 10px;
    margin: 1.2rem calc(-1 * max(16px, env(safe-area-inset-left, 0px))) 0;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 30px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .diag::-webkit-scrollbar { display: none; }
  .dz { flex: 0 0 calc(250px + var(--off)); scroll-snap-align: start; }
  .dz:first-child .dz-img, .dz:last-child .dz-img { -webkit-mask-image: none; mask-image: none; }
  .dz:first-child, .dz:last-child { background: var(--c); }
  .dz:first-child .dz-txt { padding-left: 1.4rem; }
  .dz:last-child .dz-txt { padding-right: calc(var(--off) + .5rem); }
}
@media (max-width: 560px) {
  .diag { --h: 440px; }
  .dz { flex-basis: calc(68vw + var(--off)); }
  .dz h3 { font-size: 1.2rem; }
  .dz p { font-size: .86rem; }
}

/* En-tête de la section « Le concept » : la phrase tient sur
   une ligne sur ordinateur ; elle revient à la ligne sur tablette et téléphone */
.section-head-wide { max-width: none; }
@media (min-width: 1100px) { .section-head-wide p { white-space: nowrap; } }

/* Accueil : les trois étapes, en bref, sous le bouton du hero.
   Numéros dans des pastilles au trait d'encre, comme la marque « N » ;
   flèches en pointillé, dans l'esprit de l'annotation « c'est parti ! ». */
.hero-steps {
  list-style: none; margin: 2.8rem 0 0; padding: 0;
  display: flex; align-items: center; gap: .55rem; flex-wrap: nowrap;
}
.hs { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.hs-n {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  font: italic 500 1.15rem/1 var(--f-serif); color: var(--pen);
}
.hs-txt { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.hs-txt b { font: 500 1rem/1.15 var(--f-serif); color: var(--ink); white-space: nowrap; }
.hs-txt span { font-size: .72rem; color: var(--ink-3); line-height: 1.3; }
.hs-sep { flex: none; color: var(--ink-4); width: 40px; display: grid; place-items: center; }
.hs-sep svg { width: 40px; height: 15px; }
/* Sur grand écran, la frise peut dépasser un peu la colonne de texte : chaque étape reste sur une ligne */
@media (min-width: 900px) { .hero-steps { width: max-content; } .hs-txt span { white-space: nowrap; } }
@media (max-width: 640px) {
  .hero-steps { flex-direction: column; align-items: flex-start; gap: .2rem; }
  .hs-sep { width: 34px; height: 20px; }
  .hs-sep svg { width: 22px; height: 15px; transform: rotate(90deg); }
}

/* ---------- Inscription : groupes de champs ---------- */
.fs { border: 0; margin: 0; padding: 0; min-width: 0; display: block; }
.fs + .fs { padding-top: 1.1rem; border-top: 1px solid var(--line); }
/* légende flottante : rendu de bloc ordinaire, sans le placement spécial dans la bordure */
.fs legend { float: left; width: 100%; padding: 0; margin: 0 0 .8rem; font: 700 .7rem/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.fs legend + * { clear: both; }
.fs > :not(legend) + :not(legend) { margin-top: .8rem; }
.fs-opt { margin-left: .4rem; padding: .15rem .45rem; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); letter-spacing: .04em; text-transform: none; font-weight: 500; }
.fs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.fs-grid-cp { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.fs-why { margin: 0; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 43px; padding: 0 .3rem; font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); }
.seg label + label span { border-left: 1px solid var(--line); }
.seg input:checked + span { background: var(--pen); color: var(--paper); font-weight: 600; }
.seg input:focus-visible + span { box-shadow: inset 0 0 0 3px var(--pen-soft); }
.seg[aria-invalid="true"] { border-color: var(--red); }
.seg.seg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg.seg-4 span { font-size: var(--fs-xs, 12.5px); text-align: center; line-height: 1.15; }
@media (max-width: 520px) { .seg.seg-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .seg.seg-4 label:nth-child(3) span { border-left: 0; } .seg.seg-4 label:nth-child(n+3) span { border-top: 1px solid var(--line); } }
@media (max-width: 420px) { .fs-grid { grid-template-columns: minmax(0, 1fr); } .fs-grid-cp { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }

/* ---------- Page Tarifs ---------- */
.plans-section { padding-bottom: 3rem; }
.plans-head { margin-inline: auto; text-align: center; align-items: center; margin-bottom: 1.4rem; }
.plans-head h1 { font-size: var(--fs-2xl); }
.plan-facts { list-style: none; margin: 0 auto 2.6rem; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.4rem; font-size: var(--fs-sm); color: var(--ink-2); }
.plan-facts li { display: inline-flex; align-items: center; gap: .45rem; }
.plan-facts .ni { width: 17px; height: 17px; color: var(--pen); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; align-items: stretch; max-width: 1040px; margin: 0 auto; }
.plan { display: flex; flex-direction: column; gap: 1.1rem; position: relative; min-width: 0; padding: 1.6rem 1.5rem 1.3rem; }
.plan.star { border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--pen); }
.plan.current { outline: 3px solid var(--green); outline-offset: 3px; }
.plan .flag { position: absolute; top: -14px; right: 1.2rem; background: var(--hl); color: #1A1A1A; font: 700 .68rem/1 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; padding: .4rem .7rem; border-radius: 999px; transform: rotate(2deg); }
.plan-head h3 { font-size: var(--fs-xl); }
.plan-head p { margin: .25rem 0 0; font-size: var(--fs-sm); color: var(--ink-3); }
.plan-price { display: flex; flex-direction: column; gap: .3rem; }
.plan-price b { font-family: var(--f-serif); font-size: 3rem; font-weight: 500; letter-spacing: -.03em; line-height: 1; color: var(--ink); }
.plan-price span { font-size: var(--fs-sm); color: var(--ink-3); }
.plan-month { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; padding: .55rem .75rem; border-radius: 10px; background: var(--paper-2); font-size: var(--fs-sm); color: var(--ink-2); }
.plan-month b { color: var(--ink); }
.plan-save { margin-left: auto; padding: .18rem .5rem; border-radius: 999px; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: var(--fs-xs); }
.plan-feats { list-style: none; margin: 0; padding: .2rem 0 0; display: grid; gap: 0; flex: 1; align-content: start; font-size: var(--fs-sm); }
.plan-feats li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .6rem 0; border-bottom: 1px dashed var(--line); color: var(--ink); }
.plan-feats li:last-child { border-bottom: 0; }
.plan-feats li b { font-weight: 700; white-space: nowrap; }
.plan-feats li i { font-style: normal; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft); color: var(--green); }
.plan-feats li i .ni { width: 13px; height: 13px; }
.plan-feats li.off { color: var(--ink-4); }
.plan-feats li.off span { text-decoration: line-through; text-decoration-color: var(--line); }
.plan-feats li.off i { background: transparent; color: var(--ink-4); }
.plan-renew { margin: -.3rem 0 0; text-align: center; font-size: var(--fs-xs); color: var(--ink-3); }
.plan-common { max-width: 1040px; margin: 2.2rem auto 0; padding: 1.3rem 1.5rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.plan-common h2 { font: 700 .72rem/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 1rem; }
.plan-common ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem 1.4rem; font-size: var(--fs-sm); color: var(--ink); }
.plan-common li { display: flex; align-items: center; gap: .55rem; }
.plan-common .ni { width: 18px; height: 18px; flex: none; color: var(--pen); }
.plan-free { max-width: 1040px; margin: 1.2rem auto 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.6rem; flex-wrap: wrap; padding: 1.1rem 1.5rem; border: 1.5px dashed var(--line); border-radius: var(--r); }
.plan-free > div { display: flex; flex-direction: column; gap: .2rem; }
.plan-free span { font-size: var(--fs-sm); color: var(--ink-2); }
.plan-free.current { border-color: var(--green); }
.compare-box { max-width: 1040px; margin: 0 auto; }
.compare-box summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.compare-box summary::-webkit-details-marker { display: none; }
.compare-box summary > span:first-child { display: flex; flex-direction: column; gap: .45rem; }
.compare-box summary strong { font-family: var(--f-serif); font-size: var(--fs-xl); font-weight: 500; }
.compare-chev .ni { width: 22px; height: 22px; transition: transform .2s; }
.compare-box[open] .compare-chev .ni { transform: rotate(180deg); }
.compare-box[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: transparent; }
.compare-box .table-wrap { border-top-left-radius: 0; border-top-right-radius: 0; }
@media (max-width: 960px) {
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 480px; gap: 1.8rem; }
  .plan-common ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .plan-common ul { grid-template-columns: minmax(0, 1fr); }
  .plan-free .btn { width: 100%; }
  .plan-facts { flex-direction: column; align-items: flex-start; width: fit-content; }
}
.section-tight { padding-block: clamp(2.2rem, 5vw, 3.4rem); }
.mns-card h2 { font-size: var(--fs-xl); }
.plans-head p { max-width: 54ch; }
.retract-box { border-left: 3px solid var(--pen); }
.retour-box { border-left: 3px solid var(--green); }
.retour-band { margin-bottom: 1rem; }
/* Espace maîtres-nageurs */
.mns-tools .ico-lg { display: inline-flex; width: 2.4rem; height: 2.4rem; align-items: center; justify-content: center; border-radius: 50%; background: var(--pen-soft); color: var(--pen); }
.mns-tools .ico-lg svg { width: 1.3rem; height: 1.3rem; }
.mns-tools h3 { font-size: var(--fs-lg); }
.mns-offer h2 { font-size: var(--fs-2xl); }
@media (max-width: 760px) { .mns-tools { grid-template-columns: 1fr; } }
.co-retour { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; align-items: baseline; }
.co-retour s { color: var(--ink-3); }
.retract-note { margin: 0; }
.co-retract { margin: 0; padding: .6rem .8rem; border-radius: 10px; background: var(--paper-2); }

/* ---------- Accueil : aperçu des tarifs ---------- */
#home-offers > .card { align-items: center; text-align: center; --gap: .85rem; padding: 2rem 1.5rem 1.8rem; }
#home-offers > .card h3 { width: 100%; }
#home-offers > .card .price { justify-content: center; margin-top: .2rem; }
.ho-month { margin: -.35rem 0 0; font-size: .8rem; font-style: italic; color: var(--ink-3); }
.ho-list { list-style: none; margin: .6rem 0 0; padding: 1.1rem 0 0; width: 100%; border-top: 1px dashed var(--line); display: grid; gap: .65rem; font-size: var(--fs-sm); color: var(--ink-2); }
#home-offers { gap: 1.4rem; }
.ho-star { align-self: flex-start; margin-left: .1rem; font-size: 1.1rem; line-height: 1; color: var(--ink-3); }
.ho-note { margin: 1.2rem 0 0; font-size: .8rem; font-style: italic; color: var(--ink-3); }

/* Auto-évaluation (journal) : 5 choix sur une ligne, 3 + 2 sur téléphone */
.seg.seg-eval { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.seg.seg-eval span { font-size: var(--fs-xs, .78rem); text-align: center; line-height: 1.2; }
@media (max-width: 540px) {
  .seg.seg-eval { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .seg.seg-eval label:nth-child(4) span { border-left: 0; }
  .seg.seg-eval label:nth-child(n+4) span { border-top: 1px solid var(--line); }
}
