/* ==========================================================================
   MVM — FEUILLE GLOBALE
   Ce fichier ne contient QUE :
     1. l'import du design system (source de vérité des tokens),
     2. le pont de compatibilité ancien -> nouveau (--color-*, --spacing-*, ...),
     3. la typographie de base et les styles réellement globaux,
     4. le chrome partagé par toutes les pages (header, footer, fil d'ariane,
        sélecteur de langue, icônes).

   Aucun style spécifique à une page ne doit vivre ici.
   La palette OKLCH prune/vert a été supprimée : tout descend maintenant des
   4 couleurs de marque définies dans design-system.css.
   ========================================================================== */

@import url("design-system-7Xrhztk.css");

/* ==========================================================================
   1. PONT DE COMPATIBILITÉ — ancien nom -> nouveau token
   Des centaines de règles (assets/styles/*.css et <style> inline dans les
   templates) référencent encore ces variables. Elles restent donc définies,
   mais ne portent plus AUCUNE valeur propre : elles pointent toutes vers un
   token du design system. Ne pas ajouter de nouvelle variable ici — utiliser
   directement les tokens --ds-*.
   ========================================================================== */

:root {
  /* ---------- Marque ---------- */
  --color-primary: var(--ds-ink);
  --color-primary-light: var(--ds-ink-hover);
  --color-primary-dark: var(--ds-ink);
  --color-primary-rgb: 11, 15, 25;

  --color-secondary: var(--ds-muted);
  --color-secondary-light: color-mix(in srgb, var(--ds-muted) 65%, var(--ds-paper));
  --color-secondary-dark: color-mix(in srgb, var(--ds-muted) 55%, var(--ds-ink));
  --color-secondary-rgb: 107, 114, 128;

  --color-accent: var(--ds-accent);
  --color-accent-hover: var(--ds-accent-hover);
  --color-accent-dark: var(--ds-accent-hover);
  /* Variante claire : destinée aux fonds SOMBRES (header, footer, hero encre) */
  --color-accent-light: color-mix(in srgb, var(--ds-accent) 40%, var(--ds-paper));
  /* Variante foncée : destinée aux fonds CLAIRS — ratio ≈ 6.3:1 */
  --color-accent-on-light: var(--ds-accent-hover);
  --color-accent-rgb: 37, 99, 235;

  /* ---------- Fonds ---------- */
  --color-background: var(--ds-paper);
  --color-background-light: var(--ds-surface-sunken);
  --color-background-secondary: var(--ds-surface-sunken);
  --color-surface: var(--ds-surface-raised);
  --color-hover: var(--ds-ink-subtle);

  /* ---------- États sémantiques ----------
     La palette n'autorise que 4 teintes + --ds-danger. Les anciens statuts
     colorés sont donc reprojetés :
       succès / info  -> accent (bleu)
       avertissement  -> encre (emphase neutre forte)
       erreur         -> danger (seule exception autorisée)
     ------------------------------------------------------------------ */
  --color-success: var(--ds-accent);
  --color-success-light: color-mix(in srgb, var(--ds-accent) 40%, var(--ds-paper));
  --color-success-dark: var(--ds-accent-hover);
  --color-success-rgb: 37, 99, 235;

  --color-error: var(--ds-danger);
  --color-error-light: color-mix(in srgb, var(--ds-danger) 40%, var(--ds-paper));
  --color-error-dark: var(--ds-danger-hover);
  --color-error-rgb: 220, 38, 38;
  --color-danger: var(--ds-danger);

  --color-warning: var(--ds-ink);
  --color-warning-light: var(--ds-ink-subtle);
  --color-warning-dark: var(--ds-ink);
  --color-warning-rgb: 11, 15, 25;

  --color-info: var(--ds-accent);
  --color-info-light: color-mix(in srgb, var(--ds-accent) 40%, var(--ds-paper));
  --color-info-dark: var(--ds-accent-hover);
  --color-info-rgb: 37, 99, 235;

  /* ---------- Textes ---------- */
  --color-text: var(--ds-text);
  --color-text-primary: var(--ds-text);
  --color-text-light: var(--ds-text-muted);
  --color-text-secondary: var(--ds-text-muted);
  --color-text-muted: var(--ds-text-muted);
  --color-text-disabled: var(--ds-text-disabled);
  --color-muted: var(--ds-muted);
  /* Alias sans préfixe utilisés dans quelques templates */
  --text-primary: var(--ds-text);
  --text-secondary: var(--ds-text-muted);

  /* ---------- Bordures ---------- */
  --color-border: var(--ds-border);
  --color-border-light: color-mix(in srgb, var(--ds-muted) 16%, var(--ds-paper));
  --color-border-dark: var(--ds-border-strong);

  /* ---------- Anciennes couleurs "banking" ---------- */
  --color-banking-blue: var(--ds-accent);
  --color-banking-green: var(--ds-accent);
  --color-banking-red: var(--ds-danger);
  --color-banking-purple: var(--ds-ink);
  --color-banking-orange: var(--ds-muted);

  /* ---------- Échelle de gris (dérivée encre/papier) ---------- */
  --color-gray-50: color-mix(in srgb, var(--ds-ink) 2%, var(--ds-paper));
  --color-gray-100: color-mix(in srgb, var(--ds-ink) 5%, var(--ds-paper));
  --color-gray-200: color-mix(in srgb, var(--ds-ink) 10%, var(--ds-paper));
  --color-gray-300: color-mix(in srgb, var(--ds-muted) 45%, var(--ds-paper));
  --color-gray-400: color-mix(in srgb, var(--ds-muted) 70%, var(--ds-paper));
  --color-gray-500: var(--ds-muted);
  --color-gray-600: color-mix(in srgb, var(--ds-muted) 75%, var(--ds-ink));
  --color-gray-700: color-mix(in srgb, var(--ds-muted) 50%, var(--ds-ink));
  --color-gray-800: color-mix(in srgb, var(--ds-muted) 25%, var(--ds-ink));
  --color-gray-900: var(--ds-ink);

  /* ---------- Anciennes échelles nommées par teinte ---------- */
  --color-blue-50: var(--ds-accent-subtle);
  --color-blue-200: var(--ds-accent-border);
  --color-blue-700: var(--ds-accent-hover);
  --color-blue-800: var(--ds-accent-hover);
  --color-blue-900: var(--ds-accent-active);
  --color-green-600: var(--ds-accent-hover);
  --color-yellow-50: var(--ds-ink-subtle);
  --color-yellow-200: var(--ds-border-strong);
  --color-yellow-800: var(--ds-ink);

  /* ---------- Voiles ---------- */
  --color-overlay: color-mix(in srgb, var(--ds-ink) 60%, transparent);
  --color-overlay-light: color-mix(in srgb, var(--ds-ink) 30%, transparent);
  --color-overlay-dark: color-mix(in srgb, var(--ds-ink) 80%, transparent);

  --color-white-alpha-10: rgba(255, 255, 255, 0.1);
  --color-white-alpha-15: rgba(255, 255, 255, 0.15);
  --color-white-alpha-20: rgba(255, 255, 255, 0.2);
  --color-white-alpha-50: rgba(255, 255, 255, 0.5);

  --color-black-alpha-5: color-mix(in srgb, var(--ds-ink) 5%, transparent);
  --color-black-alpha-10: color-mix(in srgb, var(--ds-ink) 10%, transparent);
  --color-black-alpha-15: color-mix(in srgb, var(--ds-ink) 15%, transparent);
  --color-black-alpha-25: color-mix(in srgb, var(--ds-ink) 25%, transparent);

  /* ---------- Typographie ----------
     Les titres passent en Geist : Departure Mono est désormais réservé aux
     montants, IBAN et références (--font-family-mono / .tabular / .ds-mono).
     ------------------------------------------------------------------ */
  --font-family-base: var(--ds-font-sans);
  --font-family-heading: var(--ds-font-sans);
  --font-family-mono: var(--ds-font-mono);

  --text-xs: var(--ds-text-xs);
  --text-sm: var(--ds-text-sm);
  --text-base: var(--ds-text-base);
  --text-lg: var(--ds-text-lg);
  --text-xl: var(--ds-text-xl);
  --text-2xl: var(--ds-text-2xl);
  --text-3xl: var(--ds-text-3xl);
  --text-4xl: var(--ds-text-4xl);

  --measure: var(--ds-measure);

  /* ---------- Espacement ---------- */
  --spacing-xs: var(--ds-space-1);
  --spacing-sm: var(--ds-space-2);
  --spacing-md: var(--ds-space-4);
  --spacing-lg: var(--ds-space-6);
  --spacing-xl: var(--ds-space-8);
  --spacing-2xl: var(--ds-space-12);
  --spacing-3xl: var(--ds-space-16);
  --spacing-4xl: calc(var(--ds-space-16) * 1.5);

  --space-3xs: var(--ds-space-1);
  --space-2xs: var(--ds-space-2);
  --space-xs: var(--ds-space-3);
  --space-sm: var(--ds-space-4);
  --space-md: var(--ds-space-6);
  --space-lg: var(--ds-space-10);
  --space-xl: var(--ds-section-y);
  --space-2xl: calc(var(--ds-section-y) * 1.5);

  /* ---------- Rayons ---------- */
  --radius-sm: var(--ds-radius-sm);
  --radius-md: var(--ds-radius-md);
  --radius-lg: var(--ds-radius-lg);
  --radius-xl: var(--ds-radius-lg);
  --radius-2xl: var(--ds-radius-lg);
  --radius-full: var(--ds-radius-full);

  /* ---------- Élévations (volontairement plus sobres qu'avant) ---------- */
  --shadow-sm: var(--ds-shadow-sm);
  --shadow-md: var(--ds-shadow-sm);
  --shadow-lg: var(--ds-shadow-md);
  --shadow-xl: var(--ds-shadow-md);
  --shadow-2xl: var(--ds-shadow-md);
  --shadow-card: var(--ds-shadow-sm);
  --shadow-hover: var(--ds-shadow-md);

  /* ---------- Mouvement ---------- */
  --transition-fast: var(--ds-transition);
  --transition-base: var(--ds-transition);
  --transition-slow: var(--ds-transition-slow);

  /* ---------- Empilement ---------- */
  --z-dropdown: var(--ds-z-dropdown);
  --z-sticky: var(--ds-z-sticky);
  --z-fixed: var(--ds-z-fixed);
  --z-modal-backdrop: var(--ds-z-backdrop);
  --z-modal: var(--ds-z-modal);
  --z-popover: var(--ds-z-popover);
  --z-tooltip: var(--ds-z-tooltip);

  /* ---------- Breakpoints & conteneurs ---------- */
  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
  --bp-2xl: 1536px;

  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: var(--ds-container);
  --container-2xl: var(--ds-container-wide);

  /* ---------- Alias orphelins ----------
     Variables référencées par d'anciens <style> inline sans avoir jamais été
     définies (elles rendaient donc `initial`). Rattachées ici pour éviter les
     couleurs fantômes pendant la migration. Ne pas en créer de nouvelles.
     ------------------------------------------------------------------ */
  --primary-color: var(--ds-accent);
  --primary-50: var(--ds-accent-subtle);
  --primary-100: color-mix(in srgb, var(--ds-accent) 16%, var(--ds-paper));
  --primary-200: var(--ds-accent-border);
  --primary-300: color-mix(in srgb, var(--ds-accent) 55%, var(--ds-paper));
  --primary-600: var(--ds-accent-hover);
  --primary-700: var(--ds-accent-active);
  --success-color: var(--ds-accent);
  --bg-white: var(--ds-surface-raised);
  --bg-light: var(--ds-surface-sunken);
  --border-light: var(--ds-border);

  /* ---------- Divers ---------- */
  --ratio-square: 1 / 1;
  --ratio-portrait: 3 / 4;
  --ratio-landscape: 4 / 3;
  --ratio-widescreen: 16 / 9;
  --ratio-cinematic: 21 / 9;
  --ratio-golden: 1.618 / 1;

  --touch-target-min: var(--ds-touch-target);
}

/* ==========================================================================
   2. RESET COMPLÉMENTAIRE
   Le reset moderne vit dans design-system.css. On conserve ici le seul écart
   historique dont dépendent les feuilles existantes : padding remis à zéro.
   ========================================================================== */

*,
*::before,
*::after {
  padding: 0;
}

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

body {
  background-color: var(--ds-paper);
  color: var(--ds-text);
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-base);
  font-weight: var(--ds-weight-regular);
  line-height: var(--ds-leading-relaxed);
  font-feature-settings: 'kern', 'liga', 'calt';
  font-kerning: normal;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--ds-font-sans);
  font-weight: var(--ds-weight-semibold);
  line-height: var(--ds-leading-tight);
  letter-spacing: var(--ds-tracking-tight);
  color: inherit;
}

h1 { font-size: var(--ds-text-3xl); }
h2 { font-size: var(--ds-text-2xl); }
h3 { font-size: var(--ds-text-xl); }
h4 { font-size: var(--ds-text-lg); }
h5 { font-size: var(--ds-text-base); }
h6 {
  font-size: var(--ds-text-sm);
  letter-spacing: var(--ds-tracking-caps);
  text-transform: uppercase;
  color: var(--ds-text-muted);
}

h1,
h2,
h3 {
  text-wrap: balance;
}

article p,
.section-description {
  text-wrap: pretty;
  max-width: var(--ds-measure);
}

strong,
b {
  font-weight: var(--ds-weight-semibold);
}

small {
  font-size: var(--ds-text-xs);
}

/* Montants, taux, IBAN, références : chiffres alignés */
.tabular {
  font-variant-numeric: tabular-nums;
}

.mono,
.amount,
.iban {
  font-family: var(--ds-font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--ds-tracking-wide);
}

/* --- Liens --- */
a {
  color: var(--ds-accent);
  text-decoration: none;
  transition: color var(--ds-transition);
}

a:hover {
  color: var(--ds-accent-hover);
}

a:active {
  color: var(--ds-accent-active);
}

a:focus-visible {
  outline: var(--ds-focus-width) solid var(--ds-focus-color);
  outline-offset: var(--ds-focus-offset);
  border-radius: var(--ds-radius-sm);
}

/* Le texte courant garde un lien souligné, repérable sans la couleur seule */
article a:not([class]),
p a:not([class]) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

/* --- Sélection --- */
::selection {
  background-color: var(--ds-accent);
  color: var(--ds-text-on-accent);
}

/* ==========================================================================
   4. ACCESSIBILITÉ GLOBALE (RGAA)
   Classes conservées telles quelles : référencées dans base.html.twig.
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-to-content {
  position: absolute;
  top: 0;
  left: 0;
  z-index: var(--ds-z-skip-link);
  transform: translateY(-120%);
  padding: var(--ds-space-3) var(--ds-space-6);
  background: var(--ds-accent);
  color: var(--ds-text-on-accent);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-weight-semibold);
  text-decoration: none;
  border-bottom-right-radius: var(--ds-radius-md);
  transition: transform var(--ds-transition);
}

.skip-to-content:focus {
  transform: translateY(0);
  outline: var(--ds-focus-width) solid var(--ds-ink);
  outline-offset: var(--ds-focus-offset);
}

/* WCAG 2.5.5 — cibles tactiles. Les primitives .ds-* gèrent déjà leur
   propre hauteur : on les exclut pour ne pas casser .ds-btn--sm. */
button:not([class*='ds-']),
.btn,
[class*='__btn']:not([class*='__btn-icon']),
[class*='-btn']:not([class*='ds-btn']):not([class*='-btn-icon']) {
  min-height: var(--ds-touch-target);
}

/* ==========================================================================
   5. SQUELETTE DE PAGE
   ========================================================================== */

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.main-content {
  flex: 1 0 auto;
}

/* ==========================================================================
   6. UTILITAIRES GLOBAUX (hérités — préférer les primitives .ds-*)
   ========================================================================== */

.container-fluid {
  width: 100%;
  max-width: var(--ds-container);
  margin-inline: auto;
  padding-inline: var(--ds-gutter);
}

/* NETTOYAGE : .stack-fluid, .cluster, .auto-grid, .show-on-md/.hide-on-md,
   .touch-target, .ratio-*, .container-cq et .section-animate ont ete supprimes.
   Aucun n'etait reference dans templates/ ni dans assets/controllers/, et
   chacun a un equivalent dans design-system.css : .ds-stack, .ds-cluster,
   .ds-grid, .ds-container. La revelation au scroll est assuree par AOS
   (attribut data-aos), pas par .section-animate. */

/* ==========================================================================
   7. ICÔNES
   ========================================================================== */

.icon {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: var(--ds-space-2);
  vertical-align: middle;
  color: currentColor;
}

h1 .icon,
h2 .icon,
h3 .icon {
  margin-right: var(--ds-space-3);
  color: var(--ds-accent);
}

.btn .icon { margin-right: var(--ds-space-2); }
.btn--primary .icon { color: var(--ds-text-on-accent); }
.btn--secondary .icon { color: var(--ds-text); }

.inline-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

/* ==========================================================================
   8. HEADER (global — présent sur toutes les pages)
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  right: 0;
  left: 0;
  z-index: var(--ds-z-fixed);
  height: 72px;
  background: color-mix(in srgb, var(--ds-ink) 95%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ds-border-inverse);
}

.header__container {
  max-width: var(--ds-container-wide);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--ds-gutter);
}

.header__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-8);
  height: 100%;
}

.header__logo {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--ds-space-3);
  text-decoration: none;
}

.header__logo-text {
  display: flex;
  flex-direction: column;
  line-height: var(--ds-leading-none);
}

.header__logo-name {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-xl);
  font-weight: var(--ds-weight-bold);
  letter-spacing: 0.12em;
  color: var(--ds-text-inverse);
}

.header__logo-tagline {
  margin-top: 2px;
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-weight-regular);
  letter-spacing: 0.24em;
  color: var(--ds-text-inverse-muted);
}

.header__logo:hover .header__logo-name {
  color: var(--color-accent-light);
}

.header__logo:focus-visible {
  outline: var(--ds-focus-width) solid var(--color-accent-light);
  outline-offset: var(--ds-focus-offset);
  border-radius: var(--ds-radius-sm);
}

/* --- Navigation bureau --- */
.header__nav {
  display: flex;
  align-items: center;
  gap: var(--ds-space-1);
}

.header__dropdown {
  position: relative;
}

.header__nav-link {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  padding: var(--ds-space-2) var(--ds-space-4);
  border-radius: var(--ds-radius-md);
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-weight-medium);
  color: var(--ds-text-inverse-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--ds-transition), background-color var(--ds-transition);
}

.header__nav-link:hover {
  background: color-mix(in srgb, #FFFFFF 10%, transparent);
  color: var(--ds-text-inverse);
}

.header__nav-link:focus-visible {
  outline: var(--ds-focus-width) solid var(--color-accent-light);
  outline-offset: var(--ds-focus-offset);
}

.header__nav-link--active {
  position: relative;
  color: var(--ds-text-inverse);
}

.header__nav-link--active::after {
  content: '';
  position: absolute;
  right: var(--ds-space-3);
  bottom: -2px;
  left: var(--ds-space-3);
  height: 2px;
  border-radius: 2px;
  background: var(--color-accent-light);
}

.header__nav-icon {
  width: 18px;
  height: 18px;
  opacity: 0.75;
}

.header__nav-chevron {
  width: 14px;
  height: 14px;
  opacity: 0.6;
  transition: transform var(--ds-transition);
}

.header__dropdown:hover .header__nav-chevron {
  transform: rotate(180deg);
}

.header__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  min-width: 220px;
  margin-top: var(--ds-space-2);
  padding: var(--ds-space-2);
  background: var(--ds-surface-raised);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity var(--ds-transition), transform var(--ds-transition),
    visibility var(--ds-transition);
}

.header__dropdown:hover .header__dropdown-menu,
.header__dropdown:focus-within .header__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.header__dropdown-item {
  display: block;
  padding: var(--ds-space-3) var(--ds-space-4);
  border-radius: var(--ds-radius-sm);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-weight-medium);
  color: var(--ds-text);
  text-decoration: none;
  transition: background-color var(--ds-transition), color var(--ds-transition);
}

.header__dropdown-item:hover {
  background: var(--ds-accent-subtle);
  color: var(--ds-accent-hover);
}

/* --- Actions header --- */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
}

.header__login-btn {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  padding: var(--ds-space-2) var(--ds-space-4);
  border: 1px solid var(--ds-border-inverse);
  border-radius: var(--ds-radius-full);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-weight-medium);
  color: var(--ds-text-inverse-muted);
  text-decoration: none;
  transition: color var(--ds-transition), background-color var(--ds-transition),
    border-color var(--ds-transition);
}

.header__login-btn:hover {
  background: color-mix(in srgb, #FFFFFF 10%, transparent);
  border-color: color-mix(in srgb, #FFFFFF 30%, transparent);
  color: var(--ds-text-inverse);
}

.header__login-icon {
  width: 18px;
  height: 18px;
}

.header__cta {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  padding: var(--ds-space-3) var(--ds-space-6);
  background: var(--ds-accent);
  border: 1px solid var(--ds-accent);
  border-radius: var(--ds-radius-full);
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-weight-semibold);
  color: var(--ds-text-on-accent);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--ds-transition), border-color var(--ds-transition);
}

.header__cta:hover {
  background: var(--ds-accent-hover);
  border-color: var(--ds-accent-hover);
  color: var(--ds-text-on-accent);
}

.header__cta:active {
  background: var(--ds-accent-active);
  border-color: var(--ds-accent-active);
}

.header__cta:focus-visible {
  outline: var(--ds-focus-width) solid var(--ds-paper);
  outline-offset: var(--ds-focus-offset);
}

.header__cta-icon {
  width: 16px;
  height: 16px;
}

/* --- Hamburger --- */
.header__mobile-btn {
  display: none;
  padding: var(--ds-space-2);
  background: none;
  border: none;
  cursor: pointer;
}

.header__hamburger,
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}

.header__hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--ds-text-inverse);
  transition: transform var(--ds-transition), opacity var(--ds-transition);
}

/* --- Voile + panneau mobile --- */
.header__mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--ds-z-backdrop);
  background: var(--ds-overlay);
}

.header__mobile-overlay.active {
  display: block;
}

.header__mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: var(--ds-z-modal);
  width: min(320px, 88vw);
  height: 100vh;
  height: 100svh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--ds-ink);
  transform: translateX(100%);
  transition: transform var(--ds-transition-slow);
}

.header__mobile-menu.active {
  transform: translateX(0);
}

.header__mobile-content {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: var(--ds-space-6);
}

.header__mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--ds-space-6);
  padding-bottom: var(--ds-space-6);
  border-bottom: 1px solid var(--ds-border-inverse);
}

.header__mobile-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ds-touch-target);
  height: var(--ds-touch-target);
  padding: var(--ds-space-2);
  background: color-mix(in srgb, #FFFFFF 10%, transparent);
  border: none;
  border-radius: var(--ds-radius-md);
  color: var(--ds-text-inverse);
  cursor: pointer;
  transition: background-color var(--ds-transition);
}

.header__mobile-close:hover {
  background: color-mix(in srgb, #FFFFFF 18%, transparent);
}

.header__mobile-close-icon {
  width: 20px;
  height: 20px;
  color: currentColor;
}

.header__mobile-nav {
  flex: 1;
}

.header__mobile-dropdown {
  margin-bottom: var(--ds-space-1);
}

.header__mobile-link,
.header__mobile-toggle {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  width: 100%;
  padding: var(--ds-space-3) var(--ds-space-4);
  background: none;
  border: none;
  border-radius: var(--ds-radius-md);
  font-size: var(--ds-text-base);
  font-weight: var(--ds-weight-medium);
  color: var(--ds-text-inverse-muted);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--ds-transition), color var(--ds-transition);
}

.header__mobile-link:hover,
.header__mobile-toggle:hover {
  background: color-mix(in srgb, #FFFFFF 10%, transparent);
  color: var(--ds-text-inverse);
}

.header__mobile-icon {
  width: 20px;
  height: 20px;
  opacity: 0.75;
}

.header__mobile-text {
  flex: 1;
}

.header__mobile-chevron {
  margin-left: auto;
  transition: transform var(--ds-transition);
}

.header__mobile-chevron svg,
.header__mobile-chevron .header__mobile-chevron-icon {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.header__mobile-submenu {
  display: none;
  padding-left: var(--ds-space-10);
}

.header__mobile-submenu.active {
  display: block;
}

.header__mobile-sublink {
  display: block;
  padding: var(--ds-space-3) var(--ds-space-4);
  border-radius: var(--ds-radius-sm);
  font-size: var(--ds-text-sm);
  color: var(--ds-text-inverse-muted);
  text-decoration: none;
  transition: background-color var(--ds-transition), color var(--ds-transition);
}

.header__mobile-sublink:hover {
  background: color-mix(in srgb, #FFFFFF 8%, transparent);
  color: var(--color-accent-light);
}

.header__mobile-cta {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
  margin-top: auto;
  padding-top: var(--ds-space-6);
  border-top: 1px solid var(--ds-border-inverse);
}

.header__mobile-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-2);
  padding: var(--ds-space-3);
  border: 1px solid var(--ds-border-inverse);
  border-radius: var(--ds-radius-full);
  font-weight: var(--ds-weight-medium);
  color: var(--ds-text-inverse);
  text-decoration: none;
  transition: background-color var(--ds-transition);
}

.header__mobile-login:hover {
  background: color-mix(in srgb, #FFFFFF 10%, transparent);
  color: var(--ds-text-inverse);
}

.header__mobile-login-icon {
  width: 20px;
  height: 20px;
}

.header__mobile-apply {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-2);
  padding: var(--ds-space-4);
  background: var(--ds-accent);
  border-radius: var(--ds-radius-full);
  font-family: var(--ds-font-sans);
  font-weight: var(--ds-weight-semibold);
  color: var(--ds-text-on-accent);
  text-decoration: none;
  transition: background-color var(--ds-transition);
}

.header__mobile-apply:hover {
  background: var(--ds-accent-hover);
  color: var(--ds-text-on-accent);
}

/* --- Header responsive --- */
@media (max-width: 1024px) {
  .header { height: 64px; }

  .header__nav,
  .header__login-btn {
    display: none;
  }

  .header__mobile-btn {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    min-width: var(--ds-touch-target);
    min-height: var(--ds-touch-target);
    padding: var(--ds-space-2);
    background: transparent;
    border: none;
    cursor: pointer;
  }

  /* WCAG 2.5.5 — cibles tactiles sur la nav mobile */
  .header__nav-link,
  .header__cta,
  .header__login-btn,
  .header__mobile-link,
  .header__mobile-toggle,
  .header__mobile-sublink,
  .header__mobile-login,
  .header__mobile-apply {
    display: inline-flex;
    align-items: center;
    min-height: var(--ds-touch-target);
    padding-block: var(--ds-space-3);
  }

  .header__mobile-apply,
  .header__mobile-login {
    justify-content: center;
  }

  .header__mobile-link,
  .header__mobile-toggle {
    display: flex;
  }
}

/* CTA mobile compact : icône seule, libère la place pour le hamburger */
@media (max-width: 768px) {
  .header__cta {
    width: 44px;
    height: 44px;
    padding: var(--ds-space-2);
    justify-content: center;
    flex-shrink: 0;
  }

  .header__cta-text { display: none; }
  .header__cta-icon { width: 18px; height: 18px; }
}

/* Défensif : empêche un état .active résiduel d'apparaître en bureau */
@media (min-width: 1025px) {
  .header__mobile-menu,
  .header__mobile-menu.active,
  .header__mobile-overlay,
  .header__mobile-overlay.active {
    display: none !important;
    visibility: hidden !important;
    transform: translateX(100%) !important;
  }
}

/* ==========================================================================
   9. SÉLECTEUR DE LANGUE — SUPPRIME DE app.css
   Le bloc historique `.translate-floating / .translate-container /
   .translate-button / .flag-icon / .chevron-icon / .translate-dropdown`
   n'etait reference par aucun template : le partial
   templates/partials/_translate.html.twig utilise la nomenclature BEM
   `.translate / .translate__dropdown / .translate__button / .translate__menu`,
   stylee dans ds-shell.css (section 6). Aucun doublon conserve ici.
   ========================================================================== */

/* ==========================================================================
   10. FIL D'ARIANE (global)
   ========================================================================== */

.breadcrumb {
  padding: var(--ds-space-3) 0;
  background: transparent;
  border-bottom: 1px solid var(--ds-border);
}

.breadcrumb__container {
  max-width: var(--ds-container);
  margin: 0 auto;
  padding-inline: var(--ds-gutter);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ds-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--ds-text-sm);
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
}

.breadcrumb__item:not(:last-child)::after {
  content: '/';
  margin-left: var(--ds-space-2);
  color: var(--ds-text-subtle);
  user-select: none;
}

.breadcrumb__link {
  color: var(--ds-text-muted);
  text-decoration: none;
  transition: color var(--ds-transition);
}

.breadcrumb__link:hover {
  color: var(--ds-accent-hover);
  text-decoration: underline;
}

.breadcrumb__link:focus-visible {
  outline: var(--ds-focus-width) solid var(--ds-focus-color);
  outline-offset: var(--ds-focus-offset);
  border-radius: var(--ds-radius-sm);
}

.breadcrumb__link--static {
  cursor: default;
}

.breadcrumb__link--static:hover {
  color: var(--ds-text-muted);
  text-decoration: none;
}

.breadcrumb__item--current {
  color: var(--ds-text);
  font-weight: var(--ds-weight-medium);
}

@media (max-width: 480px) {
  .breadcrumb { padding: var(--ds-space-2) 0; }
  .breadcrumb__list { font-size: var(--ds-text-xs); }
}

/* ==========================================================================
   11. FOOTER (global)
   ========================================================================== */

.footer {
  background: var(--ds-ink);
  color: var(--ds-text-inverse-muted);
  padding-top: var(--ds-space-16);
}

.footer__container {
  max-width: var(--ds-container-wide);
  margin: 0 auto;
  padding: 0 var(--ds-gutter);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: var(--ds-space-10);
  padding-bottom: var(--ds-space-12);
  border-bottom: 1px solid var(--ds-border-inverse);
}

.footer__brand {
  padding-right: var(--ds-space-8);
}

.footer__logo {
  display: inline-block;
  margin-bottom: var(--ds-space-4);
}

.footer__description {
  margin-bottom: var(--ds-space-6);
  font-size: var(--ds-text-sm);
  line-height: var(--ds-leading-relaxed);
  color: var(--ds-text-inverse-muted);
}

.footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-3);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--ds-touch-target);
  height: var(--ds-touch-target);
  border-radius: var(--ds-radius-full);
  background: color-mix(in srgb, #FFFFFF 8%, transparent);
  color: var(--ds-text-inverse-muted);
  transition: background-color var(--ds-transition), color var(--ds-transition);
}

.footer__social-link:hover {
  background: var(--ds-accent);
  color: var(--ds-text-on-accent);
}

.footer__social-link:focus-visible {
  outline: var(--ds-focus-width) solid var(--color-accent-light);
  outline-offset: var(--ds-focus-offset);
}

.footer__social-icon {
  width: 18px;
  height: 18px;
}

.footer__title {
  margin-bottom: var(--ds-space-6);
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-weight-semibold);
  letter-spacing: var(--ds-tracking-caps);
  text-transform: uppercase;
  color: var(--ds-text-inverse);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__link {
  display: inline-block;
  padding-block: var(--ds-space-1);
  font-size: var(--ds-text-sm);
  color: var(--ds-text-inverse-muted);
  text-decoration: none;
  transition: color var(--ds-transition);
}

.footer__link:hover {
  color: var(--ds-text-inverse);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer__link:focus-visible {
  outline: var(--ds-focus-width) solid var(--color-accent-light);
  outline-offset: var(--ds-focus-offset);
  border-radius: var(--ds-radius-sm);
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-3);
}

.footer__contact-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--color-accent-light);
}

.footer__contact-label {
  margin-bottom: 2px;
  font-size: var(--ds-text-xs);
  letter-spacing: var(--ds-tracking-caps);
  text-transform: uppercase;
  color: var(--ds-text-inverse-muted);
}

.footer__contact-value {
  font-size: var(--ds-text-sm);
  color: var(--ds-text-inverse);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-4);
  padding: var(--ds-space-6) 0;
}

.footer__copyright {
  font-size: var(--ds-text-xs);
  color: var(--ds-text-inverse-muted);
}

.footer__reg {
  color: var(--ds-text-inverse-muted);
}

.footer__certs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-6);
}

.footer__cert {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  font-size: var(--ds-text-xs);
  color: var(--ds-text-inverse-muted);
}

.footer__cert-icon {
  width: 16px;
  height: 16px;
  color: var(--color-accent-light);
}

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

  .footer__brand {
    grid-column: 1 / -1;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--ds-space-8);
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   12. PRÉFÉRENCES DE MOUVEMENT
   Le bloc générique vit dans design-system.css. On neutralise ici en plus
   les révélations au scroll pour éviter tout contenu invisible.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  /* [data-aos] : AOS ecrit ses transitions en style inline sur l'element.
     Le !important est donc structurellement necessaire ici — aucune
     specificite de selecteur ne peut battre un style inline. */
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   13. FILET DE SÉCURITÉ — LISIBILITÉ DES ACTIONS PRIMAIRES
   --------------------------------------------------------------------------
   Pourquoi ce bloc existe :
   l'ancien accent était un VERT CLAIR (#5DD83D), avec lequel un texte sombre
   était lisible. Le nouvel accent est un BLEU SATURÉ (#2563EB), qui exige un
   texte clair. Le pont de compatibilité (§1) remappe la valeur de la couleur,
   mais pas le couple fond/texte : toute règle héritée faisant
   `background: var(--color-accent)` en comptant sur la couleur de texte
   héritée produit du noir sur bleu.

   Second défaut couvert ici : plusieurs boutons hérités passent le texte en
   blanc au :hover SANS changer leur fond clair — le texte disparaît.
   Exemple : .credit-hero__cta--primary (fond vert en dur, color:#0F172A,
   puis color:white au survol).

   app.css est chargé APRÈS les CSS de page (injecté par importmap('app') dans
   le block javascripts) : à spécificité égale, ce bloc gagne la cascade.
   Aucun !important — les zones refondues utilisent une spécificité supérieure
   et reprennent donc légitimement la main.

   TEMPORAIRE : à retirer quand les 12 zones seront retokenisées.
   ========================================================================== */

.btn--primary,
.btn-primary,
.banking__action-primary,
.card-access__btn--primary,
.credit-cta__button--primary,
.credit-hero__cta--primary,
.credit-item__action--primary,
.subscription-status__button--primary,
.card-type__cta--featured,
.card-types__cta--featured {
  background: var(--ds-accent);
  border-color: var(--ds-accent);
  color: var(--ds-text-on-accent);
}

.btn--primary:hover,
.btn-primary:hover,
.banking__action-primary:hover,
.card-access__btn--primary:hover,
.credit-cta__button--primary:hover,
.credit-hero__cta--primary:hover,
.credit-item__action--primary:hover,
.subscription-status__button--primary:hover,
.card-type__cta--featured:hover,
.card-types__cta--featured:hover,
.btn--primary:focus-visible,
.btn-primary:focus-visible,
.credit-hero__cta--primary:focus-visible,
.credit-item__action--primary:focus-visible {
  background: var(--ds-accent-hover);
  border-color: var(--ds-accent-hover);
  color: var(--ds-text-on-accent);
}

.btn--primary:active,
.btn-primary:active,
.credit-hero__cta--primary:active,
.credit-item__action--primary:active,
.subscription-status__button--primary:active {
  background: var(--ds-accent-active);
  border-color: var(--ds-accent-active);
  color: var(--ds-text-on-accent);
}

/* Les icônes de ces boutons suivent la couleur du texte, jamais une teinte figée. */
.btn--primary .icon, .btn--primary svg, .btn--primary i,
.btn-primary .icon,  .btn-primary svg,  .btn-primary i,
.credit-hero__cta--primary i,
.credit-item__action--primary i,
.card-type__cta--featured i,
.card-types__cta--featured i {
  color: currentColor;
}
