/**
 * main.css — Esta’frites
 * Mobile-first, sobre, autonome.
 * Palette teal / or friterie.
 * Pas de framework externe.
 */

/* === Variables === */

:root {
  /*
   * Thème automatique :
   * - sans data-theme : préférence du système ;
   * - data-theme="light" : thème clair forcé ;
   * - data-theme="dark" : thème sombre forcé.
   */
  color-scheme: light dark;

  /* ==========================================================
     Palette Esta’frites (teal + or)
     light-dark(couleur claire, couleur sombre)
     ========================================================== */

  /* Teal principal */
  --color-brand: light-dark(
    #0F8B8D,
    #4db8ba
  );

  /*
   * Variante d'interaction :
   * plus sombre en mode clair,
   * plus lumineuse en mode sombre.
   */
  --color-brand-dark: light-dark(
    #0a6b6d,
    #7ad0d2
  );

  --color-brand-soft: light-dark(
    #e6f5f5,
    #143536
  );

  --color-brand-pale: light-dark(
    #f7fbfb,
    #0f2627
  );

  /* Textes */
  --color-text: light-dark(
    #333333,
    #e2ecec
  );

  --color-title: light-dark(
    #162521,
    #f3f7f5
  );

  --color-muted: light-dark(
    #5c6666,
    #a8b8b8
  );

  --color-brand-typo: light-dark(
    #2D939F,
    #7ad0d2
  );

  /* Structure et arrière-plans */
  --color-border: light-dark(
    #c5dede,
    #2a4a4b
  );

  --color-background: light-dark(
    #ffffff,
    #0d1f20
  );

  --color-background-soft: light-dark(
    #f7fbfb,
    #122829
  );

  /* Or / frites */
  --color-accent: light-dark(
    #E9B44C,
    #f0c96a
  );

  --color-accent-soft: light-dark(
    #fdf6e6,
    #3a3018
  );

  /* Accent chaud (complément) */
  --color-accent-warm: light-dark(
    #d4922a,
    #e8b45a
  );

  --color-accent-warm-soft: light-dark(
    #faf0dc,
    #3a2d18
  );

  /*
   * Texte affiché sur --color-brand.
   */
  --color-on-brand: light-dark(
    #ffffff,
    #0d1f20
  );

  /*
   * Texte sur fond or (#E9B44C) — foncé pour un contraste lisible.
   */
  --color-on-accent: light-dark(
    #162521,
    #0d1f20
  );

  /* ==========================================================
     Succès
     ========================================================== */

  --color-success-soft: light-dark(
    #eaf3e8,
    #1b3023
  );

  --color-success-border: light-dark(
    #a8c7a8,
    #4f7757
  );

  --color-success-text: light-dark(
    #345d3b,
    #b6d9ba
  );

  /* ==========================================================
     Avertissement
     ========================================================== */

  --color-warning-soft: light-dark(
    #fbf3e3,
    #342b1d
  );

  --color-warning-border: light-dark(
    #dcc496,
    #806b46
  );

  --color-warning-text: light-dark(
    #6a512e,
    #e5cea3
  );

  --color-warning-accent: light-dark(
    #c8a565,
    #d2b46c
  );

  /* ==========================================================
     Erreur
     ========================================================== */

  --color-error-soft: light-dark(
    #f8e9e5,
    #351f21
  );

  --color-error-border: light-dark(
    #d9aaa0,
    #855052
  );

  --color-error-text: light-dark(
    #7a4038,
    #efb7b7
  );

  /* ==========================================================
     Compteurs
     ========================================================== */

  --color-counter-low-text: light-dark(
    #735b31,
    #e4c58f
  );

  --color-counter-low-fill: light-dark(
    #e8d7b5,
    #5f4b28
  );

  --color-counter-high-text: light-dark(
    #7a452a,
    #efb483
  );

  --color-counter-high-fill: light-dark(
    #e7c2a8,
    #6f3f25
  );

  /* ==========================================================
     Ombres
     ========================================================== */

  --shadow-sm:
    0 4px 12px
    light-dark(
      rgba(35, 93, 102, 0.08),
      rgba(0, 0, 0, 0.32)
    );

  --shadow-md:
    0 2px 10px
    light-dark(
      rgba(35, 93, 102, 0.10),
      rgba(0, 0, 0, 0.40)
    );

  --shadow-lg:
    0 4px 24px
    light-dark(
      rgba(35, 93, 102, 0.12),
      rgba(0, 0, 0, 0.48)
    );

  --shadow-toggle:
    0 3px 10px
    light-dark(
      rgba(35, 93, 102, 0.18),
      rgba(0, 0, 0, 0.42)
    );

  /* ==========================================================
     Espacements et rayons
     Indépendants du thème
     ========================================================== */

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  --radius: 0.75rem;
  --radius-lg: 1.25rem;

  --max-width: 1080px;
  --container-padding: 1rem;
}

/* Choix manuel : thème clair */
:root[data-theme="light"] {
  color-scheme: only light;
}

/* Choix manuel : thème sombre */
:root[data-theme="dark"] {
  color-scheme: only dark;
}

/* === Base === */

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

html {
  scroll-behavior: smooth;
  color-scheme: light dark;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-background);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* Skip link pour accessibilité (conforme référentiel Accessibilité) - visible uniquement au focus clavier */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 1000;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--color-brand);
  color: var(--color-on-brand);
  text-decoration: none;
  left: 0;
  top: 0;
}

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

a {
  color: var(--color-brand-dark);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--color-brand);
}

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  color: var(--color-title);
  line-height: 1.25;
  margin: 0 0 var(--space-md) 0;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; margin-top: var(--space-xl); }
h3 { font-size: 1.1rem; }

p {
  margin: 0 0 var(--space-md) 0;
}

ul, ol {
  margin: 0 0 var(--space-md) var(--space-lg);
  padding-left: 1.25rem;
}

/* === Layout === */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.narrow {
  max-width: 720px;
}

/* === Header et navigation === */

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: var(--space-md);
}

.site-logo img {
  width: auto;
  max-width: 200px;
  height: 52px;
  display: block;
}

/* Logo compact : variante dark mode (contraste) — même logique que le theme-toggle */
.site-logo__picture--dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-logo__picture--light {
    display: none;
  }
  :root:not([data-theme="light"]) .site-logo__picture--dark {
    display: block;
  }
}

:root[data-theme="dark"] .site-logo__picture--light {
  display: none;
}

:root[data-theme="dark"] .site-logo__picture--dark {
  display: block;
}

.main-nav {
  display: none; /* caché par défaut sur mobile */
}

.main-nav.is-open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) var(--container-padding);
  box-shadow: var(--shadow-sm);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-list a,
.nav-list .nav-link {
  display: block;
  padding: 0.35rem 0.4rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  border-radius: 4px;
  hyphens: none;
  overflow-wrap: normal;
}

.nav-list a:hover,
.nav-list a:focus-visible,
.nav-list a.active,
.nav-list .nav-link:hover,
.nav-list .nav-link:focus-visible,
.nav-list .nav-link.active {
  color: var(--color-on-accent);
  background: var(--color-accent-soft);
  box-shadow: inset 0 -2px 0 var(--color-accent);
}

.nav-list a:focus-visible,
.nav-list .nav-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Sous-menus (optionnels) — mobile : accordéon */
.nav-item-row {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  width: fit-content;
  max-width: 100%;
}

.nav-item-row .nav-link {
  flex: 0 1 auto;
  min-width: 0;
}

.submenu-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  color: var(--color-title);
}

.submenu-toggle:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.submenu-toggle__icon {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 0.2s ease;
}

.nav-item.is-open > .nav-item-row .submenu-toggle__icon,
.nav-item.has-submenu.is-open .submenu-toggle__icon {
  transform: rotate(225deg) translate(-1px, -1px);
}

.nav-submenu {
  list-style: none;
  margin: 0.15rem 0 0.35rem 0.75rem;
  padding: 0 0 0 0.5rem;
  border-left: 2px solid var(--color-brand-soft);
  display: none;
}

.nav-item.is-open > .nav-submenu {
  display: block;
}

.nav-submenu a {
  font-weight: 400;
  font-size: 0.95rem;
  padding: 0.4rem 0.5rem;
}

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

.btn.header-cta {
  display: inline-flex;
  white-space: nowrap;
}

/* Bascule thème clair / sombre */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.theme-toggle__icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

/* Icône lune (mode clair effectif → inviter au sombre) */
.theme-toggle__icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset -5px -2px 0 0 var(--color-title);
}

/* Icône soleil (mode sombre effectif → inviter au clair) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__icon::before {
    box-shadow: none;
    background: transparent;
    border: 2px solid var(--color-title);
    border-radius: 50%;
  }
  :root:not([data-theme="light"]) .theme-toggle__icon::after {
    content: "";
    position: absolute;
    inset: -4px;
    background:
      linear-gradient(var(--color-title), var(--color-title)) center top / 2px 4px no-repeat,
      linear-gradient(var(--color-title), var(--color-title)) center bottom / 2px 4px no-repeat,
      linear-gradient(var(--color-title), var(--color-title)) left center / 4px 2px no-repeat,
      linear-gradient(var(--color-title), var(--color-title)) right center / 4px 2px no-repeat,
      linear-gradient(var(--color-title), var(--color-title)) 3px 3px / 3px 2px no-repeat,
      linear-gradient(var(--color-title), var(--color-title)) calc(100% - 3px) 3px / 3px 2px no-repeat,
      linear-gradient(var(--color-title), var(--color-title)) 3px calc(100% - 3px) / 3px 2px no-repeat,
      linear-gradient(var(--color-title), var(--color-title)) calc(100% - 3px) calc(100% - 3px) / 3px 2px no-repeat;
  }
}

:root[data-theme="dark"] .theme-toggle__icon::before {
  box-shadow: none;
  background: transparent;
  border: 2px solid var(--color-title);
  border-radius: 50%;
}

:root[data-theme="dark"] .theme-toggle__icon::after {
  content: "";
  position: absolute;
  inset: -4px;
  background:
    linear-gradient(var(--color-title), var(--color-title)) center top / 2px 4px no-repeat,
    linear-gradient(var(--color-title), var(--color-title)) center bottom / 2px 4px no-repeat,
    linear-gradient(var(--color-title), var(--color-title)) left center / 4px 2px no-repeat,
    linear-gradient(var(--color-title), var(--color-title)) right center / 4px 2px no-repeat,
    linear-gradient(var(--color-title), var(--color-title)) 3px 3px / 3px 2px no-repeat,
    linear-gradient(var(--color-title), var(--color-title)) calc(100% - 3px) 3px / 3px 2px no-repeat,
    linear-gradient(var(--color-title), var(--color-title)) 3px calc(100% - 3px) / 3px 2px no-repeat,
    linear-gradient(var(--color-title), var(--color-title)) calc(100% - 3px) calc(100% - 3px) / 3px 2px no-repeat;
}

:root[data-theme="light"] .theme-toggle__icon::after {
  content: none;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 20px;
  background: var(--color-title);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Smartphone : libellé court CTA (un seul texte HTML, pas de doublon si cache périmé) */
@media (max-width: 767.98px) {
  .btn.header-cta {
    font-size: 0;
  }

  .btn.header-cta::after {
    content: "Contact";
    font-size: 0.95rem;
    line-height: 1;
  }
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .main-nav {
    display: block;
    position: static;
    box-shadow: none;
    padding: 0;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    /* Espacement horizontal uniforme entre entrées (rythme type Accueil → Naturopathie) */
    gap: 0.15rem 0.5rem;
  }

  .nav-list > .nav-item {
    flex-shrink: 0; /* ne pas compresser l’entrée (sinon gap « mangé » visuellement) */
  }

  /*
   * Libellés multi-mots plus compacts : max-width force le wrap sur les espaces
   * (Massages / Bien-être, Sauna / Dôme, Qui / suis-je).
   * min-width: min-content empêche les mots d’un seul tenant (Naturopathie)
   * d’être écrasés — sinon le texte déborde dans l’entrée suivante.
   */
  .nav-list > .nav-item > .nav-link,
  .nav-list > .nav-item > .nav-item-row > .nav-link {
    max-width: 5.4rem;
    min-width: min-content;
    text-align: center;
    line-height: 1.2;
    padding: 0.3rem 0.25rem;
  }

  .site-logo img {
    max-width: 240px;
    height: 62px;
  }

  /* Sous-menus desktop : déroulant au survol / focus / ouverture JS */
  .nav-item.has-submenu {
    position: relative;
  }

  .nav-item-row {
    gap: 0.05rem;
  }

  .submenu-toggle {
    width: 1.15rem;
    height: 1.75rem;
    min-width: 0;
    border: none;
    background: transparent;
  }

  .submenu-toggle__icon {
    width: 0.4rem;
    height: 0.4rem;
  }

  .nav-submenu {
    display: none;
    position: absolute;
    /* Légère séparation visuelle ; le ::before comble la zone morte
       pour que le :hover tienne au passage lent de la souris. */
    top: calc(100% + 0.2rem);
    left: 0;
    min-width: 14rem;
    margin: 0;
    padding: 0.4rem 0;
    border: 1px solid var(--color-border);
    border-left: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-background);
    box-shadow: var(--shadow-md);
    z-index: 40;
  }

  /* Pont de survol invisible entre le libellé et le panneau */
  .nav-submenu::before {
    content: "";
    position: absolute;
    top: -0.35rem;
    left: 0;
    right: 0;
    height: 0.35rem;
  }

  .nav-item.has-submenu:hover > .nav-submenu,
  .nav-item.has-submenu:focus-within > .nav-submenu,
  .nav-item.has-submenu.is-open > .nav-submenu {
    display: block;
  }

  .nav-submenu a {
    white-space: nowrap;
    padding: 0.5rem 0.85rem;
  }
}

@media (max-width: 360px) {
  .site-logo img {
    max-width: 160px;
    height: 42px;
  }
}

/* Sticky en fin de section header (spécificité) */
.site-header {
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
}

/* === Composants (boutons, alertes, cartes) === */

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  min-height: 44px; /* tactile friendly */
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-warm);
  border-color: var(--color-accent-warm);
  color: var(--color-on-accent);
}

/* État désactivé du bouton (activé dynamiquement par JS quand le formulaire est prêt) */
.btn:disabled,
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--color-border);
  border-color: var(--color-border);
  color: var(--color-muted);
}

.btn-secondary {
  background: var(--color-background);
  color: var(--color-title);
  border-color: var(--color-accent);
}

.btn-secondary:hover {
  background: var(--color-accent-soft);
  color: var(--color-on-accent);
  border-color: var(--color-accent-warm);
}

.btn-small {
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  min-height: 36px;
}

.btn-block {
  width: 100%;
}

@media (max-width: 360px) {
  .btn {
    font-size: 0.9rem;
    padding: 0.6rem 0.95rem;
  }

  .btn.header-cta::after {
    font-size: 0.9rem;
  }
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.alert-success {
  background: var(--color-success-soft);
  border: 1px solid var(--color-success-border);
  color: var(--color-success-text);
}
.alert-error {
  background: var(--color-warning-soft);
  border: 1px solid var(--color-warning-border);
  color: var(--color-warning-text);
}
.alert-error ul {
  margin: 0;
  padding-left: 1.1rem;
}

/* === Hero et illustrations === */

/* Sections & hero */
.hero {
  padding: var(--space-xl) 0;
  background: var(--color-background-soft);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.hero-text h1 {
  font-size: 1.65rem;
  margin-bottom: var(--space-sm);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

@media (min-width: 768px) {
  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2xl);
  }

  .hero-text {
    flex: 1 1 52%;
  }

  .hero-illustration {
    flex: 1 1 42%;
    max-width: 520px;
  }
}

/* Illustrations éditoriales (accueil, pages, couvertures blog) */
.hero-illustration picture,
.hero-illustration img,
.illustration-container picture,
.illustration-container img,
.illustration img {
  border-radius: var(--radius-lg);
}

.hero-illustration picture,
.illustration-container picture,
.illustration {
  overflow: hidden;
}

.hero-illustration picture,
.hero-illustration img,
.illustration-container picture,
.illustration-container img {
  box-shadow: var(--shadow-sm);
  outline: 1px solid var(--color-border);
}

/* Hero illustration */
.hero-illustration {
  margin-top: var(--space-lg);
}

.hero-illustration picture,
.hero-illustration img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
}

@media (min-width: 768px) {
  .hero-illustration {
    margin-top: 0;
  }
}

.illustration {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.illustration img {
  display: block;
  width: 100%;
  height: auto;
}

.illustration--hero {
  width: 100%;
}

.illustration--page {
  width: min(100%, 620px);
  margin: 0 auto var(--space-xl);
}

.illustration-container {
  padding: 0 var(--container-padding) var(--space-lg);
}

.illustration-container picture {
  display: block;
}

.illustration-container img {
  display: block;
  width: 100%;
  height: auto;
}

/*
 * Surfaces de section : fond + surface complémentaire pour cartes / blocs flottants.
 * L’alternance est automatique via :nth-of-type (indépendante du nombre de sections).
 * --surface-on-section = inverse du fond pour garantir le contraste des .card.
 * Hero (div) et page-header ne comptent pas dans l’alternance.
 * .section--alt reste disponible pour forcer manuellement un fond soft.
 */
.section {
  --section-bg: var(--color-background);
  --surface-on-section: var(--color-background-soft);
  background: var(--section-bg);
}

.section:nth-of-type(even),
.section--alt {
  --section-bg: var(--color-background-soft);
  --surface-on-section: var(--color-background);
}

.section--center {
  text-align: center;
}

.section-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-lg);
}

.lead {
  font-size: 1.05rem;
  color: var(--color-text);
}

@media (min-width: 1024px) {
  h1 { font-size: 2rem; }
  .hero-text h1 { font-size: 2.1rem; }

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

  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Cards — fond complémentaire à la section parente (auto via --surface-on-section) */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

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

.cards-grid > .card {
  height: 100%;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface-on-section, var(--color-background));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }

  .card:hover {
    transform: none;
  }
}

.card h3 {
  margin-top: 0;
  margin-bottom: var(--space-sm);
}

/* Carte entièrement cliquable (accueil Facebook, partenaires, etc.) */
.card--link,
.partner-card:has(.partner-card__link),
.card:has(> .card__link) {
  padding: 0;
}

.card__link,
.partner-card__link {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  padding: var(--space-lg);
  text-decoration: none;
  color: inherit;
  border-radius: inherit;
}

.card__link:focus-visible,
.partner-card__link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.card__link h3,
.partner-card__link .partner-card__title {
  transition: color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .card:has(.card__link):hover .card__link h3,
  .partner-card:hover .partner-card__title {
    color: var(--color-accent-warm);
  }
}

.card-link {
  display: inline-block;
  margin-top: auto;
  padding-top: var(--space-sm);
  font-weight: 500;
  text-decoration: none;
}

.tarifs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* 
  On laisse auto-fit pour que le nombre de colonnes s'adapte automatiquement 
  au nombre de cartes visibles (ex: quand la 4ème est masquée).
  Si on veut absolument 4 colonnes égales quand les 4 sont présentes, 
  on peut remettre un media query plus tard.
*/

.card .price {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-brand);
  margin: 0.25rem 0 0.5rem 0;
}

/* Grille tarifs : couverture carrée + corps de carte homogène */
.tarifs-grid .card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.tarif-card__cover img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.tarif-card__body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tarif-card__body ul {
  flex: 1;
  margin-bottom: var(--space-sm);
}

/* Tarifs */
.tarif-highlight {
  background: var(--color-brand-pale);
  border: 1px solid var(--color-brand-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin: var(--space-md) 0;
}

.tarif-price {
  font-size: 1.5rem;
  margin: 0 0 var(--space-sm) 0;
}

.page-next {
  background: var(--color-brand-pale);
  border: 1px solid var(--color-brand-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin: 0 auto;
  max-width: 720px;
}

.page-next h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.page-next p:last-of-type {
  margin-bottom: var(--space-md);
}

/* === Pages éditoriales === */

.page-header {
  padding: var(--space-lg) 0 var(--space-md);
  background: var(--color-background-soft);
}

.page-header h1 {
  margin-bottom: var(--space-sm);
}

/* Portrait personnel (page À propos)
   Flotté dans la 1re section : retour à la ligne naturel (shape-outside)
   uniquement à hauteur de l'image ; pleine largeur ensuite.
   margin-top négatif : effet visuel à cheval sur le header (sans absolute).
   H1 protégé via padding-right ciblé sur .title-edit-wrapper.
*/
.page-header--with-portrait,
.page-header--with-portrait + .section {
  --portrait-size: 150px;
  --portrait-pull-up: -8rem;
  --portrait-gap-inline: 0.75rem;
  --portrait-gap-bottom: 1rem;
}

.page-header--with-portrait .title-edit-wrapper {
  padding-right: calc(var(--portrait-size) + var(--portrait-gap-inline));
}

.page-portrait {
  float: right;
  width: var(--portrait-size);
  height: var(--portrait-size);
  margin: var(--portrait-pull-up) 0 var(--portrait-gap-bottom) var(--portrait-gap-inline);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 3px solid var(--color-background);
}

@media (max-width: 479px) {
  .page-header--with-portrait .title-edit-wrapper {
    padding-right: 0;
  }

  .page-portrait {
    float: none;
    display: block;
    margin: 0 auto var(--portrait-gap-bottom);
  }
}

@supports (shape-outside: circle()) {
  .page-portrait {
    shape-outside: circle(50%);
    shape-margin: 0.75rem;
  }
}

.page-portrait picture,
.page-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.page-header--with-portrait {
  padding-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .page-header--with-portrait,
  .page-header--with-portrait + .section {
    --portrait-size: 168px;
    --portrait-pull-up: -6.5rem;
    --portrait-gap-inline: 1rem;
    --portrait-gap-bottom: 1.25rem;
  }

  .page-header--with-portrait {
    padding-bottom: 3.75rem;
  }

  .page-portrait {
    border-width: 4px;
    box-shadow: var(--shadow-md);
  }
}

@media (min-width: 1024px) {
  .page-header--with-portrait,
  .page-header--with-portrait + .section {
    --portrait-size: 200px;
    --portrait-pull-up: -8rem;
    --portrait-gap-inline: 1.25rem;
  }

  .page-header--with-portrait {
    padding-bottom: 5rem;
  }
}

.page-header--with-portrait + .section {
  padding-top: 1.25rem;
}

.page-header--with-portrait + .section .container {
  display: flow-root;
}

@media (min-width: 768px) {
  .page-header--with-portrait + .section {
    padding-top: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .page-header--with-portrait + .section {
    padding-top: 0.5rem;
  }
}

.legal h2 {
  font-size: 1.1rem;
  margin-top: var(--space-xl);
}

.legal p {
  margin-bottom: var(--space-md);
}

.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.25rem;
  margin-bottom: var(--space-md);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--color-brand-pale);
  color: var(--color-brand-dark);
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.muted, .note {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.required {
  color: var(--color-accent-warm);
}

/* === Formulaire contact === */

/* Formulaire contact (mobile comfortable) */
.contact-form {
  margin: var(--space-xl) 0;
}

.form-row {
  margin-bottom: var(--space-md);
}

.form-row label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

/* Case à cocher / radio : case à côté du texte (pas pleine largeur) */
.form-row label.checkbox-label,
.form-row label.admin-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0;
  cursor: pointer;
  width: fit-content;
  max-width: 100%;
}

.form-row input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]),
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-background-soft);
  color: var(--color-text);
}

.form-row input[type="checkbox"],
.form-row input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  margin: 0.15rem 0 0;
  padding: 0;
  flex-shrink: 0;
  border: none;
  background: transparent;
  accent-color: var(--color-brand);
}

.form-row input:not([type="checkbox"]):not([type="radio"]):focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--color-brand);
  outline: none;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.checkbox-label {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  cursor: pointer;
  width: fit-content;
  max-width: 100%;
}

.checkbox-label input[type="checkbox"],
.checkbox-label input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  margin: 0.15rem 0 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--color-brand);
}

.form-hint {
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* Compteur esthétique de caractères pour le message du formulaire de contact */
.char-counter {
  margin-top: 0.25rem;
}
.char-counter .counter-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-bottom: 0.15rem;
}
.char-counter .counter-count {
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}
.char-counter .counter-min {
  font-size: 0.72rem;
  color: var(--color-muted);
}
.char-counter .counter-bar {
  height: 3px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
}
.char-counter .counter-fill {
  height: 100%;
  background: var(--color-brand);
  transition: width 120ms ease;
  width: 0;
}
.char-counter .counter-fill.counter-fill-p0 { width: 0%; }
.char-counter .counter-fill.counter-fill-p5 { width: 5%; }
.char-counter .counter-fill.counter-fill-p10 { width: 10%; }
.char-counter .counter-fill.counter-fill-p15 { width: 15%; }
.char-counter .counter-fill.counter-fill-p20 { width: 20%; }
.char-counter .counter-fill.counter-fill-p25 { width: 25%; }
.char-counter .counter-fill.counter-fill-p30 { width: 30%; }
.char-counter .counter-fill.counter-fill-p35 { width: 35%; }
.char-counter .counter-fill.counter-fill-p40 { width: 40%; }
.char-counter .counter-fill.counter-fill-p45 { width: 45%; }
.char-counter .counter-fill.counter-fill-p50 { width: 50%; }
.char-counter .counter-fill.counter-fill-p55 { width: 55%; }
.char-counter .counter-fill.counter-fill-p60 { width: 60%; }
.char-counter .counter-fill.counter-fill-p65 { width: 65%; }
.char-counter .counter-fill.counter-fill-p70 { width: 70%; }
.char-counter .counter-fill.counter-fill-p75 { width: 75%; }
.char-counter .counter-fill.counter-fill-p80 { width: 80%; }
.char-counter .counter-fill.counter-fill-p85 { width: 85%; }
.char-counter .counter-fill.counter-fill-p90 { width: 90%; }
.char-counter .counter-fill.counter-fill-p95 { width: 95%; }
.char-counter .counter-fill.counter-fill-p100 { width: 100%; }

/* États visuels */
.char-counter.is-below-min .counter-count {
  color: var(--color-counter-low-text);
}
.char-counter.is-below-min .counter-fill {
  background: var(--color-counter-low-fill);
}
.char-counter.is-near-max .counter-count {
  color: var(--color-counter-high-text);
}
.char-counter.is-near-max .counter-fill {
  background: var(--color-counter-high-fill);
}

@media (prefers-reduced-motion: reduce) {
  .char-counter .counter-fill {
    transition: none;
  }
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: var(--space-md);
}

.contact-direct {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.contact-direct h2 {
  font-size: 1.1rem;
}

/* === Pied de page ===
 * Fond soft par défaut (après une dernière section blanche).
 * Si la dernière section de main est soft (pair ou .section--alt), bascule en blanc
 * pour éviter le fondu section / footer — indépendant du nombre de sections.
 */
.site-footer {
  background: var(--color-background-soft);
  border-top: 1px solid var(--color-border);
  padding: var(--space-xl) 0 var(--space-lg);
  font-size: 0.9rem;
}

.swipe-page:has(#main-content > .section:last-of-type:nth-of-type(even)) .site-footer,
.swipe-page:has(#main-content > .section.section--alt:last-of-type) .site-footer {
  background: var(--color-background);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.footer-tagline {
  color: var(--color-muted);
  margin: 0;
}

.footer-nav ul {
  list-style: none;
  margin: 0 0 var(--space-md) 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-nav a {
  text-decoration: none;
  color: var(--color-text);
}

.footer-nav a:hover {
  color: var(--color-accent-warm);
}

.footer-legal {
  margin-top: var(--space-sm);
  opacity: 0.85;
}

.footer-contact p {
  margin: 0.35rem 0;
}

.footer-zone {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.footer-bottom {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-muted);
}

.footer-small {
  margin-top: 0.25rem;
}

/* === Blog === */

/* Blog filters */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.blog-filters-label {
    font-size: 0.82rem;
    color: var(--color-muted);
    margin-right: 0.35rem;
    white-space: nowrap;
    font-weight: 500;
}

.blog-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1rem;
    min-height: 32px; /* taille tactile correcte */
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    color: var(--color-text);
    background: var(--color-background);
    transition: background-color 0.1s ease, border-color 0.1s ease, color 0.1s ease;
    white-space: nowrap;
}

.blog-filter:hover {
    border-color: var(--color-brand);
    color: var(--color-title);
    background: var(--color-brand-pale);
}

.blog-filter.is-active {
    background: var(--color-brand);
    border-color: var(--color-brand);
    color: var(--color-on-brand);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.blog-filter-note {
    font-size: 0.88rem;
    color: var(--color-muted);
    margin: 0.3rem 0 0;
}

/* Cartes d’articles, page article, sources (CSP : pas de style inline) */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

.blog-card {
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--color-background);
}
.blog-card__cover img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.blog-card__body { padding: 1rem 1.25rem 1.5rem; }
.blog-card__meta {
  font-size: 0.8rem;
  color: var(--color-muted);
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.blog-card h2 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}
.blog-card h2 a {
  text-decoration: none;
  color: var(--color-title);
}
.blog-excerpt { font-size: 0.9rem; margin-bottom: 0.75rem; }

.blog-sentinel { height: 1px; margin: 1rem 0; }

.noscript-fallback {
  text-align: center;
  margin-top: 1rem;
}

/* === Portfolio (page Exemples) === */
.portfolio-intro {
  color: var(--color-muted);
  margin-bottom: var(--space-md);
  max-width: 52rem;
}

.media-showcase {
  margin-top: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-background);
}

.media-showcase__cover {
  display: block;
  position: relative;
  width: 50%;
  max-width: 640px;
  margin: 0 auto;
  text-decoration: none;
}

.media-showcase__cover:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.media-showcase__cover img {
  margin-top: 1.5rem;
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.media-showcase__play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.media-showcase__play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-brand);
  color: var(--color-on-brand);
  font-size: 0.9rem;
  line-height: 1;
  box-shadow: var(--shadow-lg);
}

.media-showcase__body {
  padding: 1rem 1.25rem 1.5rem;
}

.media-showcase__header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.media-showcase h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--color-title);
}

.media-showcase__role {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.media-showcase__desc {
  margin: 0 0 0.75rem;
  line-height: 1.55;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.portfolio-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-background);
}

.portfolio-card__cover {
  display: block;
  text-decoration: none;
  overflow: hidden;
  background: var(--color-background-soft);
}

.portfolio-card__cover:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.portfolio-card__cover img {
  width: 100%;
  height: auto;
  display: block;
}

.portfolio-card__body {
  padding: 1rem 1.25rem 1.5rem;
}

.portfolio-card__badge {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  color: var(--color-muted);
  background: var(--color-background-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.portfolio-card h3 {
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
  line-height: 1.3;
  color: var(--color-title);
}

.portfolio-card__meta {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 0 0 0.75rem;
}

@media (max-width: 767.98px) {
  .portfolio-card__cover {
    max-height: calc(100dvh - 5.5rem);
  }

  .media-showcase__cover {
    width: 100%;
    max-width: none;
  }
}

@media (min-width: 768px) {
  .portfolio-card__cover {
    max-height: 32rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Article de blog */
.breadcrumb {
  font-size: 0.85rem;
  padding: 0.5rem 0;
  color: var(--color-muted);
}
.breadcrumb a {
  color: var(--color-muted);
  text-decoration: none;
}
.blog-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.75rem;
}
.blog-article .narrow { max-width: 720px; }

.blog-cta {
  margin-top: 2rem;
  padding: 1.25rem;
  background: var(--color-brand-pale);
  border-radius: 0.75rem;
  text-align: center;
}

/* Sources et notes éditoriales en fin d’article */
.sources-list {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 1.25rem 0 1.5rem;
  padding-left: 1.25rem;
  line-height: 1.4;
}
.sources-list li { margin-bottom: 0.3rem; }
.sources-list a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sources-list a:hover { color: var(--color-brand); }

.editorial-note {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-top: 1rem;
  font-style: italic;
  line-height: 1.35;
}

/* === Branding typographique === */

/* Police Indie Flower (local) */
@font-face {
  font-family: 'IndieFlower';
  src: url('/assets/fonts/IndieFlower-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.ecauxlogique {
  font-family: 'IndieFlower', cursive;   /* fallback cursive si la police ne charge pas */
  color: var(--color-brand-typo);
  font-size: 1.15em;
  font-weight: bold;
  line-height: 1.4;
  white-space: nowrap;
}

/* Héritage pour toutes les parties internes (sup, sub, span) */
.eca-first,
.eca-mid,
.eca-end {
  font-family: inherit;
  color: inherit;
}

.eca-first {
  position: relative;
  top: -0.15em;
}

.eca-mid {
  position: relative;
  bottom: -0.15em;
}

/* === Utilitaires === */

/*
  On évite le overflow-x global car cela peut casser position: sticky sur certains navigateurs.
  Si un débordement horizontal apparaît, on le corrigera sur l'élément fautif (ex: menu mobile).
*/

body.nav-open {
  overflow: hidden;
}

/* Navigation par balayage (mobile) */
@media (max-width: 767.98px) {
  :root {
    --swipe-offset: 0px;
    --swipe-edge-prev-opacity: 0;
    --swipe-edge-next-opacity: 0;
  }

  .swipe-page {
    transform: translateX(var(--swipe-offset));
    transition: transform 0.2s ease;
  }

  .swipe-page.is-swiping {
    transition: none;
  }

  .swipe-page.swipe-exit-left {
    transition: transform 0.18s ease-in;
    transform: translateX(-100%);
  }

  .swipe-page.swipe-exit-right {
    transition: transform 0.18s ease-in;
    transform: translateX(100%);
  }

  .swipe-edge {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 2.5rem;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-brand-soft);
    color: var(--color-brand-dark);
    pointer-events: none;
    transition: opacity 0.12s ease;
  }

  .swipe-edge--prev {
    left: 0;
    opacity: var(--swipe-edge-prev-opacity);
  }

  .swipe-edge--next {
    right: 0;
    opacity: var(--swipe-edge-next-opacity);
  }

  .swipe-edge__icon {
    font-size: 1.75rem;
    line-height: 1;
    font-weight: 700;
  }
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  .swipe-page {
    transform: none;
    transition: none;
  }

  .swipe-edge {
    display: none;
  }
}

/* Indication de scroll (mobile) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.scroll-hint {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  z-index: 150;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-brand);
  color: var(--color-on-brand);
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-toggle);
  pointer-events: none;
}

.scroll-hint.is-visible {
  display: flex;
}

.scroll-hint__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  font-size: 1.35rem;
  line-height: 1;
  animation: scroll-hint-bounce 1.6s ease-in-out infinite;
}

@keyframes scroll-hint-bounce {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(2px); }
}

@media (min-width: 768px) {
  .scroll-hint {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint__icon {
    animation: none;
  }
}

.back-to-top {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--color-brand);
  color: var(--color-on-brand);
  font-size: 1.35rem;
  line-height: 1;
  display: none; /* hidden by default */
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-toggle);
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  padding: 0;
}

.back-to-top.visible {
  display: flex;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  transform: translateY(-2px);
  background: var(--color-brand-dark);
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}

.http-blocked {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-background-soft);
  color: var(--color-text);
}

.http-blocked__main {
  max-width: 28rem;
  padding: 2rem 1.25rem;
  text-align: center;
}

.http-blocked__main h1 {
  color: var(--color-title);
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}

.http-blocked__main p {
  margin: 0;
  line-height: 1.5;
}

/* === Impression === */

@media print {
  .site-header, .site-footer, .btn, .nav-toggle, .theme-toggle, .hero-illustration {
    display: none !important;
  }
  body {
    font-size: 11pt;
    color: #000;
  }
}


/* === Emmanuelle Merette — extensions site === */

/* Logo manuscrite : même famille que .ecauxlogique (IndieFlower, fichier local) */
.site-logo-text,
.brand-hand {
  font-family: 'IndieFlower', cursive;
}

/* Logo complet (pas de crop circulaire) — comme éCauxLogique :
   dimensions gérées par .site-logo img plus haut. */

.site-brand-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.site-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.site-brand-text .site-name {
  font-family: 'IndieFlower', cursive;
  font-size: 1.25rem;
  color: var(--color-brand);
  font-weight: normal;
}

.site-brand-text .site-tagline {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.tarif-intro {
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-background);
}

.tarifs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 280px;
  font-size: 0.95rem;
}

.tarifs-table th,
.tarifs-table td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.tarifs-table th {
  background: var(--color-brand-soft);
  color: var(--color-title);
  font-weight: 600;
}

.tarifs-table tr:last-child td {
  border-bottom: none;
}

/* Liens de libellé uniquement — pas les boutons .btn (Réserver) */
.tarifs-table a:not(.btn) {
  color: var(--color-brand-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tarifs-table th.tarifs-table__price,
.tarifs-table td.tarifs-table__price {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tarifs-table th.tarifs-table__action,
.tarifs-table td.tarifs-table__action {
  text-align: center;
  white-space: nowrap;
  width: 1%;
}

.tarifs-book-btn {
  text-decoration: none;
  min-height: 2.25rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  /* S’assurer que la couleur on-brand n’est pas écrasée par les styles de tableau */
  color: var(--color-on-brand);
}

.tarifs-book-btn:hover,
.tarifs-book-btn:focus {
  text-decoration: none;
  color: var(--color-on-brand);
}

@media (max-width: 480px) {
  .tarifs-table {
    font-size: 0.88rem;
  }

  .tarifs-table th,
  .tarifs-table td {
    padding: 0.55rem 0.5rem;
  }

  .tarifs-book-btn {
    padding: 0.28rem 0.55rem;
    font-size: 0.8rem;
  }
}

.cta-row {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-list {
  margin: 1rem 0;
  padding-left: 1.25rem;
}

.prose h2 {
  margin-top: 1.75rem;
}

.footer-credit {
  font-size: 0.9rem;
}

/* Lien production : le mot « éCauxLogique » est stylé par .ecauxlogique (JS + CSS eCaux) */
.footer-credit a {
  text-decoration: none;
  color: inherit;
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.footer-credit a .ecauxlogique {
  /* conserve IndieFlower + --color-brand-typo (#2D939F) du site eCauxLogique */
  text-decoration: none;
}

.hero-illustration img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.btn-booking {
  background: var(--color-brand);
  color: #fff;
  border-color: var(--color-brand);
}

.btn-booking:hover,
.btn-booking:focus {
  background: var(--color-brand-dark);
  border-color: var(--color-brand-dark);
  color: var(--color-on-brand);
}

.massages-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.massages-subnav a {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--color-brand-soft);
  color: var(--color-brand-dark);
  text-decoration: none;
  font-size: 0.9rem;
}

.massages-subnav a:hover,
.massages-subnav a:focus {
  background: var(--color-brand);
  color: #fff;
}

/* Illustrations dans le contenu éditorial */
.content-illustration {
  margin: 1.25rem 0 1.5rem;
  max-width: 100%;
}

.content-illustration picture,
.content-illustration img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-inline: auto;
}

@media (min-width: 768px) {
  .content-illustration picture,
  .content-illustration img {
    max-width: 80%;
  }
}

.content-illustration img {
  box-shadow: var(--shadow-sm);
}

/* Images dans titres (héritage migration) : les figures restent hors flux de titre */
h1 .content-illustration,
h2 .content-illustration,
h3 .content-illustration {
  display: block;
  margin: 0.75rem 0 1rem;
}

/* Variante compacte si image flottante / petite */
.content-illustration--compact img {
  max-width: min(100%, 280px);
}


/* ==========================================================
   Carrousel accueil Esta’frites
   ========================================================== */

.carousel-section {
  margin: 0;
  padding: 0;
  background: var(--color-background-soft);
}

.carousel {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  overflow: hidden;
}

.carousel__viewport {
  position: relative;
  width: 100%;
  background: var(--color-title);
}

.carousel__track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
}

.carousel__slide {
  margin: 0;
  padding: 0;
  line-height: 0;
}

.carousel__slide[hidden] {
  display: none;
}

.carousel__slide img {
  width: 100%;
  height: auto;
  max-height: min(70vh, 36rem);
  object-fit: cover;
  object-position: center center;
  display: block;
  aspect-ratio: 16 / 9;
}

/* Recadrage ciblé (ex. slide-01 : camion en bas de l’image carrée) */
.carousel__slide--focus-bottom img {
  object-position: center bottom;
}

.carousel__slide--focus-top img {
  object-position: center top;
}

.carousel__slide--focus-left img {
  object-position: left center;
}

.carousel__slide--focus-right img {
  object-position: right center;
}

.carousel__controls {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  padding: 0 0.5rem;
}

.carousel__btn {
  pointer-events: auto;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-background) 88%, transparent);
  color: var(--color-title);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  display: grid;
  place-items: center;
}

.carousel__btn:hover,
.carousel__btn:focus-visible {
  background: var(--color-accent);
  color: var(--color-on-accent);
  outline: 2px solid var(--color-accent-warm);
  outline-offset: 2px;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  background: var(--color-background-soft);
}

.carousel__dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  border: 2px solid var(--color-accent);
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.carousel__dot.is-active,
.carousel__dot[aria-current="true"] {
  background: var(--color-accent);
}

.carousel__dot:focus-visible {
  outline: 2px solid var(--color-accent-warm);
  outline-offset: 2px;
}

.hero--home {
  padding-top: 1.5rem;
}

.hero--home .hero-inner {
  display: block;
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
}

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

/* Logo circulaire + libellé */
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.site-logo__text {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-title);
  letter-spacing: 0.01em;
}

/* Surlignage or du mot « frites » (équivalent #site-text / #site-title WP) */
.word-frites {
  background-color: var(--color-accent);
  color: var(--color-on-accent);
  padding: 0 0.12em;
  border-radius: 0.15em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.site-logo img {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--color-accent);
}

@media (min-width: 768px) {
  .site-logo img {
    width: 3.5rem;
    height: 3.5rem;
  }
  .site-logo__text {
    font-size: 1.35rem;
  }
  .carousel__slide img {
    max-height: min(72vh, 40rem);
  }
}

/* Partenaires */
.partners-grid .partner-card {
  text-align: center;
}

.partner-card__title {
  font-size: 1.15rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

.partner-card__logo {
  margin: 0 auto 1rem;
  max-width: 16rem;
}

.partner-card__logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.partner-card__name {
  margin: 0;
}

.cards-grid--two {
  grid-template-columns: 1fr;
}

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

/* === Titres h1 animés (esprit Bravada animated-title) === */

.animated-title .caption-title-word {
  display: inline-block;
  font-style: normal;
}

.animated-title .caption-title-space {
  display: inline-block;
}

.animated-title .caption-title-word > span {
  position: relative;
  display: inline-block;
  line-height: 1.2;
  opacity: 0;
  animation: title-showwords 2.5s ease forwards;
}

.animated-title .caption-title-word > span:nth-child(n) {
  animation-duration: 1.2s;
}

.animated-title .caption-title-word > span:nth-child(2n) {
  animation-duration: 0.4s;
}

.animated-title .caption-title-word > span:nth-child(3n) {
  animation-duration: 2.8s;
}

.animated-title .caption-title-word > span:nth-child(4n) {
  animation-duration: 0.8s;
}

.animated-title .caption-title-word > span:nth-child(5n) {
  animation-duration: 3.6s;
}

.animated-title .caption-title-word > span:nth-child(6n) {
  animation-duration: 1.6s;
}

.animated-title .caption-title-word > span:nth-child(7n) {
  animation-duration: 3.2s;
}

.animated-title .caption-title-word > span:nth-child(8n) {
  animation-duration: 2s;
}

.animated-title .caption-title-word > span:nth-child(9n) {
  animation-duration: 2.8s;
}

@keyframes title-showwords {
  to {
    opacity: 1;
  }
}

.animated-title .title-letter {
  position: relative;
  display: inline-block;
  transition: color 0.5s ease-out;
}

.animated-title .title-letter-alt {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  display: inline-block;
  transition: color 0.5s ease-out;
}

.animated-title .title-letter.animated-letter,
.animated-title .title-letter-alt.animated-letter {
  color: var(--color-accent);
}

.animated-title .caption-title-word > span:nth-child(n) .title-letter.animated-letter {
  animation: title-slide-left-hide 1.5s 0.25s ease-in-out forwards;
}

.animated-title .caption-title-word > span:nth-child(2n) .title-letter.animated-letter {
  animation: title-slide-right-hide 1.5s 0.25s ease-in-out forwards;
}

.animated-title .caption-title-word > span:nth-child(n) .title-letter-alt.animated-letter {
  animation: title-slide-right-show 1s ease-in-out forwards;
}

.animated-title .caption-title-word > span:nth-child(2n) .title-letter-alt.animated-letter {
  animation: title-slide-left-show 1s ease-in-out forwards;
}

@keyframes title-slide-right-hide {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(150%);
  }
}

@keyframes title-slide-left-hide {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-150%);
  }
}

@keyframes title-slide-right-show {
  from {
    opacity: 0;
    transform: translateX(-150%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes title-slide-left-show {
  from {
    opacity: 0;
    transform: translateX(150%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel__btn,
  .carousel__dot {
    transition: none;
  }

  .animated-title .caption-title-word > span {
    opacity: 1;
    animation: none;
  }

  .animated-title .title-letter.animated-letter,
  .animated-title .title-letter-alt.animated-letter {
    animation: none;
    color: inherit;
  }

  .animated-title .title-letter-alt {
    display: none;
  }
}

/* Branding canonique — logo.svg / dark / footer tagline
   Spécificité > .site-logo img { display:block } pour masquer le dark en mode jour. */
.site-logo img.site-logo__img--dark { display: none; }
html[data-theme="dark"] .site-logo--has-dark img.site-logo__img--light { display: none; }
html[data-theme="dark"] .site-logo--has-dark img.site-logo__img--dark { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .site-logo--has-dark img.site-logo__img--light { display: none; }
  html:not([data-theme="light"]) .site-logo--has-dark img.site-logo__img--dark { display: block; }
}
.site-brand__product { font-weight: 700; color: var(--color-brand-typo, var(--color-brand)); }
.site-brand__tagline { font-weight: 400; color: inherit; }
.site-logo--footer {
  display: inline;
  max-width: none;
  text-decoration: none;
  color: inherit;
  line-height: 1.45;
}
.site-logo--footer .site-brand--text,
.site-logo--footer .site-brand__product,
.site-logo--footer .site-brand__tagline {
  display: inline;
  font-size: inherit;
}
body.maintenance { background: var(--color-background-soft); }
.maintenance__main {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--container-padding);
  box-sizing: border-box;
}
.maintenance__card {
  max-width: 28rem;
  width: 100%;
  padding: var(--space-xl);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.maintenance__card--bootstrap,
.bootstrap-card { text-align: left; }
.maintenance__brand {
  margin: 0 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.maintenance__brand .site-logo,
.maintenance__brand .site-logo--static {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  max-width: 100%;
}
.maintenance__brand .site-logo img {
  width: min(100%, 16rem);
  height: auto;
  max-height: 5.5rem;
  object-fit: contain;
}
.maintenance__brand-text {
  margin: 0 0 var(--space-lg);
  font-size: 1.35rem;
  font-weight: 650;
  color: var(--color-brand-typo, var(--color-brand-dark));
}
.maintenance__title {
  margin: 0 0 var(--space-md);
  font-size: 1.25rem;
}
.maintenance__message {
  margin: 0;
  color: var(--color-muted);
  white-space: pre-line;
}
.maintenance__credit {
  margin: var(--space-lg) 0 0;
  font-size: 0.875rem;
  color: var(--color-muted);
}


