/* ═══════════════════════════════════════════════════════════════
   OVELIYA SCELLÉ — Luxe Sombre 2026 (après index.html <style>)
   Ultra premium · lisibilité · mystique notariale · DOM réel (#p-wizard)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #0a0805;
  --surface: #12100c;
  --surface2: #1a1712;
  /* Votre "ink" texte ; l’inline utilise --snow pour le corps et --ink pour les fonds */
  --ink-readable: #f0e9d8;
  --ink-light: #d9ceb0;
  --gold: #d4af37;
  --gold2: #c19a2f;
  --gold3: #a67c1f;
  --border: rgba(212, 175, 55, 0.18);
  --border-soft: rgba(212, 175, 55, 0.08);
  --accent-dim: rgba(212, 175, 55, 0.1);
  --glow: rgba(212, 175, 55, 0.25);
  --text-dim: rgba(240, 233, 216, 0.82);
  --text-mid: rgba(240, 233, 216, 0.94);
  --r4: 4px;
  --r8: 8px;
  --r12: 12px;

  --fd: 'EB Garamond', Garamond, Georgia, serif;
  --fm: 'Cinzel', 'EB Garamond', Garamond, serif;

  --read-opt: min(62ch, 100%);
  --layout-max: min(1120px, 94vw);
  --layout-pad-x: clamp(20px, 4vw, 48px);

  /* Pont inline : fonds & surfaces */
  --ink: var(--bg);
  --snow: var(--ink-readable);
  --mist: var(--text-dim);
  --fog: rgba(240, 233, 216, 0.64);
  --ink2: var(--surface);
  --p1: var(--surface2);
  --p2: #1f1b15;
  --p3: #262118;
  --paper: var(--surface);
  --cream: var(--surface2);
  --rim: var(--border-soft);
  --rim2: rgba(212, 175, 55, 0.14);
  --rim3: rgba(212, 175, 55, 0.24);
  --gring: rgba(212, 175, 55, 0.32);
  --red: #991b1b;
  --crit-red: #991b1b;

  --text-dim-ui: var(--text-dim);
}

@media (min-width: 768px) {
  :root {
    --read-opt: min(68ch, 100%);
    --layout-max: min(1260px, 94vw);
    --layout-pad-x: clamp(28px, 4vw, 56px);
  }
}

@media (min-width: 1200px) {
  :root {
    --read-opt: min(72ch, 100%);
    --layout-max: min(1380px, 92vw);
    --layout-pad-x: clamp(36px, 5vw, 72px);
  }
}

@media (min-width: 1536px) {
  :root {
    --layout-max: min(1480px, 90vw);
  }
}

/* ====================== BASE ====================== */
html {
  background: var(--bg) !important;
  scroll-behavior: smooth;
}

body {
  background: var(--bg) !important;
  color: var(--ink-readable) !important;
  font-family: var(--fd) !important;
  font-size: 16.8px !important;
  line-height: 1.82 !important;
  font-weight: 440 !important;
  overflow-x: hidden;
}

@media (min-width: 1200px) {
  body {
    font-size: 18px !important;
  }
}

/* Texture sombre (votre SVG) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
}

.grain-overlay {
  opacity: 0.06 !important;
  mix-blend-mode: overlay !important;
}

.archive-vignette {
  box-shadow: inset 0 0 min(120vw, 780px) rgba(0, 0, 0, 0.45) !important;
}

input:focus,
textarea:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 4px var(--accent-dim) !important;
  outline: none !important;
}

.gold-text {
  color: var(--gold);
}

.text-dim {
  color: var(--text-dim);
}

/* Titres luxe (optionnel si .big-title au HTML) */
h1,
.big-title {
  font-family: var(--fm);
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 400;
}

.hero {
  background: linear-gradient(
      rgba(10, 8, 5, 0.88),
      rgba(10, 8, 5, 0.94)
    ),
    var(--surface);
  color: var(--ink-readable);
  padding: 160px 20px 120px;
  text-align: center;
}

.hero h1 {
  font-family: var(--fm);
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero .gold-text {
  color: var(--gold);
}

/* Conteneurs génériques + #wizard-container si présent */
.main-container,
.panel,
.card,
#wizard-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r12);
  box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.6);
}

/* ====================== NAV ====================== */
nav {
  background: rgba(18, 16, 12, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid var(--border-soft) !important;
}

.nav-logo span {
  color: var(--text-dim) !important;
}

.nav-link {
  color: var(--text-dim) !important;
  border-color: var(--rim2) !important;
}

.nav-link:hover {
  color: var(--gold) !important;
  border-color: var(--gring) !important;
}

.nav-cta:hover {
  background: var(--accent-dim) !important;
}

/* ====================== LANDING ====================== */
#p-landing .dossier-entry::before {
  background: radial-gradient(
    ellipse at 40% 30%,
    rgba(212, 175, 55, 0.12) 0%,
    transparent 62%
  ) !important;
}

.landing-preview-banner {
  border-color: rgba(212, 175, 55, 0.35) !important;
  background: linear-gradient(
    180deg,
    rgba(212, 175, 55, 0.08),
    rgba(18, 16, 12, 0.5)
  ) !important;
}

/* ——— Landing hero · sceau isolé (colonne droite desktop · compact au-dessus du texte mobile) ——— */
#p-landing #dossier-hero .dossier-meta,
#p-landing #dossier-hero .dossier-kicker,
#p-landing #dossier-hero .dossier-hero-fade,
#p-landing #dossier-hero .dossier-cta-row,
#p-landing #dossier-hero .hero-proof-card,
#p-landing #dossier-hero .dossier-scroll-hint {
  position: relative;
  z-index: 2;
}

#p-landing #dossier-hero .dossier-hero-seal-stage.landing-seal-stage,
#p-landing #dossier-hero .landing-seal-stage.dossier-hero-seal-stage {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: min(100%, min(44vmin, 560px));
  aspect-ratio: 1;
  max-height: min(76svh, 560px);
  height: auto;
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 900px) {
  #p-landing #dossier-hero.dossier-entry--hero-split .dossier-hero-seal-stage.landing-seal-stage {
    width: 110px;
    max-width: 110px;
    max-height: 110px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 901px) {
  /* Colonne droite : centrer le sceau et la carte de preuve comme un bloc unifié. */
  #p-landing #dossier-hero.dossier-entry--hero-split .dossier-hero-rail {
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  #p-landing #dossier-hero.dossier-entry--hero-split .dossier-hero-seal-stage.landing-seal-stage {
    width: min(100%, min(46vmin, 520px));
    max-height: min(72svh, 520px);
    margin-left: auto;
    margin-right: auto;
  }
  #p-landing #dossier-hero.dossier-entry--hero-split .landing-seal-img {
    width: clamp(150px, 50%, 270px);
    height: clamp(150px, 50%, 270px);
  }
  #p-landing #dossier-hero.dossier-entry--hero-split .landing-seal-glow {
    width: 96%;
    height: 96%;
    filter: blur(44px);
  }
  #p-landing #dossier-hero.dossier-entry--hero-split .landing-seal-ring--outer {
    border-width: clamp(8px, 1.2vmin, 16px);
    border-color: rgba(212, 175, 55, 0.28);
  }
}

@media (max-width: 900px) {
  #p-landing #dossier-hero.dossier-entry--hero-split .landing-seal-img {
    width: 110px;
    height: 110px;
  }
}

.landing-seal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 50% 45%;
  will-change: transform;
}

/* Anneaux retirés : on ne garde que la médaille + une lumière pulsante derrière. */
.landing-seal-ring--outer,
.landing-seal-ring--inner {
  display: none;
}

/* Halo doré pulsant, centré derrière la médaille (effet d'ombre lumineuse vivante). */
.landing-seal-glow {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.55) 0%, rgba(212,175,55,0.22) 38%, rgba(212,175,55,0) 70%);
  filter: blur(34px);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
  transform-origin: 50% 50%;
  animation: seal-glow-pulse 3.6s ease-in-out infinite;
}

@keyframes seal-glow-pulse {
  0%, 100% { transform: scale(0.92); opacity: 0.35; }
  50%      { transform: scale(1.12); opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-seal-glow { animation: none; opacity: 0.5; transform: scale(1); }
}

.landing-seal-img {
  position: relative;
  width: clamp(68px, 19vw, 112px);
  height: clamp(68px, 19vw, 112px);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.5);
}

.landing-seal-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dossier-kicker {
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.88);
  border: 1px solid var(--border);
  display: inline-block;
  padding: 10px 22px;
  margin: 0 0 26px;
  background: rgba(18, 16, 12, 0.55);
}

#p-landing #dossier-hero .dossier-hero-fade {
  transition: opacity 0.08s linear;
}

.dossier-cta-row {
  margin-top: 36px;
}

.dossier-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 52px;
}

.dossier-scroll-hint::before {
  content: '↓';
  font-size: 22px;
  line-height: 1;
  color: var(--gold);
  opacity: 0.5;
}

.dossier-scroll-hint .dossier-scroll-label {
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.42;
}

@media (prefers-reduced-motion: reduce) {
  .landing-seal {
    transform: none !important;
  }

  #p-landing #dossier-hero .dossier-hero-fade {
    opacity: 1 !important;
    transition: none;
  }

  .dossier-scroll-hint {
    animation: none !important;
  }
}

/* ====================== WIZARD ====================== */
#p-wizard {
  background: var(--bg) !important;
}

.wiz-header {
  background: rgba(18, 16, 12, 0.96) !important;
  border-bottom: 1px solid var(--border-soft) !important;
}

.wiz-progress-fill,
.progress-bar {
  background: linear-gradient(to right, var(--gold), var(--gold2)) !important;
  box-shadow: 0 0 16px var(--glow);
}

#screen-profile .profile-option,
#screen-consent .consent-box {
  background: var(--surface2) !important;
  border-color: var(--border-soft) !important;
}

.profile-option:hover,
.profile-option.selected {
  background: var(--p2) !important;
}

.q-text,
.question-text {
  font-size: clamp(24px, 3.5vw, 38px) !important;
  line-height: 1.35 !important;
  color: var(--ink-light) !important;
  font-weight: 400 !important;
}

.q-textarea {
  font-size: 18px !important;
  line-height: 1.75 !important;
  padding: 22px 26px !important;
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--r8) !important;
  min-height: 160px !important;
  color: var(--ink-readable) !important;
}

.q-next.enabled,
.profile-continue.enabled,
.consent-btn.enabled,
.ct-btn-crit,
.mirror-continue,
.recap-sticky-inner .btn-recap-pay,
.preview-pay-btn.btn-primary,
#preview-pay-btn,
.btn-primary,
button[type='submit'] {
  background: var(--gold) !important;
  color: #1c1812 !important;
  font-family: var(--fm) !important;
  font-size: 11px !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  border-radius: var(--r8) !important;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.35s ease,
    background 0.2s !important;
}

.q-next.enabled:hover,
.profile-continue.enabled:hover,
.consent-btn.enabled:hover,
.ct-btn-crit:hover,
.mirror-continue:hover,
.btn-primary:hover {
  background: #e8c96a !important;
  transform: translateY(-3px);
  box-shadow: 0 15px 40px var(--glow);
}

.q-intro {
  color: var(--text-dim) !important;
  border-left-color: var(--border) !important;
}

.q-phase {
  color: var(--gold2) !important;
}

.recap-sticky-wrap {
  background: linear-gradient(
    to top,
    rgba(10, 8, 5, 0.96) 0%,
    rgba(10, 8, 5, 0.88) 50%,
    transparent 100%
  ) !important;
}

/* ====================== HUB ====================== */
#p-hub-pdf .hub-block,
.hub-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--r12) !important;
  box-shadow: 0 22px 65px -18px rgba(0, 0, 0, 0.55) !important;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

#p-hub-pdf .hub-block:hover,
.hub-card:hover {
  border-color: var(--gold);
  box-shadow: 0 20px 50px var(--glow);
  transform: translateY(-6px);
}

.hub-count {
  font-size: 32px !important;
}

.hub-muted {
  color: var(--text-dim) !important;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.hub-card {
  padding: 32px;
}

/* ====================== PREVIEW PDF ====================== */
#p-preview.active {
  background: var(--surface) !important;
}

#p-preview {
  box-shadow: 0 30px 90px -15px rgba(0, 0, 0, 0.7);
}

#p-preview .wiz-header {
  background: rgba(18, 16, 12, 0.98) !important;
  border-bottom: 1px solid var(--border-soft) !important;
}

#preview-intent-banner {
  background: var(--accent-dim) !important;
  color: var(--text-mid) !important;
  border-bottom-color: var(--border-soft) !important;
}

/* ====================== MODE CRITIQUE ====================== */
#p-wizard.wiz-critical {
  --surface: #0f0c08;
  --surface2: #16130e;
  --paper: #0f0c08;
  --cream: #16130e;
  --gold: #e8c670;
  --gold2: #d4b45a;
  --gold3: #b8923a;
  --border: rgba(232, 198, 112, 0.28);
  --border-soft: rgba(232, 198, 112, 0.1);
  --accent-dim: rgba(232, 198, 112, 0.09);
  --glow: rgba(232, 198, 112, 0.22);
  --ink-readable: #f8f1df;
  --ink-light: #e8ddc4;
  --text-dim: rgba(248, 241, 223, 0.68);
  --text-mid: rgba(248, 241, 223, 0.9);
  --snow: var(--ink-readable);
  --mist: var(--text-dim);
  --fog: rgba(248, 241, 223, 0.5);
}

#p-wizard.wiz-critical,
#p-wizard.wiz-critical .wiz-header {
  background: var(--bg) !important;
}

#p-wizard.wiz-critical .profile-option,
#p-wizard.wiz-critical .consent-box {
  background: var(--surface2) !important;
}

#p-wizard.wiz-critical .q-textarea {
  background: var(--surface2) !important;
  color: var(--ink-readable) !important;
}
