/* ============================================
   EoKin — Design System V1.2
   Charte officielle CédricBis (Pomilo, oct. 2020)
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

:root {
  --bg-primary: #FFFFFF;
  --bg-soft: #F9F7F7;
  --bg-cream: #FCFAFA;
  --bg-deep: #2C2E34;

  --primary: #12A6A3;
  --primary-hover: #0E8A88;
  --primary-soft: #E3F4F4;
  --primary-deep: #0A5E5C;

  --secondary: #CF5C36;
  --secondary-hover: #B14E2D;
  --secondary-soft: #FBE9E1;
  --secondary-deep: #823520;

  --accent-blue: #1E3A5F;
  --accent-blue-hover: #15294A;
  --accent-blue-soft: #E4E9F1;

  --text-primary: #2C2E34;
  --text-secondary: #5E626C;
  --text-muted: #8E929B;
  --text-on-dark: #F9F7F7;
  --text-on-dark-mute: #C8CACE;

  --border-fine: #E8E5E5;
  --border-soft: #F0EDED;
  --border-strong: #D4D1D1;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-title: 'Nunito', -apple-system, system-ui, sans-serif;
  --font-body: 'Lora', Georgia, serif;
  --font-ui: 'Nunito', -apple-system, system-ui, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 5rem;
  --space-3xl: 7rem;

  --container: 1120px;
  --container-narrow: 880px;
  --container-text: 680px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.6s;

  --shadow-sm: 0 1px 2px rgba(44, 46, 52, 0.04);
  --shadow-md: 0 4px 16px rgba(44, 46, 52, 0.06);
  --shadow-lg: 0 16px 40px -12px rgba(44, 46, 52, 0.12);
  --shadow-xl: 0 30px 60px -20px rgba(44, 46, 52, 0.18);

  /* Surfaces adaptatives (pilotées par le thème) */
  --surface-glass: rgba(255, 255, 255, 0.92);   /* header translucide */
  --surface-overlay: rgba(255, 255, 255, 0.98); /* menus / dropdowns   */
  --glass-border: var(--border-soft);
  --halo-blend: normal;        /* mode de fusion des halos       */
  --grain-opacity: 0;          /* texture de grain (sombre uniquement) */
  --color-scheme: light;
}

/* HIÉRARCHIE TYPOGRAPHIQUE UNIFIÉE */
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  color: var(--text-primary);
  background: var(--bg-primary);
  letter-spacing: 0.005em;
  line-height: 1.7;
}

h1, .h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h2, .h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h3, .h3 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

h4, .h4 {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: clamp(1.05rem, 1.3vw, 1.15rem);
  line-height: 1.3;
  color: var(--text-primary);
}

.h-display {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
}

/* Em accentué dans les hero titles des pages internes */
.page-hero__title em,
.h1 em,
h1 em {
  font-style: normal;
  color: var(--primary);
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-block;
  margin-bottom: var(--space-sm);
}

.subtitle, .page-hero__sub {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.35rem, 2.1vw, 1.65rem);
  line-height: 1.45;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.lead {
  font-family: var(--font-body);
  font-size: clamp(1.12rem, 1.5vw, 1.26rem);
  line-height: 1.6;
  color: var(--text-secondary);
}

.breadcrumb,
.page-hero__breadcrumb {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}
.breadcrumb a,
.page-hero__breadcrumb a {
  color: var(--primary);
  transition: color 0.2s var(--ease);
}
.breadcrumb a:hover,
.page-hero__breadcrumb a:hover { color: var(--primary-hover); }

em, .italic { font-style: italic; }

/* CONTAINERS */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.container--narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.container--text {
  max-width: var(--container-text);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
}
.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.75rem var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}
.brand__logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
}
.brand__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1;
}

.nav { display: flex; align-items: center; gap: var(--space-lg); }
.nav__list { display: flex; gap: var(--space-md); list-style: none; }
.nav__link {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.4rem 0;
  transition: color 0.2s var(--ease);
}
.nav__link:hover { color: var(--text-primary); }
.nav__link.is-active { color: var(--primary); }
.nav__link.has-dropdown::after {
  content: '';
  display: inline-block;
  margin-left: 0.3rem;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.nav__dropdown-trigger { position: relative; }
.nav__dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: -1rem;
  min-width: 290px;
  background: var(--surface-overlay);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-fine);
  border-radius: 14px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s var(--ease);
  list-style: none;
  box-shadow: var(--shadow-lg);
}
.nav__dropdown-trigger:hover .nav__dropdown,
.nav__dropdown-trigger:focus-within .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav__dropdown a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-weight: 500;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.nav__dropdown a:hover {
  background: var(--primary-soft);
  color: var(--text-primary);
}
.nav__dropdown a small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Menu mobile */
.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border-fine);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.nav__toggle:hover { border-color: var(--primary); }
.nav__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Sidebar mobile — glisse depuis la droite, fond bleu nuit */
.nav__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 58, 95, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.nav__backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nav__mobile {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 88vw);
  background: var(--accent-blue);
  color: #FFFFFF;
  z-index: 100;
  flex-direction: column;
  padding: 5.5rem var(--space-md) var(--space-lg);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  box-shadow: -20px 0 50px -20px rgba(0, 0, 0, 0.25);
}
.nav__mobile.is-open {
  transform: translateX(0);
}
.nav__mobile-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.nav__mobile-close:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  transform: rotate(90deg);
}
.nav__mobile-close::before,
.nav__mobile-close::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 1.5px;
  background: #FFFFFF;
  border-radius: 2px;
}
.nav__mobile-close::before { transform: rotate(45deg); }
.nav__mobile-close::after { transform: rotate(-45deg); }

.nav__mobile-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.nav__mobile-link {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  color: #FFFFFF;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.nav__mobile-link:hover,
.nav__mobile-link:focus,
.nav__mobile-link:active {
  background: var(--secondary);
  color: #FFFFFF;
  transform: translateX(4px);
}
.nav__mobile-link small {
  display: block;
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.2rem;
  font-weight: 400;
  transition: color 0.25s var(--ease);
}
.nav__mobile-link:hover small,
.nav__mobile-link:focus small {
  color: rgba(255, 255, 255, 0.85);
}

.nav__mobile-cta {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.nav__mobile-cta .btn--primary {
  background: var(--secondary);
  color: #FFFFFF;
  width: 100%;
  justify-content: center;
}
.nav__mobile-cta .btn--primary:hover {
  background: var(--secondary-hover);
}

/* BOUTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  transition: all 0.25s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn--primary { background: var(--primary); color: #FFFFFF; }
.btn--primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(18, 166, 163, 0.3);
}
.btn--secondary { background: var(--secondary); color: #FFFFFF; }
.btn--secondary:hover {
  background: var(--secondary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(207, 92, 54, 0.3);
}
.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.btn--link { background: transparent; color: var(--primary); padding: 0; border-radius: 0; }
.btn--link:hover { color: var(--primary-hover); }
.btn .arrow { display: inline-block; transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* SECTIONS */
.section { padding: var(--space-3xl) 0; }
.section--tight { padding: var(--space-2xl) 0; }
.section--soft { background: var(--bg-soft); }
.section--cream { background: var(--bg-cream); }
.section--alt { background: var(--bg-soft); }
.section--light { background: var(--bg-cream); color: var(--text-primary); }
.section--dark { background: var(--bg-deep); color: var(--text-on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--text-on-dark); }
.section--dark .lead { color: var(--text-on-dark-mute); }
.section--dark .eyebrow { color: var(--primary); }

.section-head {
  max-width: 720px;
  margin: 0 auto var(--space-xl);
  text-align: center;
}
.section-head h2 { margin-top: 0; }

/* FOOTER */
.site-footer {
  background: var(--bg-soft);
  padding: var(--space-xl) 0 var(--space-md);
  border-top: 1px solid var(--border-fine);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.site-footer__brand-block { max-width: 320px; }
.site-footer__brand-block .brand { margin-bottom: var(--space-sm); }
.site-footer__brand-block p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}
.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: var(--space-md);
  position: relative;
  z-index: 1;
}
.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border-fine);
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.site-footer__social-link:hover {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.site-footer__col-title {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}
.site-footer__list { list-style: none; }
.site-footer__list li { margin-bottom: 0.35rem; }
.site-footer__list a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  margin-left: -0.85rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-family: var(--font-ui);
  font-weight: 500;
  border-radius: 999px;
  transition: all 0.25s var(--ease);
  position: relative;
}
.site-footer__list a::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  transform: scale(0);
  transition: all 0.25s var(--ease);
}
.site-footer__list a:hover {
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateX(2px);
}
.site-footer__list a:hover::before {
  opacity: 1;
  transform: scale(1);
}
.site-footer__bottom {
  border-top: 1px solid var(--border-fine);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 0.82rem;
  font-family: var(--font-ui);
  color: var(--text-muted);
}
.site-footer__bottom a {
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.site-footer__bottom a:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.9s var(--ease) both; }
.fade-up--d1 { animation-delay: 0.1s; }
.fade-up--d2 { animation-delay: 0.25s; }
.fade-up--d3 { animation-delay: 0.4s; }
.fade-up--d4 { animation-delay: 0.55s; }

.halo {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.halo--primary { background: radial-gradient(circle, rgba(18, 166, 163, 0.28) 0%, transparent 70%); }
.halo--secondary { background: radial-gradient(circle, rgba(207, 92, 54, 0.22) 0%, transparent 70%); }
.halo--deep { background: radial-gradient(circle, rgba(10, 94, 92, 0.18) 0%, transparent 70%); }
.halo--blue { background: radial-gradient(circle, rgba(30, 58, 95, 0.22) 0%, transparent 70%); }
.halo--soft { background: radial-gradient(circle, rgba(227, 244, 244, 0.9) 0%, transparent 70%); }

/* RESPONSIVE */
@media (max-width: 880px) {
  .nav__list { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__mobile { display: flex; }
  .nav__backdrop { display: block; }
  .nav > .btn { display: none; }

  .section { padding: var(--space-2xl) 0; }
  .section--tight { padding: var(--space-xl) 0; }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }
  .site-footer__brand-block {
    max-width: 100%;
    margin: 0 auto;
  }
  .site-footer__brand-block .brand,
  .site-footer__brand-block p {
    justify-content: center;
    text-align: center;
  }
  .site-footer__brand-block .brand { display: inline-flex; }
  .site-footer__social { justify-content: center; }
  .site-footer__list a {
    justify-content: center;
    margin-left: 0;
  }
  .site-footer__list a::before { display: none; }
  .site-footer__list a:hover { transform: none; }
  .site-footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.4rem;
  }
}
@media (max-width: 600px) {
  h1, .h1 { font-size: clamp(2.5rem, 9vw, 3.25rem); }
  .h-display { font-size: clamp(2.75rem, 11vw, 4rem); }
  h2, .h2 { font-size: clamp(2rem, 7vw, 2.5rem); }
  .subtitle, .page-hero__sub { font-size: clamp(1.15rem, 4.5vw, 1.35rem); }
  .lead { font-size: clamp(1.05rem, 3.8vw, 1.15rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ============================================================
   THÈMES — Clair (par défaut) + 2 variantes sombres
   Sélecteur en bas à droite (injecté par theme.js)
   ============================================================ */

/* --- Signature de marque : Eo neutre · Kin turquoise --- */
.brand__eo { color: inherit; }
.brand__kin {
  color: var(--primary);
  transition: color 0.3s var(--ease);
}

/* --- Sélecteur de thème flottant --- */
.theme-switch {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.7rem 0.5rem 0.85rem;
  border-radius: 999px;
  background: var(--surface-overlay);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--border-fine);
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.6s var(--ease) both;
  animation-delay: 0.5s;
}
.theme-switch__label {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.theme-switch__opt {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.theme-switch__opt:hover { transform: translateY(-2px) scale(1.08); }
.theme-switch__opt:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary);
}
.theme-switch__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  transition: transform 0.25s var(--ease);
}
.theme-switch__opt--light  .theme-switch__dot { background: linear-gradient(135deg, #FBFAFA, #E7E3E3); border-color: rgba(0,0,0,0.18); }
.theme-switch__opt--encre  .theme-switch__dot { background: linear-gradient(135deg, #295082, #0C1118); }
.theme-switch__opt--foret  .theme-switch__dot { background: linear-gradient(135deg, #1A5450, #08130F); }
.theme-switch__opt[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--primary); }
.theme-switch__opt[aria-pressed="true"] .theme-switch__dot { transform: scale(0.9); }
@media (max-width: 600px) {
  .theme-switch__label { display: none; }
  .theme-switch { padding: 0.5rem 0.6rem; gap: 0.45rem; }
}

/* --- Ambiance « vivante » : halos qui respirent + grain premium --- */
.halo {
  mix-blend-mode: var(--halo-blend);
  animation: haloBreath 17s ease-in-out infinite;
}
@keyframes haloBreath {
  0%, 100% { filter: blur(80px); }
  50%      { filter: blur(108px); }
}
/* Voile de grain très léger pour la profondeur (visible surtout en sombre) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   THÈME SOMBRE 1 — « ENCRE »
   Encre profonde bleu-nuit / charbon. Sobre & premium.
   Dérivé du bleu nuit de la charte (#1E3A5F) + #2C2E34.
   ============================================================ */
[data-theme="dark-encre"] {
  --color-scheme: dark;

  --bg-primary: #131A22;   /* canvas + cartes      */
  --bg-soft:    #0F151C;   /* sections en retrait  */
  --bg-cream:   #111821;   /* sections alternées   */
  --bg-deep:    #0A0E14;   /* footer / sections sombres */

  --primary: #1FB6B2;
  --primary-hover: #3ACBC6;
  --primary-soft: rgba(31, 182, 178, 0.16);
  --primary-deep: #0C7E7C;

  --secondary: #E06A42;
  --secondary-hover: #EC7E59;
  --secondary-soft: rgba(224, 106, 66, 0.16);
  --secondary-deep: #B14E2D;

  --accent-blue: #16263B;
  --accent-blue-hover: #1E3A5F;
  --accent-blue-soft: rgba(46, 80, 130, 0.22);

  --text-primary: #ECEFF3;
  --text-secondary: #A7B0BD;
  --text-muted: #6E7785;
  --text-on-dark: #ECEFF3;
  --text-on-dark-mute: #AEB6C2;

  --border-fine: rgba(255, 255, 255, 0.09);
  --border-soft: rgba(255, 255, 255, 0.05);
  --border-strong: rgba(255, 255, 255, 0.18);

  --surface-glass: rgba(15, 21, 28, 0.82);
  --surface-overlay: rgba(22, 29, 38, 0.96);
  --glass-border: rgba(255, 255, 255, 0.07);
  --halo-blend: screen;
  --grain-opacity: 0.04;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 44px -14px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 30px 60px -20px rgba(0, 0, 0, 0.72);
}

/* ============================================================
   THÈME SOMBRE 2 — « FORÊT »
   Vert sapin / pétrole très sombre. Organique, incarné, vivant.
   Dérivé du turquoise de la charte poussé en profondeur.
   ============================================================ */
[data-theme="dark-foret"] {
  --color-scheme: dark;

  --bg-primary: #122220;   /* canvas + cartes      */
  --bg-soft:    #0C1714;   /* sections en retrait  */
  --bg-cream:   #0E1A17;   /* sections alternées   */
  --bg-deep:    #071210;   /* footer / sections sombres */

  --primary: #1AC2B3;
  --primary-hover: #36D6C7;
  --primary-soft: rgba(26, 194, 179, 0.16);
  --primary-deep: #0C8076;

  --secondary: #E8703E;
  --secondary-hover: #F08454;
  --secondary-soft: rgba(232, 112, 62, 0.18);
  --secondary-deep: #BA552C;

  --accent-blue: #123A38;   /* recentré sur la famille verte */
  --accent-blue-hover: #19514D;
  --accent-blue-soft: rgba(26, 84, 80, 0.24);

  --text-primary: #ECF2EE;
  --text-secondary: #9FB1A9;
  --text-muted: #687771;
  --text-on-dark: #ECF2EE;
  --text-on-dark-mute: #A6B7AF;

  --border-fine: rgba(216, 255, 240, 0.09);
  --border-soft: rgba(216, 255, 240, 0.05);
  --border-strong: rgba(216, 255, 240, 0.18);

  --surface-glass: rgba(16, 30, 27, 0.82);
  --surface-overlay: rgba(20, 38, 33, 0.96);
  --glass-border: rgba(216, 255, 240, 0.07);
  --halo-blend: screen;
  --grain-opacity: 0.045;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.42);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 18px 44px -14px rgba(0, 0, 0, 0.62);
  --shadow-xl: 0 30px 60px -20px rgba(0, 0, 0, 0.74);
}

/* --- Ajustements ciblés pour les deux thèmes sombres --- */
[data-theme="dark-encre"] .brand__kin,
[data-theme="dark-foret"] .brand__kin {
  text-shadow: 0 0 22px rgba(31, 182, 178, 0.35);
}

/* Placeholder photo fondateur : texte lisible sur fond sombre */
[data-theme="dark-encre"] .founder__photo::after,
[data-theme="dark-foret"] .founder__photo::after {
  color: rgba(255, 255, 255, 0.4);
}

/* Carte « premium » harmonisée avec le thème Forêt (sinon bleu nuit par défaut) */
[data-theme="dark-foret"] .space--premium {
  background: linear-gradient(165deg, #123E3B, #0C2A27);
  border-color: rgba(26, 194, 179, 0.28);
}

/* Avatars témoignages : un peu plus de présence sur fond sombre */
[data-theme="dark-encre"] .testimonial__avatar,
[data-theme="dark-foret"] .testimonial__avatar {
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
}

@media (prefers-reduced-motion: reduce) {
  .halo { animation: none; }
  .theme-switch { animation: none; }
}

/* ============================================================
   BIBLIOTHÈQUE DE COMPOSANTS « VIVANTS » (partagés multi-pages)
   Galaxie · constellation · couches · avant/après · piliers ·
   étapes au survol · listes ✓/✗ · grande citation · valeurs…
   ============================================================ */

/* --- Grande citation respirante --- */
.section--quote { position: relative; overflow: hidden; }
.big-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-align: center;
  max-width: 940px;
  margin: 0 auto;
  color: var(--text-primary);
  position: relative;
  z-index: 2;
}
.big-quote em { font-style: italic; color: var(--primary); }
.big-quote--sm { font-size: clamp(1.5rem, 3vw, 2.2rem); }

/* --- Listes ✓ / ✗ --- */
.check-list, .cross-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.check-list li, .cross-list li {
  position: relative;
  padding-left: 2.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1.02rem;
}
.check-list li::before, .cross-list li::before {
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
}
.check-list li::before { content: '✓'; color: var(--primary); background: var(--primary-soft); }
.cross-list li::before { content: '✕'; color: var(--secondary); background: var(--secondary-soft); }

/* --- Piliers (grille 2×2) --- */
.pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  max-width: 920px;
  margin: 0 auto;
}
.pillar {
  padding: var(--space-lg);
  border: 1px solid var(--border-fine);
  border-radius: 20px;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.pillar:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow-lg); }
.pillar__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  opacity: 0.8;
  margin-bottom: 0.2rem;
}
.pillar h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  margin-bottom: var(--space-xs);
}
.pillar p { color: var(--text-secondary); line-height: 1.6; }
.pillar::after {
  content: '';
  position: absolute;
  top: var(--space-lg); right: var(--space-lg);
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  opacity: 0.4;
  transition: all 0.4s var(--ease);
}
.pillar:hover::after { opacity: 1; transform: scale(1.4); }

/* --- Avant / Après (transformation) --- */
.ba { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-sm); }
.ba__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-md);
}
.ba__cell {
  padding: var(--space-md) var(--space-lg);
  border-radius: 16px;
  border: 1px solid var(--border-fine);
  font-size: 1.02rem;
  line-height: 1.5;
}
.ba__cell--before { background: var(--bg-soft); color: var(--text-secondary); }
.ba__cell--after { background: var(--primary-soft); color: var(--text-primary); border-color: transparent; }
.ba__cell small {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  opacity: 0.75;
}
.ba__cell--before small { color: var(--text-muted); }
.ba__cell--after small { color: var(--primary); }
.ba__arrow { color: var(--primary); font-size: 1.5rem; text-align: center; }

/* --- Arrivée → Départ (deux panneaux) --- */
.tflow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-lg);
  align-items: stretch;
  max-width: 940px;
  margin: 0 auto;
}
.tflow__panel { padding: var(--space-xl) var(--space-lg); border-radius: 22px; border: 1px solid var(--border-fine); }
.tflow__panel--in { background: var(--bg-soft); }
.tflow__panel--out { background: var(--primary-soft); border-color: transparent; }
.tflow__title {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}
.tflow__panel--in .tflow__title { color: var(--text-muted); }
.tflow__panel--out .tflow__title { color: var(--primary); }
.tflow__arrow { display: flex; align-items: center; color: var(--primary); font-size: 2rem; }

/* --- Parcours d'évolution (chips + flèches) --- */
.journey { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 0.6rem; max-width: 1000px; margin: 0 auto; }
.journey__step {
  flex: 1 1 150px;
  min-width: 140px;
  padding: var(--space-md);
  text-align: center;
  border-radius: 16px;
  border: 1px solid var(--border-fine);
  background: var(--bg-primary);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.journey__step:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: var(--shadow-md); }
.journey__step h4 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 0.3rem;
}
.journey__step p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.45; }
.journey__arrow { display: flex; align-items: center; color: var(--primary); opacity: 0.6; font-size: 1.2rem; }

/* --- Étapes avec détail au survol --- */
.flow { max-width: 860px; margin: 0 auto; position: relative; }
.flow::before {
  content: '';
  position: absolute;
  left: 27px; top: 40px; bottom: 40px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--primary) 8%, var(--primary) 92%, transparent);
  opacity: 0.35;
}
.flow__step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-md);
  padding: 0.7rem 0.9rem;
  border-radius: 16px;
  outline: none;
  transition: background-color 0.35s var(--ease);
}
.flow__step:hover, .flow__step:focus-within { background: var(--bg-soft); }
.flow__num {
  position: relative;
  z-index: 2;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1.5px solid var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--primary);
  transition: all 0.35s var(--ease);
}
.flow__step:hover .flow__num, .flow__step:focus-within .flow__num {
  background: var(--primary); color: #fff; transform: scale(1.06);
}
.flow__body { padding-top: 0.55rem; }
.flow__body h3 { font-size: 1.25rem; margin-bottom: 0; }
.flow__detail {
  max-height: 0; opacity: 0; overflow: hidden;
  color: var(--text-secondary); line-height: 1.6;
  transition: max-height 0.45s var(--ease), opacity 0.45s var(--ease), margin-top 0.45s var(--ease);
}
.flow__step:hover .flow__detail, .flow__step:focus-within .flow__detail {
  max-height: 240px; opacity: 1; margin-top: 0.5rem;
}
.flow__hint {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}
.flow__hint::after { content: ' ↓'; color: var(--primary); }

/* --- GALAXIE / CONSTELLATION (noyau central + satellites) --- */
.galaxy {
  position: relative;
  width: min(560px, 92vw);
  height: min(560px, 92vw);
  margin: var(--space-lg) auto 0;
}
.galaxy__ring {
  position: absolute;
  border: 1px dashed var(--border-strong);
  border-radius: 50%;
  opacity: 0.5;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}
.galaxy__core {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--primary), var(--primary-deep));
  color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  box-shadow: 0 0 0 10px var(--primary-soft), var(--shadow-lg);
}
.galaxy__core strong {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
}
.galaxy__core span { font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.04em; opacity: 0.85; margin-top: 0.25rem; }
.galaxy__node {
  position: absolute;
  left: 50%; top: 50%;
  width: 2px;
  height: var(--r, 200px);
  transform-origin: top center;
  transform: translateX(-50%) rotate(var(--a, 0deg));
  background: linear-gradient(to bottom, var(--primary) 0%, transparent 92%);
  opacity: 0.4;
  z-index: 1;
}
.galaxy__planet {
  position: absolute;
  left: 50%; bottom: 0;
  transform: translate(-50%, 50%) rotate(calc(-1 * var(--a, 0deg)));
  z-index: 2;
  width: max-content;
  max-width: 190px;
  padding: var(--space-sm) var(--space-md);
  border-radius: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-fine);
  box-shadow: var(--shadow-md);
  text-align: center;
  animation: floaty 7s ease-in-out infinite;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.galaxy__planet h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.15rem;
  margin-bottom: 0.15rem;
}
.galaxy__planet p { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }
.galaxy__planet:hover { border-color: var(--primary); }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
/* Variante « mots » (constellation autour du dirigeant) */
.galaxy--words .galaxy__planet {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  max-width: none;
}
.galaxy--words .galaxy__planet h3 { font-size: 1.05rem; margin: 0; color: var(--text-primary); }
.galaxy--words .galaxy__core { width: 160px; height: 160px; }

/* --- Couches systémiques (cercles concentriques) --- */
.layers { max-width: 760px; margin: 0 auto; }
.layers__band {
  border: 1px solid var(--border-fine);
  border-radius: 26px;
  padding: var(--space-lg);
}
.layers__band--projet { background: var(--bg-soft); }
.layers__band--equipe { background: var(--bg-primary); margin-top: var(--space-md); }
.layers__band--dirigeant { background: var(--primary-soft); border-color: transparent; margin-top: var(--space-md); }
.layers__title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  margin-bottom: var(--space-sm);
}
.layers__band--dirigeant .layers__title { color: var(--primary-deep); }
.layers__list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.layers__list li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex: 1 1 240px;
}
.layers__list li::before {
  content: ''; position: absolute; left: 0; top: 0.55em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
}

/* --- Valeurs (cartes) --- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); max-width: 960px; margin: 0 auto; }
.value {
  padding: var(--space-lg);
  border: 1px solid var(--border-fine);
  border-radius: 20px;
  background: var(--bg-primary);
  text-align: center;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.value:hover { transform: translateY(-4px); border-color: var(--primary); }
.value h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.7rem;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}
.value p { color: var(--text-secondary); line-height: 1.6; }

/* --- Convictions (énoncés) --- */
.convictions { max-width: 820px; margin: 0 auto; list-style: none; padding: 0; counter-reset: c; }
.convictions li {
  counter-increment: c;
  position: relative;
  padding: var(--space-md) 0 var(--space-md) 3.5rem;
  border-bottom: 1px solid var(--border-fine);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.4;
  color: var(--text-primary);
}
.convictions li:last-child { border-bottom: none; }
.convictions li::before {
  content: counter(c, decimal-leading-zero);
  position: absolute; left: 0; top: var(--space-md);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
}

/* --- Liens médias / réseaux --- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-md); max-width: 920px; margin: 0 auto; }
.media-card {
  display: block;
  padding: var(--space-lg);
  border: 1px solid var(--border-fine);
  border-radius: 18px;
  background: var(--bg-primary);
  transition: all 0.3s var(--ease);
}
.media-card:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-3px); }
.media-card__type { font-family: var(--font-ui); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.4rem; }
.media-card h3 { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.3rem; margin-bottom: 0.2rem; }
.media-card p { font-size: 0.9rem; color: var(--text-secondary); }

/* --- Hero deux colonnes (texte + photo) pour pages internes --- */
.hero-split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-xl); align-items: center; }
.hero-split__media {
  aspect-ratio: 4/5;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 25%, rgba(18,166,163,0.35), transparent 60%),
    linear-gradient(150deg, var(--bg-soft), var(--primary-deep));
  border: 1px solid var(--border-fine);
  position: relative;
}
.hero-split__media img { width: 100%; height: 100%; object-fit: cover; }
.hero-split__media[data-placeholder]::after {
  content: attr(data-placeholder);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-style: italic;
  color: rgba(255,255,255,0.4); font-size: 1rem; text-align: center; padding: 1rem;
}

/* --- Prix discret (réutilisable) --- */
.price-soft {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* --- Responsive composants --- */
@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .ba__row, .tflow { grid-template-columns: 1fr; }
  .ba__arrow, .tflow__arrow { transform: rotate(90deg); justify-content: center; }
  .journey__arrow { transform: rotate(90deg); width: 100%; }
  .flow__detail { max-height: none !important; opacity: 1 !important; margin-top: 0.5rem !important; }
  .flow__hint { display: none; }
  .hero-split { grid-template-columns: 1fr; }
  .hero-split__media { max-width: 380px; margin: 0 auto; order: -1; }

  /* La galaxie se replie en grille lisible */
  .galaxy { width: 100%; height: auto; display: flex; flex-direction: column; align-items: center; gap: var(--space-md); }
  .galaxy__ring { display: none; }
  .galaxy__core { position: static; transform: none; }
  .galaxy__node {
    position: static; width: 100%; height: auto; transform: none;
    background: none; opacity: 1; display: flex; justify-content: center;
  }
  .galaxy__planet { position: static; transform: none; animation: none; max-width: 320px; }
  .galaxy--words .galaxy { gap: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .galaxy__planet { animation: none; }
}

/* --- Grilles utilitaires responsive --- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); max-width: 920px; margin: 0 auto; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); max-width: 980px; margin: 0 auto; }
@media (max-width: 760px) { .duo, .trio { grid-template-columns: 1fr; } }
