/* Art direction: Torus Group — institutional financial security structuring
   Palette: warm ivory neutral + unified purple accent (hue 264)
   Typography: Cabinet Grotesk (display) + Satoshi (body) */

:root,
[data-theme="light"] {
  --color-bg: hsl(264 22% 97%);
  --color-surface: hsl(264 24% 99%);
  --color-surface-2: hsl(264 20% 100%);
  --color-surface-offset: hsl(264 18% 94%);
  --color-surface-offset-2: hsl(264 16% 91%);
  --color-surface-dynamic: hsl(264 14% 88%);
  --color-divider: hsl(264 14% 86%);
  --color-border: hsl(264 12% 80%);

  --color-text: hsl(264 30% 14%);
  --color-text-muted: hsl(264 12% 42%);
  --color-text-faint: hsl(264 10% 65%);
  --color-text-inverse: hsl(264 22% 97%);

  --color-primary: #b8862f;
  --color-primary-hover: #96691f;
  --color-primary-active: #7a5518;
  --color-primary-highlight: hsl(38 55% 90%);

  --color-purple: hsl(264 38% 34%);
  --color-purple-hover: hsl(264 40% 26%);
  --color-purple-deep: hsl(264 45% 16%);
  --color-purple-highlight: hsl(264 30% 92%);

  /* Couleur réservée aux onglets de langue actifs. */
  --color-language-active: hsl(264 38% 34% / 0.84);

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px hsl(264 30% 20% / 0.06);
  --shadow-md: 0 4px 12px hsl(264 30% 20% / 0.08);
  --shadow-lg: 0 12px 32px hsl(264 30% 20% / 0.14);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  --font-display: 'Cabinet Grotesk', Georgia, serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;
}

[data-theme="dark"] {
  --color-bg: hsl(264 24% 9%);
  --color-surface: hsl(264 22% 12%);
  --color-surface-2: hsl(264 20% 14%);
  --color-surface-offset: hsl(264 20% 15%);
  --color-surface-offset-2: hsl(264 18% 18%);
  --color-surface-dynamic: hsl(264 16% 22%);
  --color-divider: hsl(264 16% 20%);
  --color-border: hsl(264 14% 28%);

  --color-text: hsl(264 20% 92%);
  --color-text-muted: hsl(264 10% 68%);
  --color-text-faint: hsl(264 8% 48%);
  --color-text-inverse: hsl(264 24% 10%);

  --color-primary: #d9a44a;
  --color-primary-hover: #e6b866;
  --color-primary-active: #f0c884;
  --color-primary-highlight: hsl(38 40% 22%);

  --color-purple: hsl(264 40% 62%);
  --color-purple-hover: hsl(264 42% 70%);
  --color-purple-deep: hsl(264 30% 20%);
  --color-purple-highlight: hsl(264 22% 24%);
  --color-language-active: hsl(264 40% 62% / 0.84);

  --shadow-sm: 0 1px 2px hsl(0 0% 0% / 0.3);
  --shadow-md: 0 4px 12px hsl(0 0% 0% / 0.4);
  --shadow-lg: 0 12px 32px hsl(0 0% 0% / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: hsl(264 24% 9%);
    --color-surface: hsl(264 22% 12%);
    --color-surface-2: hsl(264 20% 14%);
    --color-surface-offset: hsl(264 20% 15%);
    --color-surface-offset-2: hsl(264 18% 18%);
    --color-surface-dynamic: hsl(264 16% 22%);
    --color-divider: hsl(264 16% 20%);
    --color-border: hsl(264 14% 28%);

    --color-text: hsl(264 20% 92%);
    --color-text-muted: hsl(264 10% 68%);
    --color-text-faint: hsl(264 8% 48%);
    --color-text-inverse: hsl(264 24% 10%);

    --color-primary: #d9a44a;
    --color-primary-hover: #e6b866;
    --color-primary-active: #f0c884;
    --color-primary-highlight: hsl(38 40% 22%);

    --color-purple: hsl(264 40% 62%);
    --color-purple-hover: hsl(264 42% 70%);
    --color-purple-deep: hsl(264 30% 20%);
    --color-purple-highlight: hsl(264 22% 24%);
    --color-language-active: hsl(264 40% 62% / 0.84);

    --shadow-sm: 0 1px 2px hsl(0 0% 0% / 0.3);
    --shadow-md: 0 4px 12px hsl(0 0% 0% / 0.4);
    --shadow-lg: 0 12px 32px hsl(0 0% 0% / 0.5);
  }
}

:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 8rem);

  --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;
  --space-32: 8rem;
}

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

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-16);
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
  line-height: 1.15;
  font-family: var(--font-display);
}

p,
li,
figcaption {
  text-wrap: pretty;
  max-width: 72ch;
}

::selection {
  background: hsl(264 40% 60% / 0.25);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-purple);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

a,
button,
[role="button"],
[role="link"],
input,
textarea,
select {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--color-bg) 97%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
}

.nav-wrap {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

/* Logo identique pour EN, FR et ZH */
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.brand img {
  width: 180px;
  height: auto;
  max-height: 45px;
  object-fit: contain;
  display: block;
}

.main-nav {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}

.main-nav a {
  position: relative;
  padding-block: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--color-text);
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 2px;
  background: var(--color-purple);
  border-radius: var(--radius-full);
}

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

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--color-text-muted);
  border-radius: var(--radius-full);
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--color-text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-md);
}

.btn-primary {
  color: #fff;
  background: var(--color-purple);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-purple-hover);
  box-shadow: var(--shadow-md);
}

.btn-on-purple {
  color: #fff;
  background: transparent;
  border: 1px solid hsl(0 0% 100% / 0.4);
}

.btn-on-purple:hover {
  background: hsl(0 0% 100% / 0.12);
  border-color: hsl(0 0% 100% / 0.7);
}

/* ===================================================================
   BANNIÈRE — règle unifiée pour TOUTES les pages (index, services,
   procedure, faq, questionnaire, contact).
   Objectifs :
   1. La photo doit rester bien visible : overlay allégé et uniforme.
   2. La virgule dorée (orange-curve-shape) doit apparaître partout,
      y compris sur les pages qui n'avaient qu'un .page-banner simple.
   =================================================================== */

.page-banner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(280px, 32vw, 420px);
  overflow: hidden;
  background-color: var(--color-purple-deep);
}

.page-banner.curve-banner {
  min-height: 580px;
}

/* Bannière "photo pleine largeur" simple (questionnaire/contact) :
   on lui applique désormais le même calque et la même virgule que
   curve-banner, via les pseudo-éléments ci-dessous — aucune
   modification HTML n'est nécessaire pour cette partie. */
.page-banner > .banner-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.94;
}

.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(120deg, hsl(264 45% 14% / 0.62) 0%, hsl(264 40% 20% / 0.5) 45%, hsl(264 38% 26% / 0.32) 100%);
}

/* Virgule dorée injectée automatiquement en haut à droite de CHAQUE
   bannière, y compris celles sans .banner-side-panel dans le HTML. */
.page-banner::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -80px;
  z-index: 1;
  width: 320px;
  height: 480px;
  pointer-events: none;
  border-right: 6px solid var(--color-primary);
  border-radius: 50%;
  opacity: 0.55;
  transform: rotate(18deg);
}

.banner-content {
  position: relative;
  z-index: 2;
  max-width: var(--content-default);
  padding: var(--space-16) var(--space-6);
  margin-inline: auto;
  color: #fff;
}

.banner-eyebrow {
  display: inline-block;
  margin-bottom: var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: hsl(38 55% 78%);
  text-transform: uppercase;
}

.banner-content h1 {
  max-width: 20ch;
  margin-bottom: var(--space-5);
  font-size: var(--text-2xl);
  font-weight: 500;
}

.banner-content .lead {
  max-width: 60ch;
  margin-bottom: var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: hsl(264 20% 92%);
}

.banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* --- Variante à panneau latéral (curve-banner avec .banner-side-panel
   explicite dans le HTML) : on désactive la virgule générée par
   ::before pour ne pas la dupliquer avec celle du panneau. --- */
.page-banner.curve-banner:has(.banner-side-panel)::before {
  display: none;
}

.banner-bg-wrap {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 70%;
  height: 100%;
}

.banner-bg-wrap .banner-bg {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.94;
}

.banner-overlay-gradient {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, hsl(264 45% 14% / 0.22) 0%, hsl(264 45% 14% / 0.6) 100%);
}

.banner-content-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1320px;
  padding: 0 var(--space-6);
  margin: 0 auto;
}

.banner-content-container .banner-content {
  max-width: 620px;
  padding: 0;
  margin: 0;
  color: #fff;
}

.banner-side-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 400px;
  height: 580px;
}

.orange-curve-shape {
  position: absolute;
  top: -50px;
  left: -120px;
  width: 450px;
  height: 700px;
  pointer-events: none;
  border-right: 6px solid var(--color-primary);
  border-radius: 50%;
  opacity: 0.55;
  transform: rotate(-15deg);
}

.side-logo-mark {
  position: relative;
  z-index: 3;
  opacity: 0.25;
}

/* =================================================================== */

section {
  padding-block: clamp(var(--space-12), 6vw, var(--space-24));
}

.alt-surface {
  background: var(--color-surface-offset);
}

.purple-block {
  color: #fff;
  text-align: left;
  background: linear-gradient(135deg, var(--color-purple-deep), var(--color-purple));
}

.purple-block .eyebrow,
.purple-block h2,
.purple-block p {
  color: #fff;
}

.purple-block .eyebrow {
  opacity: 0.75;
}

.purple-block p {
  opacity: 0.88;
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-10);
}

.eyebrow {
  display: block;
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-purple);
  text-transform: uppercase;
}

.section-head h2 {
  margin-bottom: var(--space-4);
  font-size: var(--text-xl);
  font-weight: 500;
}

.section-head p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--space-6);
}

.service-card,
.nav-card {
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.purple-block .service-card {
  background: hsl(0 0% 100% / 0.08);
  border-color: hsl(0 0% 100% / 0.15);
}

.service-card h3,
.nav-card h3 {
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--text-lg);
  font-weight: 500;
}

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

.purple-block .service-card p {
  color: hsl(264 20% 90%);
  opacity: 0.9;
}

.nav-card p {
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.icon-mark {
  width: 28px;
  height: 28px;
  color: var(--color-purple);
}

.purple-block .icon-mark {
  color: hsl(38 55% 78%);
}

.arrow-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-purple);
  text-decoration: none;
}

.arrow-link:hover {
  color: var(--color-purple-hover);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

@media (min-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr 2fr;
  }
}

.service-feature {
  padding: var(--space-8);
  background: var(--color-purple-highlight);
  border-radius: var(--radius-xl);
}

.service-feature h3 {
  margin: var(--space-4) 0 var(--space-3);
  font-size: var(--text-lg);
}

.service-list {
  display: grid;
  gap: var(--space-4);
}

.note-box {
  padding: var(--space-6);
  margin-top: var(--space-8);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
  border-left: none;
  border-radius: var(--radius-lg);
}

.note-box strong {
  color: var(--color-text);
}

.step-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-12);
}

.step-pill {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-purple);
  background: var(--color-purple-highlight);
  border-radius: var(--radius-full);
}

.timeline {
  position: relative;
  display: grid;
  gap: var(--space-8);
}

.timeline-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--space-5);
  align-items: start;
}

.timeline-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: #fff;
  background: var(--color-purple);
  border-radius: var(--radius-full);
}

.timeline-content h4 {
  margin-bottom: var(--space-2);
  font-size: var(--text-base);
  font-weight: 600;
}

.timeline-content p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

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

.term-table th,
.term-table td {
  padding: var(--space-3) var(--space-5);
  text-align: left;
  border-bottom: 1px solid var(--color-divider);
}

.term-table th {
  width: 40%;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
}

.term-table tr:last-child th,
.term-table tr:last-child td {
  border-bottom: none;
}

.glossary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.glossary-item {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.glossary-item strong {
  color: var(--color-purple);
}

.form-card {
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.form-section {
  padding-bottom: var(--space-8);
  margin-bottom: var(--space-10);
  border-bottom: 1px solid var(--color-divider);
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section h3 {
  margin-bottom: var(--space-5);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-purple);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: var(--text-sm);
  font-weight: 500;
}

.field input,
.field textarea {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-purple);
  box-shadow: 0 0 0 3px var(--color-purple-highlight);
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.checkbox-pill {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  cursor: pointer;
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}

.checkbox-pill input {
  accent-color: var(--color-purple);
}

.status-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
}

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

.consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.consent input {
  margin-top: 4px;
  accent-color: var(--color-purple);
}

.form-footer p {
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.form-msg {
  display: none;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
}

.form-msg.show {
  display: block;
}

.form-msg.success {
  color: hsl(140 45% 22%);
  background: hsl(140 30% 92%);
}

.form-msg.error {
  color: hsl(0 55% 32%);
  background: hsl(0 50% 94%);
}

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

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 1.4fr;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.contact-item h4 {
  margin-bottom: var(--space-1);
  font-size: var(--text-base);
}

.contact-item p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.legal-block {
  padding: var(--space-6);
  margin-top: var(--space-2);
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
}

.legal-block h4 {
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  color: var(--color-purple);
  text-transform: uppercase;
}

.legal-block dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.legal-block dt {
  color: var(--color-text-muted);
}

.legal-block dd {
  font-weight: 500;
  color: var(--color-text);
}

.site-footer {
  padding-block: var(--space-16) var(--space-8);
  color: hsl(264 20% 90%);
  background: var(--color-purple-deep);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-10);
  margin-bottom: var(--space-10);
}

.footer-col h5 {
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  color: hsl(38 55% 78%);
  text-transform: uppercase;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-col a {
  font-size: var(--text-sm);
  color: hsl(264 20% 85%);
  text-decoration: none;
}

.footer-col a:hover {
  color: #fff;
}

.footer-col p {
  color: hsl(264 15% 75%);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-6);
  font-size: var(--text-xs);
  color: hsl(264 12% 68%);
  border-top: 1px solid hsl(0 0% 100% / 0.12);
}

.reveal {
  clip-path: inset(0 0 15% 0);
  opacity: 0;
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1), clip-path 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
  clip-path: inset(0 0 0 0);
  opacity: 1;
}

/* Sélecteur EN / FR / 中文 : même aplat violet semi-transparent pour l'onglet actif */
.language-switch,
.lang-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 165px;
  min-width: 165px;
  height: 36px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}

.language-switch a,
.lang-switch a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text-muted);
  text-decoration: none;
  background-color: transparent;
  border-right: 1px solid var(--color-divider);
  border-radius: 0;
}

.language-switch a:last-child,
.lang-switch a:last-child {
  border-right: none;
}

.language-switch a[aria-current="page"],
.language-switch a.active,
.lang-switch a[aria-current="page"],
.lang-switch a.active {
  color: #fff;
  background-color: var(--color-language-active);
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: 68px;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    max-height: calc(100dvh - 68px);
    padding: var(--space-6);
    overflow-y: auto;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-divider);
    transform: translateY(-12px);
    transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
  }

  .main-nav.open {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .main-nav a {
    display: block;
    flex-shrink: 0;
    width: 100%;
    min-height: 44px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-actions .btn-primary {
    display: none;
  }
}

@media (min-width: 861px) {
  .main-nav {
    display: flex;
    visibility: visible;
    opacity: 1;
  }

  .main-nav a {
    display: inline-block;
    flex-shrink: 0;
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  .nav-wrap {
    padding-inline: var(--space-4);
  }

  .brand img {
    width: 150px;
    max-height: 38px;
  }

  .language-switch,
  .lang-switch {
    width: 138px;
    min-width: 138px;
    height: 34px;
  }

  .language-switch a,
  .lang-switch a {
    font-size: 12px;
  }

  .theme-toggle {
    display: none;
  }

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

  .page-banner::before {
    width: 220px;
    height: 320px;
    top: -30px;
    right: -60px;
  }

  .banner-bg-wrap {
    width: 100%;
  }

  .banner-side-panel {
    display: none;
  }
}

/* ===================================================================
   UNIFICATION STRICTE DES HAUTEURS DE BANDEAUX (Évite le "saut")
   =================================================================== */
.page-banner,
.page-banner.curve-banner,
.page-banner.annex-banner {
  /* On utilise 'height' pour forcer une taille identique partout, 
     et '!important' pour écraser les balises HTML */
  height: 480px !important; 
  min-height: 480px !important; 
}

/* Force l'image d'arrière-plan à s'adapter parfaitement à cette hauteur stricte */
.page-banner .banner-bg,
.page-banner.curve-banner .banner-bg-wrap .banner-bg {
  height: 100% !important;
  width: 100% !important;
  object-fit: cover !important;
}

/* Adaptation harmonieuse pour les écrans mobiles */
@media (max-width: 600px) {
  .page-banner,
  .page-banner.curve-banner,
  .page-banner.annex-banner {
    height: 380px !important;
    min-height: 380px !important;
  }
}
