/* ============================================================
   SOLILO FILMS — Design System V3.2
   Source : Dossier Designer V3.2 (palette exacte) + Accueil V1
   ============================================================ */

:root {
  /* Palette exacte (Dossier Designer V3.2) */
  --color-night: #061525;      /* Nuit Cinéma — fond principal */
  --color-deep: #102A43;      /* Bleu Profond — surfaces secondaires */
  --color-ivory: #F3F0E9;     /* Ivoire Chaud — titres, textes majeurs */
  --color-mist: #AFC6D6;      /* Bleu Brume — labels, traits, métadonnées */
  --color-light: #DCE8EF;     /* Bleu Lumière — révélation, focus, halo fin */
  --color-gold: #D8AB76;      /* Doré solaire (accent) — échantillonné Accueil V1 */
  /* Couleurs du logo SOLILO (deux anneaux entrelacés) */
  --logo-ivory: #F5EBDC;      /* Ivoire chaud de l'anneau gauche */
  --logo-blue: #4169E1;       /* Bleu royal de l'anneau droit */
  --logo-blue-deep: #2A4B8D;  /* Ombre du bleu royal */

  /* Typographie */
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;

  /* Espacement */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;

  /* Rayons */
  --radius-sm: 4px;
  --radius-md: 8px;

  /* Transitions (Dossier Développeur V3.2) */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-micro: 150ms;
  --dur-comp: 220ms;
  --dur-page: 400ms;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html {
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  background: var(--color-night);
  color: var(--color-ivory);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ---------- Fond cinématographique en couches ----------
   « La peau de l'image » : jamais un noir uni.
   Halos lumineux clairs (chiaroscuro) + vignettage. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    /* Halos lumineux diffus — plus clairs que le fond pour créer de la lumière */
    radial-gradient(55% 40% at 15% 5%, rgba(220,232,239,0.10), transparent 70%),
    radial-gradient(45% 35% at 88% 12%, rgba(175,198,214,0.08), transparent 70%),
    radial-gradient(60% 45% at 50% 45%, rgba(16,42,67,0.35), transparent 75%),
    radial-gradient(70% 50% at 50% 100%, rgba(6,21,37,0.9), transparent 75%),
    /* Vignettage : bords plus sombres que le centre */
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(2,8,15,0.6) 100%);
}
/* Grain cinématographique (pellicule) — plus présent pour la matière */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("/static/img/grain.svg");
  background-size: 160px 160px;
  opacity: 0.42;
  mix-blend-mode: overlay;
  animation: solilo-grain 0.6s steps(4) infinite;
}
@keyframes solilo-grain {
  0% { transform: translate(0,0); }
  25% { transform: translate(-1px,1px); }
  50% { transform: translate(1px,-1px); }
  75% { transform: translate(-1px,-1px); }
  100% { transform: translate(1px,1px); }
}

/* Le contenu passe au-dessus des couches de fond */
#app, main, .site-header, .site-footer { position: relative; z-index: 2; }

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-ivory);
}

/* ---------- Accessibilité : focus visible (Bleu Lumière) ---------- */
:focus-visible {
  outline: 2px solid var(--color-light);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Conteneur ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Typographie utilitaire ---------- */
.serif { font-family: var(--font-serif); }
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-mist);
}
.gold { color: var(--color-gold); }
.mist { color: var(--color-mist); }
.ivory { color: var(--color-ivory); }

/* ---------- Boutons / liens CTA ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.9rem 1.6rem;
  border: 1px solid rgba(243,240,233,0.35);
  color: var(--color-ivory);
  background: linear-gradient(180deg, rgba(243,240,233,0.06), rgba(243,240,233,0.02));
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  transition: background var(--dur-comp) var(--ease-out),
              color var(--dur-comp) var(--ease-out),
              border-color var(--dur-comp) var(--ease-out),
              box-shadow var(--dur-comp) var(--ease-out),
              transform var(--dur-comp) var(--ease-out);
}
/* Reflet lumineux sur le bord supérieur (effet verre) */
.btn::before {
  content: "";
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243,240,233,0.5), transparent);
  opacity: 0.6;
}
.btn:hover {
  background: linear-gradient(180deg, rgba(243,240,233,0.12), rgba(243,240,233,0.05));
  color: var(--color-ivory);
  border-color: rgba(243,240,233,0.6);
  box-shadow: 0 0 24px rgba(220,232,239,0.12), inset 0 0 12px rgba(220,232,239,0.05);
  transform: translateY(-1px);
}
.btn .arrow { transition: transform var(--dur-comp) var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-gold {
  border-color: rgba(216,171,118,0.45);
  color: var(--color-gold);
  background: linear-gradient(180deg, rgba(216,171,118,0.08), rgba(216,171,118,0.02));
}
.btn-gold::before {
  background: linear-gradient(90deg, transparent, rgba(216,171,118,0.6), transparent);
}
.btn-gold:hover {
  background: linear-gradient(180deg, rgba(216,171,118,0.16), rgba(216,171,118,0.05));
  color: var(--color-gold);
  border-color: rgba(216,171,118,0.7);
  box-shadow: 0 0 28px rgba(216,171,118,0.18), inset 0 0 14px rgba(216,171,118,0.06);
}

/* Lien texte avec flèche */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-comp) var(--ease-out);
}
.link-arrow:hover { border-bottom-color: var(--color-gold); }
.link-arrow .arrow { transition: transform var(--dur-comp) var(--ease-out); }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* ---------- Séparateur lumineux (LightDivider) ---------- */
.light-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block: var(--space-5);
}
.light-divider::before {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-mist));
  opacity: 0.4;
}
.light-divider .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-light);
  box-shadow: 0 0 8px var(--color-light);
}
.light-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--color-mist), transparent);
  opacity: 0.4;
}

/* ---------- Section heading ---------- */
.section-heading {
  margin-bottom: var(--space-4);
}
.section-heading .eyebrow { margin-bottom: 0.75rem; display: block; }
.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  max-width: 22ch;
}

/* ---------- Réduction de mouvement ---------- */
@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;
  }
}

/* ============================================================
   Animations SOLILO — le soliloque : une voix, une lumière
   Sobres, cinématiques, jamais ostentatoires.
   ============================================================ */
@keyframes solilo-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes solilo-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes solilo-twinkle {
  0%, 100% { opacity: .35; }
  50%      { opacity: .85; }
}
@keyframes solilo-glow {
  0%, 100% { opacity: .55; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.06); }
}
@keyframes solilo-line {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Apparition du contenu au chargement (décalée, comme une révélation) */
.solilo-reveal { animation: solilo-fade-up .9s var(--ease-out) both; }
.solilo-reveal-1 { animation-delay: .05s; }
.solilo-reveal-2 { animation-delay: .18s; }
.solilo-reveal-3 { animation-delay: .32s; }
.solilo-reveal-4 { animation-delay: .46s; }

/* Scintillement discret des étoiles (cosmos) */
.solilo-twinkle { animation: solilo-twinkle 4.5s ease-in-out infinite; }

/* Halo lumineux qui respire (le point de rencontre) */
.solilo-glow { animation: solilo-glow 5s ease-in-out infinite; }

/* Trait qui se déploie (une voix qui s'étend) */
.solilo-line { transform-origin: left center; animation: solilo-line 1.1s var(--ease-out) both; }
