/* ==========================================================================
   SunuGal — feuille de style unique
   --------------------------------------------------------------------------
   Sommaire
   1.  Police (Inter, hébergée localement)
   2.  Variables (couleurs, typo, espacements)
   3.  Base et remise à zéro
   4.  Mise en page (conteneur, sections, grilles)
   5.  Typographie et en-têtes de section
   6.  Boutons et liens
   7.  En-tête et navigation
   8.  Héros (accueil et pages intérieures)
   9.  Cartes, étapes, chiffres, listes
   10. FAQ (accordéon <details>)
   11. Formulaires
   12. Bandeaux d'appel à l'action
   13. Pages légales (texte long)
   14. Composants spécifiques (carte VISA, frise, postes, partenaires)
   15. Pied de page
   16. Bandeau et préférences cookies
   17. Utilitaires et accessibilité
   18. Responsive (tablette, mobile)
   ========================================================================== */


/* 1. Police ----------------------------------------------------------------
   Inter variable (poids 100 à 900), sous-ensemble latin : couvre le français
   et l'anglais. Hébergée sur le site : aucune requête vers Google Fonts. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* 2. Variables -------------------------------------------------------------
   Toutes les couleurs du site sont ici. Contrastes vérifiés (WCAG AA) :
   - texte #334155 sur blanc : 10,3:1
   - texte atténué #5B6B82 sur blanc : 5,4:1
   - bleu #2C5282 sur blanc : 7,9:1
   - marine #14305C sur or #F2B233 : 7,3:1 */
:root {
  /* Couleur principale : le bleu du logo */
  --navy-950: #0b1b36;
  --navy-900: #0e2142;
  --navy-800: #14305c;
  --blue-700: #234474;
  --blue-600: #2c5282;          /* bleu du logo */
  --blue-100: #dbe6f4;
  --blue-50:  #eef3fa;

  /* Accent : or */
  --gold-600: #d99a1e;
  --gold-500: #f2b233;
  --gold-100: #fdf3dc;

  /* Neutres */
  --ink:   #0f172a;             /* titres */
  --text:  #334155;             /* texte courant */
  --muted: #5b6b82;             /* texte secondaire */
  --line:  #e2e8f0;             /* bordures */
  --bg:    #ffffff;
  --bg-alt:#f5f7fb;             /* sections alternées */

  /* États */
  --success: #15803d;
  --danger:  #b91c1c;

  /* Typographie */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-body: 1.0625rem;                                   /* 17 px */
  --fs-small: .9375rem;                                   /* 15 px */
  --fs-h1: clamp(2.25rem, 1.55rem + 3vw, 3.5rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.7vw, 2.5rem);
  --fs-h3: 1.1875rem;
  --fs-lead: clamp(1.0625rem, 1rem + .4vw, 1.25rem);

  /* Espacements et formes */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 32px);
  --section-y: clamp(64px, 8vw, 112px);
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 48px rgba(14, 33, 66, .18);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}


/* 3. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);   /* ancres sous l'en-tête fixe */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
a { color: var(--blue-600); text-underline-offset: 3px; }
a:hover { color: var(--blue-700); }
strong { color: var(--ink); font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--gold-100); color: var(--ink); }


/* 4. Mise en page ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 860px; }

.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--tight { padding-block: clamp(48px, 6vw, 72px); }

/* Grilles responsives : passent automatiquement à 2 puis 1 colonne */
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }


/* 5. Typographie ----------------------------------------------------------- */
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: var(--fs-h1); font-weight: 700; letter-spacing: -.025em; line-height: 1.08; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 600; }
h4 { font-size: 1.0625rem; font-weight: 600; }

.h3 { font-size: var(--fs-h3); }
.h4 { font-size: 1.0625rem; }

.lead { font-size: var(--fs-lead); color: var(--muted); line-height: 1.6; }
.text-accent { color: var(--blue-600); }

/* Petit libellé au-dessus des titres */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-600);
}
.eyebrow::before {
  content: "";
  width: 20px; height: 2px;
  background: var(--gold-500);
}

/* En-tête de section : libellé + titre + sous-titre */
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head h2 + p { margin-top: 14px; }


/* 6. Boutons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Bleu : action principale sur fond clair */
.btn--primary { background: var(--blue-600); color: #fff; }
.btn--primary:hover { background: var(--blue-700); color: #fff; }

/* Or : action principale sur fond marine */
.btn--accent { background: var(--gold-500); color: var(--navy-800); }
.btn--accent:hover { background: var(--gold-600); color: var(--navy-900); }

/* Contour : action secondaire */
.btn--outline { border-color: #c7d2e0; color: var(--ink); background: #fff; }
.btn--outline:hover { border-color: var(--blue-600); color: var(--blue-600); }

/* Contour clair : action secondaire sur fond marine */
.btn--ghost-light { border-color: rgba(255,255,255,.35); color: #fff; }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }

.btn--sm { min-height: 40px; padding: 8px 16px; font-size: .9375rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Lien avec flèche */
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; text-decoration: none;
}
.link-arrow::after { content: "→"; transition: transform .2s var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }
.link-arrow.is-disabled { color: var(--muted); pointer-events: none; }
.link-arrow.is-disabled::after { content: none; }


/* 7. En-tête et navigation ------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255, 255, 255, .85); backdrop-filter: saturate(180%) blur(12px); }
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.site-header .container {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

/* Logo : pictogramme carte + mot « SunuGal » */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--navy-800);
  text-decoration: none;
}
.logo:hover { color: var(--navy-800); }
.logo svg { width: 32px; height: 32px; flex: none; }
.logo--light { color: #fff; }
.logo--light:hover { color: #fff; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav__list { display: flex; gap: 4px; }
.nav__link {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s, background-color .2s;
}
.nav__link:hover { color: var(--blue-600); background: var(--blue-50); }
.nav__link[aria-current="page"] { color: var(--blue-600); font-weight: 600; }
.nav__actions { display: flex; align-items: center; gap: 12px; }

/* Sélecteur de langue FR | EN */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.lang-switch button {
  min-width: 40px;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--navy-800); color: #fff; }
.lang-switch button:not([aria-pressed="true"]):hover { color: var(--blue-600); }

/* Bouton menu mobile (caché sur ordinateur) */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-right: -8px;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: var(--radius);
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  margin: 5px auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* 8. Héros ----------------------------------------------------------------- */
/* Héros sombre de l'accueil */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 8vw, 120px) clamp(64px, 9vw, 128px);
  background: var(--navy-800);
  color: #c9d6ea;
}
.hero::before {                 /* halo discret derrière la carte */
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 60vw; height: 60vw;
  max-width: 760px; max-height: 760px;
  background: radial-gradient(closest-side, rgba(44, 82, 130, .55), transparent);
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.hero h1 { color: #fff; }
.hero h1 .text-accent { color: var(--gold-500); }
.hero .eyebrow { color: var(--gold-500); }
.hero .lead { color: #c9d6ea; margin-top: 20px; max-width: 560px; }
.hero .btn-row { margin-top: 32px; }

/* Points de confiance sous les boutons */
.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 36px;
  font-size: var(--fs-small);
  color: #c9d6ea;
}
.trust-list li { display: inline-flex; align-items: center; gap: 8px; }
.trust-list svg { width: 18px; height: 18px; color: var(--gold-500); flex: none; }

/* Héros clair des pages intérieures */
.page-hero {
  padding-block: clamp(48px, 7vw, 96px) clamp(40px, 6vw, 80px);
  background:
    linear-gradient(180deg, var(--blue-50) 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
}
.page-hero .container {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.page-hero--simple .container { grid-template-columns: 1fr; }
.page-hero--simple .container > div { max-width: 860px; }
.page-hero .lead { margin-top: 18px; max-width: 640px; }
.page-hero .btn-row { margin-top: 28px; }

/* Visuel à droite du héros intérieur : grand pictogramme dans un cadre */
.hero-visual {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
  text-align: center;
  font-weight: 600;
  color: var(--navy-800);
}
.hero-visual img { width: 96px; height: 96px; }

/* Encadré de chiffres dans le héros (page Agent) */
.hero-stats { display: grid; gap: 14px; }
.hero-stats .stat { text-align: left; background: #fff; box-shadow: var(--shadow-sm); }

/* Pastille d'état (page API) */
.status-pill {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 24px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--gold-100);
  color: #7a5200;
  font-size: var(--fs-small);
  font-weight: 600;
}
.status-pill::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold-600);
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: .35; } }


/* 9. Cartes, étapes, chiffres --------------------------------------------- */
.card {
  position: relative;
  padding: clamp(24px, 3vw, 32px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.card:hover { border-color: var(--blue-100); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h2, .card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: var(--fs-small); }

/* Pastille d'icône des cartes */
.icon-badge {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--blue-50);
}
.icon-badge img { width: 32px; height: 32px; }
.icon-badge--lg { width: 72px; height: 72px; }
.icon-badge--lg img { width: 40px; height: 40px; }

/* Étapes numérotées */
.steps { counter-reset: step; }
.step {
  position: relative;
  padding: 28px 24px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.step__num {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--gold-500);
  font-weight: 700;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); font-size: var(--fs-small); }

/* Chiffres clés */
.stat {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
}
.stat__num {
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--navy-800);
}
.stat__label { margin-top: 6px; color: var(--muted); font-size: var(--fs-small); }
.stats-band { background: var(--navy-800); }
.stats-band h2 { color: #fff; }
.stats-band .stat { border-color: rgba(255,255,255,.14); }
.stats-band .stat__num { color: var(--gold-500); }
.stats-band .stat__label { color: #c9d6ea; }

/* Liste à coches (prérequis) */
.checklist { display: grid; gap: 16px; }
.check-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.check-item__icon {
  flex: none;
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gold-100);
  color: var(--navy-800);
}
.check-item__icon svg { width: 16px; height: 16px; }
.check-item h3 { margin-bottom: 2px; }
.check-item p { color: var(--muted); font-size: var(--fs-small); }

/* Cartes de contact */
.contact-card { text-align: left; }
.contact-card .contact-card__value {
  display: inline-block;
  margin-top: 12px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--blue-600);
  text-decoration: none;
  word-break: break-word;
}
.contact-card .contact-card__value:hover { text-decoration: underline; }
.contact-card .contact-card__meta { margin-top: 6px; font-size: .875rem; }
.contact-card .muted-value { color: var(--muted); }

/* Horaires du support */
.hours { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.hours__item { display: flex; align-items: center; gap: 16px; padding: 20px 24px; background: #fff; }
.hours__item img { width: 36px; height: 36px; flex: none; }
.hours__item h4 { font-size: 1rem; }
.hours__item p { color: var(--muted); font-size: var(--fs-small); }


/* Section sombre « Entreprises et institutions » (accueil) */
.section--dark { background: var(--navy-800); color: #c9d6ea; }
.section--dark h2 { color: #fff; }
.section--dark .eyebrow { color: var(--gold-500); }
.section--dark .lead { color: #c9d6ea; }
.biz-card { display: flex; flex-direction: column; border-color: transparent; }
.biz-card__for {
  margin-bottom: 6px;
  font-size: .8125rem !important;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue-600) !important;
}
.biz-list { display: grid; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.biz-list li { display: flex; gap: 10px; font-size: var(--fs-small); color: var(--text); line-height: 1.5; }
.biz-list svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--gold-600); }
.biz-cta { justify-content: center; margin-top: clamp(32px, 4vw, 48px); }


/* 10. FAQ -------------------------------------------------------------------
   Utilise <details>/<summary> : accessible au clavier et sans JavaScript. */
.faq { display: grid; gap: 12px; max-width: 820px; margin-inline: auto; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .2s, box-shadow .2s;
}
.faq details[open] { border-color: var(--blue-100); box-shadow: var(--shadow-sm); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {                       /* signe + / − */
  content: "";
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background:
    linear-gradient(var(--blue-600), var(--blue-600)) center / 12px 2px no-repeat,
    linear-gradient(var(--blue-600), var(--blue-600)) center / 2px 12px no-repeat,
    var(--blue-50);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after {
  background:
    linear-gradient(var(--blue-600), var(--blue-600)) center / 12px 2px no-repeat,
    var(--blue-50);
}
.faq summary:hover { color: var(--blue-600); }
.faq .faq__answer { padding: 0 24px 22px; color: var(--muted); }


/* 11. Formulaires ---------------------------------------------------------- */
.form-card {
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(24px, 4vw, 48px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }

.field { display: grid; gap: 6px; }
.field label { font-size: .9375rem; font-weight: 600; color: var(--ink); }
.field .req { color: var(--danger); }
.field .hint { font-size: .8125rem; color: var(--muted); }

.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid #cfd8e3;
  border-radius: var(--radius);
  background: #fff;
  font-size: 1rem;              /* 16 px : évite le zoom auto sur iPhone */
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 140px; resize: vertical; }
.select {
  appearance: none;
  padding-right: 40px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235b6b82' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.input::placeholder, .textarea::placeholder { color: #94a3b8; }
.input:hover, .select:hover, .textarea:hover { border-color: #a9b7c9; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(44, 82, 130, .15);
}
.input:user-invalid, .select:user-invalid, .textarea:user-invalid { border-color: var(--danger); }

.form-actions { margin-top: 28px; display: grid; gap: 12px; }
.form-note { font-size: .8125rem; color: var(--muted); }

/* Message d'état après envoi (rempli par main.js) */
.form-status { display: none; padding: 12px 16px; border-radius: var(--radius); font-size: var(--fs-small); font-weight: 500; }
.form-status.is-success { display: block; background: #ecfdf3; color: var(--success); }
.form-status.is-error   { display: block; background: #fef2f2; color: var(--danger); }

/* Champ honeypot anti-spam : invisible pour les humains */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Formulaire en ligne (email + bouton) */
.inline-form { display: flex; gap: 10px; max-width: 520px; }
.inline-form .input { flex: 1; min-width: 0; }
.cta-band .inline-form { margin-inline: auto; }
.cta-band .inline-form .input { border-color: transparent; }
.cta-band .form-status { max-width: 520px; margin: 12px auto 0; }


/* 12. Bandeaux d'appel à l'action ----------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 7vw, 96px);
  background: var(--navy-800);
  color: #c9d6ea;
  text-align: center;
}
.cta-band::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -1px;
  width: 120px; height: 4px;
  transform: translateX(-50%);
  background: var(--gold-500);
}
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 620px; margin: 14px auto 28px; font-size: var(--fs-lead); }
.cta-band .btn-row { justify-content: center; }

/* Boîte claire (notification API) */
.panel {
  max-width: 720px;
  margin-inline: auto;
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  text-align: center;
}
.panel h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.panel > p { margin: 12px auto 24px; color: var(--muted); max-width: 520px; }
.panel .inline-form { margin-inline: auto; }
.panel .form-status { max-width: 520px; margin: 12px auto 0; }
.panel .form-note { margin-top: 14px; }


/* 13. Pages légales -------------------------------------------------------- */
.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }

/* Sommaire collant (ordinateur uniquement) */
.toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: .875rem; }
.toc p { margin-bottom: 10px; font-weight: 600; color: var(--ink); text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc a {
  display: block; margin-left: -2px; padding: 6px 12px;
  border-left: 2px solid transparent;
  color: var(--muted); text-decoration: none;
}
.toc a:hover, .toc a.is-active { color: var(--blue-600); border-left-color: var(--blue-600); }

.prose { max-width: 760px; }
.prose .updated { display: inline-block; margin-bottom: 32px; padding: 6px 12px; border-radius: 6px; background: var(--bg-alt); color: var(--muted); font-size: .875rem; }
.prose section { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.prose section:last-of-type { border-bottom: 0; }
.prose h2 { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; font-size: clamp(1.375rem, 1.2rem + .7vw, 1.625rem); }
.prose h2 img { width: 40px; height: 40px; padding: 8px; border-radius: 10px; background: var(--blue-50); flex: none; }
.prose h3 { margin: 24px 0 8px; font-size: 1.0625rem; }
.prose p + p { margin-top: 12px; }
.prose ul { margin-top: 12px; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.prose ul li { position: relative; padding-left: 22px; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); }

/* Encadrés : info (bleu), important (or), sécurité (marine) */
.callout { display: flex; gap: 16px; margin: 0 0 36px; padding: 20px 24px; border-radius: var(--radius-lg); border: 1px solid; }
.callout img { width: 32px; height: 32px; flex: none; }
.callout h3, .callout h4 { margin: 0 0 4px; font-size: 1.0625rem; }
.callout p { font-size: var(--fs-small); }
.callout--info    { background: var(--blue-50); border-color: var(--blue-100); }
.callout--warning { background: var(--gold-100); border-color: #f6dc9d; }
.callout--warning h4 { color: #6b4700; }
.callout--dark    { background: var(--navy-800); border-color: var(--navy-800); color: #c9d6ea; }
.callout--dark h3 { color: #fff; }
.callout--dark img { filter: brightness(0) invert(1); }

.contact-box { padding: 28px; border-radius: var(--radius-lg); background: var(--bg-alt); border: 1px solid var(--line); }
.contact-box h2 { font-size: 1.375rem; margin-bottom: 8px; }
.contact-box .btn-row { margin-top: 18px; }


/* 14. Composants spécifiques ---------------------------------------------- */
/* Carte VISA du héros (dessinée en CSS, aucune image) */
.visa-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1.586;                      /* format carte bancaire ISO */
  margin-inline: auto;
  padding: clamp(20px, 3vw, 28px);
  display: flex; flex-direction: column; justify-content: space-between;
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(242, 178, 51, .28) 0%, transparent 45%),
    linear-gradient(135deg, #2c5282 0%, #183a6b 55%, #0e2142 100%);
  color: #fff;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,.12);
  transform: rotate(-4deg);
}
.visa-card__top { display: flex; justify-content: space-between; align-items: center; }
.visa-card__brand { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.visa-card__chip {
  width: 44px; height: 34px; border-radius: 6px;
  background: linear-gradient(135deg, #f6d27a, #d99a1e);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.visa-card__number { font-size: clamp(1rem, .8rem + 1vw, 1.375rem); letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.visa-card__bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.visa-card__label { font-size: .625rem; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.visa-card__name { font-size: .875rem; font-weight: 600; letter-spacing: .06em; }
.visa-card__visa { font-size: 1.75rem; font-weight: 800; font-style: italic; letter-spacing: -.02em; }
.visa-card-wrap { position: relative; padding: 24px 0; }
.visa-card-wrap::after {                     /* deuxième carte en arrière-plan */
  content: "";
  position: absolute; inset: 12% 2% 6% 14%;
  z-index: -1;
  border-radius: 18px;
  background: var(--gold-500);
  opacity: .9;
  transform: rotate(6deg);
}
.visa-card-wrap { isolation: isolate; }

/* Frise chronologique (page API) */
.timeline { position: relative; max-width: 760px; margin-inline: auto; padding-left: 36px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline__item { position: relative; padding-bottom: 32px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; left: -36px; top: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--blue-600); box-shadow: 0 0 0 5px var(--blue-50);
}
.timeline__dot--todo { background: #fff; border: 2px solid #cbd5e1; box-shadow: none; }
.timeline__date { font-size: .8125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--blue-600); }
.timeline__item h3 { margin: 4px 0 6px; }
.timeline__item p { color: var(--muted); font-size: var(--fs-small); }

/* Offres d'emploi */
.jobs { display: grid; gap: 16px; max-width: 920px; margin-inline: auto; }
.job { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: start; }
.job p { grid-column: 1 / -1; }
.job__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-alt);
  font-size: .8125rem; font-weight: 500; color: var(--muted);
}
.tag img { width: 14px; height: 14px; }

/* Partenaires */
.partners { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.partner {
  display: grid; place-items: center;
  width: 220px; height: 120px; padding: 24px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #fff;
}
.partner img { max-height: 64px; width: auto; }
.partners-label { margin-bottom: 20px; text-align: center; font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }


/* 15. Pied de page --------------------------------------------------------- */
.site-footer { background: var(--navy-950); color: #a9b8cf; font-size: var(--fs-small); }
.site-footer a { color: #a9b8cf; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 40px;
  padding-block: clamp(48px, 6vw, 80px) 40px;
}
.footer-brand p { margin-top: 14px; max-width: 300px; line-height: 1.6; }
.footer-col h2 {
  margin-bottom: 14px;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
}
.footer-col ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-block: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .875rem;
}
.footer-bottom button {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: #a9b8cf; font-size: .875rem; text-decoration: underline; text-underline-offset: 3px;
}
.footer-bottom button:hover { color: #fff; }


/* 16. Cookies ---------------------------------------------------------------
   Bandeau en bas d'écran + fenêtre de préférences (<dialog>). */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 200;
  max-width: 980px;
  margin-inline: auto;
  padding: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(14, 33, 66, .22);
  animation: slide-up .35s var(--ease);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--gold-100); }
.cookie-banner__icon img { width: 28px; height: 28px; }
.cookie-banner h2 { font-size: 1.0625rem; margin-bottom: 4px; }
.cookie-banner p { font-size: .875rem; color: var(--muted); line-height: 1.55; }
.cookie-banner p a { white-space: nowrap; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@keyframes slide-up { from { transform: translateY(20px); opacity: 0; } }

.cookie-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}
.cookie-dialog::backdrop { background: rgba(11, 27, 54, .55); }
.cookie-dialog__body { padding: 28px; }
.cookie-dialog h2 { font-size: 1.375rem; margin-bottom: 8px; }
.cookie-dialog > .cookie-dialog__body > p { color: var(--muted); font-size: var(--fs-small); margin-bottom: 20px; }
.cookie-option { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.cookie-option h3 { font-size: 1rem; }
.cookie-option p { font-size: .875rem; color: var(--muted); margin-top: 2px; }
.cookie-dialog__footer { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 16px 28px; background: var(--bg-alt); border-top: 1px solid var(--line); }

/* Interrupteur on/off */
.switch { position: relative; flex: none; width: 46px; height: 26px; margin-top: 2px; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--blue-600); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { opacity: .6; }
.switch input:focus-visible + span { outline: 3px solid var(--gold-500); outline-offset: 2px; }


/* 17. Utilitaires et accessibilité ---------------------------------------- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 300;
  padding: 10px 16px; border-radius: var(--radius);
  background: var(--navy-800); color: #fff; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; border-radius: 4px; }

.mt-0 { margin-top: 0 !important; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* Apparition douce au défilement (activée par main.js) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}


/* 18. Responsive ----------------------------------------------------------- */

/* Tablette et petits portables */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

/* Menu mobile à partir de 1100 px */
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px var(--gutter) 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s, transform .2s var(--ease), visibility 0s .2s;
  }
  .site-header.is-open .nav { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s var(--ease); }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; }
  .nav__link:hover { background: none; }
  .nav__actions { justify-content: space-between; }
  .nav__actions .btn { flex: 1; }

  .hero .container, .page-hero .container { grid-template-columns: 1fr; }
  .hero__visual { max-width: 340px; margin-inline: auto; width: 100%; }
  .page-hero .hero-visual { display: none; }       /* visuel décoratif masqué sur mobile */
  .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal { grid-template-columns: 1fr; }
  .toc { display: none; }
  .cookie-banner { grid-template-columns: 1fr; }
  .cookie-banner__icon { display: none; }
  .cookie-banner__actions { justify-content: stretch; }
  .cookie-banner__actions .btn { flex: 1 1 auto; }
}

/* Mobile */
@media (max-width: 640px) {
  :root { --fs-body: 1rem; --header-h: 64px; }
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 100%; }
  .hero-stats { grid-template-columns: 1fr; }
  .inline-form { flex-direction: column; }
  .job { grid-template-columns: 1fr; }
  .job .btn { justify-self: start; }
  .footer-top { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .footer-bottom { flex-direction: column; }
  .faq summary { padding: 18px 20px; font-size: 1rem; }
  .faq .faq__answer { padding: 0 20px 20px; }
  .callout { flex-direction: column; }
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: 20px; }
  .cookie-banner__actions { flex-direction: column-reverse; }
  .cookie-banner__actions .btn { width: 100%; }
  .partner { width: 100%; }
  .visa-card { transform: rotate(-3deg); }
}
