/* ==========================================================================
   Design system RACK — couche de tokens et de composants
   Portage du projet Claude Design « Site vitrine RACK »
   (design system `rack-design-system-c133deb8`).

   Chargée APRÈS `styles.css` et AVANT `a11y.css` dans `templates/base.html.twig` :
   - elle surcharge le thème Agency historique de `styles.css` ;
   - `a11y.css` reste le dernier mot sur le focus et les contrastes (RGAA).

   Front public uniquement — ne JAMAIS la lier dans `templates/admin/base.html.twig`
   (l'admin est en Bootstrap 4 / SB Admin 2, ces règles la casseraient).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Violet — couleur primaire */
  --violet-50: #f1ecfd;
  --violet-100: #e1d6fb;
  --violet-200: #cfbcf5;
  --violet-300: #b598ee;
  --violet-400: #7a4fe6;
  --violet-500: #4315cf;
  --violet-600: #3810ac;
  --violet-700: #2c0c87;
  --violet-800: #1f0861;
  --violet-900: #140440;

  /* Jaune — accent ponctuel */
  --yellow-100: #fff3cc;
  --yellow-300: #ffdc66;
  --yellow-500: #ffc800;
  --yellow-700: #b38c00;
  --yellow-overlay: rgba(255, 200, 0, 0.9);

  /* Encre & fonds */
  --ink: #212529;
  --ink-soft: #565d64;
  --grey-body: #f5f5f5;
  --grey-section: #f8f9fa;
  --white: #fff;

  /* Neutres */
  --neutral-0: #fff;
  --neutral-25: #fcfcfc;
  --neutral-50: #f8f9fa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e4e5e7;
  --neutral-300: #ced4da;
  --neutral-400: #adb5bd;
  --neutral-500: #868e96;
  --neutral-600: #565d64;
  --neutral-700: #3e4348;
  --neutral-800: #2c3034;
  --neutral-900: #212529;

  /* Vert / ambre / rouge — états du matériel et messages, uniquement */
  --green-50: #e6f6ec;
  --green-100: #c6ead4;
  --green-300: #6cc793;
  --green-500: #10935a;
  --green-700: #0a6b41;
  --amber-50: #fff6e0;
  --amber-100: #ffe7ad;
  --amber-300: #ffd054;
  --amber-500: #b98a00;
  --amber-700: #8a6700;
  --red-50: #fcebe8;
  --red-100: #f7cfc8;
  --red-500: #c22e19;
  --red-700: #8c1f0f;

  /* Alias sémantiques — à employer dans le code, jamais les valeurs brutes */
  --brand: var(--violet-500);
  --brand-hover: var(--violet-600);
  --brand-active: var(--violet-700);
  --brand-light: var(--violet-300);
  --brand-soft: var(--violet-50);
  --brand-soft-border: var(--violet-100);
  --brand-contrast: var(--white);
  --accent: var(--yellow-500);
  --accent-hover: var(--yellow-300);
  --accent-overlay: var(--yellow-overlay);

  --text-strong: var(--ink);
  --text-body: var(--ink);
  --text-muted: var(--ink-soft);
  --text-faint: var(--neutral-500);
  --text-on-brand: var(--white);
  --text-on-dark: var(--white);
  --text-link: var(--violet-500);
  --text-link-hover: var(--violet-700);

  --surface-page: var(--grey-body);
  --surface-alt: var(--grey-section);
  --surface-card: var(--white);
  --surface-sunken: var(--neutral-200);
  --surface-dark: var(--ink);
  --surface-brand: var(--violet-500);

  --border-subtle: var(--neutral-200);
  --border-default: var(--neutral-300);
  --border-strong: var(--neutral-400);
  --border-brand: var(--violet-500);
  --focus-ring: var(--yellow-500);

  --status-available-fg: var(--green-700);
  --status-available-bg: var(--green-50);
  --status-reserved-fg: var(--amber-700);
  --status-reserved-bg: var(--amber-50);
  --status-refused-fg: var(--red-700);
  --status-refused-bg: var(--red-50);

  /* Typographie */
  --font-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Roboto Slab", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --text-3xs: 0.75rem;
  --text-2xs: 0.8125rem;
  --text-xs: 0.875rem;
  --text-sm: 0.9375rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;

  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;
  --tracking-caps: 0.0625em;
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  --type-section-sub-size: 1rem;

  /* Espacement */
  --space-2: 4px;
  --space-3: 8px;
  --space-4: 12px;
  --space-5: 16px;
  --space-6: 20px;
  --space-7: 24px;
  --space-8: 32px;
  --space-9: 40px;
  --space-10: 48px;
  --space-11: 64px;
  --space-12: 80px;

  --gutter: 1.875rem;
  --container-max: 1140px;
  --container-narrow: 720px;
  --container-pad: 1rem;
  --section-y-tight: 4rem;
  --navbar-h: 4.5rem;
  --btn-pad: 0.75rem 1.5rem;
  --btn-pad-xl: 1.25rem 2.5rem;
  --field-pad: 1.25rem;

  /* Rayons */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-pill: 999px;
  --radius-card: 8px;
  --radius-control: 6px;
  --radius-media: 8px;
  --border-width: 1px;
  --border-width-strong: 2px;

  /* Élévation */
  --shadow-xs: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.14);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.1);
  --shadow-btn-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
  --overlay-scrim: rgba(33, 37, 41, 0.55);

  /* Mouvement — 120ms contrôles, 180ms cartes et voiles, 280ms menu mobile */
  --dur-fast: 120ms;
  --dur-base: 180ms;
  --dur-slow: 280ms;
  --ease-standard: cubic-bezier(0.2, 0.6, 0.3, 1);

  /* Échelle responsive — mobile d'abord (cf. tokens/responsive.css du DS) */
  --hero-pad-top: 8rem;
  --hero-pad-bottom: 5rem;
  --type-hero-size: 2rem;
  --type-hero-tagline-size: 1.375rem;
  --type-section-title-size: 1.75rem;
  --section-y: 3.5rem;
  --type-section-sub-gap: 2.5rem;
}

@media (min-width: 768px) {
  :root {
    --hero-pad-top: 11rem;
    --hero-pad-bottom: 7rem;
    --type-hero-size: 2.5rem;
    --type-hero-tagline-size: 1.75rem;
    --type-section-title-size: 2rem;
    --section-y: 4.5rem;
    --type-section-sub-gap: 3rem;
  }
}

@media (min-width: 992px) {
  :root {
    --hero-pad-top: 17rem;
    --hero-pad-bottom: 10rem;
    --type-hero-size: 3.5rem;
    --type-hero-tagline-size: 2.25rem;
    --type-section-title-size: 2.5rem;
    --section-y: 6rem;
    --type-section-sub-gap: 4rem;
  }
}

/* Pont vers les variables Bootstrap 5 : tout ce qui est peint par BS suit les
   tokens sans avoir à réécrire chaque composant. */
:root {
  --bs-primary: var(--violet-500);
  --bs-primary-rgb: 67, 21, 207;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--grey-body);
  --bs-link-color: var(--text-link);
  --bs-link-hover-color: var(--text-link-hover);
  --bs-border-radius: var(--radius-control);
  --bs-border-radius-lg: var(--radius-card);
}

/* --------------------------------------------------------------------------
   2. Fondations
   -------------------------------------------------------------------------- */
body {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--text-body);
  background-color: var(--surface-page);
}

/* MAJUSCULES + Montserrat 700 sur tous les titres : c'est la signature
   typographique du site, pas un effet d'emphase. */
h1, h2, h3, h4, h5,
.h1, .h2, .h3, .h4, .h5 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  color: var(--text-strong);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

p {
  line-height: var(--leading-relaxed);
}

a {
  color: var(--text-link);
  text-underline-offset: 2px;
  transition: color var(--dur-fast) var(--ease-standard);
}

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

.font-mono {
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   3. Navigation
   -------------------------------------------------------------------------- */
#mainNav {
  padding-top: 0;
  padding-bottom: 0;
  background-color: var(--surface-dark);
}

#mainNav > .container {
  min-height: var(--navbar-h);
}

#mainNav .navbar-brand img {
  height: 2.5rem;
  width: auto;
}

#mainNav .navbar-nav .nav-item .nav-link {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-3xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--white);
  padding: 0.75rem 0.35rem;
  transition: color var(--dur-fast) var(--ease-standard);
}

#mainNav .navbar-nav .nav-item .nav-link.active,
#mainNav .navbar-nav .nav-item .nav-link:hover {
  color: var(--brand-light);
}

#mainNav .navbar-toggler {
  border: var(--border-width-strong) solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-control);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-3xs);
  padding: 0.5rem 0.9rem;
}

@media (min-width: 992px) {
  /* Navbar sombre sur l'accueil (posée sur la photo du hero), violette ailleurs.
     En mobile elle reste sombre dans les deux cas. */
  body:not(.home_body) #mainNav {
    background-color: var(--surface-brand);
  }
  #mainNav {
    padding-top: 0;
    padding-bottom: 0;
  }
  /* #B598EE n'atteint 4.5:1 que sur l'encre : sur le violet, l'état actif
     passe au jaune d'accent (9.4:1). */
  body:not(.home_body) #mainNav .navbar-nav .nav-item .nav-link.active,
  body:not(.home_body) #mainNav .navbar-nav .nav-item .nav-link:hover {
    color: var(--accent);
  }
}

@media (max-width: 991.98px) {
  #mainNav .navbar-nav .nav-item .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* Lien d'évitement — la valeur de référence reste dans a11y.css, on n'aligne
   ici que la composition typographique. */
.skip-link {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-3xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  border-radius: var(--radius-control);
}

/* --------------------------------------------------------------------------
   4. Hero
   -------------------------------------------------------------------------- */
header.masthead {
  position: relative;
  padding: var(--hero-pad-top) var(--container-pad) var(--hero-pad-bottom);
  text-align: center;
  color: var(--white);
}

/* Voile sombre : la seule transparence du système avec le voile jaune des
   tuiles. Sans lui, le titre blanc ne tient pas sur la photo. */
header.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay-scrim);
}

header.masthead > .container {
  position: relative;
  max-width: var(--container-max);
}

header.masthead .masthead-subheading {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: var(--weight-light);
  font-size: var(--type-hero-tagline-size);
  line-height: 1.2;
  margin: 0 0 var(--space-6);
}

header.masthead .masthead-heading {
  font-size: var(--type-hero-size);
  line-height: 1.15;
  color: var(--white);
  margin: 0 0 var(--space-11);
}

header.masthead .masthead-actions {
  display: flex;
  gap: var(--space-7);
  justify-content: center;
  flex-wrap: wrap;
}

header.masthead .masthead-actions .btn {
  margin: 0;
}

/* --------------------------------------------------------------------------
   5. Sections
   -------------------------------------------------------------------------- */
.home-section {
  padding: var(--section-y) 0;
  background: var(--surface-card);
}

.page-section {
  padding: calc(var(--navbar-h) + var(--space-9)) 0 var(--section-y-tight) 0;
  background: var(--surface-card);
}

.page-sous-section {
  padding: var(--space-5) 0;
  background: var(--surface-card);
}

/* Fonds alternés : blanc puis gris clair, jamais deux gris de suite. */
.home-section.bg-light,
.page-section.bg-light {
  background: var(--surface-alt) !important;
}

.home-section h2.section-heading,
.home-section .section-heading.h2,
.page-section h1.section-heading,
.page-section .section-heading.h1,
.section-heading {
  font-size: var(--type-section-title-size);
  margin: 0;
}

.home-section h3.section-subheading,
.home-section .section-subheading.h3,
.page-section h2.section-subheading,
.page-section .section-subheading.h2,
.section-subheading {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: var(--weight-light);
  font-size: var(--type-section-sub-size);
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  max-width: 60ch;
  margin: var(--space-5) auto var(--type-section-sub-gap);
}

/* --------------------------------------------------------------------------
   6. Boutons
   -------------------------------------------------------------------------- */
.btn {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  line-height: 1.2;
  padding: var(--btn-pad);
  border: none;
  border-radius: var(--radius-control);
  text-decoration: none;
  transition:
    background-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard),
    transform var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn-hover);
}

.btn-xl {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  padding: var(--btn-pad-xl);
}

.btn-sm {
  font-size: var(--text-3xs);
  padding: 0.5rem 1rem;
}

.btn-primary {
  background-color: var(--brand);
  color: var(--text-on-brand);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--brand-hover);
  color: var(--text-on-brand);
}

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

.btn-warning:hover,
.btn-accent:hover {
  background-color: var(--accent-hover);
  color: var(--ink);
}

/* Variante « outline » du hero : contour blanc sur la photo. */
.btn-outline-light {
  background: transparent;
  color: var(--white);
  box-shadow: inset 0 0 0 2px var(--white);
}

.btn-outline-light:hover {
  background: var(--white);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--white), var(--shadow-btn-hover);
}

/* Variante secondaire : fond blanc, texte violet, filet neutre. */
.btn-outline-dark,
.btn-outline-secondary,
.btn-outline-info,
.btn-outline-primary,
.btn-secondary {
  background: var(--white);
  color: var(--brand);
  box-shadow: inset 0 0 0 2px var(--neutral-300);
}

.btn-outline-dark:hover,
.btn-outline-secondary:hover,
.btn-outline-info:hover,
.btn-outline-primary:hover,
.btn-secondary:hover {
  background: var(--white);
  color: var(--brand);
  box-shadow: inset 0 0 0 2px var(--brand), var(--shadow-btn-hover);
}

.btn-product {
  width: 100%;
}

/* Les pastilles sociales rondes du pied de page ne suivent pas le gabarit
   général des boutons (cf. commentaire historique dans styles.css). */
.btn.btn-social {
  height: 2.5rem;
  width: 2.5rem;
  padding: 0;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--white);
}

.btn.btn-social:hover {
  background: var(--neutral-800);
  color: var(--white);
}

/* --------------------------------------------------------------------------
   7. Tuiles catalogue et cartes produit
   -------------------------------------------------------------------------- */
/* Gouttière de la grille de tuiles portée par la row (token --gutter), et non
   par des `mb-*` posés tuile par tuile : ajouter une catégorie ne peut plus
   coller deux rangées faute de marge sur la dernière. */
.row-tuiles {
  --bs-gutter-x: var(--gutter);
  --bs-gutter-y: var(--gutter);
}

/* `position: relative` : c'est le bloc que le `.stretched-link` du titre
   recouvre — toute la tuile est cliquable, pas seulement l'image. */
.portfolio-item {
  position: relative;
  max-width: none;
  background: var(--surface-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  height: 100%;
  transition: transform var(--dur-base) var(--ease-standard);
}

.portfolio-item:hover {
  transform: translateY(-2px);
}

.portfolio-item .portfolio-link .portfolio-hover {
  background: var(--accent-overlay);
  transition: opacity var(--dur-base) var(--ease-standard);
}

/* Le voile jaune répond au survol de la tuile entière : le média n'étant plus
   un lien, c'est le `::after` du lien étiré qui reçoit le pointeur. */
.portfolio-item:hover .portfolio-link .portfolio-hover,
.portfolio-item:focus-within .portfolio-link .portfolio-hover {
  opacity: 1;
}

/* Le lien étiré ne doit pas se voir : la tuile fait déjà l'affordance. */
.portfolio-caption a.stretched-link,
.portfolio-caption a.stretched-link:hover {
  color: inherit;
  text-decoration: none;
}

.portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 4rem;
  line-height: 1;
  color: var(--white);
}

.portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content svg {
  width: 4rem;
  height: 4rem;
}

.portfolio-item .portfolio-caption {
  padding: var(--space-7) var(--space-7) var(--space-8);
  text-align: center;
  background-color: var(--surface-card);
}

.portfolio-item .portfolio-caption .portfolio-caption-heading {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  margin-bottom: 0;
}

.portfolio-item .portfolio-caption .portfolio-caption-subheading {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: var(--weight-light);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--text-muted);
  margin-top: var(--space-3);
}

#portfolio .portfolio-item .portfolio-link,
#portfolio .portfolio-item .portfolio-link:hover {
  color: inherit;
  text-decoration: none;
}

/* Carte produit (liste d'une catégorie) : marque en exergue, titre, état,
   caractéristiques en mono, puis la mention de tarif — jamais de prix. */
.product-card-brand {
  font-family: var(--font-display);
  font-size: var(--text-3xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.portfolio-caption .product-heading {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-md);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  line-height: var(--leading-snug);
  text-align: center;
  margin-bottom: var(--space-5);
}

.product-card-tarif {
  margin: var(--space-5) 0 0;
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--text-2xs);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   8. Étiquettes d'état (Tag)
   -------------------------------------------------------------------------- */
.rack-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-3xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  line-height: 1.4;
  padding: 0.25rem 0.65rem;
  color: var(--text-muted);
  background: var(--surface-alt);
}

.rack-tag--mono {
  font-family: var(--font-mono);
  text-transform: none;
}

.rack-tag--available {
  color: var(--status-available-fg);
  background: var(--status-available-bg);
}

.rack-tag--reserved {
  color: var(--status-reserved-fg);
  background: var(--status-reserved-bg);
}

.rack-tag--refused {
  color: var(--status-refused-fg);
  background: var(--status-refused-bg);
}

/* Les badges Bootstrap déjà en place adoptent la même forme. */
.badge {
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-3xs);
  letter-spacing: var(--tracking-caps);
  padding: 0.25rem 0.65rem;
}

/* --------------------------------------------------------------------------
   9. Services, chiffres clés, étapes
   -------------------------------------------------------------------------- */
#services svg,
.rack-service-icon {
  width: 8rem;
  height: 8rem;
}

#services h4 {
  font-size: var(--text-lg);
  margin: 0 0 var(--space-5);
}

#services p {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Bandeau de chiffres clés : le nombre en 3.5rem violet, la légende en gris. */
.home-section .h1.text-primary,
.home-section h3.h1.text-primary,
.rack-stat-value {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-5xl);
  line-height: 1.1;
  color: var(--brand) !important;
}

.rack-stat-label {
  margin-top: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Étape numérotée (StepItem) : pastille violette + titre + texte. */
.rack-step {
  display: flex;
  gap: var(--space-8);
}

.rack-step + .rack-step {
  margin-top: var(--space-11);
}

.rack-step__index {
  flex: 0 0 3.5rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-xl);
}

.rack-step h3,
.rack-step h4 {
  margin: 0.6rem 0 var(--space-4);
  font-size: var(--text-md);
}

.rack-step__body {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.rack-step__body p:last-child,
.rack-step__body ul:last-child {
  margin-bottom: 0;
}

/* Padding de carte du DS (32px) : Bootstrap n'en met que 16. */
.card > .card-body {
  padding: var(--space-8);
}

/* --------------------------------------------------------------------------
   10. Cartes, alertes, fil d'Ariane
   -------------------------------------------------------------------------- */
.card,
.container-fluid article.card {
  border: none;
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
}

.card-header {
  background: transparent;
  border-bottom: var(--border-width) solid var(--border-subtle);
}

/* ⚠ `.alert` n'est PAS un encadré de contenu sur ce site : styles.css la fixe en
   `position: fixed; top: 0; width: 100%; z-index: 9999` pour les messages flash.
   L'employer dans une page remonte le bloc en haut de la fenêtre par-dessus le
   titre. Pour un encadré dans le flux, utiliser `.rack-note` ci-dessous.
   Le rayon reste à 0 : c'est un bandeau pleine largeur, pas une carte. */
.alert {
  border: none;
  border-radius: 0;
  padding: var(--space-7) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-body);
  box-shadow: var(--shadow-md);
}

/* Encadré d'information dans le flux — le composant Alert du design system. */
.rack-note {
  border: none;
  border-radius: var(--radius-card);
  padding: var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-body);
  background: var(--violet-50);
}

.rack-note h3,
.rack-note h4 {
  font-size: var(--text-md);
  margin: 0 0 var(--space-4);
  color: var(--brand);
}

.rack-note p:last-child {
  margin-bottom: 0;
}

.rack-note--success {
  background: var(--green-50);
}

.rack-note--success h3,
.rack-note--success h4 {
  color: var(--green-700);
}

.rack-note--warning {
  background: var(--amber-50);
}

.rack-note--warning h3,
.rack-note--warning h4 {
  color: var(--amber-700);
}

.rack-note--danger {
  background: var(--red-50);
}

.rack-note--danger h3,
.rack-note--danger h4 {
  color: var(--red-700);
}

.alert-info,
.alert-primary {
  background: var(--violet-50);
}

.alert-success {
  background: var(--green-50);
}

.alert-warning {
  background: var(--amber-50);
}

.alert-danger,
.alert-error {
  background: var(--red-50);
}

.breadcrumb {
  font-family: var(--font-body);
  font-size: var(--text-2xs);
  color: var(--text-muted);
  background: transparent;
  margin-bottom: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--border-strong);
}

.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--text-link);
}

.breadcrumb-item.active {
  color: var(--text-strong);
}

/* --------------------------------------------------------------------------
   11. Formulaires
   -------------------------------------------------------------------------- */
.form-control,
.form-select,
section#contact form#contactForm .form-group input,
section#contact form#contactForm .form-group textarea {
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--text-strong);
  background: var(--white);
  border: none;
  border-bottom: var(--border-width-strong) solid var(--border-default);
  border-radius: 0;
  /* « Champs généreux (padding 1.25rem) » : sur les quatre côtés. Le composant
     Input du DS ne rembourre que le haut et le bas, ce qui colle le texte au
     bord blanc du champ dès que celui-ci se détache du fond. */
  padding: var(--field-pad);
  transition: border-color var(--dur-fast) var(--ease-standard);
}

.form-control:focus,
.form-select:focus,
section#contact form#contactForm .form-control:focus {
  border-color: var(--brand-light);
  box-shadow: none;
}

/* Un placeholder n'est jamais un libellé : il est composé, pas informatif. */
.form-control::placeholder,
section#contact form#contactForm input::placeholder,
section#contact form#contactForm textarea::placeholder {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-size: var(--text-3xs);
  /* Le DS demande `--neutral-400` (#ADB5BD) : 2,2:1 sur blanc, sous le seuil
     RGAA 4.1 pour du texte de 0,75rem. On garde la composition (Montserrat
     gras MAJUSCULES) mais on remonte au gris de texte secondaire, 7:1 — le
     placeholder reste distinct de la valeur saisie, en Roboto Slab 1rem encre. */
  color: var(--text-muted);
  opacity: 1;
}

.form-label,
label.required,
.form-group > label {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-3xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

/* Pas d'astérisque ajouté par le CSS : les libellés de `ContactType` et consorts
   portent déjà le leur dans le texte (« Votre nom * »). En ajouter un ici
   affichait « Votre nom * * ». */

.form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}

@media (max-width: 991.98px) {
  .form-control,
  .form-select {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}

/* --------------------------------------------------------------------------
   12. Fiche produit
   -------------------------------------------------------------------------- */
h1.product-title {
  font-size: var(--text-3xl) !important;
  margin: var(--space-6) 0 0;
}

.product-subtitle {
  margin: var(--space-5) 0 0;
}

/* Caractéristiques : libellé en display MAJ, valeur en mono. Aucun prix. */
.product-specs {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-8);
  row-gap: var(--space-4);
  margin: var(--space-9) 0 0;
  font-size: var(--text-sm);
}

.product-specs dt {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-size: var(--text-2xs);
  padding-top: 2px;
}

.product-specs dd {
  margin: 0;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.product-tarif {
  margin: var(--space-9) 0 var(--space-7);
  font-family: var(--font-body);
  font-style: italic;
  color: var(--text-muted);
}

.product-carousel .carousel-inner,
.product-carousel img {
  border-radius: var(--radius-media);
}

.specifications-list .spec-item span {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

/* --------------------------------------------------------------------------
   13. Pied de page
   -------------------------------------------------------------------------- */
.footer {
  background: var(--surface-card);
  border-top: var(--border-width) solid var(--border-subtle);
  padding: var(--section-y-tight) var(--container-pad);
  text-align: center;
  font-family: var(--font-display);
}

.footer .footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-size: var(--text-3xs);
  font-weight: var(--weight-medium);
  padding: 0.4rem 0;
  margin: 0 var(--space-4) var(--space-3);
}

.footer .footer-links a:hover {
  color: var(--text-link);
}

.footer .footer-coordonnees {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--text-muted);
}

.footer .footer-coordonnees strong {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-strong);
}

.footer .row:last-child {
  font-size: var(--text-3xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   14. Texte long (rack-prose)
   Gabarit de lecture des articles, tutoriels, intros de catégorie et pages
   éditoriales. Le contenu vient de TinyMCE : on style les balises, pas des
   classes qu'on ne maîtrise pas.
   -------------------------------------------------------------------------- */
.rack-prose,
.article-content,
.bloc-services,
.faq-answer {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
}

.rack-prose,
.article-content {
  max-width: 72ch;
  margin: 0 auto;
}

.rack-prose h1,
.article-content h1 {
  font-size: var(--text-4xl);
  margin: 0 0 var(--space-6);
  line-height: var(--leading-snug);
}

.rack-prose h2,
.article-content h2 {
  font-size: var(--text-xl);
  margin: var(--space-12) 0 var(--space-6);
}

/* Les sous-titres de niveau 3 passent en violet : c'est le seul repère de
   hiérarchie dans un texte long, où tout est déjà en majuscules. */
/* Violet réservé au vrai texte long : dans un article, c'est le seul repère de
   hiérarchie quand tout est en majuscules. `.bloc-services` en était exclu —
   ses H3 sont des titres de blocs (« Ce que nous acceptons »), pas des
   sous-titres de prose : 42 titres sur 13 gabarits passaient en violet. */
.rack-prose h3,
.article-content h3 {
  font-size: var(--text-md);
  margin: var(--space-9) 0 var(--space-4);
  color: var(--brand);
}

.rack-prose p,
.article-content p,
.bloc-services p {
  margin: 0 0 var(--space-7);
}

.rack-prose .meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
  margin-bottom: var(--space-8);
}

/* Chapô encadré — composant `.pull` du design system. Réservé au contenu
   rédigé à la main : le chapô des articles, lui, s'en passe (voir ci-dessous). */
.rack-prose .pull {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-style: normal;
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--text-body);
  background: var(--surface-alt);
  border-left: 4px solid var(--brand);
  border-radius: 0;
  padding: var(--space-8) var(--space-9);
  margin: 0 0 var(--space-9);
}

/* Chapô d'article : sans cadre ni filet. L'encadré à bordure gauche alourdit
   l'entrée de l'article — le chapô se distingue par sa taille et sa couleur,
   pas par une boîte. C'est aussi la variante `.lead` du design system. */
.rack-prose .lead,
.article-content .lead,
.rack-article .lead,
.card-body > .lead {
  background: none;
  border-left: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-style: italic;
  font-weight: var(--weight-light);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
  margin: 0 0 var(--space-9);
}

/* --- Gabarit d'article (templates/article/show.html.twig) ---
   Le texte est posé directement sur la section, sans carte ni ombre : la
   colonne de lecture suffit à porter l'article. */
.rack-article {
  max-width: 72ch;
  margin: 0 auto;
}

.rack-article > header h1 {
  font-size: var(--type-section-title-size);
  line-height: var(--leading-snug);
  margin: 0 0 var(--space-6);
}

.rack-article__meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
  margin: 0 0 var(--space-9);
}

.rack-article__cover {
  margin: 0 0 var(--space-9);
}

.rack-article__cover img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-media);
  display: block;
}

.rack-article__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-11);
}

.rack-article__tags-label {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-size: var(--text-2xs);
  margin-right: var(--space-3);
}

.rack-article__tags a.rack-tag,
.rack-article__tags a.rack-tag:hover {
  text-decoration: none;
}

.rack-article__tags a.rack-tag:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

/* Le contenu hérite déjà de la largeur de lecture de l'article. */
.rack-article .article-content {
  max-width: none;
  padding-top: 0;
}

/* Code en incise : références, raccourcis clavier, invites. */
.rack-prose code,
.article-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-alt);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-xs);
}

/* Titres ancrés : le lien « # » n'apparaît qu'au survol ou au focus clavier. */
.rack-prose h2 a[href^="#"],
.article-content h2 a[href^="#"] {
  opacity: 0;
  color: var(--text-faint);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: opacity var(--dur-fast) var(--ease-standard);
}

.rack-prose h2:hover a[href^="#"],
.rack-prose h2 a[href^="#"]:focus,
.article-content h2:hover a[href^="#"],
.article-content h2 a[href^="#"]:focus {
  opacity: 1;
}

/* Un seul filet violet par article, celui du chapô : le H1 s'en passe. */
.card-body h1.card-title {
  border-left: none;
  padding-left: 0;
  font-size: var(--text-4xl);
  color: var(--text-strong);
}

/* Encadré « Bon à savoir » — composant Callout du design system. Le contenu
   vient de TinyMCE : l'éditeur marque le paragraphe `data-info="true"`, la
   pastille est ajoutée ici. */
/* Pas de `display: flex` ici : le contenu vient de TinyMCE, et chaque enfant
   inline (`<strong>`, `<code>`…) deviendrait un élément flex à part — le texte
   se brisait en colonnes. La pastille est donc posée en absolu, le paragraphe
   reste un bloc normal. */
.article-content p[data-info="true"],
.rack-prose p[data-info="true"] {
  position: relative;
  background: var(--violet-50);
  border-left: none;
  border-radius: var(--radius-card);
  /* Le retrait à gauche réserve la place de la pastille. `padding-left` vient
     APRÈS le raccourci, sinon il est réinitialisé et le texte repasse sous la
     pastille — c'est ce qui masquait le mot « Bon » de « Bon à savoir ». */
  padding: var(--space-8);
  padding-left: calc(var(--space-8) + 1.75rem + var(--space-6));
  margin: var(--space-9) 0;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  text-align: left;
}

.article-content p[data-info="true"]::before,
.rack-prose p[data-info="true"]::before {
  content: "i";
  position: absolute;
  left: var(--space-8);
  top: var(--space-8);
  box-shadow: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: var(--text-on-brand);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-2xs);
}

.rack-prose ul,
.rack-prose ol,
.article-content ul,
.article-content ol,
.bloc-services ul,
.bloc-services ol {
  margin: 0 0 var(--space-7);
  padding-left: 1.4em;
}

.rack-prose li,
.article-content li,
.bloc-services li {
  margin-bottom: var(--space-4);
}

.rack-prose blockquote,
.article-content blockquote {
  margin: var(--space-11) 0;
  padding: var(--space-9) var(--space-11);
  background: var(--violet-50);
  border-radius: var(--radius-md, var(--radius-sm));
  border-left: none;
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
}

.rack-prose blockquote p,
.article-content blockquote p {
  margin: 0;
}

.rack-prose figure,
.article-content figure {
  margin: var(--space-11) 0;
}

.rack-prose figcaption,
.article-content figcaption {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

.rack-prose img,
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-media);
}

/* Les tableaux débordent en mobile : ils défilent dans leur propre boîte,
   jamais le corps de page. */
.rack-prose .table-wrap,
.article-content .table-wrap {
  overflow-x: auto;
  margin: 0 0 var(--space-9);
}

.rack-prose table,
.article-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.rack-prose caption,
.article-content caption {
  caption-side: bottom;
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
  text-align: left;
}

.rack-prose th,
.article-content th {
  text-align: left;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-size: var(--text-2xs);
  padding: var(--space-5);
  background: var(--surface-alt);
}

.rack-prose td,
.article-content td {
  padding: var(--space-5);
  border-top: var(--border-width) solid var(--border-default);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.rack-prose td:first-child,
.article-content td:first-child {
  font-family: var(--font-body);
  font-size: var(--text-sm);
}

/* Le contenu TinyMCE n'a pas de `.table-wrap` : sur petit écran, c'est le
   tableau lui-même qui défile, jamais le corps de la page. */
@media (max-width: 767.98px) {
  .article-content table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }
}

/* --- Neutralisation de l'ancien habillage d'article de styles.css ---
   Ces décorations (filet sous les H2, texte justifié, ombre et coins arrondis
   sur les tableaux, puces violettes en ::before) ne font pas partie du design
   system, et styles.css ne les pose que sur `.article-content`. */
.article-content h2 {
  border-bottom: none;
  padding-bottom: 0;
  font-weight: var(--weight-bold);
}

.article-content p {
  text-align: left;
  hyphens: manual;
}

.article-content table {
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
  margin: 0 0 var(--space-9);
}

.article-content ul li {
  list-style-type: disc;
}

.article-content ul li::before {
  content: none;
}

/* --------------------------------------------------------------------------
   15. FAQ — accordéon
   Le gabarit utilise <details>/<summary> natifs : ils restent accessibles au
   clavier sans JavaScript, on ne fait que les habiller.
   -------------------------------------------------------------------------- */
details.faq-item {
  background: var(--surface-card);
  border-radius: var(--radius-md, var(--radius-sm));
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

details.faq-item > summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-7);
  padding: var(--space-7) var(--space-8);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-size: var(--text-2xs);
  color: var(--text-strong);
}

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

/* Chevron en pastille, retourné à l'ouverture. */
details.faq-item > summary::after {
  content: "▼";
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: var(--text-xs);
  transition: transform var(--dur-base) var(--ease-standard);
}

details.faq-item[open] > summary {
  color: var(--brand);
}

details.faq-item[open] > summary::after {
  transform: rotate(180deg);
  background: var(--brand);
  color: var(--text-on-brand);
}

details.faq-item > summary h3,
details.faq-item > summary .h6 {
  font-size: inherit;
  color: inherit;
  margin: 0;
}

.faq-answer {
  padding: 0 var(--space-8) var(--space-8);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   16. Actualités, tutoriels, événements
   -------------------------------------------------------------------------- */
/* Bandeau de tête des listes : même gabarit que le PageTop du catalogue —
   fond blanc, titre centré, phrase italique. Ni dégradé ni bandeau coloré. */
.news-container {
  background: var(--surface-page);
  min-height: 0;
}

.news-header {
  background: var(--surface-card);
  border-radius: var(--radius-card);
  padding: var(--section-y-tight) var(--space-8);
  margin-bottom: var(--section-y-tight);
  box-shadow: var(--shadow-card);
}

.news-header h1,
.news-header .display-4 {
  font-size: var(--type-section-title-size);
  color: var(--text-strong);
  margin: 0;
}

.news-header .lead {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: var(--weight-light);
  font-size: var(--text-md);
  color: var(--text-muted);
  max-width: 60ch;
  margin: var(--space-5) auto 0;
}

.news-header i,
.news-header .fas {
  color: var(--brand);
}

/* Titre de carte (actualité, tutoriel, événement). */
.card-title,
.card-title.h2 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-md);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  line-height: var(--leading-snug);
}

.card .card-body > small,
.card .card-body .text-muted small,
.card-body small.text-muted {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
}

/* Pastille de date des événements. */
.rack-date {
  display: inline-block;
  background: var(--brand);
  color: var(--text-on-brand);
  border-radius: var(--radius-md, var(--radius-sm));
  padding: var(--space-5) var(--space-7);
  text-align: center;
  font-family: var(--font-display);
  line-height: 1;
}

.rack-date__day {
  display: block;
  font-size: 2rem;
  font-weight: var(--weight-bold);
}

.rack-date__month {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--text-3xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}

/* --------------------------------------------------------------------------
   17. États vides et pages d'erreur
   -------------------------------------------------------------------------- */
.rack-empty {
  text-align: center;
  max-width: 56ch;
  margin: 0 auto;
  padding: var(--space-12) var(--space-8);
}

.rack-empty__icon {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--space-9);
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 2rem;
  color: var(--text-faint);
}

.rack-empty h2,
.rack-empty h3 {
  font-size: var(--text-lg);
  margin: 0 0 var(--space-5);
}

.rack-empty p {
  margin: 0 0 var(--space-9);
  color: var(--text-muted);
  font-style: italic;
}

.rack-error {
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  background: var(--surface-card);
}

.rack-error__head {
  background: var(--ink);
  color: var(--white);
  padding: var(--space-12);
  text-align: center;
}

.rack-error__code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.rack-error__title {
  margin: var(--space-5) 0 0;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  color: var(--white);
}

.rack-error__body {
  padding: var(--space-12);
  text-align: center;
}

.rack-error__body p {
  margin: 0 auto var(--space-9);
  max-width: 52ch;
  color: var(--text-muted);
  font-style: italic;
}

/* Rangée d'appels à l'action centrés : le motif est le même partout dans le DS
   (hero, états vides, pages d'erreur, bas de page éditoriale). */
.rack-actions,
.rack-error__actions {
  display: flex;
  gap: var(--space-5);
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   18. Messages flash, erreurs de formulaire
   -------------------------------------------------------------------------- */
.alert-dismissible {
  padding-right: calc(var(--space-8) + 44px);
}

.alert-dismissible .btn-close {
  width: 44px;
  height: 44px;
  padding: 0;
  top: var(--space-4);
  right: var(--space-4);
  opacity: 0.7;
}

.alert h4,
.alert .alert-heading {
  font-size: var(--text-md);
  margin: 0 0 var(--space-4);
}

.alert-success h4,
.alert-success .alert-heading {
  color: var(--green-700);
}

.alert-warning h4,
.alert-warning .alert-heading {
  color: var(--amber-700);
}

.alert-danger h4,
.alert-danger .alert-heading {
  color: var(--red-700);
}

.alert-info h4,
.alert-info .alert-heading {
  color: var(--brand);
}

/* Un champ en erreur se signale par son trait, pas par un halo. */
.form-control.is-invalid,
.form-select.is-invalid,
.form-control[aria-invalid="true"] {
  border-color: var(--red-500);
  background-image: none;
  box-shadow: none;
}

.invalid-feedback,
.form-error-message,
ul.form-error-message li {
  font-size: var(--text-2xs);
  color: var(--red-700);
  font-style: normal;
}

.form-text,
.help-text {
  font-size: var(--text-2xs);
  font-style: italic;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Section de contact
   Le fond sombre à carte du monde vient du thème Agency d'origine : le design
   system n'a pas de section sombre (les fonds alternent blanc et gris clair,
   la seule zone sombre du site est la navbar de l'accueil). Sur ce fond, le
   sous-titre et les libellés de champs en gris #565D64 étaient illisibles :
   on remet la section dans le système plutôt que d'inventer un thème sombre
   de formulaire qui n'existe nulle part ailleurs.
   -------------------------------------------------------------------------- */
section#contact {
  background-color: var(--surface-alt);
  background-image: none;
}

section#contact .section-heading {
  color: var(--text-strong);
}

section#contact .section-subheading {
  color: var(--text-muted);
}

/* `styles.css` fixe un padding propre à cette section : on le réaligne sur le
   token, sinon il l'emporte par spécificité. */
section#contact form#contactForm .form-group input,
section#contact form#contactForm .form-group textarea {
  padding: var(--field-pad);
}

section#contact form#contactForm .form-group {
  margin-bottom: var(--space-7);
}

/* Le champ Message s'aligne sur la colonne de gauche : la rangée est déjà en
   `align-items-stretch`, il ne manquait qu'une chaîne flex jusqu'au textarea.
   `height: 100%` (styles.css) le faisait déborder de la hauteur du libellé,
   puisque 100 % de la boîte ne laisse pas de place au <label> au-dessus.
   Les sélecteurs reprennent le préfixe `section#contact form#contactForm`
   parce que styles.css l'emporterait sinon par spécificité. Le gabarit
   imbrique deux fois `.form-group-textarea` (div de la colonne + row_attr du
   form_row) : la règle vaut pour les deux niveaux. */
.form-group-textarea,
section#contact form#contactForm .form-group-textarea {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
}

.form-group-textarea textarea,
section#contact form#contactForm .form-group-textarea textarea {
  flex: 1 1 auto;
  height: auto;
  min-height: 8rem;
  resize: vertical;
}

/* --------------------------------------------------------------------------
   19. Marques, partenaires, connexion
   -------------------------------------------------------------------------- */
.brand-item .brand-logo {
  max-height: 60px;
  max-width: 120px;
}

.brand-item .brand-name,
.partner-name {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-size: var(--text-sm);
  text-align: center;
}

.brand-item .brand-link,
.brand-item .brand-link:hover {
  text-decoration: none;
  color: inherit;
}

.brand-placeholder {
  height: 60px;
  display: grid;
  place-items: center;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  color: var(--text-faint);
}

#login_section .card {
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

#login_section .card h1 {
  font-size: var(--text-2xl);
}

/* --------------------------------------------------------------------------
   20. Neutralisation des restes du thème historique
   Le DS n'a ni dégradé, ni flou, ni bordure gauche colorée.

   L'encadré « Bon à savoir » était habillé ici ET dans la section 14 : le
   `padding` raccourci de cette règle-ci, plus bas dans la cascade, annulait le
   `padding-left` qui réserve la place de la pastille. Une seule règle désormais,
   dans la section 14 — ne pas en réintroduire une seconde.
   -------------------------------------------------------------------------- */

/* Le logo posé sur la navbar violette : pastille blanche, comme la maquette. */
#mainNav .navbar-brand img {
  background: var(--white);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  box-sizing: content-box;
}

/* Aucune animation d'entrée au défilement, aucun rebond. */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
