/*
 * Thème : `color-scheme` choisit la valeur de chaque `light-dark(clair, sombre)`. Par défaut celui
 * du système / navigateur ; `<html data-theme="light|dark">` impose le choix de l'utilisateur.
 */
:root {
  --bg: light-dark(#ffffff, #0b0d12);
  --bg-alt: light-dark(#f6f7fb, #11141b);
  --surface: light-dark(#ffffff, #151821);
  --text: light-dark(#111827, #f3f4f6);
  --muted: light-dark(#5b6472, #9ca3af);
  --border: light-dark(#e5e7eb, #242a36);
  --primary: light-dark(#4f46e5, #818cf8);
  --primary-hover: light-dark(#4338ca, #a5b4fc);
  --primary-soft: light-dark(#eef2ff, #1d1f3a);
  --on-primary: light-dark(#ffffff, #0b0d12);
  --accent: light-dark(#0f766e, #5eead4);
  --best: light-dark(#047857, #34d399);
  --best-soft: light-dark(#ecfdf5, #0f2a22);
  --error: light-dark(#b91c1c, #f87171);
  --success: light-dark(#047857, #34d399);
  --shadow: 0 10px 30px light-dark(rgb(17 24 39 / 8%), rgb(0 0 0 / 45%));
  --radius: 12px;
  color-scheme: light dark;
}

:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark'] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
/* `hidden` l'emporte sur les `display` des classes */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  /* `clip` : rien ne dépasse en largeur (formes du haut de page en 100vw), sans conteneur de défilement */
  overflow-x: clip;
}

main { flex: 1; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
h3, .h3 { font-size: 1.1rem; margin: 0 0 8px; }
img, svg { max-width: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.small { font-size: 0.85rem; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.3rem; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.logo-mark { color: var(--primary); flex: none; }
/* Yeux de Sacha « découpés » : blancs sur l'indigo du thème clair, sombres sur l'indigo clair du thème sombre */
.logo-eyes { fill: var(--on-primary); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current='page'] { color: var(--primary); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.nav-mobile { display: none; }

/* Menus de l'en-tête (langue, thème, menu mobile) : <details> + header-menus.js */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.menu-button-icon { justify-content: center; width: 40px; padding: 0; }
.menu-button:hover, .menu[open] > .menu-button { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.menu-button:focus-visible, .menu-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.menu-button .icon-chevron { transition: transform 0.2s; }
.menu[open] > .menu-button .icon-chevron { transform: rotate(180deg); }
.menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 2px;
  min-width: 200px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transform-origin: top right;
  animation: menu-in 0.18s ease-out;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(0.97); } }
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}
.menu-item:hover { background: var(--primary-soft); color: var(--primary); }
.menu-item > span:not(.menu-code-pill) { flex: 1; }
.menu-item .icon-tick { visibility: hidden; color: var(--primary); }
.menu-item[aria-current='true'], .menu-item[aria-pressed='true'] { font-weight: 600; }
.menu-item[aria-current='true'] .icon-tick, .menu-item[aria-pressed='true'] .icon-tick { visibility: visible; }
.menu-code-pill {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.menu-item[aria-current='true'] .menu-code-pill { background: var(--primary); color: var(--on-primary); }
/* Icône du thème : celle de la préférence choisie, changée avec une rotation */
.theme-icons { display: grid; }
.theme-icons > span { grid-area: 1 / 1; display: grid; transition: opacity 0.25s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.theme-icons:not([data-theme-current='auto']) > [data-theme-icon='auto'],
.theme-icons:not([data-theme-current='light']) > [data-theme-icon='light'],
.theme-icons:not([data-theme-current='dark']) > [data-theme-icon='dark'] { opacity: 0; transform: rotate(-90deg) scale(0.5); }

@media (max-width: 820px) {
  .nav-desktop { display: none; }
  .nav-mobile { display: block; }
  .menu-button { height: 44px; }
  .menu-button-icon { width: 44px; }
  .nav-burger, .nav-burger::before, .nav-burger::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; content: ''; transition: transform 0.2s, background 0.2s; }
  .nav-burger { position: relative; }
  .nav-burger::before { position: absolute; top: -6px; }
  .nav-burger::after { position: absolute; top: 6px; }
  .nav-mobile[open] .nav-burger { background: transparent; }
  .nav-mobile[open] .nav-burger::before { transform: translateY(6px) rotate(45deg); }
  .nav-mobile[open] .nav-burger::after { transform: translateY(-6px) rotate(-45deg); }
  .nav-mobile { position: static; }
  .nav-mobile .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    animation: menu-in 0.18s ease-out;
  }
  .nav-mobile .nav-links a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--border); }
  .nav-mobile .nav-links .btn { margin-top: 12px; }
}
@media (max-width: 420px) {
  .locale-menu .icon-chevron { display: none; }
  .nav-tools { gap: 6px; }
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-small { padding: 7px 14px; font-size: 0.9rem; }
.btn-icon { flex: none; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.install-note { margin: 10px 0 0; color: var(--muted); font-size: 0.9rem; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: ' →'; }
.link-arrow:hover { text-decoration: underline; }

/*
 * Extension installée dans ce navigateur : elle pose elle-même `<html data-trakrio-extension>` (dès le
 * début du chargement, pas de clignotement). Sans elle (ni sans script), la version « à installer »
 * reste affichée (docs/site-extension.md).
 */
html:not([data-trakrio-extension]) [data-ext='present'],
html[data-trakrio-extension] [data-ext='absent'] { display: none !important; }
.installed-cta { align-items: center; }
.center-cta { justify-content: center; margin-top: 16px; }
.installed-badge { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--best-soft); color: var(--text); font-weight: 600; font-size: 0.95rem; }
.installed-badge .icon-check { margin: 0; }
.install-cta-small .installed-badge { font-size: 0.85rem; padding: 4px 12px; }
.step-done { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; vertical-align: middle; color: var(--best); font-size: 0.8rem; font-weight: 600; letter-spacing: 0; }
.step-done .icon-check { margin: 0; width: 16px; height: 16px; }
/* Panneau non ouvert par le navigateur (Firefox) : quoi faire (extension-link.js), en bas de l'écran */
.trakrio-hint { position: fixed; inset-inline: 16px; bottom: 16px; z-index: 50; max-width: 520px; margin: 0 auto; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.trakrio-hint:empty { display: none; }

/* Sections */
.section { padding: 72px 0; }
.section-tight { padding: 24px 0 48px; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); text-align: center; margin: 0 auto 40px; max-width: 760px; }
.eyebrow { margin: 0 0 12px; color: var(--primary); font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; }
.eyebrow a { color: inherit; text-decoration: none; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 0 28px; }
.center .lead, .lead.center { margin-inline: auto; }
.center .cta { justify-content: center; }
.page-head { padding: 64px 0 32px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 16px; }
.page-head.center .lead { margin-inline: auto; }

/* Héros : texte + démo du panneau */
.hero { padding: 72px 0 56px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 20px; }
.hero h1 .accent { color: var(--primary); }
.hero-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: center; }
.hero-split .site-sacha.coach-says { margin: 32px 0 0; }
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding-top: 48px; }
}

/* Grilles et cartes */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; gap: 14px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.card-plain { gap: 6px; }
.card-plain p, .card-link p { margin: 0; color: var(--muted); }
.card h2, .card h3 { margin: 0; }
.card-plain h3, .card-plain .h3 { display: flex; gap: 8px; align-items: flex-start; }
.card-link { gap: 10px; color: inherit; text-decoration: none; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.card-link:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .card-link:hover { transform: none; } }
.card-link .link-arrow { margin-top: auto; color: var(--primary); }
.card-kicker { color: var(--primary); font-weight: 700; font-size: 0.85rem; }
.icon-check { flex: none; margin-top: 2px; color: var(--best); }
/* Icône d'une carte (card-icons.ts) : ce dont la carte parle, au-dessus de son titre */
.card-icon { display: inline-grid; flex: none; place-items: center; width: 44px; height: 44px; margin-bottom: 8px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.card-icon-muted { background: var(--bg-alt); color: var(--muted); }

/* Bandeau de garanties */
.trust-strip { border-block: 1px solid var(--border); background: var(--bg-alt); }
.trust-strip ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; margin: 0 auto; padding: 18px 0; list-style: none; font-weight: 500; }
.trust-strip li { display: inline-flex; align-items: center; gap: 8px; }

/* Fonctionnalités avec démo */
.feature-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; margin-bottom: 64px; }
.feature-row-reverse .feature-text { order: 2; }
.feature-text h3 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
.feature-text p { color: var(--muted); font-size: 1.05rem; }
@media (max-width: 900px) {
  .feature-row { grid-template-columns: 1fr; gap: 24px; }
  .feature-row-reverse .feature-text { order: 0; }
}
.feature-cards { margin-top: 16px; }
/* Parcours (faux site + panneau) : texte centré au-dessus, démo sur toute la largeur */
.feature-row-wide { grid-template-columns: minmax(0, 1fr); gap: 28px; }
.feature-row-wide .feature-text { max-width: 720px; margin-inline: auto; text-align: center; }
.hero-demo-wide { margin-top: 40px; }

/* Démos interactives (shadow root rempli par /assets/js/demo/trakrio-demo.js) */
.demo { margin: 0 auto; width: 100%; max-width: 440px; }
.demo.demo-journey { max-width: 1080px; }
/* L'hôte ne défile pas et n'a pas de cadre : la démo a le sien et défile dedans (sinon deux barres) */
.trakrio-demo { display: block; min-height: 120px; }
.demo-fallback { margin: 0; padding: 40px 24px; color: var(--muted); text-align: center; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
/* Place réservée à la démo avant son montage (le texte de repli n'est plus rendu une fois la racine
   fantôme attachée) : hauteur mesurée de chaque démo, pour que la page ne saute pas (CLS) */
.trakrio-demo .demo-fallback { display: grid; place-items: center; min-height: 640px; }
.demo-applications .demo-fallback { min-height: 600px; }
.demo-journey .demo-fallback { min-height: 650px; }
@media (max-width: 760px) { .demo-journey .demo-fallback { min-height: 850px; } }
.demo figcaption { margin-top: 10px; color: var(--muted); font-size: 0.8rem; text-align: center; }

/* Étapes numérotées */
.steps-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps-grid li { position: relative; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); counter-increment: step; }
.steps-grid li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}
.steps-grid p { margin: 0; color: var(--muted); }
@media (max-width: 900px) { .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.steps-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .steps-grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .steps-grid { grid-template-columns: 1fr; } }

/* Tarifs : la formule gratuite est mise en avant */
.ribbon {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--best);
  color: light-dark(#ffffff, #0b0d12);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.card-highlight { position: relative; align-items: flex-start; border: 2px solid var(--best); background: var(--best-soft); }
.pricing-teaser .card-highlight { max-width: 960px; margin-inline: auto; }
.pricing-teaser p { margin: 0; }
/* Offre gratuite en trois temps (accueil) */
.offer-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; width: 100%; margin: 8px 0 0; padding: 0; list-style: none; counter-reset: offer; }
.offer-steps li { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.offer-steps h3 { margin: 0; font-size: 1.1rem; }
.offer-steps li p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 760px) { .offer-steps { grid-template-columns: 1fr; } }
.offer-icon { display: inline-grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--best-soft); color: var(--best); }
.offer-steps .offer-icon { background: var(--primary-soft); color: var(--primary); }
.offer-steps li:first-child .offer-icon { background: var(--best-soft); color: var(--best); }
.offer-actions { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.offer-actions .install-cta { margin: 0; }
.pricing-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; max-width: 880px; }
@media (max-width: 680px) { .pricing-grid { grid-template-columns: 1fr; } }
.plan { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.plan h2 { margin: 0; font-size: 1.15rem; }
.plan-best { border: 2px solid var(--best); background: var(--best-soft); box-shadow: var(--shadow); }
.plan-best .btn { background: var(--best); border-color: var(--best); color: light-dark(#ffffff, #0b0d12); }
.plan-best .btn:hover { filter: brightness(1.08); }
.plan-price { margin: 0; color: var(--muted); }
.plan-price strong { color: var(--text); font-size: 2rem; letter-spacing: -0.02em; }
.plan-highlight { margin: 0; font-weight: 700; color: var(--best); }
.plan-sub { margin: 0; min-height: 1.4em; color: var(--muted); font-size: 0.9rem; }
.plan-note { margin: 0; color: var(--muted); font-size: 0.85rem; }
.plan-list-title { margin: 8px 0 0; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.check-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.check-list li { display: flex; gap: 8px; align-items: flex-start; }
/* Carte Illimité unique : période choisie par radios, bloc de prix affiché selon la case cochée (sans script) */
.plan-unlimited { border-color: var(--primary); }
.ribbon-alt { background: var(--primary); color: var(--on-primary); }
.period-switch { display: flex; gap: 4px; margin: 0; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); }
.period-switch label { flex: 1 1 0; display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; justify-content: center; min-height: 36px; padding: 4px 8px; border-radius: 999px; color: var(--muted); font-size: 0.9rem; font-weight: 600; text-align: center; cursor: pointer; }
.period-switch label:hover { color: var(--text); }
.period-switch input:checked + label { background: var(--primary); color: var(--on-primary); }
.period-switch input:focus-visible + label { outline: 2px solid var(--primary); outline-offset: 2px; }
.period-savings { padding: 0 6px; border-radius: 999px; background: var(--best-soft); color: var(--best); font-size: 0.75rem; }
.period-switch input:checked + label .period-savings { background: var(--surface); }
.plan-period { display: none; }
.plan-unlimited:has(#period-week:checked) [data-period="week"],
.plan-unlimited:has(#period-month:checked) [data-period="month"],
.plan-unlimited:has(#period-quarter:checked) [data-period="quarter"] { display: block; }
/* Navigateur sans :has() : tous les prix restent visibles */
@supports not selector(:has(*)) { .plan-period { display: block; } }
.plan-period .plan-sub { margin-top: 4px; }
.plan-trial { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--best); font-size: 0.92rem; }
.plan-trial .icon { flex: none; color: var(--best); }
.plan-trial strong { display: block; color: var(--best); font-size: 1rem; }
.cancel-note { display: flex; gap: 10px; align-items: center; justify-content: center; max-width: 820px; margin: 24px auto 0; font-weight: 600; }
.cancel-note .icon { flex: none; color: var(--best); }
.referral-card { flex-direction: row; gap: 20px; align-items: flex-start; max-width: 960px; margin-inline: auto; border-color: var(--best); }
.referral-card h2, .referral-card p { margin: 0 0 8px; text-align: left; }
.referral-card p:last-child { margin-bottom: 0; }
.pricing-teaser .referral-card, .referral-section { margin-top: 24px; }
.referral-note { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 600px) { .referral-card { flex-direction: column; } }

/* Tableaux */
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child th, .table tr:last-child td { border-bottom: 0; }
.table thead th { background: var(--bg-alt); font-size: 0.85rem; color: var(--muted); }
.table tbody th { font-weight: 600; }
.card .table th, .card .table td { padding: 8px 0; }
.table tbody + tbody .table-group th { padding-top: 20px; }
.table .table-group th { color: var(--muted); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* FAQ */
.faq-list { display: grid; gap: 10px; margin-bottom: 24px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.faq-item summary { padding: 16px 20px; font-weight: 600; cursor: pointer; }
.faq-item p { margin: 0; padding: 0 20px 18px; color: var(--muted); }
.faq-group { margin: 32px 0 12px; }

/* Appel final */
.final-cta { background: linear-gradient(135deg, var(--primary-soft), var(--best-soft)); border-top: 1px solid var(--border); }
.final-cta h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin: 0 0 12px; }
.final-cta .install-note { text-align: center; }

/* Page d'installation */
.browser-card { align-items: flex-start; }
.browser-card > .btn-icon { width: 40px; height: 40px; color: var(--primary); }

/* Pied de page */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 24px; color: var(--muted); font-size: 0.9rem; background: var(--bg-alt); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-grid h2 { margin: 0 0 12px; font-size: 0.85rem; color: var(--text); text-transform: uppercase; letter-spacing: 0.06em; }
.footer-grid ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.footer-grid a:not(.btn):not(.logo) { color: inherit; text-decoration: none; }
.footer-grid a:not(.btn):not(.logo):hover { color: var(--text); text-decoration: underline; }
.footer-brand p { margin: 10px 0 16px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid var(--border); }
.footer-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 16px; }
.legal-nav a { color: inherit; }
.language-switch { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.language-switch a { color: var(--muted); text-decoration: none; }
.language-switch a:hover { color: inherit; text-decoration: underline; }
.language-switch a[aria-current] { color: var(--text); font-weight: 600; }

/* Pages simples (connecteur mail, paiement…) */
.auth { max-width: 440px; padding: 64px 0; }
.auth h1 { text-align: center; }
.muted { color: var(--muted); }
.card .muted { font-size: 0.9rem; margin: 0; text-align: center; }

/* Pages légales (mentions légales, confidentialité, CGU) */
.legal-page { max-width: 760px; padding: 48px 0 64px; line-height: 1.6; }
.legal-page h2 { font-size: 1.15rem; margin-top: 32px; }
.legal-page ul { padding-left: 20px; }
.legal-page li + li { margin-top: 8px; }
.legal-page a { overflow-wrap: anywhere; }
.legal-intro { color: var(--muted); }

/* Sacha, le coach de l'extension : styles et animations dans sacha.css, généré depuis l'extension ;
   ici, les jetons du panneau qu'il attend et sa place dans la page. */
.site-sacha {
  --surface: light-dark(#ffffff, #171a21);
  --surface-2: light-dark(#f1f3f8, #1e222b);
  --error-soft: light-dark(#fdecec, #3a1c1f);
  --warning: light-dark(#b45309, #fbbf24);
  --shadow-lg: 0 -4px 16px light-dark(rgb(16 24 40 / 10%), rgb(0 0 0 / 40%));
  --job-color-1: light-dark(#2a78d6, #3987e5);
  --job-color-2: light-dark(#eb6834, #d95926);
  --job-color-3: light-dark(#1baf7a, #199e70);
  --job-color-4: light-dark(#eda100, #c98500);
  --job-color-5: light-dark(#e87ba4, #d55181);
  --job-color-6: light-dark(#008300, #008300);
  --job-color-7: light-dark(#4a3aa7, #9085e9);
  --job-color-8: light-dark(#e34948, #e66767);
}
.site-sacha.coach-says { max-width: 520px; margin: 0 auto 32px; text-align: left; }
.site-sacha .coach-avatar { width: 64px; height: 64px; }
.site-sacha .coach-bubble { margin: 0; padding: 12px 16px; }
.site-sacha-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}
.site-sacha-alone { display: flex; justify-content: center; margin-bottom: 24px; }
.site-sacha-alone .coach-avatar { width: 96px; height: 96px; }
.hero:not(.hero-split) { text-align: center; }
.hero:not(.hero-split) .lead { margin-inline: auto; }
.hero:not(.hero-split) .cta { justify-content: center; }
.auth .site-sacha.coach-says { margin: 0; }
.auth .site-sacha .coach-avatar { width: 56px; height: 56px; }
.auth .site-sacha-alone { margin-bottom: 0; }
.auth .site-sacha-alone .coach-avatar { width: 80px; height: 80px; }

/* Page du connecteur mail (views/pages/mail-connector.eta) */
.auth.mail-connector { max-width: 640px; }
.mail-connector h2 { margin: 8px 0 0; font-size: 1.1rem; }
.mail-connector ul, .mail-connector ol { margin: 0; padding-left: 1.2em; }
.mail-connector li { margin-bottom: 6px; }
.mail-connector .download-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.mail-connector code { padding: 1px 6px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.85em; overflow-wrap: anywhere; }

/* Invitation d'un code de parrainage (pages/referral.eta) */
.referral-invite { display: flex; flex-direction: column; align-items: center; }
.referral-code-card { align-items: center; margin: 0 auto 32px; max-width: 420px; width: 100%; }
.referral-code {
  padding: 6px 16px;
  border: 1px dashed var(--primary);
  border-radius: var(--radius);
  color: var(--primary);
  font: 700 clamp(1.6rem, 6vw, 2.2rem) / 1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.15em;
  user-select: all;
  overflow-wrap: anywhere;
}
.referral-steps { max-width: 560px; margin: 0 auto 24px; text-align: start; }
.referral-steps h2 { font-size: 1.15rem; }
.referral-steps ol { display: grid; gap: 8px; padding-inline-start: 22px; }

/*
 * Animations (« vivant mais léger », dev 2026-10-07). Sans JavaScript : apparitions au défilement
 * en CSS (`animation-timeline: view()`, ignoré par les navigateurs qui ne le gèrent pas : le contenu
 * est alors simplement affiché), le contenu reste toujours dans la page (robots, SEO, pas de
 * décalage de mise en page). Seuls `transform` / `opacity` bougent, et tout est coupé sous
 * `prefers-reduced-motion: reduce` (aucune règle animée hors des blocs `no-preference`).
 */
.hero, .page-head { position: relative; isolation: isolate; }
.page-head .hero-blobs span { opacity: 0.2; }
.hero-blobs { position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1; overflow: hidden; pointer-events: none; mask-image: linear-gradient(to bottom, #000 60%, transparent); }
.hero-blobs span { position: absolute; width: 42vmax; height: 42vmax; border-radius: 50%; filter: blur(70px); opacity: 0.35; }
.hero-blobs span:nth-child(1) { top: -18vmax; left: -8vmax; background: radial-gradient(circle, var(--primary), transparent 65%); }
.hero-blobs span:nth-child(2) { top: -6vmax; right: -14vmax; background: radial-gradient(circle, var(--accent), transparent 65%); opacity: 0.25; }
.hero-blobs span:nth-child(3) { bottom: -20vmax; left: 30%; width: 30vmax; height: 30vmax; background: radial-gradient(circle, var(--best), transparent 65%); opacity: 0.18; }
.hero h1 .accent {
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 28%) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}
.steps-grid li::before { background: linear-gradient(135deg, var(--primary), var(--accent)); color: var(--on-primary); }
.card-plain { transition: border-color 0.2s, box-shadow 0.2s; }
.card-plain:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); box-shadow: var(--shadow); }
.faq-item summary { display: flex; justify-content: space-between; gap: 16px; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
  transition: transform 0.25s;
}
.faq-item[open] summary::after { transform: translateY(4px) rotate(-135deg); }
.final-cta { background: linear-gradient(120deg, var(--primary-soft), var(--best-soft), var(--primary-soft)); background-size: 200% 200%; }
.final-cta .site-sacha-alone .coach-avatar { width: 88px; height: 88px; }

@media (prefers-reduced-motion: no-preference) {
  .hero-blobs span { animation: blob-drift 22s ease-in-out infinite alternate; }
  .hero-blobs span:nth-child(2) { animation-duration: 28s; animation-direction: alternate-reverse; }
  .hero-blobs span:nth-child(3) { animation-duration: 34s; }
  .hero h1 .accent { animation: accent-shift 8s ease-in-out infinite alternate; }
  .hero-text > * { animation: rise-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .hero-text > :nth-child(2) { animation-delay: 0.08s; }
  .hero-text > :nth-child(3) { animation-delay: 0.16s; }
  .hero-text > :nth-child(4) { animation-delay: 0.24s; }
  .hero-text > :nth-child(n + 5) { animation-delay: 0.32s; }
  .hero-demo { animation: rise-in 0.9s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .hero-demo .demo { animation: float 7s 1.2s ease-in-out infinite; }
  .hero-demo:hover .demo, .hero-demo:focus-within .demo { animation-play-state: paused; }
  /* Le parcours a sa propre animation (souris) : il ne flotte pas */
  .hero-demo-wide .demo { animation: none; }
  .hero .site-sacha .coach-bubble { animation: bubble-pop 0.5s 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both; transform-origin: left center; }

  .btn { transition: background 0.15s, border-color 0.15s, transform 0.2s, box-shadow 0.2s; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 28%, transparent); }
  .btn:active { transform: translateY(0); }
  .btn:hover::after { transform: translateX(120%); transition: transform 0.7s ease; }
  .card-plain { transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
  .card-plain:hover { transform: translateY(-3px); }
  .logo:hover .logo-mark { animation: wiggle 0.5s ease; }
  .final-cta { animation: accent-shift 14s ease-in-out infinite alternate; }

  /* FAQ : ouverture animée là où `::details-content` existe */
  .faq-item { interpolate-size: allow-keywords; }
  .faq-item::details-content { block-size: 0; overflow: hidden; transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete; }
  .faq-item[open]::details-content { block-size: auto; }

  @supports (animation-timeline: view()) {
    .section-title, .section .card, .section .plan, .feature-row > *, .steps-grid li, .faq-item,
    .final-cta .container > *, .page-head > *, .guide-body > *, .trust-strip li {
      animation: reveal-up linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    .grid > :nth-child(3n + 2), .steps-grid li:nth-child(2n), .trust-strip li:nth-child(2n) { animation-range: entry 8% entry 65%; }
    .grid > :nth-child(3n), .steps-grid li:nth-child(3) { animation-range: entry 16% entry 75%; }
    .steps-grid li::before { animation: pop-in linear both; animation-timeline: view(); animation-range: entry 20% entry 80%; }
    .feature-row > .demo { animation-name: reveal-scale; }
  }
}

@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } }
@keyframes reveal-up { from { opacity: 0; transform: translateY(32px); } }
@keyframes reveal-scale { from { opacity: 0; transform: translateY(24px) scale(0.94); } }
@keyframes pop-in { 0% { transform: scale(0.3) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.15) rotate(6deg); opacity: 1; } }
@keyframes bubble-pop { from { opacity: 0; transform: scale(0.85) translateX(-8px); } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes blob-drift { to { transform: translate(6vmax, 4vmax) scale(1.15); } }
@keyframes accent-shift { to { background-position: 100% 50%; } }
@keyframes wiggle { 25% { transform: rotate(-12deg); } 75% { transform: rotate(10deg); } }

/* Guides (pages/guides.eta, pages/guide.eta) */
.guides-group-title { font-size: 1.3rem; margin: 24px 0 16px; }
.guides-all { margin-top: 28px; }
.section-title + .lead.center { margin-top: -24px; margin-bottom: 36px; }
.guide-card h3 { font-size: 1.15rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; color: var(--muted); font-size: 0.9rem; }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }
.guide-meta { margin: -12px 0 0; color: var(--muted); font-size: 0.9rem; }
.guide-layout { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: 56px; justify-content: center; padding-bottom: 64px; }
.guide-toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-alt); font-size: 0.9rem; }
.guide-toc-title { margin: 0 0 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; color: var(--muted); }
.guide-toc ol { display: grid; gap: 8px; margin: 0; padding-left: 18px; }
.guide-toc a { color: var(--text); text-decoration: none; }
.guide-toc a:hover { color: var(--primary); }
@media (max-width: 960px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .guide-toc { position: static; max-height: none; }
}
.guide-body { font-size: 1.05rem; line-height: 1.75; }
.guide-body > h2 { margin: 48px 0 12px; font-size: clamp(1.35rem, 3vw, 1.7rem); scroll-margin-top: 88px; }
.guide-body > h2:first-child { margin-top: 0; }
.guide-body > h3 { margin: 28px 0 8px; font-size: 1.15rem; }
.guide-body ul, .guide-body ol { padding-left: 1.3em; }
.guide-body li + li { margin-top: 6px; }
.guide-body li::marker { color: var(--primary); font-weight: 700; }
.guide-body .faq-list { font-size: 1rem; }
.guide-tip { position: relative; margin: 24px 0; padding: 18px 20px 18px 64px; border-radius: var(--radius); background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); }
.guide-tip::before { content: '💡'; position: absolute; left: 20px; top: 16px; font-size: 1.5rem; }
.guide-tip-label { display: block; font-weight: 700; color: var(--primary); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.guide-tip p { margin: 4px 0 0; }
.guide-example { margin: 24px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.guide-example figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--bg-alt); font-weight: 600; font-size: 0.95rem; }
.guide-example pre { margin: 0; padding: 18px 20px; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 0.98rem; line-height: 1.65; }
.guide-cta { margin: 32px 0; padding: 22px 24px; border-radius: var(--radius); border: 2px solid var(--best); background: var(--best-soft); }
.guide-cta-title { margin: 0 0 4px; font-weight: 800; font-size: 1.1rem; }
.guide-cta p { margin: 0 0 8px; }
.table-wrap { margin: 24px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.guide-body .table { font-size: 0.95rem; }
.guide-sources { font-size: 0.9rem; color: var(--muted); }
.guide-sources a { overflow-wrap: anywhere; }
.guide-sources-title { font-size: 1.15rem !important; }

/* Visite des fonctionnalités (pages/features.eta, js/feature-tour.js) : rail collant dont le trait se
   remplit au défilement (--tour-progress) ; sur mobile, barre de puces collante + fine barre de progression */
.feature-tour { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; padding-bottom: 72px; }
.tour-rail { position: sticky; top: 96px; align-self: start; }
.tour-rail ol { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.tour-rail::before, .tour-progress { position: absolute; top: 18px; bottom: 18px; left: 17px; width: 2px; border-radius: 2px; content: ''; }
.tour-rail::before { background: var(--border); }
.tour-progress { background: var(--primary); transform: scaleY(var(--tour-progress, 0)); transform-origin: top; }
.tour-link { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 500; text-decoration: none; }
.tour-link:hover { color: var(--text); }
.tour-dot { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--muted); }
.tour-link[aria-current] { color: var(--text); font-weight: 700; }
.tour-link[aria-current] .tour-dot { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.tour-steps { container-type: inline-size; }
.tour-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 40px; align-items: start; padding: 48px 0; border-top: 1px solid var(--border); scroll-margin-top: 80px; }
.tour-step:first-child { padding-top: 0; border-top: 0; }
.tour-step-wide { grid-template-columns: minmax(0, 1fr); }
.tour-step-wide .demo { max-width: none; }
.tour-position { margin: 0 0 6px; color: var(--primary); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.tour-text h2 { margin: 0 0 12px; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.tour-lead { margin: 0 0 20px; color: var(--muted); font-size: 1.05rem; }
.tour-points { display: grid; gap: 14px; margin: 0 0 20px; padding: 0; list-style: none; }
.tour-points li { display: flex; gap: 14px; align-items: flex-start; }
.tour-points .card-icon { width: 38px; height: 38px; margin: 0; border-radius: 10px; }
.tour-points span:last-child { color: var(--muted); }
.tour-points strong { color: var(--text); }
@container (max-width: 760px) {
  .tour-step { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 960px) {
  .feature-tour { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  /* Barre de puces sous l'en-tête (64 px), sur toute la largeur */
  .tour-rail { top: 64px; z-index: 5; margin-inline: -16px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
  .tour-rail ol { display: flex; gap: 8px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; }
  .tour-rail::before { display: none; }
  .tour-progress { top: auto; right: 0; bottom: -1px; left: 0; width: auto; height: 3px; border-radius: 0; transform: scaleX(var(--tour-progress, 0)); transform-origin: left; }
  .tour-link { flex: none; gap: 6px; padding: 6px 12px 6px 6px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 0.9rem; white-space: nowrap; }
  .tour-dot { width: 26px; height: 26px; border: 0; background: var(--bg-alt); }
  .tour-link[aria-current] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
  .tour-step { scroll-margin-top: 136px; }
}

/* Onglets des pages de fonctionnalité (partials/feature-tabs.eta), collants sous l'en-tête */
.feature-tabs { position: sticky; top: 64px; z-index: 9; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
/* Plus large que .container : les 6 onglets tiennent sur une ligne dès ~1200 px (au-delà, retour à la ligne) */
.feature-tabs-inner { display: flex; align-items: center; gap: 12px; width: min(1320px, 100% - 32px); }
.feature-tabs-count { flex: none; padding: 2px 10px; border-radius: 999px; background: var(--bg-alt); color: var(--muted); font-size: 0.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.feature-tabs-list { display: flex; flex-wrap: wrap; gap: 2px; min-width: 0; margin: 0; padding: 8px 4px; list-style: none; }
.feature-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; color: var(--muted); font-size: 0.875rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.feature-tab:hover { color: var(--text); background: var(--bg-alt); }
.feature-tab[aria-current='page'] { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
/* Mobile : une ligne qui défile en largeur (l'onglet courant y est ramené par js/feature-tour.js) */
@media (max-width: 820px) { .feature-tabs-list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } }

/* Précédente / Suivante en bas d'une page de fonctionnalité */
.feature-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.feature-pager-link { display: grid; gap: 4px; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color 0.15s; }
.feature-pager-link:hover { border-color: var(--primary); }
.feature-pager-next { text-align: right; }
.feature-pager-dir { color: var(--primary); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.feature-pager-name { font-size: 1.15rem; font-weight: 700; }
@media (max-width: 640px) { .feature-pager { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: no-preference) {
  .tour-progress { transition: transform 0.15s linear; }
  .tour-dot { transition: background 0.2s, color 0.2s, border-color 0.2s; }
  @supports (animation-timeline: view()) {
    .tour-step > * { animation: reveal-up linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
  }
}
