/* ==========================================================================
   researchproject.fr — Feuille de style unique
   Site statique / vitrine. Mobile-first. Priorité : lisibilité.
   Sommaire :
   1. Variables (design tokens)
   2. Reset & base
   3. Typographie & lisibilité
   4. Layout (conteneurs, sections, grilles)
   5. Composants (boutons, cartes, header, footer, formulaire…)
   6. Utilitaires
   7. Responsive
   8. Accessibilité / préférences utilisateur
   ========================================================================== */

/* 0. POLICE AUTO-HÉBERGÉE (Inter variable, woff2) ========================
   Auto-hébergée pour la performance et la conformité RGPD (aucun appel à
   Google Fonts). Police variable : une seule requête couvre 100→900. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../assets/fonts/inter-latin-wght-normal.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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 1. VARIABLES ============================================================ */
:root {
  /* Couleurs — thème sombre futuriste : fond profond, texte clair, accent néon */
  --color-bg: #0b0a18;              /* fond principal (indigo quasi noir) */
  --color-surface: #110f26;         /* sections alternées (panneau sombre) */
  --color-surface-2: #221e44;       /* survols, puces, états */
  --color-card: #191634;            /* cartes surélevées */
  --color-text: #d9dcec;            /* texte clair — fort contraste sur fond sombre */
  --color-text-muted: #9aa0bf;      /* texte secondaire (≥ 4.5:1 sur le fond) */
  --color-heading: #f4f5ff;         /* titres (blanc cassé) */
  --color-border: #2c2954;          /* traits, séparateurs, contours */

  --color-accent: #a78bfa;          /* accent clair — liens, eyebrow, icônes, focus */
  --color-accent-hover: #c4b5fd;    /* état survol des liens */
  --color-accent-strong: #7c3aed;   /* fond des boutons primaires (texte blanc lisible) */
  --color-accent-soft: rgba(139, 92, 246, 0.16); /* halos / fonds d'icônes */
  --color-on-accent: #ffffff;       /* texte sur fond accent */

  /* Dégradé néon de la marque (cyan → violet → magenta) — éléments décoratifs */
  --brand-gradient: linear-gradient(135deg, #22d3ee 0%, #7c3aed 55%, #ec4899 100%);
  --color-footer: #080714;          /* fond footer (encore plus profond) */

  /* Typographie */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-body);

  --fs-base: 1.0625rem;   /* 17px — corps de texte (16–18px) */
  --lh-body: 1.65;        /* interligne texte courant (1.6–1.7) */
  --lh-tight: 1.2;        /* interligne titres */
  --measure: 68ch;        /* longueur de ligne max (~65–70 caractères) */

  /* Échelle typographique (fluide, clamp mini→maxi) */
  --fs-h1: clamp(2rem, 1.4rem + 2.7vw, 3.25rem);
  --fs-h2: clamp(1.6rem, 1.25rem + 1.6vw, 2.4rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --fs-lead: clamp(1.125rem, 1.05rem + 0.4vw, 1.3rem);
  --fs-small: 0.9375rem; /* 15px */

  /* Espacements (échelle) */
  --space-2xs: 0.375rem;
  --space-xs: 0.625rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Formes */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Ombres douces et discrètes */
  --shadow-sm: 0 1px 2px rgba(16, 26, 41, 0.06),
               0 1px 3px rgba(16, 26, 41, 0.05);
  --shadow-md: 0 6px 18px rgba(16, 26, 41, 0.07),
               0 2px 6px rgba(16, 26, 41, 0.05);
  --shadow-lg: 0 18px 45px rgba(16, 26, 41, 0.10);

  /* Divers */
  --container: 1120px;
  --container-narrow: 780px;
  --header-h: 72px;
  --transition: 180ms ease;
}

/* 2. RESET & BASE ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
picture,
svg { display: block; max-width: 100%; height: auto; }

a { color: var(--color-accent); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--color-accent-hover); }

ul, ol { padding-left: 1.25rem; }

/* 3. TYPOGRAPHIE & LISIBILITÉ ============================================= */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: var(--lh-tight);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p, li { max-width: var(--measure); }

.lead {
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
  line-height: 1.55;
  max-width: 62ch;
}

/* Bloc de contenu long : garde une longueur de ligne lisible */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--space-sm); }
.prose h2 { margin-top: var(--space-lg); }
.prose h3 { margin-top: var(--space-md); }

/* 4. LAYOUT =============================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-md);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--space-2xl); }
.section--tight { padding-block: var(--space-xl); }
.section--surface { background: var(--color-surface); }

.section-head { max-width: 60ch; margin-bottom: var(--space-lg); }
.section-head .eyebrow { margin-bottom: var(--space-xs); }
.section-head p { color: var(--color-text-muted); margin-top: var(--space-xs); }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.grid { display: grid; gap: var(--space-md); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

/* 5. COMPOSANTS =========================================================== */

/* Lien d'évitement (accessibilité clavier) */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  background: var(--color-accent);
  color: var(--color-on-accent);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  transition: top var(--transition);
}
.skip-link:focus { top: 12px; color: var(--color-on-accent); }

/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 10, 24, 0.72);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--color-border);
  border-top: 3px solid transparent;
  border-image: var(--brand-gradient) 1;
}
.brand img { width: 38px; height: 38px; }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-heading);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--color-heading); }
.brand img { width: 32px; height: 32px; }

.nav { display: flex; align-items: center; gap: var(--space-md); }
.nav__list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav__link {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: background var(--transition), color var(--transition);
}
.nav__link:hover { background: var(--color-surface-2); color: var(--color-heading); }
.nav__link[aria-current="page"] { color: var(--color-accent); font-weight: 600; }

/* Bouton burger (mobile) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-heading);
}
.nav-toggle:hover { background: var(--color-surface-2); }
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition),
    box-shadow var(--transition);
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--color-accent-strong);
  color: var(--color-on-accent);
  box-shadow: 0 6px 22px -6px rgba(124, 58, 237, 0.65);
}
.btn--primary:hover {
  background: var(--color-accent-strong);
  color: var(--color-on-accent);
  box-shadow: 0 10px 30px -6px rgba(167, 139, 250, 0.8);
  transform: translateY(-1px);
}
.btn--secondary {
  background: var(--color-bg);
  color: var(--color-heading);
  border-color: var(--color-border);
}
.btn--secondary:hover { background: var(--color-surface-2); color: var(--color-heading); }
.btn--ghost { background: transparent; color: var(--color-accent); padding-inline: 0.4rem; }
.btn--ghost:hover { color: var(--color-accent-hover); }
.btn--lg { padding: 0.95rem 1.7rem; font-size: 1.0625rem; }

.btn-group { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* --- Hero --- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 2rem + 7vw, 6.5rem);
  background:
    radial-gradient(900px 460px at 88% -20%, rgba(34, 211, 238, 0.22), transparent 62%),
    radial-gradient(820px 520px at 12% 120%, rgba(236, 72, 153, 0.20), transparent 58%),
    linear-gradient(180deg, #0b0a18 0%, #14122c 100%);
  border-bottom: 1px solid var(--color-border);
}
.hero__inner { max-width: 620px; }
.hero h1 { margin-bottom: var(--space-md); }
.hero .lead { margin-bottom: var(--space-lg); max-width: 56ch; }

/* Hero sur deux colonnes (texte + visuel logo) */
.hero-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: var(--space-xl);
}
.hero-visual { display: grid; place-items: center; }
.hero-visual img {
  width: min(360px, 80%);
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(124, 58, 237, 0.28));
}
@media (max-width: 860px) {
  .hero-layout { grid-template-columns: 1fr; gap: var(--space-lg); }
  .hero-visual { display: none; } /* on privilégie le texte sur mobile */
}

/* --- Cartes --- */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}
.card--link { display: block; text-decoration: none; color: inherit; }
.card--link:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 34px -10px rgba(124, 58, 237, 0.5);
  border-color: rgba(167, 139, 250, 0.6);
}
.card--link p { color: var(--color-text-muted); }
.card h3 { margin-bottom: var(--space-2xs); }
.card p { color: var(--color-text-muted); }
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: var(--space-sm);
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
.card__icon svg { width: 24px; height: 24px; }

/* --- Bande CTA --- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: #17123a;
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  color: var(--color-on-accent);
  box-shadow: var(--shadow-lg);
}
/* Halo néon décoratif */
.cta-band::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 60%;
  aspect-ratio: 1;
  background: var(--brand-gradient);
  filter: blur(60px);
  opacity: 0.55;
  z-index: 0;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 52ch; margin-top: var(--space-xs); }
.cta-band .btn--primary { background: #fff; color: #4c1d95; }
.cta-band .btn--primary:hover { background: #f2ebfd; color: #4c1d95; }
.cta-band .btn--secondary {
  background: transparent; color: #fff; border-color: rgba(255,255,255,0.5);
}
.cta-band .btn--secondary:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* --- Bloc encart secondaire (aperçu accueil / services) --- */
.teaser {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-lg);
  background: #17123a;
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 1.5rem + 3vw, 3.25rem);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.teaser::before {
  content: "";
  position: absolute;
  inset: auto auto -40% -10%;
  width: 55%;
  aspect-ratio: 1;
  background: var(--brand-gradient);
  filter: blur(70px);
  opacity: 0.5;
  z-index: 0;
}
.teaser > * { position: relative; z-index: 1; }
.teaser h2 { color: #fff; }
.teaser .btn--primary { background: #fff; color: #4c1d95; margin-top: var(--space-sm); }
.teaser .btn--primary:hover { background: #f2ebfd; color: #4c1d95; }
.teaser__mark svg {
  width: clamp(90px, 12vw, 150px);
  height: auto;
  color: transparent;
  stroke: url(#teasergrad);
}
/* Repli couleur si le dégradé SVG n'est pas défini */
.teaser__mark svg { stroke: #a78bfa; }
@media (max-width: 640px) {
  .teaser { grid-template-columns: 1fr; }
  .teaser__mark { display: none; }
}

/* --- Liste "features" / valeurs --- */
.feature { display: flex; gap: var(--space-sm); align-items: flex-start; }
.feature__mark {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin-top: 2px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-soft); color: var(--color-accent);
}
.feature__mark svg { width: 16px; height: 16px; }
.feature h3 { font-size: 1.125rem; margin-bottom: 2px; }
.feature p { color: var(--color-text-muted); font-size: 1rem; }

/* --- Étapes numérotées --- */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 3.25rem; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-accent); color: #fff;
  font-weight: 700;
}

/* --- Bloc contact / coordonnées --- */
.contact-info { list-style: none; padding: 0; display: grid; gap: var(--space-sm); }
.contact-info li { display: flex; gap: 0.75rem; align-items: flex-start; max-width: none; }
.contact-info .contact-info__ic { color: var(--color-accent); flex: none; margin-top: 3px; }
.contact-info a { text-decoration: none; }
.contact-info a:hover { text-decoration: underline; }

/* --- Formulaire --- */
.form { display: grid; gap: var(--space-md); }
.form__row { display: grid; gap: var(--space-md); grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; color: var(--color-heading); font-size: 0.95rem; }
.field .req { color: var(--color-accent); }
.field input,
.field textarea,
.field select {
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #6f7599; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.field .hint { font-size: var(--fs-small); color: var(--color-text-muted); }
.form__note { font-size: var(--fs-small); color: var(--color-text-muted); }
.form-status {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status--ok { background: #e7f6ec; color: #14622f; border: 1px solid #b9e3c6; }
.form-status--err { background: #fdecec; color: #8f1f1f; border: 1px solid #f3c2c2; }

/* --- Footer --- */
.site-footer {
  background: var(--color-footer);
  color: #c4cede;
  padding-block: var(--space-xl) var(--space-md);
  border-top: 3px solid transparent;
  border-image: var(--brand-gradient) 1;
}
.site-footer a { color: #dbe4f2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.site-footer .brand { color: #fff; }
.site-footer h4 { color: #fff; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-sm); }
.footer-nav { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.footer-bottom {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  font-size: var(--fs-small); color: #9aa8bf;
  text-align: center;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  justify-content: center;
}
.footer-legal a { color: #9aa8bf; }
.footer-legal a:hover { color: #fff; }

/* --- Sommaire légal --- */
.legal-toc {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}
.legal-toc strong {
  display: block;
  color: var(--color-heading);
  margin-bottom: var(--space-xs);
}
.legal-toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.legal-toc a { color: var(--color-accent); text-decoration: none; }
.legal-toc a:hover { color: var(--color-accent-hover); text-decoration: underline; }

/* --- FAQ (accordéon natif <details>) --- */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-sm) var(--space-md);
  font-weight: 600;
  color: var(--color-heading);
  font-size: 1.0625rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: none;
  width: 12px; height: 12px;
  border-right: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transform: rotate(45deg);
  transition: transform var(--transition);
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item summary:hover { background: var(--color-surface); }
.faq-answer { padding: 0 var(--space-md) var(--space-md); }
.faq-answer p { color: var(--color-text-muted); max-width: none; }

/* --- Badge / pastille placeholder de contenu --- */
.placeholder {
  outline: 1px dashed #f0a500;
  outline-offset: 3px;
  background: #fff9ec;
}
.placeholder-note {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #8a5b00;
  background: #ffe9b3;
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.5rem;
}

/* 6. UTILITAIRES ========================================================== */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-lg { margin-top: var(--space-lg); }
.stack > * + * { margin-top: var(--space-sm); }
.stack-lg > * + * { margin-top: var(--space-md); }

/* 7. RESPONSIVE =========================================================== */
@media (max-width: 860px) {
  .grid--3 { grid-template-columns: 1fr 1fr; }
}

/* Navigation : le menu horizontal complet demande ~890 px de large.
   En dessous, on passe au menu déroulant (burger). */
@media (max-width: 940px) {
  /* Navigation mobile en panneau déroulant */
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: block;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: var(--space-sm) var(--space-md) var(--space-md);
    transform: translateY(-120%);
    transition: transform 220ms ease;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .nav.is-open { transform: translateY(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0.15rem; }
  .nav__link { padding: 0.85rem 0.75rem; border-radius: var(--radius-sm); font-size: 1.0625rem; }
  .nav .btn { margin-top: var(--space-xs); width: 100%; }
}

@media (max-width: 760px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .section { padding-block: var(--space-xl); }
}

@media (max-width: 380px) {
  :root { --fs-base: 1rem; } /* 16px minimum garanti sur très petits écrans */
}

/* 8. ACCESSIBILITÉ / PRÉFÉRENCES ========================================= */
:where(a, button, input, textarea, select, .nav__link, [tabindex]):focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
