/**
 * main.css — Regnard Deschamps Psychologue
 * Mobile-first, sobre, autonome, premium.
 * Charte d’origine : header vert #eaf9bd, jaunes doux, footer orange #dd9933,
 * liens violet #7f54b3, titre orange #ff7700 + lettrines #ba26eb.
 * Pas de framework externe.
 */

/* === Variables === */

:root {
  /*
   * Palette d’origine regnard-psy.fr (légèrement adoucie pour le premium) :
   * - header vert #eaf9bd
   * - jaunes de fond #fbf6e3 / #f8e9ae
   * - footer orange #dd9933
   * - liens / H2 violet #7f54b3
   * - titre site orange #ff7700 + lettrines #ba26eb
   */
  --color-brand: #7f54b3;
  --color-brand-dark: #6a4499;
  --color-brand-soft: #efe6f8;
  --color-brand-pale: #f7f1fb;
  --color-text: #333333;
  --color-title: #222222;
  --color-muted: #5c5c5c;
  --color-border: #e6d48a;
  --color-background: #fff0b5;
  --color-background-soft: #fff8d6;
  --color-warning-soft: #fff7e8;
  --color-success-soft: #edf7ee;
  --color-header-soft: #eaf9bd;
  --color-footer: #dd9933;
  --color-footer-text: #333333;
  --color-tarif: #b03f07;
  --color-accent: #ff7700;
  --color-accent-soft: #fff1e0;
  --color-title-glow: #170e05;
  --color-first-letter: #8121a1;
  --color-yellow-soft: #ffe9a0;

  /* Tokens sémantiques (alertes, états, typo marque) */
  --color-on-brand: #ffffff;
  --color-success-border: #a3d9a8;
  --color-success-text: #2f5c32;
  --color-warning-border: #e8c89a;
  --color-warning-text: #5c3f1f;
  --color-warning-accent: #f0c36b;
  --color-error-soft: #f5d0d0;
  --color-error-border: #e8a0a0;
  --color-error-text: #7a3a3a;
  --color-accent-warm: #ff7700;
  --color-brand-typo: #6a4a8a;
  --color-counter-low-text: #8c6f3a;
  --color-counter-low-fill: #c9a46a;
  --color-counter-high-text: #b36b2e;
  --color-counter-high-fill: #c17a3f;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.07);
  --shadow-toggle: 0 3px 10px rgba(0, 0, 0, 0.18);

  /* Espacements et rayons (sobre) */
  --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: 1140px;
  --container-padding: 1rem;
}

/* Mode sombre « Nuit sage » — préférence système (sauf forçage clair) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-brand: #b48ad9;
    --color-brand-dark: #c9a6e8;
    --color-brand-soft: #2f2438;
    --color-brand-pale: #241c2c;
    --color-text: #ece6f0;
    --color-title: #f7f2fa;
    --color-muted: #b0a5b8;
    --color-border: #3a4230;
    --color-background: #151812;
    --color-background-soft: #1c2118;
    --color-warning-soft: #2e2618;
    --color-success-soft: #1e2e22;
    --color-header-soft: #2a3320;
    --color-footer: #b87a28;
    --color-footer-text: #1f180c;
    --color-tarif: #e07a4a;
    --color-accent: #ff9933;
    --color-accent-soft: #3a2818;
    --color-title-glow: #170e05;
    --color-first-letter: #d4a0e8;
    --color-yellow-soft: #3a3420;
    --color-on-brand: #1a1220;
    --color-success-border: #4a7a52;
    --color-success-text: #a8d4ac;
    --color-warning-border: #7a6040;
    --color-warning-text: #e8c89a;
    --color-warning-accent: #9a7848;
    --color-error-soft: #3a2222;
    --color-error-border: #8a5050;
    --color-error-text: #e8b0b0;
    --color-accent-warm: #ff9933;
    --color-brand-typo: #c9a6e8;
    --color-counter-low-text: #c9a46a;
    --color-counter-low-fill: #8c6f3a;
    --color-counter-high-text: #d4845c;
    --color-counter-high-fill: #b36b2e;
  
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-toggle: 0 3px 10px rgba(0, 0, 0, 0.45);
  }
}

/* Mode sombre — choix manuel */
:root[data-theme="dark"] {
  --color-brand: #b48ad9;
  --color-brand-dark: #c9a6e8;
  --color-brand-soft: #2f2438;
  --color-brand-pale: #241c2c;
  --color-text: #ece6f0;
  --color-title: #f7f2fa;
  --color-muted: #b0a5b8;
  --color-border: #3a4230;
  --color-background: #151812;
  --color-background-soft: #1c2118;
  --color-warning-soft: #2e2618;
  --color-success-soft: #1e2e22;
  --color-header-soft: #2a3320;
  --color-footer: #b87a28;
  --color-footer-text: #1f180c;
  --color-tarif: #e07a4a;
  --color-accent: #ff9933;
  --color-accent-soft: #3a2818;
  --color-title-glow: #8a5a20;
  --color-first-letter: #d4a0e8;
  --color-yellow-soft: #3a3420;
  --color-on-brand: #1a1220;
  --color-success-border: #4a7a52;
  --color-success-text: #a8d4ac;
  --color-warning-border: #7a6040;
  --color-warning-text: #e8c89a;
  --color-warning-accent: #9a7848;
  --color-error-soft: #3a2222;
  --color-error-border: #8a5050;
  --color-error-text: #e8b0b0;
  --color-accent-warm: #ff9933;
  --color-brand-typo: #c9a6e8;
  --color-counter-low-text: #c9a46a;
  --color-counter-low-fill: #8c6f3a;
  --color-counter-high-text: #d4845c;
  --color-counter-high-fill: #b36b2e;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-toggle: 0 3px 10px rgba(0, 0, 0, 0.45);
}

/* Forçage clair sur système sombre */
:root[data-theme="light"] {
  --color-brand: #7f54b3;
  --color-brand-dark: #6a4499;
  --color-brand-soft: #efe6f8;
  --color-brand-pale: #f7f1fb;
  --color-text: #333333;
  --color-title: #222222;
  --color-muted: #5c5c5c;
  --color-border: #e6d48a;
  --color-background: #fff0b5;
  --color-background-soft: #fff8d6;
  --color-warning-soft: #fff7e8;
  --color-success-soft: #edf7ee;
  --color-header-soft: #eaf9bd;
  --color-footer: #dd9933;
  --color-footer-text: #333333;
  --color-tarif: #b03f07;
  --color-accent: #ff7700;
  --color-accent-soft: #fff1e0;
  --color-title-glow: #170e05;
  --color-first-letter: #ba26eb;
  --color-yellow-soft: #ffe9a0;
  --color-on-brand: #ffffff;
  --color-success-border: #a3d9a8;
  --color-success-text: #2f5c32;
  --color-warning-border: #e8c89a;
  --color-warning-text: #5c3f1f;
  --color-warning-accent: #f0c36b;
  --color-error-soft: #f5d0d0;
  --color-error-border: #e8a0a0;
  --color-error-text: #7a3a3a;
  --color-accent-warm: #b35c3a;
  --color-brand-typo: #627261;
  --color-counter-low-text: #8c6f3a;
  --color-counter-low-fill: #c9a46a;
  --color-counter-high-text: #b36b2e;
  --color-counter-high-fill: #c17a3f;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.07);
  --shadow-toggle: 0 3px 10px rgba(0, 0, 0, 0.18);
}

/* === 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: 72px;
  gap: var(--space-sm);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  min-width: 0;
  flex: 0 1 auto;
  max-width: min(42%, 20rem);
}

.site-logo__picture {
  flex-shrink: 0;
  display: block;
  line-height: 0;
}

.site-logo__mark,
.site-logo img.site-logo__mark {
  width: 3.25rem;
  height: 3.25rem;
  max-width: none;
  object-fit: contain;
  display: block;
}

.site-logo__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/*
 * Admin : marque seule (pas de .site-logo__text).
 * Côté site (main.css) pour survivre aux MAJ moteur (admin.css écrasé).
 * Évite le chevauchement « Admin » / « Tableau de bord » sur le menu densifié.
 */
.site-logo--admin {
  max-width: none;
  flex: 0 0 auto;
}

.site-logo--admin .site-logo__text {
  display: none;
}

.site-logo__title {
  color: var(--color-accent);
  text-shadow: 0.08em 0.08em 0.16em var(--color-title-glow);
  font-weight: 700;
  font-size: clamp(0.78rem, 1.9vw, 1.05rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.site-logo__title .first-letter {
  color: var(--color-first-letter);
}

/* Ancien sélecteur large (images logo) — non carré */
.site-logo img:not(.site-logo__mark) {
  width: auto;
  max-width: 200px;
  height: 52px;
  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-header-soft);
  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.2rem;
}

.nav-list a,
.nav-list .nav-link {
  display: block;
  padding: 0.3rem 0.28rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  border-radius: 4px;
  white-space: nowrap;
}

.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-brand-dark);
  background: var(--color-brand-pale);
}

/* Sous-menus (optionnels) — mobile : accordéon */
.nav-item-row {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

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

.submenu-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  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;
    flex-wrap: nowrap;
    gap: 0.05rem 0.28rem;
  }

  .nav-list a,
  .nav-list .nav-link {
    padding: 0.28rem 0.22rem;
  }

  .site-logo {
    max-width: min(38%, 22rem);
    gap: 0.65rem;
  }

  .site-logo__mark,
  .site-logo img.site-logo__mark {
    width: 3.75rem;
    height: 3.75rem;
  }

  .site-logo__title {
    font-size: clamp(0.85rem, 1.15vw, 1.12rem);
  }

  .site-logo img:not(.site-logo__mark) {
    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;
  }

  .submenu-toggle {
    width: 2rem;
    height: 2rem;
    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__mark,
  .site-logo img.site-logo__mark {
    width: 2.75rem;
    height: 2.75rem;
  }

  .site-logo__title {
    font-size: 0.72rem;
  }

  .site-logo img:not(.site-logo__mark) {
    max-width: 160px;
    height: 42px;
  }
}

/* Sticky en fin de section header (spécificité) */
.site-header {
  background: var(--color-header-soft);
  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-brand);
  outline-offset: 2px;
}

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

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

/* É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-brand-dark);
  border-color: var(--color-brand);
}

.btn-secondary:hover {
  background: var(--color-brand-pale);
}

.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);
  padding: var(--space-2xl) 0;
  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-2xl) 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-brand-soft);
    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);
}

.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 ===
 * Toujours orange charte (#dd9933) — pas d’alternance selon le nombre de sections.
 */
.site-footer {
  background: var(--color-footer);
  color: var(--color-footer-text);
  border-top: 3px solid var(--color-brand);
  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-footer);
  color: var(--color-footer-text);
}

.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-brand-dark);
}

.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;
  }
}


/* === Regnard-Psy — surfaces premium & identité === */

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

.site-header {
  background: var(--color-header-soft);
  border-bottom: 1px solid var(--color-border);
}

.site-footer {
  border-top: 3px solid var(--color-brand);
  background: var(--color-footer);
  color: var(--color-footer-text);
}

.site-footer a {
  color: var(--color-footer-text);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--color-title);
}

.site-footer .footer-small,
.site-footer .footer-tagline,
.site-footer .footer-zone,
.site-footer .footer-bottom p {
  color: var(--color-footer-text);
}

.site-footer .btn-secondary {
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.35);
  color: var(--color-footer-text);
}

.site-footer .btn-secondary:hover,
.site-footer .btn-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.55);
}

.footer-credit .bio-dark,
a.bio-dark {
  font-family: "Indie Flower", cursive;
  font-size: 1.25em;
  color: var(--color-brand-typo);
  text-decoration: none;
}

.footer-credit .bio-dark:hover,
a.bio-dark:hover {
  color: var(--color-brand);
  text-decoration: underline;
}

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

.quote-jung {
  margin: 0 0 var(--space-lg);
  padding: var(--space-lg);
  border-left: 4px solid var(--color-brand);
  background: var(--color-yellow-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
}

.quote-jung p {
  font-size: 1.15rem;
  color: var(--color-title);
  margin: 0 0 var(--space-sm);
  font-style: italic;
}

.quote-jung footer {
  margin-top: var(--space-md);
  font-style: normal;
}

.quote-jung__years {
  color: #800080;
  font-weight: 600;
}

:root[data-theme="dark"] .quote-jung__years,
:root:not([data-theme="light"]) .quote-jung__years {
  color: #d4a0e8;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .quote-jung__years {
    color: #d4a0e8;
  }
}

.home-hero {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 768px) {
  .home-hero {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.home-hero__figure {
  margin: 0;
}

.home-hero__figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.figure-caption {
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  color: var(--color-muted);
  text-align: center;
}

.content-split {
  display: grid;
  gap: var(--space-xl);
  align-items: start;
}

@media (min-width: 768px) {
  .content-split {
    grid-template-columns: 1.4fr 0.8fr;
  }
}

.content-split__figure {
  margin: 0;
}

.content-split__figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.info-card {
  margin: var(--space-lg) 0;
  padding: var(--space-lg);
  background: var(--color-yellow-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.info-card p:last-child {
  margin-bottom: 0;
}

.section--hero-soft {
  background: linear-gradient(
    180deg,
    var(--color-background-soft) 0%,
    var(--color-background) 100%
  );
}

.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-background);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-brand-soft);
  transform: translateY(-2px);
}

.card--link .card__link {
  display: block;
  padding: var(--space-lg);
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.card--link h3 {
  color: var(--color-brand);
  margin-top: 0;
}

.quotes-list li {
  margin-bottom: var(--space-md);
  padding-left: var(--space-sm);
  border-left: 3px solid var(--color-brand-soft);
}

.prose blockquote {
  color: var(--color-brand);
  font-size: 1.1em;
  border-left: 3px solid var(--color-brand);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
}

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

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

.nav-link.active,
.nav-item.is-active > .nav-link,
.nav-item.is-active > .nav-item-row > .nav-link {
  color: var(--color-brand);
}

.prose h2 {
  color: var(--color-brand);
}


/* === Illustrations de contenu (pages métiers) === */
.content-split--with-media,
.content-with-figure {
  display: grid;
  gap: var(--space-xl);
  align-items: start;
}

@media (min-width: 720px) {
  .content-with-figure {
    grid-template-columns: 1fr min(42%, 22rem);
    gap: var(--space-xl);
  }

  .content-with-figure--portrait {
    grid-template-columns: 1fr min(36%, 16rem);
  }

  .content-with-figure__media {
    order: 2;
  }
}

.content-with-figure__media {
  margin: 0;
}

.content-with-figure__media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: block;
}

.content-with-figure__media figcaption {
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-muted);
  text-align: center;
}

/* === Œuvres à fond transparent (dessins Benjamin) ===
 * En mode clair : le jaune du site suffit.
 * En mode sombre : fond parchemin clair pour que les traits restent lisibles.
 */
.illustration-art {
  border-radius: var(--radius-lg);
}

.illustration-art picture,
.illustration-art > img {
  display: block;
  border-radius: var(--radius-lg);
  background: transparent;
}

/* Forcer un fond lisible dès que le thème sombre est actif (système ou manuel) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .illustration-art picture,
  :root:not([data-theme="light"]) .illustration-art > img {
    background: #fff0b5;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  }
}

:root[data-theme="dark"] .illustration-art picture,
:root[data-theme="dark"] .illustration-art > img {
  background: #fff0b5;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

/* Légère marge intérieure pour que l’œuvre respire sur le parchemin */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .illustration-art picture img,
  :root:not([data-theme="light"]) .home-hero__figure.illustration-art img {
    /* l’image garde son ratio ; le fond est sur picture */
  }
}

:root[data-theme="dark"] .illustration-art picture img {
  /* no-op: fond porté par picture */
}

/* === Cartes d’accueil (ivoire + pastille picto) === */
.cards-grid--home {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .cards-grid--home {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem;
  }
}

@media (min-width: 900px) {
  .cards-grid--home {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.card--home {
  --card-home-bg: #fffdf6;
  --card-home-border: #e6d48a;
  --card-home-border-hover: #d4bc6a;
  --card-home-icon-bg: var(--color-brand-pale);
  background: var(--card-home-bg);
  border: 1px solid var(--card-home-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 0;
  min-height: 0;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.card--home .card__link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  height: 100%;
  min-height: 11.5rem;
  padding: 1.15rem 1.2rem 1rem;
  color: inherit;
  text-decoration: none;
  border-radius: inherit;
}

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

.card--home .card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  background: var(--card-home-icon-bg);
  flex-shrink: 0;
}

.card--home .card__icon picture,
.card--home .card__icon img {
  display: block;
  width: 1.85rem;
  height: 1.85rem;
  object-fit: contain;
}

.card--home h3 {
  margin: 0;
  color: var(--color-brand);
  font-size: 1.1rem;
  line-height: 1.25;
}

.card--home p {
  margin: 0;
  flex: 1 1 auto;
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.45;
}

.card--home .card__more {
  align-self: flex-end;
  margin-top: 0.25rem;
  color: var(--color-muted);
  font-size: 1.15rem;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

  .card--home:hover .card__more {
    color: var(--color-brand);
    transform: translateX(2px);
  }
}

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

  .card--home:hover {
    transform: none;
  }

  .card--home:hover .card__more {
    transform: none;
  }
}

/* Dark mode : ivoire sombre + pastille lavande sombre, picto lisible */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .card--home {
    --card-home-bg: #2a261c;
    --card-home-border: #5a4e32;
    --card-home-border-hover: #8a7848;
    --card-home-icon-bg: #3a3428;
  }

  :root:not([data-theme="light"]) .card--home .card__icon {
    background: #fff0b5;
  }
}

:root[data-theme="dark"] .card--home {
  --card-home-bg: #2a261c;
  --card-home-border: #5a4e32;
  --card-home-border-hover: #8a7848;
  --card-home-icon-bg: #3a3428;
}

:root[data-theme="dark"] .card--home .card__icon {
  background: #fff0b5;
}

/* 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-logo__text,
.site-logo--footer .site-logo__title,
.site-logo--footer .site-brand--text,
.site-logo--footer .site-brand__product,
.site-logo--footer .site-brand__tagline {
  display: inline;
  font-size: inherit;
}
.site-logo--footer .site-logo__text {
  flex-direction: unset;
  min-width: 0;
}
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);
}


