/* Exocerveau · feuille commune
   Charte reprise du futur site d'AbHinc (Café du Web) : Newsreader pour les titres,
   Figtree pour le texte, bleu canard, orange, turquoise et fonds crème. */

/* Polices hébergées sur le site (licence OFL), pour ne rien envoyer à Google à chaque visite */
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --teal: #034861;      /* couleur principale, titres */
  --teal-deep: #013143;  /* pied de page */
  --ink: #2b4a61;        /* texte courant */
  --text: #333333;
  --muted: #5d6f7c;
  --orange: #f5933a;     /* accent, boutons d'action */
  --orange-deep: #d9741c;
  --turquoise: #5cb5be;  /* accent secondaire */
  --cream: #f8f2e6;      /* fonds de section */
  --mist: #e5eff1;       /* fonds froids */
  --white: #ffffff;
  --line: #e2dccf;
  --radius: 6px;
  --radius-lg: 14px;
  --shadow: 0 10px 30px rgba(3, 72, 97, 0.08);
  --max: 1120px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); }
a:hover { color: var(--orange-deep); }
:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); color: var(--teal); font-weight: 600; line-height: 1.15; margin: 0 0 16px; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 14px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 88px 0; }
.section.cream { background: var(--cream); }
.section.mist { background: var(--mist); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.eyebrow {
  display: inline-block;
  font: 600 0.74rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  margin-bottom: 20px;
}
.accent { color: var(--orange); }

/* Boutons */
.btn {
  display: inline-block;
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  border-radius: var(--radius);
  padding: 17px 30px;
  border: 0;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-deep); color: var(--white); }
.btn-secondary { background: var(--turquoise); color: var(--white); }
.btn-secondary:hover { background: #479fa8; color: var(--white); }
.btn-ghost { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-ghost:hover { background: var(--teal); color: var(--white); }

/* En-tête */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { white-space: nowrap; display: flex; align-items: baseline; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-name { font: 600 1.7rem/1 var(--serif); color: var(--teal); letter-spacing: -0.01em; }
.brand-name::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); margin-left: 2px; }
.brand-by { font-size: 0.78rem; color: var(--muted); }
.nav { display: flex; gap: 22px; }
.nav a { white-space: nowrap; font-size: 0.93rem; color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--orange-deep); }
.site-header .btn { white-space: nowrap; padding: 12px 20px; font-size: 0.92rem; }
@media (max-width: 1080px) { .nav { display: none; } }
@media (max-width: 520px) { .brand-by { display: none; } .site-header .wrap { gap: 12px; } .brand-name { font-size: 1.45rem; } .site-header .btn { padding: 10px 12px; font-size: 0.82rem; } }

/* Accueil */
.hero { background: var(--cream); padding: 80px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero h1 .accent { display: block; }
.lede { font-size: 1.15rem; color: var(--ink); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: 0.9rem; color: var(--muted); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Maquette de conversation */
.demo { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px; border: 1px solid var(--line); }
.demo-bar { display: flex; gap: 6px; margin-bottom: 18px; }
.demo-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.bubble { border-radius: 12px; padding: 14px 16px; font-size: 0.95rem; margin-bottom: 12px; }
.bubble.ask { background: var(--mist); color: var(--teal); margin-left: 18%; }
.bubble.answer { background: var(--cream); color: var(--text); margin-right: 8%; }
.sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sources span { font-size: 0.75rem; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted); }
.draft { border: 1.5px dashed var(--turquoise); border-radius: 12px; padding: 12px 16px; font-size: 0.88rem; color: var(--ink); }
.draft b { display: block; font-size: 0.7rem; letter-spacing: 0.14em; color: var(--turquoise); margin-bottom: 4px; }

/* Grilles de cartes */
.grid { display: grid; gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.card p { color: var(--muted); font-size: 0.97rem; margin: 0; }
.card h3 { font-size: 1.25rem; }
.icon { width: 48px; height: 48px; border-radius: 12px; background: var(--mist); display: grid; place-items: center; margin-bottom: 18px; }
.icon svg { width: 26px; height: 26px; stroke: var(--teal); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.warm { background: #fde9d6; }
.icon.warm svg { stroke: var(--orange-deep); }

/* Étapes et prix */
.steps { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; align-items: stretch; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr; } }
.price-card { position: relative; background: var(--white); border-radius: var(--radius-lg); padding: 34px 30px; border: 1px solid var(--line); display: flex; flex-direction: column; }
.price-card .tag { font: 600 0.74rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--turquoise); margin-bottom: 14px; }
.price { font: 600 2.4rem/1 var(--serif); color: var(--orange); margin: 6px 0 4px; }
.price small { font: 500 0.9rem var(--sans); color: var(--muted); margin-left: 4px; }
.price-card ul { padding: 0; margin: 18px 0 0; list-style: none; flex: 1; }
.price-card li { position: relative; padding-left: 26px; margin-bottom: 10px; font-size: 0.97rem; }
.price-card li::before { content: ""; position: absolute; left: 0; top: 9px; width: 12px; height: 7px; border-left: 2px solid var(--turquoise); border-bottom: 2px solid var(--turquoise); transform: rotate(-45deg); }
.price-card .foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.price-card.featured { background: var(--orange); border-color: var(--orange); color: var(--white); transform: translateY(-10px); box-shadow: 0 18px 40px rgba(245, 147, 58, 0.3); }
.price-card.featured h3, .price-card.featured .price, .price-card.featured .tag { color: var(--white); }
.price-card.featured .price small, .price-card.featured .foot { color: rgba(255, 255, 255, 0.88); }
.price-card.featured .foot { border-top-color: rgba(255, 255, 255, 0.35); }
.price-card.featured li::before { border-color: var(--white); }
@media (max-width: 960px) { .price-card.featured { transform: none; } }

/* Faits chiffrés */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 28px 0; }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr 1fr; } }
.fact { background: var(--white); border-radius: var(--radius-lg); padding: 22px; border: 1px solid var(--line); }
.fact .v { font: 600 1.5rem/1.15 var(--serif); color: var(--teal); margin-bottom: 6px; }
.fact .l { font-size: 0.9rem; color: var(--muted); }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 12px; height: 7px; border-left: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: rotate(-45deg); }

/* Équipe */
.person { display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: start; }
.person img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.person .role { font-size: 0.85rem; color: var(--turquoise); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.person h3 { font-family: var(--sans); font-weight: 600; font-size: 1.2rem; color: var(--text); margin-bottom: 4px; }
@media (max-width: 520px) { .person { grid-template-columns: 1fr; } }

/* Questions fréquentes */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; font-weight: 600; color: var(--teal); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); font: 400 1.6rem/1 var(--sans); color: var(--orange); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 24px 20px; margin: 0; color: var(--muted); }

/* Appel à l'action */
.cta { background: var(--teal); color: var(--white); text-align: center; }
.cta h2 { color: var(--white); }
.cta p { color: rgba(255, 255, 255, 0.85); max-width: 640px; margin: 0 auto 28px; font-size: 1.08rem; }

/* Pied de page */
.site-footer { background: var(--teal-deep); color: rgba(255, 255, 255, 0.78); padding: 56px 0 28px; font-size: 0.93rem; }
.site-footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.site-footer a:hover { color: var(--orange); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand-name { color: var(--white); }
.site-footer h4 { font: 600 0.8rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--white); margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 22px; font-size: 0.85rem; }

/* Pages de texte (mentions légales, zone fermée) */
.page { padding: 64px 0 88px; }
.page .wrap { max-width: 820px; }
.page h2 { font-size: 1.6rem; margin-top: 40px; }
.page h3 { margin-top: 28px; }

/* Repère « à compléter », visible tant qu'un contenu n'est pas tranché */
.todo { background: #fff3c4; color: #6b4e00; border-radius: 4px; padding: 1px 6px; font-size: 0.92em; }

/* Simulateur de prix (zone /myco) */
.sim { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.sim label { font-weight: 600; color: var(--teal); display: block; margin-bottom: 10px; }
.sim input[type="range"] { width: 100%; accent-color: var(--orange); }
.sim-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
@media (max-width: 640px) { .sim-out { grid-template-columns: 1fr; } }
.sim-check { display: flex; gap: 10px; align-items: center; margin-top: 16px; font-size: 0.95rem; }

.private-bar { background: var(--teal); color: var(--white); font-size: 0.85rem; text-align: center; padding: 8px 16px; }
.private-bar a { color: var(--white); }

/* Vue 3D « l'Exocerveau de l'intérieur » (assets/exo3d.js) */
.exo3d-stage {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  background: radial-gradient(ellipse at 50% 40%, #0a5a78 0%, var(--teal) 45%, var(--teal-deep) 100%);
  border-radius: var(--radius-lg); overflow: hidden; color: #e9eef2;
  box-shadow: var(--shadow);
  /* arrivée par le menu : la vue tient sous l'en-tête (scroll-padding-top du html), même sur un écran bas */
  max-height: calc(100svh - 104px); scroll-margin-top: 8px;
}
@media (max-width: 640px) { .exo3d-stage { aspect-ratio: 4 / 5; } }
.exo3d-title {
  position: absolute; top: 18px; left: 22px; right: 22px; z-index: 1; margin: 0; pointer-events: none;
  font-size: clamp(1.15rem, 2.4vw, 1.7rem); color: #fff; text-shadow: 0 1px 12px rgba(1, 30, 42, 0.6);
}.exo3d-stage canvas { display: block; width: 100%; height: 100%; }
.exo3d-lbls { position: absolute; inset: 0; pointer-events: none; }
.exo3d-lbl {
  position: absolute; transform: translate(-50%, -100%); pointer-events: auto; cursor: pointer;
  font: 600 11px/1.4 var(--sans); color: #fff; white-space: nowrap;
  background: rgba(1, 49, 67, 0.82); border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 3px solid var(--k, var(--turquoise)); border-radius: 4px; padding: 1px 7px;
}
.exo3d-lbl.sm { font-weight: 500; font-size: 10px; }
.exo3d-lbl.on { background: var(--orange); border-color: var(--orange); }
@media (max-width: 640px) { .exo3d-lbl.sm { display: none; } }
.exo3d-hint { position: absolute; left: 14px; bottom: 10px; font-size: 12px; color: rgba(255, 255, 255, 0.7); pointer-events: none; }
.exo3d-stage.nogl .exo3d-hint { display: none; }
.exo3d-stage.nogl::after {
  content: "La vue 3D ne peut pas s'afficher sur cet appareil. Les cartes ci-dessus décrivent ce qu'elle contient.";
  position: absolute; inset: 0; display: grid; place-items: center; padding: 2em; text-align: center; color: rgba(255, 255, 255, 0.8);
}
.exo3d-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 0 10px; font-size: 0.88rem; color: var(--muted); }
.exo3d-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.exo3d-info { min-height: 5em; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; font-size: 0.97rem; color: var(--text); }
.exo3d-info b { color: var(--teal); }
