/* ============================================
   ARCHITECTE DU RÉEL — Design System 2026
   Direction : Deep Tech, Deep Ocean
   ============================================ */

/* ─── Modes de profondeur (UI Sur-Mesure) ─── */

/* Sélecteur */
.depth-selector {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 1rem;
  padding: 0.25rem 0.5rem;
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  backdrop-filter: blur(8px);
}

.depth-selector button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-muted);
}

.depth-selector button:hover {
  transform: scale(1.1);
  border-color: var(--border-subtle);
}

/* Créature inactive : grisée et discrète */
.depth-selector button[aria-pressed="false"] .depth-creature {
  opacity: 0.35;
  filter: grayscale(100%);
  transition: all 0.4s ease;
}

/* Créature active : pleine couleur */
.depth-selector button[aria-pressed="true"] .depth-creature {
  opacity: 1;
  filter: grayscale(0%);
  transition: all 0.4s ease;
}

/* Couleurs par mode via custom properties */
.depth-selector button[data-mode="surface"] {
  --creature-color: #2a8a9e;
  --creature-glow: rgba(42, 138, 158, 0.3);
}
.depth-selector button[data-mode="profondeur"] {
  --creature-color: #c9a94c;
  --creature-glow: rgba(201, 169, 76, 0.3);
}
.depth-selector button[data-mode="abysses"] {
  --creature-color: #f5f0e8;
  --creature-glow: rgba(245, 240, 232, 0.2);
}

.depth-selector button[aria-pressed="true"] {
  border-color: var(--creature-color);
  box-shadow: 0 0 14px var(--creature-glow);
  background: var(--creature-glow);
}

/* Mini-créature dans le header */
.depth-creature {
  display: block;
  width: 26px;
  height: 26px;
  overflow: visible;
  pointer-events: none;
}

/* Désactive les animations dans le header */
.depth-selector .depth-creature .creature-tentacles,
.depth-selector .depth-creature .creature-core,
.depth-selector .depth-creature .creature-glow-dot,
.depth-selector .depth-creature .creature-node {
  animation: none !important;
}

/* ─── Couleurs explicites des mini-créatures (indépendantes du mode du document) ─── */

/* Surface — Méduse (cyan) */
.depth-selector button[data-mode="surface"] .depth-creature .creature-bell {
  stroke: #2a8a9e;
  fill: rgba(42, 138, 158, 0.08);
}
.depth-selector button[data-mode="surface"] .depth-creature .creature-tentacle,
.depth-selector button[data-mode="surface"] .depth-creature .creature-tentacle-branch {
  stroke: #2a8a9e;
}
.depth-selector button[data-mode="surface"] .depth-creature .creature-core,
.depth-selector button[data-mode="surface"] .depth-creature .creature-node {
  fill: #2a8a9e;
}
.depth-selector button[data-mode="surface"] .depth-creature .creature-glow-dot {
  fill: #3db8cc;
}

/* Profondeur — Baleine (or) */
.depth-selector button[data-mode="profondeur"] .depth-creature .creature-bell {
  stroke: #c9a94c;
  fill: rgba(201, 169, 76, 0.08);
}
.depth-selector button[data-mode="profondeur"] .depth-creature .creature-tentacle,
.depth-selector button[data-mode="profondeur"] .depth-creature .creature-tentacle-branch {
  stroke: #c9a94c;
}
.depth-selector button[data-mode="profondeur"] .depth-creature .creature-core,
.depth-selector button[data-mode="profondeur"] .depth-creature .creature-node {
  fill: #c9a94c;
}
.depth-selector button[data-mode="profondeur"] .depth-creature .creature-glow-dot {
  fill: #e0c96e;
}

/* Abysses — Requin (blanc) */
.depth-selector button[data-mode="abysses"] .depth-creature .creature-bell {
  stroke: #f5f0e8;
  fill: rgba(245, 240, 232, 0.08);
}
.depth-selector button[data-mode="abysses"] .depth-creature .creature-tentacle,
.depth-selector button[data-mode="abysses"] .depth-creature .creature-tentacle-branch {
  stroke: #f5f0e8;
}
.depth-selector button[data-mode="abysses"] .depth-creature .creature-core,
.depth-selector button[data-mode="abysses"] .depth-creature .creature-node {
  fill: #f5f0e8;
}
.depth-selector button[data-mode="abysses"] .depth-creature .creature-glow-dot {
  fill: #ffffff;
}

/* Mode compact : un seul bouton visible à la fois */
.depth-selector button[aria-pressed="false"] {
  display: none;
}

.depth-selector button[aria-pressed="true"] {
  display: flex;
}

/* ─── Sélecteur de profondeur COMPACT (un seul bouton + menu) ─── */
.depth-selector-compact {
  position: relative;
  padding: 0.15rem;
  background: rgba(17, 24, 39, 0.8);
}

.depth-selector-compact .depth-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-muted);
}

.depth-selector-compact .depth-toggle:hover {
  transform: scale(1.1);
  border-color: var(--border-subtle);
}

.depth-selector-compact .depth-toggle[aria-expanded="true"] {
  border-color: var(--creature-color, var(--rivage-accent));
  box-shadow: 0 0 14px var(--creature-glow, rgba(201, 169, 76, 0.3));
}

/* Menu déroulant */
.depth-selector-compact .depth-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.4rem;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  min-width: 200px;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.depth-selector-compact .depth-menu[hidden] {
  display: none;
}

.depth-selector-compact .depth-menu:not([hidden]) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.depth-selector-compact .depth-menu button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: none;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-align: left;
}

.depth-selector-compact .depth-menu button:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--border-subtle);
}

.depth-selector-compact .depth-menu button[aria-pressed="true"] {
  border-color: var(--creature-color, var(--rivage-accent));
  background: var(--creature-glow, rgba(201, 169, 76, 0.1));
  color: var(--text-primary);
}

.depth-selector-compact .depth-menu button .depth-creature {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* Flèche du menu */
.depth-selector-compact .depth-menu::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 14px;
  width: 10px;
  height: 10px;
  background: rgba(17, 24, 39, 0.95);
  border-left: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
  transform: rotate(45deg);
}

/* Tooltip natif via title, plus label visuel au survol */
.depth-selector button::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 0.3rem 0.6rem;
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 0.65rem;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

.depth-selector button:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Mobile : depth-selector reste dans le header */
@media (max-width: 768px) {
  .depth-selector {
    margin-left: 0.5rem;
    padding: 0.15rem 0.3rem;
    gap: 0.25rem;
  }
  .depth-selector button {
    width: 34px;
    height: 34px;
  }
  .depth-creature {
    width: 22px;
    height: 22px;
  }
}

/* ─── Transitions de contenu ─── */
[data-level] {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease,
              margin 0.3s ease,
              padding 0.3s ease;
}

/* ─── Mode additif (défaut) : chaque niveau s'ajoute ─── */
.mode-surface [data-level="1"],
.mode-profondeur [data-level="1"],
.mode-profondeur [data-level="2"],
.mode-abysses [data-level="1"],
.mode-abysses [data-level="2"],
.mode-abysses [data-level="3"] {
  max-height: 1200px;
  opacity: 1;
}

/* ─── Mode exclusif : un seul niveau visible (ex: contact) ─── */
/* !important pour surcharger toutes les règles additives */
.level-exclusive [data-level] {
  max-height: 0 !important;
  opacity: 0 !important;
}

.mode-surface .level-exclusive [data-level="1"],
.mode-profondeur .level-exclusive [data-level="2"],
.mode-abysses .level-exclusive [data-level="3"] {
  max-height: 1200px !important;
  opacity: 1 !important;
}

/* Quand aucun mode n'est appliqué sur <html>, tous les data-level restent visibles */
html:not([class*="mode-"]) [data-level],
html:not([class*="mode-"]) .level-exclusive [data-level] {
  max-height: none;
  opacity: 1;
}

/* ─── Signatures visuelles par mode ─── */

/* Surface : plus d'air, plus grand */
.mode-surface {
  --card-bg-opacity: 0.4;
}

.mode-surface .card,
.mode-surface .card-expertise {
  backdrop-filter: blur(4px);
}

.mode-surface section + section {
  padding-top: calc(var(--section-gap) * 1.2);
}

/* Abysses : plus dense, plus sombre, grille subtile */
.mode-abysses {
  --card-bg-opacity: 0.85;
}

.mode-abysses body {
  background-color: #050810;
}

.mode-abysses main {
  background-image: 
    linear-gradient(rgba(201, 169, 76, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 169, 76, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
}

.mode-abysses .card,
.mode-abysses .card-expertise {
  background: rgba(17, 24, 39, 0.85);
  border-color: rgba(201, 169, 76, 0.25);
}

/* Badges techniques : visibles uniquement en abysses */
.tech-badge-inline {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cyan-bright);
  background: rgba(42, 138, 158, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.mode-abysses .tech-badge-inline {
  display: inline;
}

/* Réduction de contenu en mode surface */
.mode-surface .depth-hide-surface,
.mode-profondeur .depth-hide-profondeur,
.mode-abysses .depth-hide-abysses {
  display: none !important;
}

/* Animation ripple au changement de mode */
@keyframes depthRipple {
  0% { box-shadow: 0 0 0 0 currentColor; }
  100% { box-shadow: 0 0 0 18px transparent; }
}

.depth-selector button.switching {
  animation: depthRipple 0.5s ease-out;
}

/* Flash subtil sur le body au changement de mode */
@keyframes depthFlash {
  0% { opacity: 0; }
  15% { opacity: 0.04; }
  100% { opacity: 0; }
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--gold);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
}

/* Stagger sur les badges techniques en mode abysses */
.mode-abysses .tech-badge-inline:nth-child(1) { transition-delay: 0.05s; }
.mode-abysses .tech-badge-inline:nth-child(2) { transition-delay: 0.1s; }
.mode-abysses .tech-badge-inline:nth-child(3) { transition-delay: 0.15s; }
.mode-abysses .tech-badge-inline:nth-child(4) { transition-delay: 0.2s; }

/* Transition douce du fond de page */
body {
  transition: background-color 0.6s ease;
}

main {
  transition: background-image 0.6s ease;
}

/* ═══════════════════════════════════════════
   CRÉATURE GUIDE — Aquarium Électronique
   ═══════════════════════════════════════════ */

.creature-guide {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 210;
  opacity: 0;
  transform: translateY(40px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.creature-guide.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.creature-float {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  will-change: transform;
}

.creature-body {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 2px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.creature-body:hover {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(201, 169, 76, 0.25), 0 8px 32px rgba(0,0,0,0.3);
}

/* Glow selon le mode */
.mode-surface .creature-body {
  border-color: rgba(42, 138, 158, 0.5);
  box-shadow: 0 0 16px rgba(42, 138, 158, 0.2);
}

.mode-profondeur .creature-body {
  border-color: rgba(201, 169, 76, 0.5);
  box-shadow: 0 0 16px rgba(201, 169, 76, 0.2);
}

.mode-abysses .creature-body {
  border-color: rgba(245, 240, 232, 0.3);
  box-shadow: 0 0 16px rgba(245, 240, 232, 0.1);
}

/* SVG créature */
.creature-svg {
  display: block;
  width: 72px;
  height: 72px;
  overflow: visible;
  background: transparent;
}

.creature-svg * {
  vector-effect: non-scaling-stroke;
}

@media (max-width: 768px) {
  .creature-svg { width: 56px; height: 56px; }
}

/* ─── Couleurs par défaut (profondeur/or) ───
   Fallback : la créature est visible même avant que le JS n'applique le mode.
   Les sélecteurs .mode-* ci-dessous surchargent ces règles. ─── */
.creature-bell {
  stroke: #c9a94c;
  fill: rgba(201, 169, 76, 0.08);
}
.creature-circuit {
  stroke: #c9a94c;
  opacity: 0.7;
}
.creature-core {
  fill: #c9a94c;
  stroke: none;
}
.creature-node {
  fill: #c9a94c;
  opacity: 0.8;
}
.creature-tentacle {
  stroke: #c9a94c;
  opacity: 0.5;
}
.creature-tentacle-branch {
  stroke: #c9a94c;
  opacity: 0.35;
}
.creature-glow-dot {
  fill: #e0c96e;
  opacity: 0.85;
}
.creature-tentacle-dot {
  fill: #c9a94c;
  opacity: 0.6;
}

/* ─── 3 modes chromatiques ─── */

/* Surface : Cyan */
.mode-surface .creature-bell {
  stroke: #2a8a9e;
  fill: rgba(42, 138, 158, 0.08);
}
.mode-surface .creature-circuit {
  stroke: #2a8a9e;
  opacity: 0.7;
}
.mode-surface .creature-core {
  fill: #2a8a9e;
  stroke: none;
}
.mode-surface .creature-node {
  fill: #2a8a9e;
  opacity: 0.8;
}
.mode-surface .creature-tentacle {
  stroke: #2a8a9e;
  opacity: 0.5;
}
.mode-surface .creature-tentacle-branch {
  stroke: #2a8a9e;
  opacity: 0.35;
}
.mode-surface .creature-glow-dot {
  fill: #3db8cc;
  opacity: 0.85;
}
.mode-surface .creature-tentacle-dot {
  fill: #2a8a9e;
  opacity: 0.6;
}

/* Profondeur : Or */
.mode-profondeur .creature-bell {
  stroke: #c9a94c;
  fill: rgba(201, 169, 76, 0.08);
}
.mode-profondeur .creature-circuit {
  stroke: #c9a94c;
  opacity: 0.7;
}
.mode-profondeur .creature-core {
  fill: #c9a94c;
  stroke: none;
}
.mode-profondeur .creature-node {
  fill: #c9a94c;
  opacity: 0.8;
}
.mode-profondeur .creature-tentacle {
  stroke: #c9a94c;
  opacity: 0.5;
}
.mode-profondeur .creature-tentacle-branch {
  stroke: #c9a94c;
  opacity: 0.35;
}
.mode-profondeur .creature-glow-dot {
  fill: #e8d5a3;
  opacity: 0.85;
}
.mode-profondeur .creature-tentacle-dot {
  fill: #c9a94c;
  opacity: 0.6;
}

/* Abysses : Argent */
.mode-abysses .creature-bell {
  stroke: #9ca3af;
  fill: rgba(229, 231, 235, 0.06);
}
.mode-abysses .creature-circuit {
  stroke: #9ca3af;
  opacity: 0.7;
}
.mode-abysses .creature-core {
  fill: #e5e7eb;
  stroke: none;
}
.mode-abysses .creature-node {
  fill: #9ca3af;
  opacity: 0.8;
}
.mode-abysses .creature-tentacle {
  stroke: #9ca3af;
  opacity: 0.5;
}
.mode-abysses .creature-tentacle-branch {
  stroke: #9ca3af;
  opacity: 0.35;
}
.mode-abysses .creature-glow-dot {
  fill: #f5f0e8;
  opacity: 0.85;
}
.mode-abysses .creature-tentacle-dot {
  fill: #9ca3af;
  opacity: 0.6;
}

/* Transition douce entre modes */
.creature-svg,
.creature-svg * {
  transition: stroke 0.8s ease, fill 0.8s ease, opacity 0.8s ease;
}

/* ─── Animations Aquarium Électronique — Créature curieuse ─── */

/* Déplacement vivant : elle explore doucement l'espace autour d'elle */
@keyframes creatureWander {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  12% { transform: translate(5px, -6px) rotate(2deg) scale(1.02); }
  24% { transform: translate(-3px, -4px) rotate(-1.5deg) scale(1.01); }
  36% { transform: translate(4px, -8px) rotate(1deg) scale(1.03); }
  48% { transform: translate(-5px, -5px) rotate(-2deg) scale(1.02); }
  60% { transform: translate(2px, -7px) rotate(0.5deg) scale(1.01); }
  72% { transform: translate(-2px, -3px) rotate(-1deg) scale(1.02); }
  84% { transform: translate(3px, -6px) rotate(1.5deg) scale(1.01); }
}

/* Ondulation des tentacules — plus fluide */
@keyframes creatureTentaclesSway {
  0%, 100% { transform: rotate(-1.5deg) translateX(-1px); }
  50% { transform: rotate(1.5deg) translateX(2px); }
}

/* Pulsation bioluminescente */
@keyframes creaturePulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* Scintillement des nodes — irrégulier comme du vivant */
@keyframes creatureFlicker {
  0%, 100% { opacity: 0.8; }
  33% { opacity: 0.3; }
  66% { opacity: 1; }
}

/* Ripple au clic */
@keyframes creatureClick {
  0% { transform: scale(1); }
  30% { transform: scale(0.9); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Applique le wander au conteneur */
.creature-guide.visible .creature-body {
  animation: creatureWander 6s ease-in-out infinite;
}

/* Hover : elle s'approche curieusement */
.creature-body:hover {
  animation: creatureWander 6s ease-in-out infinite, creaturePulse 2s ease-in-out infinite !important;
}

/* Clic : contraction puis expansion */
.creature-body.clicking {
  animation: creatureClick 0.5s ease-out !important;
}

/* Tentacules qui ondulent indépendamment */
.creature-svg .creature-tentacles {
  animation: creatureTentaclesSway 4s ease-in-out infinite;
  transform-origin: 50% 40%;
}

/* Cœur qui pulse */
.creature-svg .creature-core {
  animation: creaturePulse 2.5s ease-in-out infinite;
  transform-origin: 50% 38%;
}

/* Points lumineux avec délais variés */
.creature-svg .creature-glow-dot {
  animation: creaturePulse 3.5s ease-in-out infinite;
}
.creature-svg .creature-glow-dot:nth-child(1) { animation-delay: 0s; }
.creature-svg .creature-glow-dot:nth-child(2) { animation-delay: 0.7s; }
.creature-svg .creature-glow-dot:nth-child(3) { animation-delay: 1.4s; }
.creature-svg .creature-glow-dot:nth-child(4) { animation-delay: 2.1s; }
.creature-svg .creature-glow-dot:nth-child(5) { animation-delay: 2.8s; }

/* Nodes qui scintillent de façon désynchronisée */
.creature-svg .creature-node {
  animation: creatureFlicker 5s ease-in-out infinite;
}
.creature-svg .creature-node:nth-child(1) { animation-delay: 0.2s; }
.creature-svg .creature-node:nth-child(2) { animation-delay: 0.9s; }
.creature-svg .creature-node:nth-child(3) { animation-delay: 1.6s; }
.creature-svg .creature-node:nth-child(4) { animation-delay: 2.3s; }
.creature-svg .creature-node:nth-child(5) { animation-delay: 3.0s; }
.creature-svg .creature-node:nth-child(6) { animation-delay: 3.7s; }

/* Label sous la créature */
.creature-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.4s ease;
}

.creature-guide.visible:hover .creature-label {
  opacity: 1;
  transform: translateY(0);
}

/* Bouton fermeture */
.creature-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: all 0.3s ease;
}

.creature-guide:hover .creature-close {
  opacity: 1;
}

.creature-close:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Mobile — créature discrète et bien positionnée */
@media (max-width: 768px) {
  .creature-guide {
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    right: 12px;
  }
  .creature-body {
    width: 56px;
    height: 56px;
  }
  .creature-svg {
    width: 48px;
    height: 48px;
  }
  .creature-label {
    display: none; /* Pas de label sur mobile (trop petit) */
  }
}

/* Très petits écrans — créature encore plus discrète */
@media (max-width: 360px) {
  .creature-guide {
    bottom: 8px;
    right: 8px;
  }
  .creature-body {
    width: 48px;
    height: 48px;
  }
  .creature-svg {
    width: 40px;
    height: 40px;
  }
}

/* ═══════════════════════════════════════════
   WIDGET DE CONTEXTE — Invite à la curiosité
   ═══════════════════════════════════════════ */

.depth-context {
  position: relative;
  max-width: 520px;
  margin: 2rem auto;
  padding: 1rem 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  text-align: center;
  animation: depthContextIn 0.6s ease-out;
}

@keyframes depthContextIn {
  0% { opacity: 0; transform: translateY(20px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Trait doré scintillant en haut */
.depth-context::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
  animation: depthContextShine 3s ease-in-out infinite;
}

@keyframes depthContextShine {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.9; }
}

.depth-context-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.depth-context-hint {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.depth-context-hint strong {
  color: var(--gold);
  font-weight: 500;
}

.depth-context-modes {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem;
  background: rgba(0,0,0,0.2);
  border-radius: 100px;
}

.depth-context-modes button {
  background: none;
  border: 1px solid transparent;
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.depth-context-modes button:hover {
  border-color: var(--border-subtle);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.depth-context-modes button.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 169, 76, 0.12);
  box-shadow: 0 0 12px rgba(201, 169, 76, 0.15);
}

/* Pulse sur les modes non-actifs pour inviter au clic */
.depth-context-modes button:not(.active) {
  animation: depthContextPulse 2.5s ease-in-out infinite;
}

.depth-context-modes button:nth-child(1):not(.active) { animation-delay: 0s; }
.depth-context-modes button:nth-child(2):not(.active) { animation-delay: 0.8s; }
.depth-context-modes button:nth-child(3):not(.active) { animation-delay: 1.6s; }

@keyframes depthContextPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 76, 0); }
  50% { box-shadow: 0 0 0 4px rgba(201, 169, 76, 0.08); }
}

.depth-context-close {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
  transition: color 0.2s ease;
}

.depth-context-close:hover {
  color: var(--text-primary);
}

/* Masqué quand l'utilisateur l'a fermé */
.depth-context.hidden {
  display: none;
}

/* Mobile */
@media (max-width: 768px) {
  .depth-context {
    margin: 1rem;
    padding: 0.875rem 1rem;
  }
  .depth-context-modes {
    flex-wrap: wrap;
    justify-content: center;
  }
  .depth-context-modes button {
    font-size: 0.7rem;
    padding: 0.35rem 0.6rem;
  }
}

/* ═══════════════════════════════════════════
   TRANSITION THÉÂTRALE — La page se redessine
   ═══════════════════════════════════════════ */

/* Durée paramétrable via JS (défaut 3s) */
.depth-transitioning [data-level],
.depth-transitioning .depth-hide-surface,
.depth-transitioning .depth-hide-profondeur,
.depth-transitioning .depth-hide-abysses {
  transition-duration: 2.5s !important;
  transition-timing-function: cubic-bezier(0.65, 0, 0.35, 1) !important;
}

/* Scanline dorée qui traverse l'écran */
@keyframes depthScanline {
  0% { top: -5%; opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { top: 105%; opacity: 0; }
}

.depth-transitioning::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 15px var(--gold), 0 0 30px var(--gold), 0 0 60px rgba(201, 169, 76, 0.4);
  animation: depthScanline 3s linear forwards;
  z-index: 10000;
  pointer-events: none;
}

/* Les éléments qui changent floutent et rétrécissent avant de renaître */
.depth-transitioning [data-level] {
  filter: blur(3px) !important;
  transform: scale(0.97) !important;
}

/* Les éléments entrants se clarifient avec un stagger naturel */
.depth-transitioning.mode-surface [data-level="1"],
.depth-transitioning.mode-profondeur [data-level="1"],
.depth-transitioning.mode-profondeur [data-level="2"],
.depth-transitioning.mode-abysses [data-level="1"],
.depth-transitioning.mode-abysses [data-level="2"],
.depth-transitioning.mode-abysses [data-level="3"] {
  filter: blur(0) !important;
  transform: scale(1) !important;
}

/* Respect .level-exclusive pendant les transitions */
.depth-transitioning.mode-surface .level-exclusive [data-level="1"],
.depth-transitioning.mode-profondeur .level-exclusive [data-level="2"],
.depth-transitioning.mode-abysses .level-exclusive [data-level="3"] {
  filter: blur(0) !important;
  transform: scale(1) !important;
}

/* Vibration subtile (glitch) pendant la transition */
@keyframes depthGlitch {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-1px); }
  40% { transform: translateX(1px); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
}

.depth-transitioning .card,
.depth-transitioning .card-expertise,
.depth-transitioning .project-card,
.depth-transitioning .timeline-item {
  animation: depthGlitch 0.15s ease-in-out 3;
}

/* Stagger visuel : les sections apparaissent en cascade */
.depth-transitioning section:nth-child(1) [data-level]:not([style*="max-height: 0"]) { transition-delay: 0.0s; }
.depth-transitioning section:nth-child(2) [data-level]:not([style*="max-height: 0"]) { transition-delay: 0.15s; }
.depth-transitioning section:nth-child(3) [data-level]:not([style*="max-height: 0"]) { transition-delay: 0.30s; }
.depth-transitioning section:nth-child(4) [data-level]:not([style*="max-height: 0"]) { transition-delay: 0.45s; }
.depth-transitioning section:nth-child(5) [data-level]:not([style*="max-height: 0"]) { transition-delay: 0.60s; }
.depth-transitioning section:nth-child(6) [data-level]:not([style*="max-height: 0"]) { transition-delay: 0.75s; }
.depth-transitioning section:nth-child(7) [data-level]:not([style*="max-height: 0"]) { transition-delay: 0.90s; }
.depth-transitioning section:nth-child(8) [data-level]:not([style*="max-height: 0"]) { transition-delay: 1.05s; }

/* Overlay de reconstruction : flash très bref */
@keyframes depthRebuild {
  0% { opacity: 0; }
  5% { opacity: 0.06; }
  10% { opacity: 0; }
  50% { opacity: 0.03; }
  100% { opacity: 0; }
}

.depth-transitioning body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--gold);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  animation: depthRebuild 3s ease-out;
}

/* ─── Bioluminescence — effet d'émergence sur les blocs entrants ─── */
@keyframes depthBloom {
  0% {
    box-shadow: 0 0 0 0 transparent;
    border-color: transparent;
  }
  20% {
    box-shadow: 0 0 30px 6px rgba(42, 138, 158, 0.28),
                0 0 70px 14px rgba(201, 169, 76, 0.10),
                inset 0 0 20px rgba(42, 138, 158, 0.06);
    border-color: rgba(201, 169, 76, 0.40);
  }
  45% {
    box-shadow: 0 0 50px 12px rgba(42, 138, 158, 0.18),
                0 0 100px 24px rgba(201, 169, 76, 0.06),
                inset 0 0 30px rgba(42, 138, 158, 0.04);
    border-color: rgba(201, 169, 76, 0.25);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
    border-color: transparent;
  }
}

.depth-bloom {
  animation: depthBloom 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Les cartes et blocs structurés doivent avoir une bordure pour que le bloom soit visible */
[data-level].card,
[data-level].card-expertise,
[data-level].project-card,
[data-level].timeline-item,
[data-level].form-group,
[data-level].nav-card,
[data-level].stat-item {
  border: 1px solid transparent;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  [data-level],
  body,
  main,
  .card,
  .card-expertise,
  .tech-badge-inline {
    transition: none !important;
    animation: none !important;
  }
  .depth-selector button {
    transition: none;
    animation: none !important;
  }
  body::after {
    display: none;
  }
}

/* ============================================
   ARCHITECTE DU RÉEL — Design System 2026
   Direction : Deep Tech, Deep Ocean
   ============================================ */

/* ─── Variables CSS ─── */
:root {
  /* Fonds */
  --abyss: #0a0e1a;
  --deep-ocean: #1a3a5c;
  --navy-card: #111827;

  /* Accents */
  --gold: #c9a94c;
  --gold-bright: #e8d5a3;
  --gold-dim: #8a7340;

  /* Bioluminescence */
  --cyan: #2a8a9e;
  --cyan-bright: #3db8cc;

  /* Texte */
  --text-primary: #f5f0e8;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  /* Fonctionnels */
  --border-subtle: rgba(201, 169, 76, 0.15);
  --border-gold: rgba(201, 169, 76, 0.4);
  --glass-bg: rgba(17, 24, 39, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Typographie */
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: var(--font-sans);

  /* Tailles */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Espacement */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Bordures */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --section-gap: var(--space-16);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ─── Reset ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-secondary);
  background-color: var(--abyss);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ─── Skip link ─── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--gold);
  color: var(--abyss);
  padding: 8px 16px;
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s;
  border-radius: 0 0 var(--radius-md) 0;
}
.skip-link:focus {
  top: 0;
}

/* ─── Layout ─── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

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

/* ─── Header & Navigation — 2 lignes : Marque + Nav ─── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: auto;
  background: rgba(10, 14, 26, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  transition: border-color var(--transition-base);
  overflow: visible;
}

/* Ligne 1 : Marque centrée */
.header-brand {
  text-align: center;
  padding: 0.55rem var(--space-6) 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.header-brand .site-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
  line-height: 1.2;
}
.header-brand .site-title::after {
  content: '•';
  color: var(--gold);
  margin-left: 0.35em;
}

/* Ligne 2 : Navigation */
.header-nav-row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.header-nav-inner nav {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

/* Navigation */
nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: var(--space-1);
  flex-wrap: nowrap;
  align-items: center;
}

nav a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  transition: color var(--transition-fast);
  white-space: nowrap;
}

nav a:hover {
  color: var(--gold);
}

nav a.active {
  color: var(--gold);
  border-bottom: 1px solid var(--gold);
}

/* Switch langue */
.lang a {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.lang a:hover {
  background: var(--gold);
  color: var(--abyss);
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-2);
}

/* ─── Main ─── */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px var(--space-6) var(--space-24);
  min-height: calc(100vh - 200px);
}

/* ─── Hero ─── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-16) var(--space-6);
  position: relative;
  background: var(--abyss);
  overflow: hidden;
  margin-top: -120px;
  padding-top: calc(var(--space-16) + 120px);
}

.hero.full-bleed {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero backgrounds multi-mode (crossfade) */
.hero-bg-mode {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 3s ease;
}

.mode-surface .hero-bg-mode[data-bg-mode="surface"],
.mode-profondeur .hero-bg-mode[data-bg-mode="profondeur"],
.mode-abysses .hero-bg-mode[data-bg-mode="abysses"] {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,14,26,0.3) 0%, rgba(10,14,26,0.7) 100%);
  z-index: 1;
}

.hero > *:not(.hero-bg):not(.hero-overlay):not(#particles-canvas) {
  position: relative;
  z-index: 2;
}

/* Hero compact (pages secondaires) */
.hero-compact {
  min-height: 60vh;
  padding: var(--space-12) var(--space-6);
  margin-top: -120px;
  padding-top: calc(var(--space-12) + 120px);
}

.hero-compact .quote-hero {
  border: none;
  padding: 0;
  margin: 0;
  max-width: 700px;
}

/* Hero badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: var(--space-2) var(--space-4);
  background: rgba(201, 169, 76, 0.12);
  color: var(--gold);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.08em;
  border: 1px solid var(--border-subtle);
  margin-bottom: var(--space-6);
}

/* Hero H1 */
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--space-6);
}

.hero h1 .tech {
  font-family: var(--font-mono);
  color: var(--gold);
  font-style: normal;
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto var(--space-8);
  line-height: 1.8;
}

/* Hero tags */
.hero-tags {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.tag {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: rgba(201, 169, 76, 0.12);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  border-radius: 100px;
  border: 1px solid var(--border-subtle);
}

/* Hero actions */
.hero-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Stats ─── */
.stats {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.stats-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.15;
}
.stats-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 1;
}

.stat-item {
  background: var(--abyss);
  padding: var(--space-8) var(--space-6);
  text-align: center;
}

.stat-value {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--gold);
  display: block;
  line-height: 1;
}

.stat-label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-2);
}

/* ─── Section titles ─── */
.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: var(--space-4);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  line-height: 1.2;
}

.section-title .tech {
  font-family: var(--font-mono);
  color: var(--gold);
  font-style: normal;
}

.section-intro {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 700px;
  margin-bottom: var(--space-12);
}

/* ─── Cards (Glassmorphism) ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.card-expertise {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}

@supports not (backdrop-filter: blur(16px)) {
  .card-expertise {
    background: var(--navy-card);
  }
}

.card-expertise::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-6);
  right: var(--space-6);
  height: 1px;
  background: var(--gold);
  opacity: 0.3;
  transition: all var(--transition-slow);
}

.card-expertise:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(10, 14, 26, 0.5),
              0 0 40px rgba(201, 169, 76, 0.08);
}

.card-expertise:hover::before {
  opacity: 1;
  left: 0;
  right: 0;
}

.card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 169, 76, 0.1);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: var(--space-4);
}

.card-expertise h3 {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.card-expertise p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.card-link {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--gold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: gap var(--transition-fast);
}
.card-link:hover {
  gap: var(--space-3);
}
.card-link::after {
  content: '→';
}

/* ─── Navigation Grid (explorer) ─── */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.nav-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-base);
}

@supports not (backdrop-filter: blur(12px)) {
  .nav-card {
    background: var(--navy-card);
  }
}

.nav-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}

.nav-card-icon {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gold);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 169, 76, 0.1);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.nav-card-text {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
}

/* ─── Boutons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--abyss);
  color: var(--gold);
  border: 1px solid var(--gold);
}
.btn-primary:hover {
  background: var(--gold);
  color: var(--abyss);
  box-shadow: 0 0 30px rgba(201, 169, 76, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-muted);
}
.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ─── Compatibilité anciennes classes ─── */
.btn-accent {
  background: var(--gold);
  color: var(--abyss);
  border: 1px solid var(--gold);
}
.btn-accent:hover {
  background: var(--gold-bright);
  color: var(--abyss);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-sm);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-muted);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-light {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-muted);
}
.btn-light:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.cta-box {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin: var(--space-12) 0;
}

@supports not (backdrop-filter: blur(12px)) {
  .cta-box {
    background: var(--navy-card);
  }
}

.cta-box h2 {
  margin-bottom: var(--space-4);
}
.cta-box p {
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

/* ─── Typography ─── */
h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: var(--space-4);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 600;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 600;
}

h3 {
  font-size: var(--text-xl);
  font-weight: 500;
}

p {
  margin-bottom: var(--space-4);
}

.lead {
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Lists */
ul, ol {
  margin-left: var(--space-6);
  margin-bottom: var(--space-6);
}
li {
  margin-bottom: var(--space-2);
}

/* Numbered list (dorée) */
.numbered-list {
  list-style: none;
  margin-left: 0;
  padding: 0;
}
.numbered-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--glass-border);
}
.numbered-list li:last-child {
  border-bottom: none;
}
.numbered-list .number {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gold);
  width: 32px;
  flex-shrink: 0;
}

/* ─── Blockquote ─── */
blockquote {
  border-left: 2px solid var(--gold);
  padding-left: var(--space-6);
  margin: var(--space-12) 0;
}

blockquote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

blockquote cite {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--text-muted);
}

.blockquote-3xl p {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

/* ─── CTA Section ─── */
.cta-section {
  text-align: center;
  padding: var(--space-24) var(--space-6);
}

.cta-section h2 {
  margin-bottom: var(--space-4);
}

.cta-section p {
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

.cta-coords {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
  margin-top: var(--space-8);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ─── Footer ─── */
footer {
  background: var(--abyss);
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-12) var(--space-6);
  border-top: 1px solid var(--border-subtle);
  position: relative;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

footer::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  height: 40px;
  background: url('assets/asset_wave_circuit_divider.jpg') center top / contain no-repeat;
  opacity: 0.25;
  pointer-events: none;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
}
.footer-links a:hover {
  color: var(--gold);
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Reveal au scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger pour les grilles */
.reveal:nth-child(1) { transition-delay: 0s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal:nth-child(6) { transition-delay: 0.5s; }
.reveal:nth-child(7) { transition-delay: 0.6s; }
.reveal:nth-child(8) { transition-delay: 0.7s; }
.reveal:nth-child(9) { transition-delay: 0.8s; }

/* Animation simple (chargement) */
.animate-fade-in {
  animation: fadeIn 0.8s ease forwards;
}

/* ─── Particules canvas ─── */
#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ─── Utilities ─── */
.text-center { text-align: center; }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold); }
.text-cyan { color: var(--cyan); }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.ml-4 { margin-left: var(--space-4); }

/* ─── Responsive ─── */
@media (max-width: 1023px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --space-24: 4rem;
    --space-20: 3rem;
    --space-16: 2rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(16px);
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
    gap: var(--space-2);
  }

  .nav-links.nav-open {
    display: flex;
  }

  .nav-links a {
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--glass-border);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .lang {
    margin-left: 0;
  }

  .lang a {
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
  }

  nav {
    gap: 0.5rem;
  }

  header {
    padding: 0;
  }

  .site-title {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
  }

  .header-brand {
    padding: 0.4rem var(--space-4);
  }

  .header-nav-row {
    padding: 0 var(--space-4);
  }

  .header-nav-inner nav {
    height: 44px;
  }

  main {
    padding: 110px var(--space-4) var(--space-12);
  }

  [id] {
    scroll-margin-top: 80px;
  }

  .hero {
    min-height: 90vh;
    margin-top: -80px;
    padding: calc(var(--space-12) + 80px) var(--space-4) var(--space-12);
  }

  .hero-compact {
    margin-top: -80px;
    padding-top: calc(var(--space-12) + 80px);
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  .card-grid {
    grid-template-columns: 1fr;
  }

  .nav-grid {
    grid-template-columns: 1fr;
  }

  .cta-coords {
    flex-direction: column;
    gap: var(--space-4);
  }

  .reveal {
    transform: translateY(15px);
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-value {
    font-size: 2rem;
  }
}

/* ─── Layouts spécifiques pages ─── */
.two-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-12);
  align-items: start;
}

.stats-inline {
  display: flex;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.stat-inline-item {
  text-align: center;
}

.stat-inline-value {
  font-family: var(--font-serif);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--gold);
  display: block;
  line-height: 1;
}

.stat-inline-label {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-subtitle {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.no-padding-top {
  padding-top: 0;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.image-grid figure {
  margin: 0;
}

.image-grid img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
}

.image-grid figcaption {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-4);
}

.img-cool {
  filter: saturate(0.8) hue-rotate(-10deg);
}

/* ─── Anciennes classes (compatibilité) ─── */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

@supports not (backdrop-filter: blur(16px)) {
  .card {
    background: var(--navy-card);
  }
}

.card-full {
  width: 100%;
}

.card-dark {
  background: var(--navy-card);
  border-color: var(--glass-border);
}

.text-white-muted {
  color: var(--text-secondary);
}

.text-xl {
  font-size: var(--text-xl);
}

.text-lg {
  font-size: var(--text-lg);
}

.text-sm {
  font-size: var(--text-sm);
}

.mt-0 {
  margin-top: 0;
}

.mt-4 {
  margin-top: var(--space-4);
}

.mt-8 {
  margin-top: var(--space-8);
}

.m-0 {
  margin-bottom: 0;
}

.link-underline {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color var(--transition-fast);
}
.link-underline:hover {
  border-color: var(--gold);
}

.cta-box-dark {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  background: var(--navy-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin: var(--space-12) 0;
}

.cta-box-dark h2 {
  margin-bottom: var(--space-4);
}
.cta-box-dark p {
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-8) 0;
}

.table th,
.table td {
  padding: var(--space-4) var(--space-6);
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.table th {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  background: var(--navy-card);
}

.table td {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.table tbody tr:hover {
  background: rgba(201, 169, 76, 0.05);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
}

.contact-item {
  padding: var(--space-6);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

@supports not (backdrop-filter: blur(12px)) {
  .contact-item {
    background: var(--navy-card);
  }
}

.contact-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: var(--space-2);
}

.contact-value {
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.contact-value a {
  color: var(--gold);
  text-decoration: none;
}
.contact-value a:hover {
  text-decoration: underline;
}

.icon-container {
  text-align: center;
  padding: var(--space-8) var(--space-6);
}

.icon-3xl {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
}

.label-accent {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: var(--space-2);
}

.blockquote {
  border-left: 2px solid var(--gold);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--text-primary);
}

/* ─── Grid System ─── */
.grid {
  display: grid;
  gap: var(--space-6);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

/* ─── Timeline ─── */
.timeline {
  position: relative;
  margin: var(--space-8) 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-subtle);
}
.timeline-item {
  position: relative;
  padding-left: var(--space-8);
  padding-bottom: var(--space-8);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -4px;
  top: var(--space-2);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--abyss);
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}
.timeline-content h3 {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.timeline-content p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

/* ─── Animations ─── */
.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.animate-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-delay-1 { transition-delay: 0.15s; }
.animate-delay-2 { transition-delay: 0.3s; }
.animate-delay-3 { transition-delay: 0.45s; }

/* ─── Text utilities ─── */
.text-accent { color: var(--gold); }
.text-white { color: var(--text-primary); }
.text-light { color: var(--text-secondary); }

/* ─── Badge ─── */
.badge {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: rgba(201, 169, 76, 0.12);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  border-radius: 100px;
  border: 1px solid var(--border-subtle);
  line-height: 1.4;
}

/* ─── Badge variants ─── */
.badge-warning {
  background: rgba(201, 169, 76, 0.2);
  color: var(--gold-bright);
  border-color: var(--border-gold);
}
.badge-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

/* ─── Flex utilities ─── */
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-start { align-items: flex-start; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-2xl { max-width: 700px; }

/* ─── Stack ─── */
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}
.stack-category {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--glass-border);
}
.stack-category-title {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: var(--space-4);
}

/* ─── Project Cards ─── */
.project-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  transition: all var(--transition-slow);
}
@supports not (backdrop-filter: blur(16px)) {
  .project-card { background: var(--navy-card); }
}
.project-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
  box-shadow: 0 20px 60px rgba(10, 14, 26, 0.5), 0 0 40px rgba(201, 169, 76, 0.08);
}
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}
.project-title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
}
.project-role {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.project-meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.project-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ─── CTA Section variants ─── */
.cta {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin: var(--space-12) 0;
}
@supports not (backdrop-filter: blur(12px)) {
  .cta { background: var(--navy-card); }
}
.cta-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}
.cta-text {
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.cta-accent {
  background: rgba(201, 169, 76, 0.08);
  border-color: var(--border-gold);
}
.cta-dark {
  background: var(--navy-card);
  border-color: var(--glass-border);
}

/* ─── Principles (moi.php) ─── */
.principle {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--glass-border);
}
.principle:last-child {
  border-bottom: none;
}
.principle-number {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
  width: 40px;
}
.principle-title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.principle-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}
.blockquote-center {
  text-align: center;
  border-left: none;
  padding-left: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--text-primary);
  margin: var(--space-12) 0;
}

/* ─── Feature Cards (moi.php) ─── */
.feature-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}
@supports not (backdrop-filter: blur(12px)) {
  .feature-card { background: var(--navy-card); }
}
.feature-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}
.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 169, 76, 0.1);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gold);
  flex-shrink: 0;
}
.feature-content h3 {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.feature-content p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ─── Card title & text (compatibilité) ─── */
.card-title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.card-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Margin utilities ─── */
.mt-2 { margin-top: var(--space-2); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-6 { margin-bottom: var(--space-6); }
.pb-0 { padding-bottom: 0; }

/* ─── Text size utilities ─── */
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.font-bold { font-weight: 700; }

/* ─── Feature Card Compact ─── */
.feature-card-compact {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}
@supports not (backdrop-filter: blur(12px)) {
  .feature-card-compact { background: var(--navy-card); }
}
.feature-card-compact:hover {
  border-color: var(--border-gold);
}
.feature-card-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ─── Card header flex ─── */
.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

/* ─── Badge critical ─── */
.badge-critical {
  background: rgba(220, 38, 38, 0.15);
  color: #ef4444;
  border-color: rgba(220, 38, 38, 0.3);
}

/* ─── Result box ─── */
.result-box {
  text-align: center;
  padding: var(--space-8) var(--space-6);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin: var(--space-8) 0;
}
@supports not (backdrop-filter: blur(12px)) {
  .result-box { background: var(--navy-card); }
}

/* ─── Button small ─── */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

/* ─── Alerts ─── */
.alert {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
}
.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}
.alert-error {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.3);
  color: #f87171;
}

/* ─── Wave divider ─── */
.wave-divider {
  width: 100%;
  height: 80px;
  background: url('assets/asset_wave_circuit_divider.jpg') center / cover no-repeat;
  opacity: 0.25;
  margin: var(--space-12) 0;
}

/* ─── Landing Hero (pages audit/offres) ─── */
.landing-hero {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  background: var(--abyss);
  position: relative;
  overflow: hidden;
  margin-top: -120px;
  padding-top: calc(var(--space-16) + 120px);
}
.landing-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--space-6);
}
.landing-hero h1 span {
  font-family: var(--font-mono);
  color: var(--gold);
  font-style: normal;
}
.hero-subtitle-center {
  max-width: 700px;
  margin: 0 auto var(--space-8);
  text-align: center;
}

/* ─── Check list ─── */
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.check-list li {
  position: relative;
  padding-left: var(--space-8);
  padding-bottom: var(--space-3);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-weight: 600;
}

/* ─── Price box ─── */
.price-box {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}
@supports not (backdrop-filter: blur(12px)) {
  .price-box { background: var(--navy-card); }
}
.price {
  font-family: var(--font-serif);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.price-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── Timeline variants (pages audit) ─── */
.timeline-title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.timeline-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── Print ─── */
@media print {
  header {
    position: static;
    background: white;
    color: black;
  }
  .site-title {
    color: black;
  }
  nav {
    display: none;
  }
  main {
    padding: 0;
  }
  .card-expertise {
    box-shadow: none;
    border: 1px solid #ddd;
    background: white;
  }
}


/* ═══════════════════════════════════════════
   FORMULAIRE — Styles cohérents avec le design system
   ═══════════════════════════════════════════ */

.form-card {
  max-width: 720px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.form-group {
  margin-bottom: var(--space-6);
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: var(--space-2);
}

.form-label .required {
  color: var(--cyan-bright);
  margin-left: 0.25rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  line-height: 1.6;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  outline: none;
  appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
  border-color: var(--border-gold);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 76, 0.12), 0 0 20px rgba(201, 169, 76, 0.06);
  background: rgba(17, 24, 39, 0.75);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23c9a94c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

.form-select option {
  background: var(--navy-card);
  color: var(--text-primary);
}

.honeypot {
  display: none !important;
}

.form-errors {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-6);
}

.form-errors ul {
  margin: 0;
  padding-left: var(--space-5);
  color: #fca5a5;
  font-size: 0.9rem;
}

.form-success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-8);
  margin-bottom: var(--space-6);
  text-align: center;
}

.form-success-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-3);
  display: block;
}

.form-success h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin: 0 0 var(--space-2);
}

.form-success p {
  color: var(--text-secondary);
  margin: 0;
}

.form-submit {
  margin-top: var(--space-4);
}

/* Responsive formulaire */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .form-card {
    padding: var(--space-6);
  }
}


/* =========================================================
   LE RIVAGE — Styles spécifiques niveau n-1
   ========================================================= */

/* Variables spécifiques Rivage */
:root {
  --rivage-bg: #F5F0E8;
  --rivage-bg-warm: #EDE6D6;
  --rivage-text: #1E293B;
  --rivage-text-soft: #475569;
  --rivage-accent: #C9A94C;
  --rivage-accent-soft: #D4B896;
  --rivage-border: rgba(201, 169, 76, 0.25);
  --rivage-card-bg: rgba(255, 252, 247, 0.9);
  --rivage-cyan-muted: #7EB8C2;
  --rivage-sand: #C4B49A;
}

/* Lien Rivage dans la nav */
.nav-rivage-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 1rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--rivage-accent);
  background: rgba(201, 169, 76, 0.1);
  border: 1px solid var(--rivage-border);
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.nav-rivage-link:hover {
  background: rgba(201, 169, 76, 0.2);
  border-color: var(--rivage-accent);
  box-shadow: 0 0 12px rgba(201, 169, 76, 0.15);
}
@media (max-width: 1023px) {
  .nav-rivage-link {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

/* Overrides créature sur fond clair (Rivage) */
.rivage-page .creature-bell {
  stroke: #B8976A;
  fill: rgba(184, 151, 106, 0.08);
}
.rivage-page .creature-circuit {
  stroke: #C9A94C;
  opacity: 0.6;
}
.rivage-page .creature-core {
  fill: #2a8a9e;
  stroke: none;
}
.rivage-page .creature-node {
  fill: #C9A94C;
  opacity: 0.8;
}
.rivage-page .creature-glow-dot {
  fill: #E8D5A3;
  opacity: 0.85;
}

/* ─── Hero Rivage ─── */
.rivage-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-12) var(--space-6);
  background: linear-gradient(160deg, var(--rivage-bg) 0%, var(--rivage-bg-warm) 100%);
  overflow: hidden;
}
.rivage-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('assets/asset_rivage_regard_plongeur.jpg') center/cover no-repeat;
  opacity: 0.45;
  filter: saturate(0.9);
}
.rivage-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(245,240,232,0.3) 0%, rgba(245,240,232,0.7) 60%, var(--rivage-bg) 100%);
}
.rivage-hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}
.rivage-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  color: var(--rivage-text);
  line-height: 1.15;
  margin-bottom: var(--space-6);
}
.rivage-hero .subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--rivage-text-soft);
  line-height: 1.6;
  margin-bottom: var(--space-8);
}
.rivage-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}
.rivage-hero-cta .btn-primary {
  background: var(--rivage-accent);
  color: #fff;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}
.rivage-hero-cta .btn-primary:hover {
  background: #b08d3a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 169, 76, 0.25);
}
.rivage-hero-cta .btn-secondary {
  background: transparent;
  color: var(--rivage-text-soft);
  padding: 0.9rem 2rem;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--rivage-border);
}
.rivage-hero-cta .btn-secondary:hover {
  border-color: var(--rivage-accent);
  color: var(--rivage-accent);
}

/* ─── Sections Rivage avec images de fond ─── */
.rivage-section {
  position: relative;
  padding: var(--space-16) var(--space-6);
  overflow: hidden;
}
.rivage-section-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  filter: saturate(0.85);
}
.rivage-section-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--rivage-bg) 0%, rgba(245,240,232,0.85) 50%, var(--rivage-bg) 100%);
}
.rivage-section-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}

/* ─── Diagnostic ─── */
.diagnostic-container {
  max-width: 720px;
  margin: 0 auto;
  background: var(--rivage-card-bg);
  border: 1px solid var(--rivage-border);
  border-radius: 16px;
  padding: var(--space-8);
  backdrop-filter: blur(12px);
}
.diagnostic-step {
  display: none;
}
.diagnostic-step.active {
  display: block;
  animation: slideIn 0.4s ease-out;
}
.diagnostic-step h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--rivage-text);
  margin-bottom: var(--space-4);
  text-align: center;
}
.diagnostic-progress {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  justify-content: center;
}
.diagnostic-progress-bar {
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: var(--rivage-border);
  transition: background 0.3s ease;
}
.diagnostic-progress-bar.active {
  background: var(--rivage-accent);
}

/* Grilles de sélection */
.profile-grid, .situation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.profile-card, .situation-card {
  padding: var(--space-6) var(--space-4);
  border: 2px solid transparent;
  border-radius: 12px;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}
.profile-card:hover, .profile-card.selected,
.situation-card:hover, .situation-card.selected {
  border-color: var(--rivage-accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(201, 169, 76, 0.12);
  background: rgba(255,255,255,0.9);
}
.profile-card .icon {
  font-size: 2rem;
  margin-bottom: var(--space-2);
}
.profile-card .label {
  font-weight: 500;
  color: var(--rivage-text);
  font-size: 0.95rem;
}
.profile-card .desc {
  font-size: 0.8rem;
  color: var(--rivage-text-soft);
  margin-top: var(--space-1);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}
.profile-card:hover .desc {
  opacity: 1;
  max-height: 60px;
  margin-top: var(--space-2);
}

/* Boutons diagnostic */
.diagnostic-nav {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-6);
  gap: var(--space-4);
}
.diagnostic-nav button {
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}
.diagnostic-nav .btn-next {
  background: var(--rivage-accent);
  color: #fff;
}
.diagnostic-nav .btn-next:hover {
  background: #b08d3a;
}
.diagnostic-nav .btn-back {
  background: transparent;
  color: var(--rivage-text-soft);
  border: 1px solid var(--rivage-border);
}
.diagnostic-nav .btn-back:hover {
  border-color: var(--rivage-accent);
  color: var(--rivage-accent);
}

/* Résultats */
.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.result-card {
  background: white;
  border: 1px solid var(--rivage-border);
  border-radius: 12px;
  padding: var(--space-6);
  transition: transform 0.3s ease;
}
.result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(201, 169, 76, 0.1);
}
.result-card h4 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--rivage-text);
  margin-bottom: var(--space-2);
}
.result-card .plain {
  color: var(--rivage-text-soft);
  font-size: 0.9rem;
  margin-bottom: var(--space-3);
}
.result-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-4);
}
.result-card ul li {
  padding: 0.25rem 0;
  font-size: 0.85rem;
  color: var(--rivage-text-soft);
}
.result-card ul li::before {
  content: '✓';
  color: var(--rivage-accent);
  margin-right: 0.5rem;
  font-weight: 600;
}
.result-card .actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.result-card .actions a,
.result-card .actions button {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: var(--font-sans);
}
.result-card .actions a.primary,
.result-card .actions button.primary {
  background: var(--rivage-accent);
  color: #fff;
  border: none;
}
.result-card .actions a.primary:hover,
.result-card .actions button.primary:hover {
  background: #b08d3a;
}
.result-card .actions a.secondary,
.result-card .actions button.secondary {
  background: transparent;
  color: var(--rivage-text-soft);
  border: 1px solid var(--rivage-border);
}
.result-card .actions a.secondary:hover,
.result-card .actions button.secondary:hover {
  border-color: var(--rivage-accent);
  color: var(--rivage-accent);
}

/* ─── Transparence / "Ce que je ne suis pas" ─── */
.rivage-transparency {
  max-width: 680px;
  margin: 0 auto;
}
.rivage-transparency-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--rivage-border);
  align-items: center;
}
.rivage-transparency-row:last-child {
  border-bottom: none;
}
.rivage-transparency-row .no {
  font-weight: 500;
  color: var(--rivage-text-soft);
  font-size: 0.95rem;
}
.rivage-transparency-row .yes {
  color: var(--rivage-text);
  font-size: 0.95rem;
}
.rivage-transparency-row .yes strong {
  color: var(--rivage-accent);
}
@media (max-width: 640px) {
  .rivage-transparency-row {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
}

/* ─── Témoignages ─── */
.rivage-story {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-6);
  background: rgba(255,255,255,0.85);
  border-radius: 12px;
  border-left: 3px solid var(--rivage-accent);
  box-shadow: 0 2px 12px rgba(30, 41, 59, 0.06);
}
.rivage-story p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--rivage-text);
  margin: 0;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}
.rivage-story .author {
  margin-top: var(--space-3);
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.85rem;
  color: var(--rivage-text-soft);
  font-weight: 500;
}

/* ─── Contact / Premier rendez-vous ─── */
.rivage-contact-cta {
  text-align: center;
}
.rivage-contact-cta .checklist {
  display: inline-flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-6) 0;
  text-align: left;
}
.rivage-contact-cta .checklist li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.95rem;
  color: var(--rivage-text-soft);
}
.rivage-contact-cta .checklist li .check {
  color: var(--rivage-accent);
  font-weight: 600;
  font-size: 1.1rem;
}

/* ─── Checklist générique (utilisée dans le voyage) ─── */
.checklist {
  display: inline-flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-6) 0;
  text-align: left;
  list-style: none;
  padding: 0;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.95rem;
  color: var(--rivage-text-soft);
}
.checklist li .check {
  color: var(--rivage-accent);
  font-weight: 600;
  font-size: 1.1rem;
}

/* ─── Animations ─── */
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Responsive Rivage */
@media (max-width: 768px) {
  .rivage-hero {
    min-height: 70vh;
    padding: var(--space-8) var(--space-4);
  }
  .diagnostic-container {
    padding: var(--space-5);
  }
  .profile-grid, .situation-grid {
    grid-template-columns: 1fr 1fr;
  }
  .result-cards {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .profile-grid, .situation-grid {
    grid-template-columns: 1fr;
  }
  .rivage-hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  .rivage-hero-cta a {
    text-align: center;
  }
}


/* Bandeau contextuel Rivage sur les pages d'offre */
.rivage-context-banner {
  background: linear-gradient(90deg, rgba(245,240,232,0.95) 0%, rgba(237,230,214,0.95) 100%);
  border-bottom: 1px solid var(--rivage-border);
  padding: 0.75rem var(--space-6);
  text-align: center;
  font-size: 0.9rem;
  color: var(--rivage-text-soft);
}
.rivage-context-banner p { margin: 0; }
.rivage-context-banner a {
  color: var(--rivage-accent);
  text-decoration: underline;
  font-weight: 500;
}
.rivage-context-banner a:hover { color: #b08d3a; }


/* =========================================================
   HIRONDELLE DU RIVAGE — Bulle guide douce
   ========================================================= */

.creature-guide-bubble {
  position: fixed;
  bottom: 110px;
  right: 24px;
  max-width: 260px;
  padding: 1rem 1.25rem;
  background: rgba(255, 252, 247, 0.96);
  border: 1px solid var(--rivage-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  font-size: 0.9rem;
  color: var(--rivage-text);
  line-height: 1.5;
  z-index: 211;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.creature-guide-bubble.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.creature-guide-bubble-tail {
  position: absolute;
  bottom: -7px;
  right: 30px;
  width: 14px;
  height: 14px;
  background: rgba(255, 252, 247, 0.96);
  border-right: 1px solid var(--rivage-border);
  border-bottom: 1px solid var(--rivage-border);
  transform: rotate(45deg);
}
.creature-guide-bubble-close {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  border: none;
  color: var(--rivage-text-soft);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.creature-guide-bubble-close:hover {
  background: rgba(201, 169, 76, 0.15);
  color: var(--rivage-accent);
}
.creature-guide-bubble-text {
  display: block;
  padding-right: 1rem;
}

/* Effet de pulsation douce sur la créature quand elle a un message */
.rivage-page .creature-body {
  animation: creature-breathe 3s ease-in-out infinite;
}
@keyframes creature-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* Sur mobile, la bulle est plus discrète */
@media (max-width: 768px) {
  .creature-guide-bubble {
    max-width: 200px;
    font-size: 0.8rem;
    bottom: 90px;
    right: 12px;
  }
}


/* =========================================================
   VOYAGE NARRATIF DU RIVAGE — Wizard plein écran v2
   ========================================================= */

.journey-container {
  position: relative;
  min-height: 100vh;
}

/* Barre de progression en haut — plus visible */
.journey-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(201, 169, 76, 0.12);
  z-index: 200;
  backdrop-filter: blur(2px);
}
.journey-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--rivage-accent), #e8d5a3, var(--rivage-accent));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px rgba(201, 169, 76, 0.35);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Bouton retour — plus élégant */
.journey-back {
  position: fixed;
  top: 80px;
  left: 24px;
  z-index: 150;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(201, 169, 76, 0.35);
  background: rgba(255, 252, 247, 0.85);
  backdrop-filter: blur(8px);
  color: var(--rivage-accent);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(30, 41, 59, 0.08);
}
.journey-back:hover {
  background: var(--rivage-accent);
  color: #fff;
  border-color: var(--rivage-accent);
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 169, 76, 0.3);
}

/* Étapes */
.journey-stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.7s ease, visibility 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateY(16px) scale(1.01);
  z-index: 10;
}
.journey-stage.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  z-index: 20;
}
.journey-stage-scrollable {
  align-items: flex-start;
  overflow-y: auto;
  padding-top: 100px;
  padding-bottom: 140px;
}
.journey-stage-scrollable.active {
  overflow-y: auto;
}

/* Barre CTA fixe en bas des étapes scrollables */
.journey-cta-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: var(--space-4) var(--space-6);
  background: linear-gradient(to top, rgba(245,240,232,0.98) 0%, rgba(245,240,232,0.92) 60%, rgba(245,240,232,0) 100%);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  pointer-events: none;
}
.journey-cta-bar > * {
  pointer-events: auto;
}
.journey-cta-bar .journey-btn-primary,
.journey-cta-bar .journey-btn-secondary {
  margin: 0;
}

/* Animation pulsante subtile sur le CTA Continuer —
   désactivée si l'utilisateur préfère réduire les animations (a11y) */
@media (prefers-reduced-motion: no-preference) {
  @keyframes cta-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(201, 169, 76, 0.25); }
    50% { transform: scale(1.03); box-shadow: 0 6px 24px rgba(201, 169, 76, 0.4); }
  }
  .journey-cta-bar .journey-btn-primary {
    animation: cta-pulse 2.5s ease-in-out infinite;
  }
}
.journey-cta-bar .journey-btn-primary:hover {
  animation: none;
  transform: translateY(-3px) scale(1.02);
}

/* Sur les stages scrollables : fond plus opaque pour la lisibilité */
.journey-stage-scrollable .journey-content {
  background: rgba(255, 252, 247, 0.9);
  backdrop-filter: blur(24px);
}

/* Renforcer l'overlay sur les stages scrollables */
.journey-stage-scrollable .journey-overlay {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(245,240,232,0.35) 0%, rgba(245,240,232,0.6) 50%, rgba(245,240,232,0.88) 100%);
}

/* Fond — image bien plus visible */
.journey-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.85;
  filter: saturate(1.1) contrast(1.08);
  transform: scale(1.05);
  transition: transform 8s ease-out;
}
.journey-stage.active .journey-bg {
  transform: scale(1);
}

/* Overlay — subtil, laisse l'image respirer */
.journey-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(245,240,232,0.18) 0%, rgba(245,240,232,0.45) 50%, rgba(245,240,232,0.75) 100%);
}

/* Contenu — fond glassmorphism chaud */
.journey-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  text-align: center;
  width: 100%;
  padding: var(--space-8) var(--space-6);
  border-radius: 24px;
  background: rgba(255, 252, 247, 0.55);
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(201, 169, 76, 0.15);
  box-shadow:
    0 24px 64px rgba(30, 41, 59, 0.08),
    0 1px 3px rgba(30, 41, 59, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

/* Desktop : contenu à gauche pour laisser l'Hirondelle visible à droite */
@media (min-width: 1024px) {
  .journey-content {
    margin-left: 7%;
    margin-right: auto;
    text-align: left;
    max-width: 720px;
    align-self: center;
  }
  .journey-stage-scrollable .journey-content {
    align-self: flex-start;
  }
  .journey-content h1,
  .journey-content h2 {
    text-align: left;
  }
  .journey-lead,
  .journey-sub {
    text-align: left;
  }
}

/* Sur le hero (scène 0) et contact (scène 7) : pas de fond, juste le texte avec ombre forte */
#stage-welcome .journey-content,
#stage-contact .journey-content {
  background: transparent;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
}
#stage-welcome .journey-content h1,
#stage-welcome .journey-content .journey-lead,
#stage-contact .journey-content h2,
#stage-contact .journey-content .journey-sub {
  text-shadow: 0 2px 24px rgba(245, 240, 232, 0.95), 0 1px 6px rgba(245, 240, 232, 0.8);
}

/* Sur les scènes avec beaucoup de cartes : fond léger pour laisser l'image vivre */
#stage-profile .journey-content,
#stage-situation .journey-content,
#stage-urgency .journey-content {
  background: rgba(255, 252, 247, 0.4);
}

.journey-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 600;
  color: var(--rivage-text);
  line-height: 1.1;
  margin-bottom: var(--space-5);
  text-shadow: 0 2px 20px rgba(245, 240, 232, 0.9), 0 1px 4px rgba(245, 240, 232, 0.6);
}
.journey-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 600;
  color: var(--rivage-text);
  line-height: 1.15;
  margin-bottom: var(--space-5);
  text-shadow: 0 2px 16px rgba(245, 240, 232, 0.9), 0 1px 3px rgba(245, 240, 232, 0.5);
}
.journey-lead {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  color: var(--rivage-text);
  line-height: 1.65;
  margin-bottom: var(--space-8);
  font-weight: 400;
  text-shadow: 0 1px 12px rgba(245, 240, 232, 0.8);
}
.journey-sub {
  font-size: 1.05rem;
  color: var(--rivage-text-soft);
  line-height: 1.7;
  margin-bottom: var(--space-6);
  text-shadow: 0 1px 10px rgba(245, 240, 232, 0.7);
}
.journey-hint {
  margin-top: var(--space-6);
  font-size: 0.9rem;
  color: var(--rivage-text-soft);
}
.journey-hint a {
  color: var(--rivage-text-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: all 0.3s ease;
}
.journey-hint a:hover {
  color: var(--rivage-accent);
}

/* Badge étape — plus chic */
.journey-step-badge {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  background: rgba(201, 169, 76, 0.1);
  border: 1px solid rgba(201, 169, 76, 0.25);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--rivage-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-5);
  backdrop-filter: blur(4px);
}

/* Boutons du voyage — plus premium */
.journey-btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #C9A94C 0%, #B8973E 100%);
  color: #fff;
  padding: 1rem 2.6rem;
  border-radius: 12px;
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(201, 169, 76, 0.25), 0 1px 2px rgba(0,0,0,0.05);
  letter-spacing: 0.01em;
}
.journey-btn-primary:hover {
  background: linear-gradient(135deg, #B8973E 0%, #A68332 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(201, 169, 76, 0.35), 0 2px 4px rgba(0,0,0,0.08);
}
.journey-btn-secondary {
  display: inline-block;
  background: rgba(255, 252, 247, 0.6);
  backdrop-filter: blur(4px);
  color: var(--rivage-text-soft);
  padding: 1rem 2.6rem;
  border-radius: 12px;
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1.5px solid rgba(201, 169, 76, 0.2);
  cursor: pointer;
}
.journey-btn-secondary:hover {
  border-color: var(--rivage-accent);
  color: var(--rivage-accent);
  background: rgba(201, 169, 76, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 169, 76, 0.1);
}

/* Cartes de sélection — plus chaleureuses */
.journey-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.journey-cards-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.journey-card {
  padding: var(--space-7) var(--space-5);
  border: 2px solid transparent;
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.8);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(30, 41, 59, 0.04), 0 0 0 1px rgba(201, 169, 76, 0.05);
}
.journey-card:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: rgba(201, 169, 76, 0.4);
  box-shadow:
    0 20px 48px rgba(201, 169, 76, 0.12),
    0 4px 12px rgba(30, 41, 59, 0.06);
  background: rgba(255, 255, 255, 0.95);
}
.journey-card.selected {
  border-color: var(--rivage-accent);
  background: rgba(201, 169, 76, 0.06);
  box-shadow:
    0 12px 32px rgba(201, 169, 76, 0.15),
    inset 0 0 0 1px rgba(201, 169, 76, 0.15);
  transform: translateY(-5px) scale(1.02);
}
.journey-card-icon {
  font-size: 2.6rem;
  margin-bottom: var(--space-4);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06));
}
.journey-card-label {
  font-weight: 500;
  color: var(--rivage-text);
  font-size: 1rem;
  line-height: 1.4;
}
.journey-card-hint {
  font-size: 0.85rem;
  color: var(--rivage-text-soft);
  margin-top: var(--space-3);
  opacity: 0.85;
  line-height: 1.4;
}

/* Responsive voyage */
@media (max-width: 768px) {
  .journey-stage {
    padding: var(--space-6) var(--space-4);
  }
  .journey-stage-scrollable {
    padding-top: 80px;
    padding-bottom: 120px;
  }
  .journey-cta-bar {
    padding: var(--space-3) var(--space-4);
    gap: var(--space-3);
  }
  .journey-cta-bar .journey-btn-primary,
  .journey-cta-bar .journey-btn-secondary {
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
  }
  .journey-back {
    top: 70px;
    left: 12px;
    width: 40px;
    height: 40px;
  }
  .journey-content {
    padding: var(--space-6) var(--space-4);
    border-radius: 18px;
  }
  .journey-cards {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
  .journey-cards-3 {
    grid-template-columns: 1fr;
  }
  .journey-card {
    padding: var(--space-5) var(--space-3);
  }
}
@media (max-width: 480px) {
  .journey-cards {
    grid-template-columns: 1fr;
  }
  .journey-btn-primary, .journey-btn-secondary {
    width: 100%;
    text-align: center;
  }
  .journey-content h1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }
  .journey-content h2 {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }
}


/* Très petits écrans — parcours Rivage */
@media (max-width: 360px) {
  .journey-stage {
    padding: var(--space-4) var(--space-3);
  }
  .journey-content {
    padding: var(--space-4) var(--space-3);
    border-radius: 14px;
  }
  .journey-card {
    padding: var(--space-4) var(--space-3);
  }
  .journey-card-icon {
    font-size: 2rem;
    margin-bottom: var(--space-3);
  }
  .journey-card-label {
    font-size: 0.9rem;
  }
  .journey-content h1 {
    font-size: 1.6rem;
  }
  .journey-content h2 {
    font-size: 1.35rem;
  }
  .journey-step-badge {
    font-size: 0.7rem;
  }
}
