/* Thème « Nuit étoilée » : mariage du soir, fond bleu nuit, indigo et or chaud, textes clairs.
   Chargé après invitation.css ; surcharge ses variables et les couleurs claires écrites en dur.
   Rôles des variables (noms hérités de L'Orangerie) : --ivoire = fond de page, --blanc = fond des cartes,
   --encre = texte, --doux = texte secondaire, --sauge-fonce = couleur principale (ici or chaud).
   Contrastes mesurés sur #141a33 : texte #f4eedf 15,6:1, secondaire #c3c0d6 9,3:1, or #e6c77f 10,6:1, surtitres #e9cd8a 11,2:1. */
body.theme-nuit{
  --ivoire:#141a33; --ivoire-2:#0f142a; --abricot:#2c3566; --abricot-doux:#1d2550;
  --sauge:#8d93c9; --sauge-fonce:#e6c77f; --or:#d6ad5c; --or-texte:#e9cd8a;
  --encre:#f4eedf; --doux:#c3c0d6; --blanc:#1c2448;
  --ombre:0 14px 40px rgba(0,0,0,.35);
  color-scheme:dark}
.theme-nuit::before{
  background:linear-gradient(rgba(13,17,38,.72),rgba(13,17,38,.72)),url(/_f/42170285785d/images/invitation/nuit/heros.jpg) center/cover,
    radial-gradient(circle at 20% 15%,#2a3370,transparent 55%),radial-gradient(circle at 85% 80%,#3a2f5e,transparent 55%),var(--ivoire)}
.theme-nuit .page{box-shadow:0 0 0 1px rgba(230,199,127,.12),0 30px 80px rgba(0,0,0,.5)}
.theme-nuit ::selection{background:#e6c77f;color:#141a33}

/* ---------- Ouverture : deux grandes portes de château ---------- */
.theme-nuit .ouverture::before{background:radial-gradient(circle at 50% 38%,#2a3266,var(--ivoire) 72%)}
.theme-nuit .bulle{background:rgba(15,20,42,.86);color:var(--encre);box-shadow:inset 0 0 0 1px rgba(230,199,127,.55),0 10px 30px rgba(0,0,0,.45)}
.theme-nuit .ouvrir:focus-visible .bulle{outline-color:var(--sauge-fonce)}
/* Repli en CSS quand la vidéo manque : une arche de pierre, deux battants qui pivotent sur leurs gonds */
.portes{position:absolute;left:9%;right:9%;top:14%;bottom:0;display:flex;perspective:1300px;
  border-radius:50% 50% 0 0 / 24% 24% 0 0;overflow:hidden;
  box-shadow:0 0 0 12px #2b3150,0 0 0 14px rgba(214,173,92,.35),0 30px 80px rgba(0,0,0,.6)}
.portes-lueur{position:absolute;inset:0;display:grid;place-content:center;gap:.3rem;text-align:center;
  background:radial-gradient(ellipse at 50% 45%,#f6d98f 0,#c99a3d 28%,#3a2f5e 70%,#141a33 100%)}
.portes-lueur .script{font-size:clamp(2rem,10vw,2.8rem);color:#2a1f0a}
.portes-lueur .petit{font:500 .9rem 'Jost',system-ui,sans-serif;letter-spacing:.2em;color:#3a2a0c}
.porte{position:relative;flex:1;backface-visibility:hidden;
  background:linear-gradient(90deg,rgba(0,0,0,.25),transparent 12%,transparent 88%,rgba(0,0,0,.25)),
    repeating-linear-gradient(90deg,#3b2a20 0 18%,#33241b 18% 19%),linear-gradient(180deg,#46322a,#2a1d16);
  transition:transform 1.4s cubic-bezier(.55,0,.25,1) .15s}
.porte.g{transform-origin:left center;box-shadow:inset -2px 0 0 rgba(0,0,0,.45)}
.porte.d{transform-origin:right center;box-shadow:inset 2px 0 0 rgba(0,0,0,.45)}
.porte::before,.porte::after{content:"";position:absolute;left:16%;right:16%;border:2px solid rgba(214,173,92,.55);border-radius:4px;
  box-shadow:inset 0 0 0 5px rgba(0,0,0,.18)}
.porte::before{top:16%;bottom:50%;border-radius:50% 50% 4px 4px / 22% 22% 4px 4px}
.porte::after{top:56%;bottom:7%}
.poignee{position:absolute;top:52%;width:16px;height:16px;margin-top:-8px;border-radius:50%;border:3px solid #d6ad5c;box-shadow:0 0 8px rgba(246,217,143,.5)}
.porte.g .poignee{right:8%}
.porte.d .poignee{left:8%}
.ouverture.ouvre .porte.g{transform:rotateY(-96deg)}
.ouverture.ouvre .porte.d{transform:rotateY(96deg)}
.ouverture.video-prete .portes{visibility:hidden}

/* ---------- Boutons ---------- */
.theme-nuit .btn-or{box-shadow:0 10px 26px rgba(214,173,92,.3)}
.theme-nuit .btn-sauge{color:#141a33}
.theme-nuit .btn-sauge:hover{background:#f0d595}
.theme-nuit .btn-contour:hover{background:rgba(230,199,127,.12)}

/* ---------- Héros : voile bleu nuit, textes clairs ---------- */
.theme-nuit .heros{background:url(/_f/42170285785d/images/invitation/nuit/heros.jpg) center/cover,
    radial-gradient(ellipse at 50% 85%,#3a2f5e 0,transparent 55%),radial-gradient(circle at 80% 25%,#2d3a7a 0,transparent 45%),
    linear-gradient(180deg,#0d1126,var(--ivoire) 55%,#1f2552)}
.theme-nuit .heros-voile{background:linear-gradient(180deg,rgba(13,17,38,.72) 0,rgba(13,17,38,.35) 34%,rgba(13,17,38,0) 55%,rgba(13,17,38,0) 68%,rgba(13,17,38,.8) 100%)}
.theme-nuit .noms{text-shadow:0 2px 18px rgba(0,0,0,.65)}
.theme-nuit .date-heros{text-shadow:0 1px 8px rgba(0,0,0,.7)}
.theme-nuit .lieu-heros{text-shadow:0 0 6px #0d1126,0 0 12px #0d1126,0 0 18px #0d1126}

/* ---------- Décors : les images sont sur fond bleu nuit, pas de mélange « multiply » ---------- */
.theme-nuit .separateur img,.theme-nuit .lieu-image img{mix-blend-mode:normal}

/* ---------- Cartes, filets, formulaire ---------- */
.theme-nuit .case{box-shadow:inset 0 0 0 1px rgba(214,173,92,.4),var(--ombre)}
.theme-nuit .programme li:not(:last-child)::after{background:rgba(141,147,201,.45)}
.theme-nuit .rond{box-shadow:inset 0 0 0 1.5px rgba(230,199,127,.55)}
.theme-nuit .champ input,.theme-nuit .champ select,.theme-nuit .champ textarea{border-color:#5b6396}
.theme-nuit .champ input:focus,.theme-nuit .champ select:focus,.theme-nuit .champ textarea:focus{outline-color:rgba(230,199,127,.3)}
.theme-nuit .champ [aria-invalid="true"]{border-color:#ff9a85}
.theme-nuit .erreur{color:#ffab99}
.theme-nuit .gros-choix span,.theme-nuit .petit-choix span{box-shadow:inset 0 0 0 1.5px #5b6396}
.theme-nuit .gros-choix input:checked+span,.theme-nuit .petit-choix input:checked+span{color:#141a33}
.theme-nuit .note-adultes{background:rgba(255,255,255,.06)}
.theme-nuit .merci-titre{color:var(--sauge-fonce)}

/* ---------- Bouton musique et message bref ---------- */
.theme-nuit .bouton-musique{background:rgba(28,36,72,.92);box-shadow:inset 0 0 0 1px rgba(230,199,127,.4),0 8px 24px rgba(0,0,0,.4)}
.theme-nuit .bouton-musique[aria-pressed="true"]{background:var(--sauge-fonce);color:#141a33}
.theme-nuit .toast{background:#f4eedf;color:#141a33}

@media (prefers-reduced-motion: reduce){
  .porte{transition:none}
}
