/* ==========================================================================
   OrienteMoi — design system
   Style "Apple.com marketing" : grands aplats, typographie énorme, sections
   qui se révèlent au scroll, cartes en verre, micro-interactions douces.
   ========================================================================== */

:root{
  color-scheme: light;

  /* --- Couleurs de marque (dérivées du drapeau béninois, désaturées) --- */
  --green-50:  #eefcf6;
  --green-100: #d6f7e8;
  --green-500: #0e9f6e;
  --green-600: #0a8a5f;
  --green-700: #057a55;
  --amber-100: #fdf3d6;
  --amber-500: #f5b400;
  --amber-700: #8a6d00;
  --red-100:   #fde8e8;
  --red-600:   #d32f2f;

  /* --- Neutres --- */
  --ink:        #0b0d0f;
  --ink-70:     rgba(11,13,15,.70);
  --ink-55:     rgba(11,13,15,.55);
  --ink-38:     rgba(11,13,15,.38);
  --paper:      #ffffff;
  --paper-sunk: #f5f5f7;
  --hairline:   rgba(11,13,15,.08);
  --hairline-strong: rgba(11,13,15,.14);

  --surface: var(--paper);
  --surface-sunk: var(--paper-sunk);
  --text: var(--ink);
  --text-muted: var(--ink-55);
  --text-faint: var(--ink-38);
  --border: var(--hairline);

  /* --- Glass / matériaux --- */
  --glass-bg: rgba(255,255,255,.72);
  --glass-border: rgba(255,255,255,.5);
  --glass-blur: 20px;

  /* --- Radii --- */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* --- Ombres (portées légères, "flottantes") --- */
  --shadow-sm: 0 1px 2px rgba(11,13,15,.04), 0 2px 8px rgba(11,13,15,.05);
  --shadow-md: 0 4px 16px rgba(11,13,15,.06), 0 12px 32px rgba(11,13,15,.06);
  --shadow-lg: 0 12px 40px rgba(11,13,15,.10), 0 2px 8px rgba(11,13,15,.05);

  /* --- Rythme --- */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 4.5rem; --space-9: 7rem;

  /* --- Type --- */
  --font: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* --- Easing "ressort" (approximations CSS d'un spring critically-damped) --- */
  --ease-spring: cubic-bezier(.22,1,.36,1);
  --ease-spring-snappy: cubic-bezier(.32,.94,.6,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur-fast: 160ms;
  --dur-base: 320ms;
  --dur-slow: 560ms;
}

@media (prefers-color-scheme: dark){
  :root{
    color-scheme: dark;
    --ink: #f5f6f7;
    --ink-70: rgba(245,246,247,.75);
    --ink-55: rgba(245,246,247,.58);
    --ink-38: rgba(245,246,247,.40);
    --paper: #0b0d0f;
    --paper-sunk: #16181b;
    --hairline: rgba(245,246,247,.10);
    --hairline-strong: rgba(245,246,247,.16);
    --surface: #141618;
    --surface-sunk: #1a1d20;
    --glass-bg: rgba(20,22,24,.62);
    --glass-border: rgba(255,255,255,.08);
    --green-50: #0d2620;
    --green-100: #123a2f;
    --amber-100: #2a2308;
    --red-100: #2a1414;
  }
}

/* ---------------------------------- Icons --------------------------------- */
.icon{ width:1.15em; height:1.15em; display:inline-block; vertical-align:-0.2em; flex-shrink:0; }
.icon-lg{ width:1.6em; height:1.6em; }
.icon-xl{ width:2.4em; height:2.4em; }
.icon-circle{
  display:inline-flex; align-items:center; justify-content:center; flex-shrink:0;
  width:40px; height:40px; border-radius:50%; background:var(--surface-sunk); color:var(--green-700);
}
.icon-circle .icon{ width:1.3em; height:1.3em; }
.icon-heading{ display:inline-flex; align-items:center; gap:9px; }
.icon-heading .icon{ color:var(--green-600); flex-shrink:0; }

/* ---------------------------------- Reset -------------------------------- */
*,*::before,*::after{ box-sizing: border-box; }
*{ margin:0; padding:0; }
html{ -webkit-text-size-adjust:100%; }
body{
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img,svg{ display:block; max-width:100%; }
a{ color: inherit; text-decoration: none; }
button{ font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul{ list-style: none; }
input,select,textarea{ font: inherit; color: inherit; }

::selection{ background: var(--green-100); color: var(--green-700); }

.container{ max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* --------------------------------- Type ----------------------------------
   Tracking/leading spécifiques à chaque taille (grand = serré/négatif,
   petit = neutre/légèrement positif), conformément à la charte Apple. */
.display-1{
  font-size: clamp(3.2rem, 8.5vw, 7.2rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -0.035em;
}
.display-2{
  font-size: clamp(2.2rem, 5.4vw, 4.2rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.028em;
}
.title-1{
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.title-2{
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.012em;
}
.eyebrow{
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green-600);
}
.lede{
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 450;
  line-height: 1.5;
  color: var(--text-muted);
  letter-spacing: -0.006em;
}
p, li{ font-size: 1rem; letter-spacing: 0; }
.text-muted{ color: var(--text-muted); }
.text-faint{ color: var(--text-faint); }
.text-center{ text-align: center; }

/* -------------------------------- Buttons -------------------------------- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-weight: 650; font-size: .98rem; letter-spacing: -0.006em;
  padding: 14px 26px; border-radius: var(--r-pill);
  transition: transform var(--dur-fast) var(--ease-spring-snappy),
              background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:active{ transform: scale(.96); }
.btn-primary{ background: var(--ink); color: var(--paper); }
.btn-primary:hover{ box-shadow: var(--shadow-md); }
.btn-accent{ background: var(--amber-500); color: #3b2f00; }
.btn-accent:hover{ box-shadow: var(--shadow-md); }
.btn-ghost{ background: var(--surface-sunk); color: var(--text); }
.btn-outline{ background: transparent; border: 1.5px solid var(--hairline-strong); color: var(--text); }
.btn-outline:hover{ border-color: var(--green-500); color: var(--green-700); }
.btn-sm{ padding: 10px 18px; font-size: .88rem; }
.btn:disabled{ opacity: .45; cursor: not-allowed; }
.btn:disabled:active{ transform: none; }

/* ---------------------------------- Nav ----------------------------------- */
.nav{
  position: sticky; top: 0; z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out);
}
.nav.scrolled{ border-bottom-color: var(--hairline); }
.nav-inner{
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.logo{ font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.logo b{ color: var(--green-600); }
.nav-links{ display: flex; gap: 2px; background: var(--surface-sunk); padding: 4px; border-radius: var(--r-pill); }
.nav-links button{
  padding: 9px 16px; border-radius: var(--r-pill); font-size: .9rem; font-weight: 600;
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.nav-links button.active{ background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.nav-links button:hover:not(.active){ color: var(--text); }
.nav-cta{ display:flex; align-items:center; gap:10px; }

.nav-menu-btn{
  display:none; flex-direction:column; justify-content:center; align-items:center; gap:5px;
  width:38px; height:38px; border-radius: 50%; flex-shrink:0;
  transition: background var(--dur-fast) var(--ease-out);
}
.nav-menu-btn:hover{ background: var(--surface-sunk); }
.nav-menu-btn span{ width:16px; height:2px; background: var(--text); border-radius:2px; transition: transform var(--dur-fast) var(--ease-spring), opacity var(--dur-fast) var(--ease-out); }
.nav-menu-btn[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-menu-btn[aria-expanded="true"] span:nth-child(2){ opacity:0; }
.nav-menu-btn[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.nav-mobile{
  display:none; flex-direction:column; gap:2px; padding: 8px 20px 16px;
  max-height:0; overflow:hidden; opacity:0;
  transition: max-height var(--dur-base) var(--ease-spring), opacity var(--dur-fast) var(--ease-out);
}
.nav-mobile.open{ max-height:320px; opacity:1; }
.nav-mobile button{
  text-align:left; padding: 12px 6px; font-size:1rem; font-weight:600; color: var(--text-muted);
  border-bottom: 1px solid var(--hairline);
}
.nav-mobile button.active{ color: var(--green-600); }

@media (max-width: 860px){
  .nav-links{ display:none; }
  .nav-menu-btn{ display:flex; }
  .nav-mobile{ display:flex; }
}

/* --------------------------------- Hero ----------------------------------- */
.hero{ padding: clamp(64px, 12vw, 128px) 0 clamp(48px, 8vw, 88px); text-align: center; position: relative; overflow: hidden; }
.hero .container{ position: relative; z-index: 1; }
.hero-map-decor{
  position: absolute; top: 50%; left: -6%; transform: translateY(-50%);
  height: 122%; width: auto; max-width: 46vw;
  color: var(--green-600); opacity: .16;
  pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(to right, black 0%, black 32%, transparent 76%);
  mask-image: linear-gradient(to right, black 0%, black 32%, transparent 76%);
}
@media (max-width: 900px){ .hero-map-decor{ display:none; } }
@media (prefers-color-scheme: dark){ .hero-map-decor{ opacity: .14; } }
.hero-flag{
  display: inline-flex; align-items:center; gap: 8px;
  font-size: .82rem; font-weight: 600; color: var(--green-700);
  background: var(--green-50); border: 1px solid var(--green-100);
  padding: 7px 16px; border-radius: var(--r-pill); margin-bottom: 28px;
}
.hero h1{ max-width: 16ch; margin: 0 auto 22px; }
.hero .lede{ max-width: 46ch; margin: 0 auto 36px; }
.hero-actions{ display:flex; gap: 14px; justify-content:center; flex-wrap: wrap; }

.stats-band{ display:grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: clamp(48px,8vw,80px); }
.stat{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 26px 18px; text-align:center;
}
.stat b{ display:block; font-size: clamp(1.6rem,3vw,2.2rem); font-weight: 800; letter-spacing: -0.02em; }
.stat span{ font-size: .82rem; color: var(--text-muted); }
@media (max-width: 760px){ .stats-band{ grid-template-columns: repeat(2,1fr); } }

/* ------------------------------- Sections --------------------------------- */
section.page{ display:none; }
section.page.visible{ display:block; }
.section{ padding: clamp(56px,8vw,96px) 0; }
.section-head{ max-width: 640px; margin: 0 auto var(--space-8); text-align:center; }
.section-head .eyebrow{ display:block; margin-bottom: 10px; }
.section-head h2{ margin-bottom: 12px; }

.grid{ display:grid; gap: 18px; }
.grid-3{ grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); }
.grid-2{ grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); }

.card{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.card:hover{ transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--hairline-strong); }
.card h3{ font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; display:flex; align-items:center; gap:10px; }
.card p{ color: var(--text-muted); font-size: .93rem; }

.step-num{
  display:inline-flex; align-items:center; justify-content:center; flex-shrink:0;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: var(--paper); font-weight: 800; font-size: .95rem;
}
.step-num-sm{ width:26px; height:26px; font-size:.78rem; }

.photo-card{ border-radius: var(--r-lg); overflow:hidden; box-shadow: var(--shadow-sm); background: var(--surface); border: 1px solid var(--border); }
.photo-card img{ width:100%; height: 210px; object-fit: cover; }
.photo-card .body{ padding: 18px 20px; }
.photo-card b{ display:flex; align-items:center; gap:8px; margin-bottom: 4px; font-weight:700; }
.photo-card b .icon{ color: var(--green-600); }
.photo-card p{ font-size: .86rem; color: var(--text-muted); }

/* --------------------------------- Badges --------------------------------- */
.badge{ display:inline-flex; align-items:center; font-size: .74rem; font-weight: 700; padding: 4px 12px; border-radius: var(--r-pill); }
.badge.green{ background: var(--green-100); color: var(--green-700); }
.badge.amber{ background: var(--amber-100); color: var(--amber-700); }
.badge.gray{ background: var(--surface-sunk); color: var(--text-muted); }
.badge.red{ background: var(--red-100); color: var(--red-600); }

/* -------------------------------- Accordion -------------------------------- */
.faq{ background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 12px; overflow: hidden; }
.faq summary{
  cursor: pointer; padding: 20px 24px; font-weight: 700; font-size: 1rem; letter-spacing: -0.008em;
  list-style: none; display:flex; justify-content:space-between; align-items:center; gap: 16px;
}
.faq summary::-webkit-details-marker{ display:none; }
.faq summary .chev{ transition: transform var(--dur-base) var(--ease-spring); color: var(--text-faint); flex-shrink:0; }
.faq[open] summary .chev{ transform: rotate(180deg); }
.faq .body{ padding: 0 24px 22px; color: var(--text-muted); font-size: .95rem; line-height:1.6; }
.faq .body b{ color: var(--text); }
.faq .body ul{ margin: 8px 0 4px 20px; list-style: disc; }
.faq .body li{ margin-bottom: 6px; }
.faq .callout{ background: var(--amber-100); border-left: 3px solid var(--amber-500); padding: 12px 14px; border-radius: var(--r-sm); margin-top: 10px; color: var(--text); font-size: .9rem; }
.faq .formula{ text-align:center; font-weight:700; background: var(--green-50); color: var(--green-700); padding: 12px; border-radius: var(--r-sm); margin: 10px 0; }

/* ---------------------------------- Form ----------------------------------- */
.form-card{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: clamp(24px,4vw,40px); box-shadow: var(--shadow-md); max-width: 760px; margin: 0 auto;
}
.step-indicator{ display:flex; gap: 8px; margin-bottom: 30px; }
.step-dot{ flex:1; height: 5px; border-radius: var(--r-pill); background: var(--hairline); transition: background var(--dur-slow) var(--ease-spring); }
.step-dot.done{ background: var(--green-500); }
.fgroup{ margin-bottom: 20px; }
.fgroup label{ display:block; font-weight: 650; font-size: .92rem; margin-bottom: 8px; letter-spacing: -0.006em; }
.fgroup .hint{ font-weight: 400; color: var(--text-faint); font-size: .82rem; }
input[type=text],input[type=number],select,textarea{
  width:100%; padding: 13px 15px; border: 1.5px solid var(--border); border-radius: var(--r-md);
  font-size: .96rem; background: var(--surface); color: var(--text);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
input:focus,select:focus,textarea:focus{ outline:none; border-color: var(--green-500); box-shadow: 0 0 0 4px var(--green-50); }
textarea{ resize: vertical; min-height: 120px; }

.chips{ display:flex; flex-wrap:wrap; gap: 9px; }
.chip{
  display:inline-flex; align-items:center; gap:7px;
  border: 1.5px solid var(--border); background: var(--surface); border-radius: var(--r-pill);
  padding: 9px 17px; font-size: .88rem; font-weight: 550; user-select:none;
  transition: transform var(--dur-fast) var(--ease-spring-snappy), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.chip:active{ transform: scale(.95); }
.chip.sel{ background: var(--ink); border-color: var(--ink); color: var(--paper); }
.notes-grid{ display:grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 14px; }
.notes-grid label{ font-weight:400; font-size:.85rem; }
.form-nav{ display:flex; justify-content:space-between; align-items:center; margin-top: 30px; }

/* -------------------------------- Results ---------------------------------- */
.result-card{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 24px; margin-bottom: 14px; position: relative; overflow: hidden;
}
.result-card::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background: var(--green-500); }
.result-head{ display:flex; justify-content:space-between; align-items:flex-start; gap: 14px; flex-wrap:wrap; }
.result-card h3{ font-size: 1.1rem; font-weight: 700; letter-spacing: -0.012em; margin-bottom: 2px; }
.result-card .uni{ color: var(--text-muted); font-size: .88rem; margin-bottom: 10px; }
.score-pill{ font-size: 1rem; font-weight: 800; color: var(--green-700); background: var(--green-50); padding: 6px 16px; border-radius: var(--r-pill); white-space:nowrap; }
.scorebar{ height: 7px; background: var(--surface-sunk); border-radius: var(--r-pill); margin: 12px 0 8px; overflow:hidden; }
.scorebar > div{ height:100%; background: linear-gradient(90deg,var(--green-500),var(--amber-500)); border-radius: var(--r-pill); width:0; transition: width 900ms var(--ease-spring); }
.result-card .desc{ font-size: .92rem; margin: 8px 0; }
.result-card .why{ font-size: .85rem; color: var(--text-faint); font-style: italic; }

.ai-box{ background: var(--surface-sunk); border: 1.5px dashed var(--hairline-strong); border-radius: var(--r-xl); padding: 28px; margin-top: 40px; }
.ai-result{ background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px; margin-top: 18px; white-space: pre-wrap; font-size: .93rem; display:none; line-height:1.6; }
.spinner{ display:none; margin: 16px auto; width: 32px; height: 32px; border: 3px solid var(--hairline); border-top-color: var(--green-500); border-radius:50%; animation: spin .8s linear infinite; }
@keyframes spin{ to{ transform: rotate(360deg); } }

/* ---------------------------------- Table ----------------------------------- */
.table-wrap{ overflow-x:auto; border-radius: var(--r-lg); border: 1px solid var(--border); }
table{ width:100%; border-collapse:collapse; background: var(--surface); font-size: .9rem; }
th{ background: var(--surface-sunk); text-align:left; padding: 13px 16px; font-weight:700; white-space: nowrap; }
td{ padding: 12px 16px; border-top: 1px solid var(--border); }
tr:hover td{ background: var(--surface-sunk); }

/* --------------------------------- Footer ------------------------------------ */
.footer{ background: var(--ink); color: rgba(245,246,247,.7); padding: 48px 0; margin-top: 40px; }
.footer a{ color: rgba(245,246,247,.92); }
.footer a:hover{ color: var(--green-500); }
.footer .brand{ color: var(--paper); font-weight: 800; }
.footer .links{ display:flex; flex-wrap:wrap; gap: 6px 4px; margin: 14px 0; font-size: .88rem; }
.footer .links span{ opacity:.35; margin: 0 4px; }
.disclaimer{ font-size: .8rem; opacity:.65; max-width: 760px; line-height:1.6; }

.link-grid{ display:grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 14px; }
.link-card{
  display:flex; flex-direction:column; min-width:0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-spring), border-color var(--dur-fast) var(--ease-out);
}
.link-card:hover{ transform: translateY(-2px); border-color: var(--green-500); }
.link-card b{
  color: var(--green-700); font-weight: 700; overflow-wrap: anywhere; word-break: break-word;
  line-height: 1.3;
}
.link-card span{ display:block; font-size: .84rem; color: var(--text-muted); margin-top: 6px; overflow-wrap: anywhere; }

/* ------------------------------ Scroll reveal --------------------------------- */
.reveal{ opacity: 0; transform: translateY(28px); transition: opacity var(--dur-slow) var(--ease-spring), transform var(--dur-slow) var(--ease-spring); }
.reveal.in{ opacity: 1; transform: none; }
.reveal-stagger > *{ transition-delay: calc(var(--i,0) * 70ms); }

/* Cross-fade entre les "pages" du site */
.page-enter{ animation: pageIn var(--dur-slow) var(--ease-spring) both; }
@keyframes pageIn{
  from{ opacity: 0; transform: translateY(14px); }
  to{ opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .12s !important; }
  .reveal{ transform: none; }
}

@media print{
  body *{ visibility: hidden; }
  .nav,.footer,.ai-box,.btn{ display:none !important; }
}
