/* ==========================================================================
   IVOIRE AI — feuille de style principale
   Thème unique : graphite chaud + ivoire + un seul accent bronze/or.
   Pas de bascule clair/sombre (hors périmètre v1).
   ========================================================================== */

:root {
  --bg: #0b0906;
  --bg-alt: #100d09;
  --surface: #15110b;
  --surface-glass: rgba(244, 239, 228, 0.04);
  --border: rgba(244, 239, 228, 0.14);
  --border-soft: rgba(244, 239, 228, 0.08);

  --ink-100: #f5efe2;
  --ink-70: rgba(245, 239, 226, 0.72);
  --ink-45: rgba(245, 239, 226, 0.46);

  --accent: #bd8b3f;
  --accent-strong: #dcae5f;
  --accent-soft: rgba(189, 139, 63, 0.14);
  --accent-ink: #1c1408;

  --good: #7fae74;
  --bad: #c97a63;
  --shadow-color: rgba(0, 0, 0, 0.5);

  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head: 'Fraunces', 'Iowan Old Style', 'Georgia', serif;

  --ease: cubic-bezier(.4, 0, .2, 1);

  color-scheme: dark;
}

/* Transition douce d'une page à l'autre (navigation classique, pas une SPA) :
   pris en charge nativement par les navigateurs compatibles, ignoré sans
   erreur ailleurs. */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .45s;
  animation-timing-function: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-70);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Page d'accueil uniquement : pas de défilement, tout tient dans l'écran. */
body.no-scroll {
  height: 100dvh;
  overflow: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  z-index: 400;
}
.skip-link:focus { left: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--ink-100);
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; }

/* Petite légende : plus de pastille ni de pilule, un trait fin et une
   graduation de lettrage suffisent à signaler une rubrique. */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  margin-bottom: 16px;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary:hover { background: var(--accent-strong); box-shadow: 0 14px 28px -10px rgba(189, 139, 63, .45); }
.btn:active { transform: translateY(0) scale(.98); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-outline {
  background: transparent;
  color: var(--ink-100);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--accent-strong); color: var(--accent-strong); }

.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn[data-loading="true"]::after {
  content: '';
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  padding: 22px 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(11, 9, 6, .78);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border-soft);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--ink-100);
  transition: opacity .2s var(--ease);
}
a.brand:hover { opacity: .8; }
.brand-mark {
  display: inline-flex;
}
.brand-mark img {
  display: block;
  height: 30px;
  width: auto;
}
.brand-name b { font-weight: 500; }

.nav-toggle {
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  gap: 5px;
  transition: border-color .2s var(--ease);
}
.nav-toggle:hover { border-color: var(--accent-strong); }
.nav-toggle span {
  display: block;
  width: 17px; height: 1px;
  background: var(--ink-100);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Drawer (toute la navigation passe par ici) ---------- */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(4, 3, 2, .65);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
  z-index: 70;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(380px, 88vw);
  background: var(--bg-alt);
  border-left: 1px solid var(--border);
  z-index: 80;
  padding: 26px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .4s var(--ease);
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.drawer-close {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-100);
  cursor: pointer;
  font-size: 16px;
  display: grid;
  place-items: center;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.drawer-close:hover { border-color: var(--accent-strong); transform: rotate(90deg); }

.drawer-nav {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
}
.drawer-nav li {
  border-bottom: 1px solid var(--border-soft);
  opacity: 0;
  transform: translateX(18px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.drawer-nav li:first-child { border-top: 1px solid var(--border-soft); }
.drawer.open .drawer-nav li { opacity: 1; transform: translateX(0); }
.drawer.open .drawer-nav li:nth-child(1) { transition-delay: .06s; }
.drawer.open .drawer-nav li:nth-child(2) { transition-delay: .10s; }
.drawer.open .drawer-nav li:nth-child(3) { transition-delay: .14s; }
.drawer.open .drawer-nav li:nth-child(4) { transition-delay: .18s; }
.drawer.open .drawer-nav li:nth-child(5) { transition-delay: .22s; }
.drawer.open .drawer-nav li:nth-child(n+6) { transition-delay: .26s; }
.drawer-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 4px;
  color: var(--ink-70);
  font-family: var(--font-head);
  font-size: 1.15rem;
  transition: color .25s var(--ease), padding-left .25s var(--ease);
}
.drawer-nav a:hover, .drawer-nav a.is-active {
  color: var(--accent-strong);
  padding-left: 20px;
}
.drawer-nav a .ext-icon { font-size: .75rem; opacity: .6; font-family: var(--font-body); }
.drawer-badge {
  font-size: .64rem;
  font-weight: 700;
  font-family: var(--font-body);
  padding: 2px 7px;
  border: 1px solid var(--accent-soft);
  color: var(--accent-strong);
}

.drawer-foot {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
  font-size: .82rem;
  color: var(--ink-45);
}
.drawer-foot .btn { width: 100%; margin-top: 14px; }

/* ---------- Fond : grille fine + un seul motif linéaire, pas de halo flouté ---------- */
.mesh-bg {
  position: absolute; inset: -20px;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  transform: translate(var(--px, 0px), var(--py, 0px));
  transition: transform .5s cubic-bezier(.2, 0, 0, 1);
}
.mesh-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
  opacity: .6;
}
/* Un seul losange à la ligne fine, jamais flouté ni rempli : un clin d'œil
   au tissage plutôt qu'un halo de dégradé générique. */
.motif {
  position: absolute;
  top: 8%;
  right: -180px;
  width: 460px;
  height: 460px;
  border: 1px solid var(--border);
  transform: rotate(45deg);
  animation: motifSpin 45s linear infinite;
}
.motif::before {
  content: '';
  position: absolute;
  inset: 46px;
  border: 1px solid var(--border-soft);
}
@keyframes motifSpin {
  from { transform: rotate(45deg); }
  to { transform: rotate(405deg); }
}
@media (max-width: 720px) {
  .motif { width: 320px; height: 320px; right: -150px; }
  .motif::before { inset: 30px; }
}

/* ---------- Accueil : héros plein écran, sans défilement ---------- */
.hero-screen {
  position: relative;
  height: 100dvh;
  padding-top: 104px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
@media (max-height: 720px) {
  .hero-screen { padding-top: 96px; }
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(16px, 2.6vh, 26px);
  padding: 0 20px;
}
/* Rideau progressif au chargement : le héros est déjà dans l'écran, la
   révélation vient donc du temps, pas du scroll. */
.hero-inner > * {
  opacity: 0;
  animation: heroRise 1s var(--ease) forwards;
}
.hero-inner .eyebrow { animation-delay: .1s; }
.hero-inner h1 { animation-delay: .26s; }
.hero-inner .lede { animation-delay: .5s; }
.hero-inner .hero-cta { animation-delay: .72s; }
.hero-inner .hero-status { animation-delay: .92s; }
@keyframes heroRise {
  from { opacity: 0; transform: translateY(36px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-inner h1 {
  font-size: clamp(2.1rem, 5.6vw, 4.2rem);
  max-width: 15ch;
  text-align: left;
}
.hero-inner .lede {
  max-width: 52ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--ink-70);
  margin: 0;
}
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.hero-status {
  font-size: .82rem;
  color: var(--ink-45);
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  margin-top: 6px;
}

@media (max-height: 720px) {
  .hero-inner { gap: 14px; }
  .hero-inner h1 { font-size: clamp(1.8rem, 5vw, 2.9rem); }
}
@media (max-height: 560px) {
  .hero-inner .lede { display: none; }
}

/* ---------- Pages secondaires : héros compact + sections ---------- */
.page-hero {
  position: relative;
  padding: 156px 0 74px;
  overflow: hidden;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); max-width: 19ch; margin-top: .4em; }
.page-hero .lede { max-width: 58ch; font-size: 1.05rem; }

section { position: relative; }
.section { padding: 76px 0; }
.section-tight { padding: 44px 0; }

.section-head { max-width: 640px; margin: 0 0 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: .5em; }

/* ---------- Panneaux (formulaires, mise en avant) ---------- */
.card {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
}

.grid {
  display: grid;
  gap: 20px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- Objectifs : liste éditoriale, pas une grille de cartes
   identiques ---------- */
.objectives-list {
  border-top: 1px solid var(--border-soft);
}
.objective-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--border-soft);
  transition: padding-left .35s var(--ease), background-color .35s var(--ease);
}
.objective-row:hover {
  padding-left: 26px;
  background: var(--surface-glass);
}
.objective-row .num {
  font-family: var(--font-head);
  font-style: italic;
  font-size: 2.1rem;
  color: var(--ink-45);
  line-height: 1;
  transition: color .35s var(--ease), transform .35s var(--ease);
}
.objective-row:hover .num { color: var(--accent-strong); transform: scale(1.15); }
.objective-row h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  max-width: 32ch;
}
.objective-row p { color: var(--ink-45); font-size: .96rem; margin: 0; max-width: 56ch; }
@media (max-width: 640px) {
  .objective-row { grid-template-columns: 1fr; gap: 8px; }
}

.honest-banner {
  padding: 22px 26px;
  border-left: 2px solid var(--accent);
  background: var(--surface-glass);
}
.honest-banner h4 {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 8px;
}
.honest-banner p { color: var(--ink-70); font-size: .92rem; margin: 0; }

/* ---------- Formulaires ---------- */
.form-card {
  max-width: 640px;
  margin: 0 auto;
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-100);
  margin-bottom: 8px;
}
.form-row .req { color: var(--accent-strong); }
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0,0,0,.22);
  color: var(--ink-100);
  font-family: inherit;
  font-size: .95rem;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.form-row select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23f5efe2' stroke-width='1.6' fill='none' fill-rule='evenodd' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 40px; color-scheme: dark; }
/* Le panneau d'options d'un <select> est dessiné par le système, pas par le
   CSS habituel — sans ceci, Chrome/Edge/Firefox l'affichent en clair par
   défaut, ce qui casse le thème sombre dès l'ouverture du menu. */
.form-row select option {
  background: var(--bg-alt);
  color: var(--ink-100);
}
.form-row textarea { resize: vertical; min-height: 120px; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent-strong);
  background: rgba(0,0,0,.32);
}
.form-row.is-invalid input,
.form-row.is-invalid select,
.form-row.is-invalid textarea { border-color: var(--bad); }
.form-row .hint { font-size: .78rem; color: var(--ink-45); margin-top: 6px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row-2 { grid-template-columns: 1fr; } }

/* Champ piège anti-robot : hors écran, jamais display:none — un lecteur
   d'écran doit pouvoir constater qu'il n'y a rien à y faire, un robot de
   formulaire le remplit quand même. */
.hp-field {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.form-note {
  margin-top: 16px;
  font-size: .88rem;
  min-height: 1.4em;
}
.form-note.is-success { color: var(--good); }
.form-note.is-error { color: var(--bad); }

/* ---------- Note (avis) ---------- */
.rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}
.rating-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-input label {
  font-size: 1.6rem;
  color: var(--border);
  cursor: pointer;
  transition: color .15s var(--ease);
  margin: 0;
}
.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label { color: var(--accent-strong); }

.testimonial-card { padding: 24px; transition: border-color .25s var(--ease), transform .25s var(--ease); }
.testimonial-card:hover { border-color: var(--accent-strong); transform: translateY(-7px); box-shadow: 0 18px 34px -18px rgba(0,0,0,.6); }
.testimonial-stars { color: var(--accent-strong); font-size: .88rem; letter-spacing: 2px; margin-bottom: 12px; }
.testimonial-card p { color: var(--ink-70); font-size: .94rem; margin-bottom: 16px; font-family: var(--font-head); font-style: italic; font-size: 1.02rem; }
.testimonial-who { font-size: .8rem; color: var(--ink-45); font-weight: 600; }
.testimonial-who b { color: var(--ink-100); }

/* ---------- Bandeau cookies ---------- */
.cookie-banner {
  position: fixed;
  left: 20px; right: 20px; bottom: -200px;
  max-width: 620px;
  margin: 0 auto;
  z-index: 90;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  box-shadow: 0 20px 50px -20px var(--shadow-color);
  transition: bottom .4s var(--ease);
}
.cookie-banner.is-visible { bottom: 20px; }
.cookie-banner p { font-size: .85rem; color: var(--ink-70); margin: 0 0 14px; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn { padding: 10px 18px; font-size: .85rem; }

/* ---------- Pied de page ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 44px 0;
  margin-top: 40px;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.site-footer p { margin: 0; font-size: .82rem; color: var(--ink-45); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: .82rem; color: var(--ink-45); }
.footer-links a:hover { color: var(--ink-100); }

/* ---------- Révélation au scroll ---------- */
.fade-up { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.fade-up.is-visible { opacity: 1; transform: none; }
.stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
  .hero-inner > * { animation: none; opacity: 1; }
  .motif { animation: none; }
  .drawer-nav li { transition: none; opacity: 1; transform: none; }
  .btn:hover, .testimonial-card:hover { transform: none; }
  .mesh-bg { transition: none; transform: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
