/* =========================================================================
   XNOVA SYSTEMS — DESIGN SYSTEM (feuille globale, chargée sur toutes les pages)
   Contrat d'utilisation : docs/design-system.md

   1. Tokens            couleurs, typo, espacements, rayons, ombres, mouvement
   2. Base              reset, éléments HTML, focus
   3. Typographie       .display, .h1–.h3, .lead, .eyebrow, .gradient-text
   4. Mise en page      .container, .section, .grid, .split, .stack, .actions
   5. Composants        boutons, liens, en-têtes, cartes, listes, citations…
   6. Formulaires       .form-field, .form-row, .form-consent, messages
   7. Habillage du site navbar, menu mobile, langue, footer, WhatsApp
   8. Mouvement         apparitions, lumière au curseur, profondeur (voir motion.js)
   9. Utilitaires       .visually-hidden, .text-muted…

   Règles : aucune couleur, taille ou durée en dur hors section 1.
   Le CSS propre à une page va dans src/assets/css/<page>.css (front matter `css`).
   ========================================================================= */


/* =========================================================================
   1. TOKENS
   ========================================================================= */

:root {
  color-scheme: dark;

  /* --- Couleurs : neutres (surfaces du plus sombre au plus clair) --- */
  --color-bg: #0A0A0A;
  --color-surface: #111111;
  --color-surface-2: #1A1A1A;
  --color-surface-3: #242424;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.16);

  /* --- Couleurs : texte (contrastes mesurés sur --color-bg / --color-surface-2) --- */
  --color-text: #F5F5F5;          /* 18.1:1 / 15.4:1 */
  --color-text-muted: #A1A1AA;    /* 7.6:1  / 6.6:1  — paragraphes */
  --color-text-subtle: #8B8B94;   /* 5.7:1  / 4.9:1  — notes, méta */

  /* --- Couleurs : marque --- */
  --color-brand: #0066FF;         /* fond plein avec texte blanc : 4.8:1 */
  --color-accent: #00F0FF;        /* liens, focus, puces */
  --color-accent-soft: rgba(0, 240, 255, 0.1);
  --color-accent-border: rgba(0, 240, 255, 0.32);
  --color-on-accent: #03111F;     /* texte sur dégradé ou cyan : ≥ 5.5:1 */
  --gradient-brand: linear-gradient(135deg, #3388FF 0%, #00F0FF 100%);   /* bouton principal */
  --gradient-text: linear-gradient(110deg, #3D8BFF 0%, #00F0FF 100%);    /* un mot mis en avant */
  --gradient-line: linear-gradient(90deg, #0066FF 0%, #00F0FF 100%);     /* filets fins */
  --glow-brand: radial-gradient(60% 60% at 50% 0%, rgba(0, 102, 255, 0.18) 0%, rgba(0, 102, 255, 0) 70%);
  /* Reflet qui traverse le dégradé du titre du héros (mêmes couleurs aux deux extrémités) */
  --gradient-text-sheen: linear-gradient(110deg, #3D8BFF 0%, #00F0FF 33.3%, #8AF8FF 46%, #E6FEFF 50%, #8AF8FF 54%, #3D8BFF 66.7%, #00F0FF 100%);

  /* --- Lumière qui suit le curseur (cartes, en-têtes, bandeau d'appel) --- */
  --spotlight-edge: rgba(0, 240, 255, 0.55);      /* bordure éclairée */
  --spotlight-fill: rgba(0, 102, 255, 0.10);      /* halo intérieur */
  --spotlight-size: 360px;
  --grid-dot: rgba(255, 255, 255, 0.16);          /* trame de points des en-têtes */

  /* --- Couleurs : états --- */
  --color-success: #4ADE80;
  --color-success-soft: rgba(74, 222, 128, 0.1);
  --color-warning: #FBBF24;
  --color-warning-soft: rgba(251, 191, 36, 0.08);
  --color-danger: #F87171;
  --color-danger-soft: rgba(248, 113, 113, 0.1);
  --color-whatsapp: #25D366;

  /* --- Typographie --- */
  /* Space Grotesk : uniquement les grands titres (h1, h2, chiffres clés).
     Geist : texte, interface et titres secondaires. Geist Mono : sur-titres, numéros, libellés, tags. */
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Échelle 12 / 14 / 16 / 18 / 24 / 32 / 48 / 64 — les titres sont fluides */
  --text-xs: 0.75rem;                                   /* 12 */
  --text-sm: 0.875rem;                                  /* 14 */
  --text-base: 1rem;                                    /* 16 */
  --text-body: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);/* 16 → 17 */
  --text-lg: 1.125rem;                                  /* 18 */
  --text-xl: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);     /* 18 → 24 */
  --text-2xl: clamp(1.5rem, 1.25rem + 1vw, 2rem);       /* 24 → 32 */
  --text-3xl: clamp(2rem, 1.45rem + 2.3vw, 3rem);       /* 32 → 48 */
  --text-4xl: clamp(2.5rem, 1.6rem + 3.8vw, 4rem);      /* 40 → 64 */

  --leading-tight: 1.05;
  --leading-snug: 1.25;
  --leading-normal: 1.65;
  --tracking-tight: -0.035em;
  --tracking-snug: -0.02em;
  --tracking-wide: 0.08em;
  --measure: 65ch;

  /* --- Espacements (base 4 px) --- */
  --space-1: 0.25rem;   /* 4 */
  --space-2: 0.5rem;    /* 8 */
  --space-3: 0.75rem;   /* 12 */
  --space-4: 1rem;      /* 16 */
  --space-5: 1.5rem;    /* 24 */
  --space-6: 2rem;      /* 32 */
  --space-7: 3rem;      /* 48 */
  --space-8: 4rem;      /* 64 */
  --space-9: 6rem;      /* 96 */
  --space-10: 8rem;     /* 128 */
  --section-space: clamp(4rem, 2.8rem + 5vw, 8rem);   /* 64 → 128 entre sections */

  /* --- Mise en page --- */
  --container: 1200px;
  --container-narrow: 760px;
  --container-reading: 720px;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);          /* 16 → 32 */
  --nav-height: 64px;

  /* --- Rayons --- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* --- Ombres --- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 64px -12px rgba(0, 0, 0, 0.6);
  --shadow-brand: 0 10px 30px -10px rgba(0, 140, 255, 0.55);

  /* --- Mouvement --- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --duration-fast: 150ms;
  --duration-base: 240ms;
  --duration-reveal: 720ms;
  --duration-slow: 900ms;
  --reveal-distance: 24px;
  --reveal-blur: 6px;

  /* --- Plans --- */
  --z-float: 90;
  --z-nav: 100;
  --z-skip: 200;
}


/* =========================================================================
   2. BASE
   ========================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + var(--space-5));
}

body {
  min-height: 100vh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

picture {
  display: contents;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: var(--leading-snug);
  text-wrap: balance;
}

/* Grands titres : la même voix que le héros */
h1, h2 {
  font-family: var(--font-display);
  letter-spacing: var(--tracking-tight);
}

/* Titres secondaires (cartes, listes, sous-parties) : Geist, plus sobre aux petites tailles */
h3, h4 {
  font-family: var(--font-body);
  letter-spacing: -0.02em;
}

p,
li,
dd {
  text-wrap: pretty;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

::selection {
  background: rgba(0, 240, 255, 0.25);
  color: var(--color-text);
}

/* Focus visible partout : jamais d'outline: none sans remplacement */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

:target {
  scroll-margin-top: calc(var(--nav-height) + var(--space-5));
}

/* Icônes Font Awesome : alignement optique */
.fa-solid, .fas, .fa-brands, .fab, .fa-regular, .far {
  line-height: 1;
}


/* =========================================================================
   3. TYPOGRAPHIE
   ========================================================================= */

.display,
.h1 {
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: 600;
}

.h2 {
  font-size: var(--text-3xl);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
}

.h3 {
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
}

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

.prose {
  max-width: var(--measure);
  color: var(--color-text-muted);
}

.prose > * + * {
  margin-top: var(--space-4);
}

/* Petit sur-titre au-dessus d'un titre : « 01 / Services » en mono, casse normale */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text-subtle);
}

/* Numéro de section : « 01 — Services » */
.eyebrow__index {
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
}

.eyebrow__index::after {
  content: "/";
  margin-left: var(--space-2);
  color: var(--color-border-strong);
}

/* Variante pastille (héros) */
.eyebrow--pill {
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  font-size: var(--text-xs);
  text-transform: none;
  letter-spacing: 0.01em;
  font-family: var(--font-body);
  color: var(--color-text);
}

.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

/* Un seul mot ou groupe de mots en dégradé par écran */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--color-accent);
}


/* =========================================================================
   4. MISE EN PAGE
   ========================================================================= */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: calc(var(--container-narrow) + 2 * var(--gutter));
}

.section {
  padding-block: var(--section-space);
}

.section--flush-top {
  padding-top: 0;
}

/* Bande légèrement surélevée pour rythmer la page */
.section--surface {
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}

/* Sur une bande .section--surface, les cartes repassent sur le fond le plus sombre */
.section--surface .card {
  background: var(--color-bg);
}

.section--surface .card--interactive:hover,
.section--surface .card--interactive:focus-within {
  background: var(--color-surface-2);
}

/* En-tête de section : sur-titre + titre + chapeau (+ lien) */
.section-head {
  max-width: 760px;
  margin-bottom: clamp(var(--space-6), 4vw, var(--space-8));
}

.section-head h2 {
  font-size: var(--text-3xl);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
}

.section-head .lead {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .lead {
  margin-inline: auto;
}

/* Titre à gauche, lien d'action à droite */
.section-head--split {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5) var(--space-7);
}

.section-head--split > :first-child {
  max-width: 720px;
}

/* Grilles : 1 colonne sur mobile, n colonnes au-delà */
.grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.grid--auto {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

/* Bloc média + texte */
.split {
  display: grid;
  gap: clamp(var(--space-6), 5vw, var(--space-9));
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split--reverse > :first-child {
    order: 2;
  }

  /* Colonne de titre étroite et collante + contenu large */
  .split--aside {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }

  .split--aside > :first-child {
    position: sticky;
    top: calc(var(--nav-height) + var(--space-6));
  }
}

.split--aside .section-head {
  margin-bottom: 0;
}

/* Empilement vertical régulier */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.stack--lg {
  gap: var(--space-6);
}

/* Rangée de boutons */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.actions--center {
  justify-content: center;
}


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

/* ---------- 5.1 Boutons ----------
   .btn--primary   dégradé + texte sombre — UNE action principale par écran
   .btn--secondary contour neutre
   .btn--ghost     texte seul (actions tertiaires)
   Tailles : .btn--sm (36 px, navbar) · défaut 44 px · .btn--lg 52 px · .btn--block */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) ease,
    border-color var(--duration-fast) ease,
    color var(--duration-fast) ease,
    box-shadow var(--duration-base) var(--ease-out),
    filter var(--duration-fast) ease,
    translate 500ms var(--ease-out),
    scale var(--duration-fast) var(--ease-out);
}

/* Retour tactile à l'appui (scale est indépendant du translate « magnétique » de motion.js) */
.btn:active {
  scale: 0.97;
}

.btn:hover {
  transition-duration: var(--duration-fast), var(--duration-fast), var(--duration-fast), var(--duration-base), var(--duration-fast), 160ms, var(--duration-fast);
}

.btn i {
  font-size: 0.875em;
  transition: transform var(--duration-base) var(--ease-out);
}

.btn:hover .fa-arrow-right {
  transform: translateX(3px);
}

.btn:focus-visible {
  border-radius: var(--radius-pill);
}

.btn--primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--gradient-brand);
  color: var(--color-on-accent);
  box-shadow: var(--shadow-brand);
}

/* Reflet qui balaie le bouton au survol */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 70%);
  translate: -110% 0;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover::after {
    translate: 110% 0;
    transition: translate 750ms var(--ease-out);
  }
}

.btn--primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 14px 34px -10px rgba(0, 170, 255, 0.7);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn--ghost {
  padding-inline: var(--space-3);
  color: var(--color-text);
}

.btn--ghost:hover {
  color: var(--color-accent);
}

.btn--sm {
  min-height: 36px;
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
}

.btn--lg {
  min-height: 52px;
  padding: 0 var(--space-6);
  font-size: var(--text-base);
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ---------- 5.2 Liens ---------- */

/* Lien d'action avec flèche : « Voir tous les services → » */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.link-arrow i {
  font-size: 0.8em;
  color: var(--color-accent);
  transition: transform var(--duration-base) var(--ease-out);
}

.link-arrow:hover {
  color: var(--color-accent);
}

.link-arrow:hover i {
  transform: translateX(3px);
}

/* Retour : « ← Toutes les réalisations » */
.back-link {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  margin-bottom: var(--space-5);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.back-link:hover {
  color: var(--color-text);
}

.back-link i {
  font-size: 0.85em;
  transition: transform var(--duration-base) var(--ease-out);
}

.back-link:hover i {
  transform: translateX(-3px);
}

/* Fil d'Ariane */
.breadcrumb {
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  color: var(--color-text-subtle);
}

.breadcrumb li + li::before {
  content: "/";
  margin-inline: var(--space-2);
  color: var(--color-border-strong);
}

.breadcrumb a {
  display: inline-block;
  padding-block: var(--space-2);
  color: var(--color-text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--color-text);
}

/* ---------- 5.3 En-tête de page (toutes les pages sauf l'accueil) ---------- */

.page-header {
  position: relative;
  padding-top: calc(var(--nav-height) + clamp(var(--space-6), 6vw, var(--space-9)));
  padding-bottom: clamp(var(--space-7), 6vw, var(--space-9));
  isolation: isolate;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 520px;
  background: var(--glow-brand);
  z-index: -1;
  pointer-events: none;
}

/* Trame de points : visible autour du curseur (motion.js), sinon un halo fixe en haut à droite */
.page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.5px);
  background-size: 22px 22px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(420px circle at var(--glow-x) var(--glow-y), #000 0%, rgba(0, 0, 0, 0.25) 45%, transparent 75%);
  mask-image: radial-gradient(420px circle at var(--glow-x) var(--glow-y), #000 0%, rgba(0, 0, 0, 0.25) 45%, transparent 75%);
  pointer-events: none;
}

/* Propriétés typées : la trame suit le curseur avec un léger retard (transition) */
@property --glow-x {
  syntax: "<length-percentage>";
  inherits: true;
  initial-value: 78%;
}

@property --glow-y {
  syntax: "<length-percentage>";
  inherits: true;
  initial-value: 30%;
}

.page-header {
  --glow-x: 78%;
  --glow-y: 30%;
  transition: --glow-x 900ms var(--ease-out), --glow-y 900ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .page-header:hover {
    --glow-x: var(--mx, 78%);
    --glow-y: var(--my, 30%);
  }
}

.page-header__title {
  max-width: 18ch;
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.page-header .lead {
  margin-top: var(--space-5);
}

.page-header .actions {
  margin-top: var(--space-6);
}

.page-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-5);
  list-style: none;
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}

.page-header__meta i {
  margin-right: var(--space-2);
  color: var(--color-text-subtle);
}

/* ---------- 5.4 Cartes ---------- */

.card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

/* Lumière qui suit le curseur (motion.js fournit --mx / --my) :
   ::before éclaire la bordure, ::after diffuse un halo sous le contenu. */
.card::before,
.card::after,
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
}

.card::before {
  z-index: 2;
  padding: 1px;
  background: radial-gradient(var(--spotlight-size) circle at var(--mx, 50%) var(--my, 50%), var(--spotlight-edge), rgba(0, 240, 255, 0) 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.card::after,
.cta-band::after {
  z-index: -1;
  background: radial-gradient(calc(var(--spotlight-size) * 1.4) circle at var(--mx, 50%) var(--my, 50%), var(--spotlight-fill), rgba(0, 102, 255, 0) 70%);
}

@media (hover: hover) and (pointer: fine) {
  .card:hover::before,
  .card:hover::after,
  .cta-band:hover::after {
    opacity: 1;
  }
}

@media (min-width: 768px) {
  .card {
    padding: var(--space-6);
  }
}

.card--interactive {
  position: relative;
  transition: border-color var(--duration-base) ease, background-color var(--duration-base) ease;
}

.card--interactive:hover,
.card--interactive:focus-within {
  border-color: var(--color-border-strong);
  background: var(--color-surface-2);
}

/* Toute la carte cliquable : le lien principal porte .card__link */
.card__link {
  color: inherit;
  text-decoration: none;
}

.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card__link:focus-visible {
  outline: none;
}

.card--interactive:has(.card__link:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface-2);
  color: var(--color-accent);
  font-size: 18px;
}

.card__title {
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
}

.card__text {
  color: var(--color-text-muted);
}

.card__footer {
  margin-top: auto;
  padding-top: var(--space-3);
}

/* ---------- 5.5 Média encadré (capture d'écran dans une fenêtre de navigateur) ---------- */

.media-frame {
  overflow: hidden;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
  box-shadow: var(--shadow-lg);
}

.media-frame__bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 32px;
  padding-inline: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.media-frame__dots {
  display: flex;
  gap: 6px;
}

.media-frame__dots::before,
.media-frame__dots::after,
.media-frame__dots span {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-surface-3);
}

.media-frame__url {
  flex: 1;
  max-width: 260px;
  margin-inline: auto;
  padding: 2px var(--space-3);
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  color: var(--color-text-subtle);
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.media-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

/* ---------- 5.6 Étiquettes (.tag, statique) et pastilles (.chip, cliquable) ---------- */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
}

.tag {
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 400;
  line-height: 1.5;
  white-space: nowrap;
}

.tag--accent {
  border-color: var(--color-accent-border);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: border-color var(--duration-fast) ease, background-color var(--duration-fast) ease;
}

.chip i {
  color: var(--color-accent);
  font-size: 0.9em;
}

.chip:hover {
  border-color: var(--color-accent-border);
  background: var(--color-accent-soft);
}

/* ---------- 5.7 Liste indexée (services numérotés 01–05) ---------- */

.index-list {
  list-style: none;
  border-top: 1px solid var(--color-border);
}

.index-list__item {
  border-bottom: 1px solid var(--color-border);
}

.index-list__link {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-2) var(--space-5);
  align-items: start;
  padding: var(--space-5) var(--space-2);
  color: inherit;
  text-decoration: none;
  transition: background-color var(--duration-base) ease;
}

.index-list__link:hover {
  background:
    radial-gradient(420px circle at var(--mx, 0) var(--my, 50%), rgba(0, 102, 255, 0.08), rgba(0, 102, 255, 0) 70%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

/* Filet en dégradé qui se trace sous la ligne survolée */
.index-list__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--gradient-line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 600ms var(--ease-out);
  pointer-events: none;
}

.index-list__title {
  transition: translate var(--duration-base) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .index-list__link:hover::after {
    transform: scaleX(1);
  }

  .index-list__link:hover .index-list__title {
    translate: 6px 0;
  }
}

.index-list__num {
  padding-top: 0.2em;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-subtle);
  transition: color var(--duration-fast) ease;
}

.index-list__title {
  font-size: var(--text-2xl);
  line-height: 1.2;
  letter-spacing: var(--tracking-snug);
}

.index-list__text {
  margin-top: var(--space-2);
  max-width: 52ch;
  color: var(--color-text-muted);
}

.index-list .tag-list {
  margin-top: var(--space-3);
}

.index-list__arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  color: var(--color-text-muted);
  font-size: 14px;
  transition: color var(--duration-fast) ease, border-color var(--duration-fast) ease, transform var(--duration-base) var(--ease-out);
}

.index-list__link:hover .index-list__num,
.index-list__link:hover .index-list__arrow {
  color: var(--color-accent);
}

.index-list__link:hover .index-list__arrow {
  border-color: var(--color-accent-border);
  transform: translateX(3px);
}

@media (max-width: 559px) {
  .index-list__link {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .index-list__num {
    grid-column: 1 / -1;
    padding-top: 0;
  }
}

/* ---------- 5.8 Listes de fonctionnalités, coches, étapes simples ---------- */

/* Icône + titre + texte, en grille */
.feature-list {
  display: grid;
  gap: var(--space-5);
  list-style: none;
}

@media (min-width: 640px) {
  .feature-list--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.feature-list__item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--space-1) var(--space-4);
}

.feature-list__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 16px;
}

.feature-list__title {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.3;
}

.feature-list__text {
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* Version compacte : icône + libellé sur une ligne */
.feature-list--compact {
  gap: var(--space-3);
}

.feature-list--compact .feature-list__item {
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
}

.feature-list--compact .feature-list__icon {
  grid-row: auto;
  width: 32px;
  height: 32px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.feature-list--compact .feature-list__title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
}

/* Liste à coches */
.check-list {
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--color-text-muted);
}

.check-list li + li {
  margin-top: var(--space-2);
}

.check-list li::before {
  content: "\f00c";
  position: absolute;
  left: 0;
  top: 0.35em;
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 12px;
  color: var(--color-accent);
}

/* Liste numérotée simple (instructions pas à pas) */
.steps {
  counter-reset: step;
  list-style: none;
}

.steps li {
  counter-increment: step;
  position: relative;
  min-height: 28px;
  padding-left: 42px;
  color: var(--color-text-muted);
}

.steps li + li {
  margin-top: var(--space-3);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- 5.9 Processus en étapes (méthode de travail) ---------- */

.process {
  display: grid;
  gap: var(--space-6) var(--space-5);
  list-style: none;
  counter-reset: process;
}

@media (min-width: 640px) {
  .process {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .process {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.process__step {
  position: relative;
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border-strong);
}

/* Filet en dégradé au-dessus du numéro */
.process__step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 48px;
  height: 1px;
  background: var(--gradient-line);
}

/* Avec motion.js : le filet se trace d'une étape à l'autre au défilement (--step-progress 0 → 1)
   et le numéro s'allume une fois l'étape atteinte. */
.process.is-linked .process__step::before {
  width: 100%;
  transform: scaleX(var(--step-progress, 0));
  transform-origin: left;
}

.process.is-linked .process__num {
  color: var(--color-text-subtle);
  transition: color var(--duration-base) ease, text-shadow var(--duration-base) ease;
}

.process.is-linked .is-reached .process__num {
  color: var(--color-accent);
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.55);
}

.process__num {
  display: block;
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--color-accent);
}

.process__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.process__text {
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* ---------- 5.10 Réalisations (cartes projet) ---------- */

.work-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 768px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-grid > .work-card--featured {
    grid-column: 1 / -1;
  }
}

.work-card {
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.work-card__media {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.work-card__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

.work-card:hover .work-card__media img {
  scale: 1.035;
}

.work-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
}

@media (min-width: 768px) {
  .work-card__body {
    padding: var(--space-6);
  }
}

.work-card__meta {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-subtle);
}

.work-card__title {
  font-size: var(--text-2xl);
  line-height: 1.15;
}

.work-card__text {
  color: var(--color-text-muted);
  max-width: 56ch;
}

.work-card .tag-list {
  margin-top: var(--space-1);
}

.work-card__cta {
  margin-top: auto;
  padding-top: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--color-text);
}

.work-card__cta i {
  font-size: 0.8em;
  color: var(--color-accent);
  transition: transform var(--duration-base) var(--ease-out);
}

.work-card:hover .work-card__cta i {
  transform: translateX(3px);
}

@media (min-width: 1024px) {
  .work-card--featured {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .work-card--featured .work-card__media {
    border-bottom: 0;
    border-right: 1px solid var(--color-border);
  }

  .work-card--featured .work-card__media img {
    height: 100%;
  }

  .work-card--featured .work-card__body {
    justify-content: center;
    padding: var(--space-7);
  }

  .work-card--featured .work-card__title {
    font-size: var(--text-3xl);
  }
}

/* Deux projets phares à la suite : le second inverse image et texte */
@media (min-width: 1024px) {
  .work-grid > .work-card--featured + .work-card--featured {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .work-grid > .work-card--featured + .work-card--featured .work-card__media {
    order: 2;
    border-right: 0;
    border-left: 1px solid var(--color-border);
  }
}

/* ---------- 5.11 Applications (cartes produit) ---------- */

.app-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
  .app-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

.app-card {
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.app-card__media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
  background:
    radial-gradient(70% 90% at 50% 100%, var(--app-tint, rgba(0, 102, 255, 0.28)) 0%, rgba(0, 0, 0, 0) 70%),
    var(--color-surface-2);
}

.app-card__media img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
}

.app-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
}

@media (min-width: 768px) {
  .app-card__body {
    padding: var(--space-6);
  }
}

.app-card__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.app-card__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface-3);
  color: var(--color-text);
  font-size: 20px;
}

.app-card__name {
  font-size: var(--text-2xl);
  line-height: 1.1;
}

.app-card__tagline {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.app-card__text {
  color: var(--color-text-muted);
}

.app-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

/* ---------- 5.12 Badges des stores ---------- */

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: #000;
  color: var(--color-text);
  text-decoration: none;
  transition: border-color var(--duration-fast) ease;
}

.store-badge:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.store-badge i {
  font-size: 22px;
}

.store-badge__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-badge__small {
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}

.store-badge__big {
  font-size: var(--text-base);
  font-weight: 600;
}

/* ---------- 5.13 Citations / témoignages ---------- */

.quote {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  height: 100%;
}

.quote__text {
  position: relative;
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--color-text);
}

.quote__text::before {
  content: "\201C";
  display: block;
  height: 0.6em;
  margin-bottom: var(--space-3);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 3rem;
  line-height: 1;
  color: var(--color-accent);
}

.quote__text p + p {
  margin-top: var(--space-3);
}

.quote__author {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.quote__name {
  font-weight: 600;
  color: var(--color-text);
}

.quote__role {
  color: var(--color-text-subtle);
}

/* Grande citation (fondateur, page À propos) */
.quote--lg .quote__text {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1.35;
  letter-spacing: var(--tracking-snug);
}

/* ---------- 5.14 Chiffres clés (n'afficher que des valeurs renseignées) ---------- */

.stat-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5) var(--space-8);
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-1);
}

.stat__value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ---------- 5.15 Bandeau d'appel à l'action ---------- */

.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(var(--space-7), 6vw, var(--space-9)) clamp(var(--space-5), 5vw, var(--space-8));
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(0, 102, 255, 0.22) 0%, rgba(0, 0, 0, 0) 60%),
    radial-gradient(60% 100% at 0% 100%, rgba(0, 240, 255, 0.1) 0%, rgba(0, 0, 0, 0) 60%),
    var(--color-surface);
  isolation: isolate;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--gradient-line);
  opacity: 0.7;
}

.cta-band__title {
  max-width: 20ch;
  font-size: var(--text-3xl);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
}

.cta-band .lead {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
}

.cta-band .actions {
  margin-top: var(--space-6);
}

/* ---------- 5.16 Encadrés (information, avertissement) ---------- */

.callout {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  color: var(--color-text);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.callout > i {
  margin-top: 0.25em;
  color: var(--color-accent);
}

.callout p {
  margin: 0;
}

.callout--warning {
  border-color: rgba(251, 191, 36, 0.35);
  background: var(--color-warning-soft);
}

.callout--warning > i,
.callout--warning p > i {
  color: var(--color-warning);
}

/* ---------- 5.17 Accordéon (FAQ) — <details class="faq-item"> ---------- */

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-of-type {
  border-top: 1px solid var(--color-border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 56px;
  padding: var(--space-4) var(--space-1);
  list-style: none;
  cursor: pointer;
  font-weight: 500;
  color: var(--color-text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "\2b";
  flex-shrink: 0;
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 13px;
  color: var(--color-text-muted);
  transition: transform var(--duration-base) var(--ease-out);
}

.faq-item summary:hover::after {
  color: var(--color-accent);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
  color: var(--color-accent);
}

.faq-answer {
  padding: 0 var(--space-1) var(--space-5);
  max-width: var(--measure);
  color: var(--color-text-muted);
}

.faq-answer > * + * {
  margin-top: var(--space-3);
}

.faq-answer ol,
.faq-answer ul {
  padding-left: var(--space-5);
}

.faq-answer li + li {
  margin-top: var(--space-1);
}

/* ---------- 5.18 Contenu à fournir — {% todo "…" %} ---------- */

.todo-placeholder {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--space-2);
  max-width: 100%;
  padding: 6px 12px;
  border: 1px dashed rgba(250, 204, 21, 0.6);
  border-radius: var(--radius-sm);
  background: var(--color-warning-soft);
  color: #FDE68A;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
}

.todo-placeholder i {
  margin-top: 0.2em;
}


/* =========================================================================
   6. FORMULAIRES (utilisés avec forms.js : <form data-xform>)
   ========================================================================= */

.form-row {
  display: grid;
  gap: 0 var(--space-4);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-field label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}

.form-field:has([required]) label::after {
  content: " *";
  color: var(--color-accent);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--text-base);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.form-field select option {
  background: var(--color-surface-2);
}

.form-field ::placeholder {
  color: var(--color-text-subtle);
}

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.2);
}

.form-field .is-invalid,
.form-field .is-invalid:focus-visible {
  border-color: var(--color-danger);
}

.form-consent {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-muted);
  cursor: pointer;
}

.form-consent input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--color-brand);
}

.form-consent.is-invalid span {
  color: var(--color-danger);
}

.form-error,
.form-success {
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.form-error {
  background: var(--color-danger-soft);
  color: #FCA5A5;
}

.form-success {
  background: var(--color-success-soft);
  color: #86EFAC;
}

/* Champ piège anti-spam */
.hp-field {
  display: none !important;
}


/* =========================================================================
   7. HABILLAGE DU SITE
   ========================================================================= */

/* ---------- Lien d'évitement ---------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: var(--z-skip);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-brand);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-4);
}

/* ---------- Navbar ---------- */

.navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-nav);
  border-bottom: 1px solid transparent;
  background: rgba(10, 10, 10, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  transition: border-color var(--duration-base) ease, background-color var(--duration-base) ease;
}

/* Progression de lecture (motion.js) : un filet en dégradé sur la bordure basse */
.navbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--gradient-line);
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left;
  pointer-events: none;
}

.navbar.is-scrolled,
.navbar:has(.mobile-menu.is-open) {
  border-bottom-color: var(--color-border);
  background: rgba(10, 10, 10, 0.88);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: var(--nav-height);
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.navbar-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo-img {
  width: 32px;
  height: 32px;
}

.logo-brand-name,
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.logo-brand-suffix,
.footer-brand-suffix {
  font-weight: 500;
  color: var(--color-text-muted);
}

.navbar-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Pastille qui glisse sous le lien survolé (motion.js) */
.navbar-indicator {
  position: absolute;
  top: 50%;
  left: 0;
  height: 36px;
  margin-top: -18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 320ms var(--ease-out),
    width 320ms var(--ease-out),
    opacity var(--duration-fast) ease;
}

.navbar-menu.has-indicator .navbar-indicator {
  opacity: 1;
}

.navbar-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.navbar-link:hover,
.navbar-link[aria-current="page"] {
  color: var(--color-text);
}

.navbar-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: 8px;
  height: 1px;
  background: var(--gradient-line);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Sélecteur de langue : deux liens vers la même page dans l'autre langue */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
}

.lang-switch a {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  min-height: 30px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color var(--duration-fast) ease, background-color var(--duration-fast) ease;
}

.lang-switch a:hover {
  color: var(--color-text);
}

.lang-switch a[aria-current="true"] {
  background: var(--color-surface-3);
  color: var(--color-text);
}

/* Bouton menu mobile : 44 × 44 */
.mobile-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: calc(-1 * var(--space-2));
  border-radius: var(--radius-md);
}

.mobile-toggle span {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform var(--duration-base) var(--ease-out), opacity var(--duration-fast) ease;
}

.mobile-toggle span:nth-child(1) { top: 16px; }
.mobile-toggle span:nth-child(2) { top: 21.5px; }
.mobile-toggle span:nth-child(3) { top: 27px; }

.mobile-toggle.active span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-menu {
  display: none;
}

@media (max-width: 960px) {
  .navbar-menu,
  .navbar-actions .btn {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .lang-switch a {
    min-width: 40px;
    min-height: 36px;
  }

  .mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    padding: var(--space-2) var(--gutter) var(--space-5);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out), visibility 0s linear var(--duration-base);
  }

  .mobile-menu.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
}

.mobile-link {
  display: flex;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  text-decoration: none;
}

.mobile-link[aria-current="page"] {
  color: var(--color-accent);
}

.mobile-cta {
  margin-top: var(--space-5);
}

/* ---------- Footer ---------- */

/* Pas de marge : chaque page se termine par une .section (qui porte déjà son espacement) */
.footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  font-size: var(--text-sm);
}

.footer-container {
  display: grid;
  gap: var(--space-7) var(--space-6);
  grid-template-columns: minmax(0, 1fr);
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding: var(--space-8) var(--gutter) var(--space-7);
}

@media (min-width: 640px) {
  .footer-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .footer-container {
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  }
}

.footer-logo-img {
  width: 32px;
  height: 32px;
}

.footer-section > p {
  max-width: 36ch;
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.footer-heading {
  font-family: var(--font-mono);
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text-subtle);
}

.footer-section ul {
  list-style: none;
}

.footer-section li a,
.footer-section li > span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 40px;
  color: var(--color-text-muted);
  font-size: 15px;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color var(--duration-fast) ease;
}

.footer-section li a:hover {
  color: var(--color-text);
}

.footer-section li i {
  width: 16px;
  color: var(--color-text-subtle);
  font-size: 13px;
}

.social-links {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.social-links a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--duration-fast) ease, border-color var(--duration-fast) ease;
}

.social-links a:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding: var(--space-5) var(--gutter) var(--space-6);
  /* filet aligné sur le contenu (pas sur les marges latérales) */
  background: linear-gradient(var(--color-border), var(--color-border)) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  color: var(--color-text-subtle);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-5);
}

.footer-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

/* Laisse de la place au bouton WhatsApp sous le dernier lien (mobile) */
@media (max-width: 640px) {
  .footer-bottom {
    padding-bottom: calc(var(--space-6) + 64px);
  }
}

/* ---------- Bouton WhatsApp : discret, sans animation permanente ---------- */

.whatsapp-float {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: var(--z-float);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  background: var(--color-surface-2);
  color: var(--color-whatsapp);
  font-size: 24px;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: opacity var(--duration-base) ease, visibility 0s linear 0s, border-color var(--duration-fast) ease, background-color var(--duration-fast) ease;
}

.whatsapp-float:hover {
  border-color: rgba(37, 211, 102, 0.5);
  background: var(--color-surface-3);
}

.whatsapp-float:focus-visible {
  border-radius: 50%;
}

/* Masqué quand le footer est visible ou le menu mobile ouvert (main.js) */
.whatsapp-float.is-hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-base) ease, visibility 0s linear var(--duration-base);
}

.whatsapp-tooltip {
  position: absolute;
  right: calc(100% + var(--space-3));
  top: 50%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(4px, -50%);
  transition: opacity var(--duration-fast) ease, transform var(--duration-base) var(--ease-out);
}

.whatsapp-float:hover .whatsapp-tooltip,
.whatsapp-float:focus-visible .whatsapp-tooltip {
  opacity: 1;
  transform: translate(0, -50%);
}

@media (max-width: 640px) {
  .whatsapp-float {
    right: var(--space-4);
    bottom: var(--space-4);
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  .whatsapp-tooltip {
    display: none;
  }
}

/* ---------- Page 404 ---------- */

.not-found {
  max-width: calc(640px + 2 * var(--gutter));
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--space-9)) var(--gutter) var(--space-8);
  text-align: center;
}

.not-found-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: var(--tracking-tight);
}

.not-found h1 {
  margin: var(--space-4) 0 var(--space-3);
  font-size: var(--text-2xl);
}

.not-found p {
  color: var(--color-text-muted);
}

.not-found .actions {
  justify-content: center;
  margin-top: var(--space-6);
}


/* =========================================================================
   8. MOUVEMENT
   Le mouvement accompagne la lecture, il ne la retarde jamais.
   - Apparition : data-reveal (un bloc) ou data-reveal-stagger (ses enfants en cascade) —
     fondu, montée et mise au point (flou → net). main.js retire les classes à la fin.
   - Médias : les visuels des cartes se posent (zoom arrière) à l'apparition, puis
     glissent légèrement au défilement (parallaxe, navigateurs compatibles).
   - Lumière au curseur, relief 3D, boutons magnétiques, sur-titres décodés,
     frise du processus : motion.js (styles dans les composants concernés).
   - Grain de film très léger sur toute la page, logotype géant du footer.
   Tout ce qui se déplace est coupé si l'utilisateur préfère moins d'animations.
   ========================================================================= */

.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  filter: blur(var(--reveal-blur));
  transition:
    opacity var(--duration-reveal) var(--ease-out) var(--reveal-delay, 0ms),
    transform var(--duration-reveal) var(--ease-out) var(--reveal-delay, 0ms),
    filter var(--duration-reveal) var(--ease-out) var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Les visuels de cartes se posent : léger zoom arrière pendant l'apparition */
.work-card__media img,
.app-card__media img {
  transition: scale 1000ms var(--ease-out);
}

.reveal:not(.is-visible) .work-card__media img,
.reveal:not(.is-visible) .app-card__media img {
  scale: 1.12;
}

/* Parallaxe des captures de projets au défilement (CSS, sans JavaScript) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .work-card__media img {
      animation: media-drift linear both;
      animation-timeline: view();
      animation-range: cover;
    }
  }
}

@keyframes media-drift {
  from {
    transform: translateY(-3%) scale(1.07);
  }

  to {
    transform: translateY(3%) scale(1.07);
  }
}

/* Relief 3D (data-tilt, motion.js) */
[data-tilt] {
  will-change: transform;
}

/* Grain de film : texture très légère sur toute la page (non interactive) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-skip);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
}

/* Logotype géant en bas du footer : texte en dégradé vers le noir, éclairé par le curseur */
.footer {
  position: relative;
  overflow: hidden;
}

.footer-wordmark {
  display: block;
  margin-top: calc(var(--space-6) * -1);
  margin-bottom: -0.2em;
  font-family: var(--font-display);
  font-size: clamp(5rem, 24vw, 22rem);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.06em;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  background:
    radial-gradient(380px circle at var(--mx, 50%) var(--my, -400px), rgba(0, 240, 255, 0.35), rgba(0, 240, 255, 0) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .footer-wordmark {
      animation: wordmark-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }
  }
}

@keyframes wordmark-rise {
  from {
    opacity: 0;
    transform: translateY(30%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }
}


/* =========================================================================
   9. 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-muted {
  color: var(--color-text-muted);
}

.text-subtle {
  color: var(--color-text-subtle);
}

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

@media print {
  .navbar,
  .whatsapp-float,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}

/* App card : visuel téléphone et contenu à fournir (accueil, applications) */
.app-card__media--phone img {
  max-height: 320px;
  object-fit: cover;
  object-position: 47% 50%;
}

.app-card__media .todo-placeholder {
  margin: var(--space-5);
}

