/* ==========================================================================
   KIN PRODUCTION — base.css
   Socle : variables de design, reset, typographie, grille, utilitaires.
   Esthétique : Fond blanc pur #FFFFFF, boutons dorés #D4AF37,
   grilles/cartes en gris architectural studio, menu et page immaculés.
   Aucune dépendance externe : la plateforme fonctionne entièrement hors ligne.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS & JETONS DE CONCEPTION
   -------------------------------------------------------------------------- */
:root {
  /* Signature dorée #D4AF37 & métalliques */
  --kin-gold: #D4AF37;
  --kin-gold-soft: #E6C862;
  --kin-gold-rich: #C59F27;
  --kin-gold-dark: #8F6E10;
  --kin-gold-light: #FDF9EE;

  /* Palette sémantique studio */
  --kin-violet: #7c3aed;
  --kin-magenta: #ff2f7a;
  --kin-cyan: #0284c7;
  --kin-amber: #d97706;
  --kin-lime: #65a30d;
  --kin-blue: #2563eb;
  --kin-red: #dc2626;
  --kin-green: #16a34a;

  /* Surfaces — Fond principal 100% blanc pur (#FFFFFF) et grilles en gris harmonieux (#F4F5F8) */
  --bg-0: #FFFFFF;
  --bg-1: #FFFFFF;
  --bg-2: #F4F5F8;
  --bg-3: #ECEEF2;
  --surface: #F4F5F8;
  --surface-2: #ECEEF2;
  --surface-3: #DFE2E8;
  --surface-solid: #FFFFFF;
  --line: rgba(18, 18, 28, 0.08);
  --line-strong: rgba(18, 18, 28, 0.16);

  /* Typographie — Encre profonde onyx (#111116) pour une lisibilité éditoriale impeccable */
  --text: #111116;
  --text-soft: #383844;
  --text-mute: #6C7080;
  --text-invert: #FFFFFF;

  /* Dégradés d'accent doré #D4AF37 */
  --grad-brand: linear-gradient(120deg, #E6C862 0%, #D4AF37 55%, #181820 100%);
  --grad-cta: linear-gradient(135deg, #E6C862 0%, #D4AF37 52%, #C19A24 100%);
  --grad-text: linear-gradient(100deg, #8F6E10 0%, #D4AF37 70%);
  --accent: #D4AF37;
  --accent-2: #C59F27;
  --accent-ink: #8F6E10;
  --grad-cool: linear-gradient(135deg, #FAF7EE 0%, #F5ECCF 100%);
  --grad-warm: linear-gradient(135deg, #E6C862 0%, #D4AF37 100%);
  --grad-surface: #F4F5F8;
  --grad-radial: radial-gradient(60% 60% at 50% 0%, rgba(212,175,55,.12), transparent 70%);
  --grad-ink: linear-gradient(165deg, #181820 0%, #111116 100%);

  /* Ombres & lueurs dorées douces — élégantes et jamais boueuses */
  --shadow-sm: 0 1px 3px rgba(18, 18, 28, .04), 0 2px 6px rgba(18, 18, 28, .03);
  --shadow-md: 0 4px 16px rgba(18, 18, 28, .05), 0 1px 3px rgba(18, 18, 28, .04);
  --shadow-lg: 0 20px 48px -6px rgba(18, 18, 28, .09), 0 4px 12px rgba(18, 18, 28, .04);
  --shadow-card: 0 1px 2px rgba(18, 18, 28, .04), 0 6px 20px rgba(18, 18, 28, .04);
  --shadow-lift: 0 18px 40px -4px rgba(18, 18, 28, .09), 0 4px 12px rgba(18, 18, 28, .04);
  --glow-gold: 0 0 0 1px rgba(212, 175, 55, .4), 0 8px 24px rgba(212, 175, 55, .3);
  --glow-violet: 0 0 0 1px rgba(212, 175, 55, .3), 0 10px 28px rgba(212, 175, 55, .25);
  --glow-magenta: 0 0 0 1px rgba(212, 175, 55, .3), 0 10px 28px rgba(212, 175, 55, .25);
  --glow-cyan: 0 0 0 1px rgba(212, 175, 55, .3), 0 10px 28px rgba(212, 175, 55, .25);

  /* Habillage clair par défaut */
  --nav-bg: #FFFFFF;
  --nav-bg-stuck: rgba(255, 255, 255, .98);
  --card-bg: #F4F5F8;
  --card-bg-2: #ECEEF2;
  --ink: #111116;
  --ink-soft: #6C7080;
  --skeleton: linear-gradient(90deg, transparent, rgba(18,18,28,.05), transparent);
  --field-bg: #FFFFFF;

  /* Rayons équilibrés et harmonieux */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-2xl: 40px; --r-full: 999px;

  /* Espacements */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px; --sp-10: 128px;

  /* Typographie haute-couture éditoriale */
  --font-display: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Fluid type */
  --fs-xs: clamp(.72rem, .70rem + .1vw, .78rem);
  --fs-sm: clamp(.82rem, .80rem + .12vw, .88rem);
  --fs-base: clamp(.95rem, .92rem + .16vw, 1.02rem);
  --fs-md: clamp(1.05rem, 1rem + .3vw, 1.2rem);
  --fs-lg: clamp(1.25rem, 1.1rem + .6vw, 1.55rem);
  --fs-xl: clamp(1.6rem, 1.3rem + 1.3vw, 2.4rem);
  --fs-2xl: clamp(2.1rem, 1.6rem + 2.4vw, 3.6rem);
  --fs-3xl: clamp(2.6rem, 1.8rem + 4vw, 5.4rem);
  --fs-hero: clamp(2.9rem, 1.6rem + 6.4vw, 7.2rem);

  /* Transitions fluides et vivantes */
  --t-fast: 140ms cubic-bezier(.16,1,.3,1);
  --t: 260ms cubic-bezier(.16,1,.3,1);
  --t-slow: 520ms cubic-bezier(.16,1,.3,1);

  /* Layout */
  --wrap: 1320px;
  --wrap-narrow: 900px;
  --wrap-wide: 1560px;
  --nav-h: 74px;
  --player-h: 78px;
  --radius: var(--r-lg);
  --z-nav: 900; --z-player: 950; --z-drawer: 99999; --z-modal: 100000; --z-toast: 100010;
  --blur: saturate(160%) blur(16px);
}

/* Les boutons et accents dorés restent constants et élégants sur toute l'application */
[data-accent] { --accent: #D4AF37; --accent-2: #C59F27; --accent-ink: #8F6E10; }
[data-theme="light"] body[data-accent] { --accent-ink: #8F6E10; }
[data-theme="dark"] body[data-accent]  { --accent-ink: #F3E5AB; }

/* Thème sombre (optionnel, pour l'utilisateur qui bascule manuellement) */
[data-theme="dark"] {
  --bg-0: #0C0C10;
  --bg-1: #121217;
  --bg-2: #181820;
  --bg-3: #22222C;
  --surface: #181820;
  --surface-2: #22222C;
  --surface-3: #2C2C38;
  --surface-solid: #121217;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #F4F4F8;
  --text-soft: #B8B8C8;
  --text-mute: #828296;
  --text-invert: #0C0C10;
  --grad-surface: #181820;
  --grad-radial: radial-gradient(60% 60% at 50% 0%, rgba(212,175,55,.2), transparent 70%);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.35);
  --shadow-md: 0 12px 32px rgba(0,0,0,.45);
  --shadow-lg: 0 28px 72px rgba(0,0,0,.6);
  --shadow-card: 0 1px 0 rgba(255,255,255,.04) inset, 0 14px 40px rgba(0,0,0,.35);
  --shadow-lift: 0 32px 80px rgba(0,0,0,.55);
  --nav-bg: #121217;
  --nav-bg-stuck: rgba(18, 18, 23, 0.98);
  --card-bg: #181820;
  --card-bg-2: #22222C;
  --ink: #F6F5FB;
  --ink-soft: #A9A5C0;
  --skeleton: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  --field-bg: rgba(255,255,255,.05);
}

/* --------------------------------------------------------------------------
   2. RESET & STRUCTURE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg-0);
  height: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-0);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  margin: 0 !important;
  padding: 0 !important;
}
main#page-content {
  flex: 1 0 auto;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); }
[hidden] { display: none !important; }
::selection { background: #F3E5AB; color: #111116; }

/* Scrollbar dorée & minimaliste */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #FFFFFF; }
::-webkit-scrollbar-thumb {
  background: #D4AF37;
  border-radius: 99px;
  border: 2px solid #FFFFFF;
}
::-webkit-scrollbar-thumb:hover { background: #C59F27; }

/* Focus visible élégant */
:focus-visible { outline: 2px solid #D4AF37; outline-offset: 3px; border-radius: 4px; }

/* --------------------------------------------------------------------------
   3. TYPOGRAPHIE
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
}
h1 { font-size: var(--fs-3xl); font-weight: 800; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }

.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.12;
}
.lead { font-size: var(--fs-md); line-height: 1.6; color: var(--text-soft); }
.muted { color: var(--text-mute); }
.tiny { font-size: var(--fs-xs); }
.small { font-size: var(--fs-sm); }
.strong { font-weight: 650; }

/* Eyebrows avec point diamant doré chic */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8F6E10;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #D4AF37;
  transform: rotate(45deg);
  border-radius: 1px;
  flex-shrink: 0;
}
.eyebrow--plain::before { display: none; }

.stat__value {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text);
  line-height: 1;
}
.stat__label {
  font-size: var(--fs-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8F6E10;
  font-weight: 700;
}
.stat__hint { font-size: var(--fs-xs); color: var(--text-mute); }

/* --------------------------------------------------------------------------
   4. LAYOUT & GRILLE
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}
.wrap--narrow { max-width: var(--wrap-narrow); }
.wrap--wide { max-width: var(--wrap-wide); }

.section { padding-block: clamp(56px, 7vw, 118px); position: relative; background-color: transparent; }
.section--tight { padding-block: clamp(36px, 4vw, 64px); }
.section--flush { padding-block: 0; }

.grid { display: grid; gap: var(--sp-5); }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.g-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g-auto-sm { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.g-auto-lg { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }

.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.row--wrap { flex-wrap: wrap; }
.row--center { justify-content: center; }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.full { width: 100%; }
.relative { position: relative; }
.hidden-mobile { display: initial; }
.show-mobile { display: none; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-5);
  flex-wrap: wrap; margin-bottom: var(--sp-6);
}
.section-head__text { max-width: 66ch; }
.section-head h2 { margin-top: var(--sp-2); }
.section-head p { margin-top: var(--sp-3); color: var(--text-soft); }

/* Séparateur lumineux doré */
.rule-glow {
  height: 1px; border: 0;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.45), transparent);
}

/* Fond décoratif doux & subtil */
.bg-aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.bg-aurora span {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: .16;
  animation: float 26s var(--t-slow) infinite alternate;
}
.bg-aurora span:nth-child(1) { width: 44vw; height: 44vw; background: #D4AF37; top: -14vw; left: -8vw; }
.bg-aurora span:nth-child(2) { width: 32vw; height: 32vw; background: #F3E5AB; top: 12vw; right: -6vw; animation-delay: -6s; }
.bg-aurora span:nth-child(3) { width: 26vw; height: 26vw; background: #E6C862; bottom: -8vw; left: 26vw; animation-delay: -12s; opacity: .12; }
.bg-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .25;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 40%, #000 20%, transparent 75%);
}

/* --------------------------------------------------------------------------
   5. UTILITAIRES
   -------------------------------------------------------------------------- */
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.flex-center { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); }
.inline { display: inline-flex; align-items: center; gap: var(--sp-2); }
.mt-1{margin-top:var(--sp-1)} .mt-2{margin-top:var(--sp-2)} .mt-3{margin-top:var(--sp-3)} .mt-4{margin-top:var(--sp-4)}
.mt-5{margin-top:var(--sp-5)} .mt-6{margin-top:var(--sp-6)} .mt-7{margin-top:var(--sp-7)} .mt-8{margin-top:var(--sp-8)} .mt-9{margin-top:var(--sp-9)}
.mb-1{margin-bottom:var(--sp-1)} .mb-2{margin-bottom:var(--sp-2)} .mb-3{margin-bottom:var(--sp-3)} .mb-4{margin-bottom:var(--sp-4)}
.mb-5{margin-bottom:var(--sp-5)} .mb-6{margin-bottom:var(--sp-6)} .mb-7{margin-bottom:var(--sp-7)} .mb-8{margin-bottom:var(--sp-8)} .mb-9{margin-bottom:var(--sp-9)}
.gap-1{gap:var(--sp-1)} .gap-2{gap:var(--sp-2)} .gap-3{gap:var(--sp-3)} .gap-4{gap:var(--sp-4)} .gap-5{gap:var(--sp-5)} .gap-6{gap:var(--sp-6)}
.text-end { text-align: right; }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--sp-4); top: -60px; z-index: 1200; padding: var(--sp-3) var(--sp-4);
  background: #D4AF37; color: #0E0E12; font-weight: 700; border-radius: var(--r-sm); transition: top var(--t);
}
.skip-link:focus { top: var(--sp-4); }
.hidden { display: none !important; }
.text-ok { color: var(--kin-green); }
.text-warn { color: var(--kin-amber); }
.text-danger { color: #dc2626; }
.mono { font-family: var(--font-mono); font-variant-ligatures: none; }
.kbd {
  display: inline-block; padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--line-strong); background: var(--surface-2);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--text-soft);
}
/* Suppression de l'espace / bande blanche inutile sous le footer sur toutes les pages */
body,
body.has-player,
body.has-player:has(.player-bar.is-active),
body.has-active-player {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
#chrome-bottom {
  margin-top: auto !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  display: block !important;
  border: 0 !important;
}
noscript {
  display: none !important;
}
.balance { text-wrap: balance; }

/* Troncature de texte sur n lignes (clamp) */
.clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}
.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}

/* --------------------------------------------------------------------------
   6. ANIMATIONS FLUIDES & RAFFINÉES
   -------------------------------------------------------------------------- */
@keyframes float { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(2%,3%,0) scale(1.08); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scale-in { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(212,175,55,.6); } 70% { box-shadow: 0 0 0 16px rgba(212,175,55,0); } 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes eq { 0%,100% { transform: scaleY(.28); } 50% { transform: scaleY(1); } }
@keyframes countdown-pop { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s cubic-bezier(.16,1,.3,1), transform .65s cubic-bezier(.16,1,.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .06s; } .reveal-d2 { transition-delay: .12s; }
.reveal-d3 { transition-delay: .18s; } .reveal-d4 { transition-delay: .24s; }
.reveal-d5 { transition-delay: .30s; } .reveal-d6 { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
[data-motion="reduced"] *, [data-motion="reduced"] *::before { animation: none !important; transition-duration: .01ms !important; }
[data-motion="reduced"] .reveal { opacity: 1 !important; transform: none !important; }

/* --------------------------------------------------------------------------
   7. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .g-5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .g-4 { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .g-3, .g-4, .g-5 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hidden-mobile { display: none !important; }
  .show-mobile { display: initial; }
  .section { padding-block: clamp(40px, 8vw, 68px); }
  .wrap { padding-inline: var(--sp-4); }
  .g-4, .g-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .g-2, .g-3, .g-4, .g-5 { grid-template-columns: minmax(0,1fr) !important; }
  .g-auto, .g-auto-lg { grid-template-columns: minmax(0,1fr) !important; }
  .g-auto-sm { grid-template-columns: repeat(2, minmax(0,1fr)); }
  :root {
    --nav-h: 60px;
    --fs-xs: 0.82rem;
    --fs-sm: 0.90rem;
  }
  .mt-9 { margin-top: var(--sp-7); }
}

/* --------------------------------------------------------------------------
   8. IMPRESSION
   -------------------------------------------------------------------------- */
@media print {
  .site-nav, .site-footer, .player-bar, .to-top, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: .8em; }
}

/* Transitions douces */
html { background: #FFFFFF; }
body, .site-nav, .site-footer, .player-bar, .card, .admin-card, .drawer__panel {
  transition: background-color .35s cubic-bezier(.16,1,.3,1), color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
