/* =========================================================================
   NOTES D'AVENIR — FEUILLE DE STYLE ÉDITORIALE & THÈMES DYNAMIQUES
   ========================================================================= */

:root,
[data-theme="nuit-solaire"] {
  --bg-canvas: #0B1320;
  --bg-surface: #111C2E;
  --bg-surface-alt: #16243B;
  --text-ink: #F4F1EA;
  --text-muted: #9BA7B8;
  --accent-gold: #E0B563;
  --accent-gold-soft: rgba(224, 181, 99, 0.12);
  --border-line: rgba(224, 181, 99, 0.24);
  --btn-text: #0B1320;
}

html,
body {
  overflow-x: clip;
  max-width: 100%;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.font-serif {
  font-family: "Cormorant Garamond", Georgia, serif;
}

/* Prévention du flash non stylé (FOUC) avant l'exécution de Tailwind en defer */
.hidden {
  display: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

:where(header img, footer img) {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
}

:where(.relative) { position: relative; }
:where(.absolute) { position: absolute; }
:where(.inset-0) { inset: 0; }
:where(.w-3\.5) { width: 0.875rem; }
:where(.h-3\.5) { height: 0.875rem; }
:where(.w-4) { width: 1rem; }
:where(.h-4) { height: 1rem; }
:where(.w-5) { width: 1.25rem; }
:where(.h-5) { height: 1.25rem; }
:where(.w-11) { width: 2.75rem; }
:where(.h-11) { height: 2.75rem; }
:where(.w-14) { width: 3.5rem; }
:where(.h-14) { height: 3.5rem; }
:where(.w-24) { width: 6rem; }
:where(.h-24) { height: 6rem; }
:where(.w-40) { width: 10rem; }
:where(.h-40) { height: 10rem; }
:where(.w-48) { width: 12rem; }
:where(.h-48) { height: 12rem; }
:where(.max-w-\[340px\]) { max-width: 340px; }
:where(.rounded-full) { border-radius: 9999px; }
:where(.overflow-hidden) { overflow: hidden; }

:where(section > [aria-hidden="true"].pointer-events-none) {
  position: absolute;
  right: -6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 460px;
  height: 460px;
  opacity: 0.05;
  pointer-events: none;
}

header {
  background-color: rgba(11, 19, 32, 0.85);
  border-bottom: 1px solid var(--border-line);
}

/* Apparition progressive du logo au fil du scroll (zoom + transparence, cercle parfait) */
.header-logo-slot {
  --logo-progress: 0;
  --logo-size: 2.75rem;
  --logo-gap: 0.75rem;
  width: calc(var(--logo-progress) * var(--logo-size));
  height: var(--logo-size);
  margin-right: calc(var(--logo-progress) * var(--logo-gap));
  pointer-events: none;
  will-change: width, margin-right;
}

.header-logo-circle {
  width: var(--logo-size);
  height: var(--logo-size);
  flex-shrink: 0;
  opacity: var(--logo-progress);
  border: 1px solid rgba(224, 181, 99, 0.4);
  background-color: rgba(17, 28, 46, 0.6);
  transform: scale(var(--logo-progress));
  transform-origin: center center;
  transition: border-color 220ms ease;
  will-change: opacity, transform;
}

.header-logo-slot.is-visible {
  pointer-events: auto;
}

.group:hover .header-logo-slot.is-visible .header-logo-circle {
  border-color: var(--accent-gold);
}

@media (min-width: 640px) {
  .header-logo-slot {
    --logo-size: 3.5rem;
    --logo-gap: 0.75rem;
  }
}

.luxury-transition {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

/* Grain éditorial très subtil */
.editorial-grain {
  background-image: radial-gradient(var(--accent-gold) 0.5px, transparent 0.5px);
  background-size: 32px 32px;
  opacity: 0.04;
}

/* Style des champs de formulaire haute couture */
.couture-input {
  background-color: transparent;
  border-bottom: 1px solid var(--border-line);
  color: var(--text-ink);
  transition: border-color 0.3s ease;
}

.couture-input:focus {
  outline: none;
  border-bottom-color: var(--accent-gold);
}

/* Cadres haute couture pour les Parrains d'Honneur */
.parrain-luxury-card {
  position: relative;
  background: linear-gradient(145deg, rgba(22, 36, 59, 0.92) 0%, rgba(11, 19, 32, 0.98) 55%, rgba(17, 28, 46, 0.95) 100%);
  border: 1px solid rgba(224, 181, 99, 0.45);
  box-shadow:
    0 24px 60px -24px rgba(0, 0, 0, 0.8),
    0 0 36px -18px rgba(224, 181, 99, 0.22),
    inset 0 1px 0 rgba(244, 241, 234, 0.08);
  transition: border-color 0.45s ease, box-shadow 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.parrain-luxury-card:hover {
  border-color: rgba(224, 181, 99, 0.8);
  box-shadow:
    0 28px 68px -20px rgba(0, 0, 0, 0.85),
    0 0 48px -14px rgba(224, 181, 99, 0.32),
    inset 0 1px 0 rgba(244, 241, 234, 0.14);
  transform: translateY(-2px);
}

.parrain-inner-frame {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(224, 181, 99, 0.16);
  border-radius: 0.75rem;
  pointer-events: none;
  z-index: 2;
}

.parrain-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(224, 181, 99, 0.72);
  pointer-events: none;
  z-index: 3;
}

.parrain-corner--tl {
  top: 10px;
  left: 10px;
  border-top: 1.5px solid;
  border-left: 1.5px solid;
  border-top-left-radius: 0.75rem;
}

.parrain-corner--tr {
  top: 10px;
  right: 10px;
  border-top: 1.5px solid;
  border-right: 1.5px solid;
  border-top-right-radius: 0.75rem;
}

.parrain-corner--bl {
  bottom: 10px;
  left: 10px;
  border-bottom: 1.5px solid;
  border-left: 1.5px solid;
  border-bottom-left-radius: 0.75rem;
}

.parrain-corner--br {
  bottom: 10px;
  right: 10px;
  border-bottom: 1.5px solid;
  border-right: 1.5px solid;
  border-bottom-right-radius: 0.75rem;
}

.couture-input::placeholder {
  color: var(--text-muted);
  opacity: 0.65;
}

.couture-input option {
  background-color: var(--bg-surface);
  color: var(--text-ink);
}

input[type="date"] {
  color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.9;
}

/* Filet vertical doré */
.gold-hairline-v {
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--accent-gold), transparent);
}

/* Accent color pour les cases à cocher */
.accent-gold {
  accent-color: var(--accent-gold);
}

/* Animation discrète des notifications toast */
@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast-enter {
  animation: toastSlideUp 0.25s ease-out forwards;
}

/* Impression propre du formulaire officiel A4 */
@media print {
  #top-banner,
  header,
  footer,
  #hero-section,
  #manifeste,
  #collection,
  #parcours-tabs-header,
  #famille-steps-intro,
  #famille-dossier-form,
  #panel-soutien,
  #contact,
  #toast-container,
  .no-print {
    display: none !important;
  }

  html,
body {
  overflow-x: clip;
  max-width: 100%;
}

body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  #dossier-modal {
    position: static !important;
    display: block !important;
    background: #ffffff !important;
    padding: 0 !important;
  }

  #dossier-modal > div {
    max-width: 100% !important;
    max-height: none !important;
    border: none !important;
    background: #ffffff !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  #official-form-preview {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible !important;
    max-height: none !important;
  }

  .page-break-before {
    page-break-before: always;
    break-before: page;
  }
}
