/* ============================================================
   PARCOURS PRIMAIRE — démo Agriculteur · design-system PACIFIK'AI
   Tokens : cdc/registre.ndjson#NAV-02 + .design/design.html
   Contrainte : perf <500KB, 0 lib motion, mobile-first (TEC-04)
   Interdits : radius arche · personnes IA · cookie banner
   ============================================================ */
:root {
  /* Filières (NAV-02, non négociable) */
  --mer: #1B6FA8;      --mer-tint: #EAF4FB;
  --terre: #2c6b3a;    --terre-tint: #EEF7EF;  --terre-bright: #3E8E4F;
  --transfo: #E08A2E;  --transfo-tint: #FDF1E1;
  /* Socle */
  --ink: #123B57;         /* bleu profond — texte */
  --ink-soft: #4a6d84;
  --paper: #FBF6EC;       /* crème — fond */
  --paper-2: #fffdf8;
  --hibiscus: #E85A6A;    /* accent chaud */
  --line: #e6ddca;
  --shadow: 0 1px 2px rgba(18,59,87,.06), 0 8px 24px -12px rgba(18,59,87,.18);
  --shadow-lg: 0 2px 4px rgba(18,59,87,.05), 0 24px 48px -20px rgba(18,59,87,.28);
  /* Filière active (par défaut Terre = Agriculteur) */
  --accent: var(--terre);
  --accent-tint: var(--terre-tint);
  --radius: 14px;        /* 4 coins symétriques — jamais d'arche */
  --radius-sm: 9px;
  --tap: 44px;           /* cible tactile mini */
  --maxw: 1120px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
}
.f-mer     { --accent: var(--mer);     --accent-tint: var(--mer-tint); }
.f-terre   { --accent: var(--terre);   --accent-tint: var(--terre-tint); }
.f-transfo { --accent: var(--transfo); --accent-tint: var(--transfo-tint); }

/* Reset + PWA app-like (checklist Codex : safe-area, overscroll, tap) */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation-duration:.01ms !important; transition-duration:.01ms !important; } }
body {
  font-family: var(--font); color: var(--ink); background: var(--paper);
  line-height: 1.62; overscroll-behavior-y: none; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { min-height: 100svh; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
input, select, textarea { font-size: 16px; } /* iOS anti-zoom focus */

/* Typo fluide */
h1,h2,h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; letter-spacing: -.01em; color: var(--ink); }
.display { font-size: clamp(2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.6vw, 1.4rem); }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.28rem); color: var(--ink-soft); }
.eyebrow { font-family: var(--font); font-weight: 700; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(18px, 5vw, 40px); }

/* Bandeau démo (transparence : illustratif) */
.demo-flag {
  background: repeating-linear-gradient(135deg, #fff4d6, #fff4d6 12px, #ffedc0 12px, #ffedc0 24px);
  color: #7a5a12; font-size: .8rem; font-weight: 600; text-align: center;
  padding: 7px 16px; border-bottom: 1px solid #f0dca0;
}
.demo-flag b { color: #5f4708; }

/* Header / nav filières (NAV-03, wayfinding NAV-04) */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 14px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.brand .seed { width: 26px; height: 26px; flex: none; }
.fil-nav { margin-left: auto; display: flex; gap: 6px; }
.fil-nav a { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--ink-soft); border: 1.5px solid transparent; transition: .2s var(--ease); }
.fil-nav a .dot { width: 9px; height: 9px; border-radius: 50%; }
.fil-nav a:hover { background: var(--paper-2); color: var(--ink); }
.fil-nav a.on { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-tint); }
.fil-nav .m-only { display: none; }

/* Wayfinding "Tu es ici" — progression 1·2·3·4 */
.steps { display: flex; align-items: center; gap: 0; font-size: .78rem; color: var(--ink-soft); padding: 10px 0; flex-wrap: wrap; }
.steps .st { display: inline-flex; align-items: center; gap: 7px; }
.steps .st b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e9dfc9; color: var(--ink-soft); font-size: .72rem; font-weight: 700; font-family: var(--font); }
.steps .st.done b { background: var(--accent); color: #fff; }
.steps .st.now b { background: var(--ink); color: #fff; box-shadow: 0 0 0 4px var(--accent-tint); }
.steps .st.now span { color: var(--ink); font-weight: 700; }
.steps .sep { width: 20px; height: 1.5px; background: var(--line); margin: 0 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: var(--tap); padding: 0 20px; border-radius: 999px; font-weight: 650; font-size: .96rem; transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .2s; will-change: transform; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: var(--paper-2); border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Cards */
.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* Reveal on scroll — SEULEMENT si JS actif (fallback : tout visible) */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--paper-2); margin-top: 72px; }
.foot .wrap { padding-block: 34px; display: flex; gap: 20px; flex-wrap: wrap; align-items: center; justify-content: space-between; color: var(--ink-soft); font-size: .85rem; }
.foot a { text-decoration: underline; text-underline-offset: 3px; }

/* Offline badge (wow archipels) */
.net { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(160%); opacity: 0; visibility: hidden; pointer-events: none; z-index: 60; display: flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 999px; font-size: .86rem; font-weight: 600; color: #fff; background: var(--ink); box-shadow: var(--shadow-lg); transition: transform .4s var(--ease); }
.net.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
.net { transition: transform .4s var(--ease), opacity .3s, visibility .3s; }
.net.on { background: var(--terre); }
.net .pulse { width: 9px; height: 9px; border-radius: 50%; background: #fff; }

@media (max-width: 720px) {
  .fil-nav .lbl { display: none; }
  .fil-nav a { padding: 0 10px; }
  .foot .wrap { flex-direction: column; align-items: flex-start; }
}
