/* Calendrier de l'Avent Sacré Divin'Om : styles communs (repris de la maquette validée). */
:root {
  --nuit: #120f26;
  --nuit-2: #1d1840;
  --violet: #7B6FB2;
  --violet-p: #2e2660;
  --or: #D8B77B;
  --or-clair: #f1dcae;
  --rouge: #8E2433;
  --sapin: #1E4A3B;
  --turq: #67C9C2;
  --neige: #F7F5F2;
  --texte: #EFEAE2;
  --doux: rgba(239, 234, 226, .7);
  --trait: rgba(216, 183, 123, .22);
  --verre: rgba(255, 255, 255, .045);
  --f-titre: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --f-texte: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  padding-top: env(safe-area-inset-top, 0px);
  background: radial-gradient(120% 80% at 50% 0%, #2b2259 0%, var(--nuit-2) 38%, var(--nuit) 75%) fixed;
  background-color: var(--nuit);
  color: var(--texte);
  font-family: var(--f-texte);
  font-weight: 300; font-size: 15px; line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--or); outline-offset: 3px; }
img { max-width: 100%; }

#ciel { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

.page {
  position: relative; z-index: 1;
  max-width: 760px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 calc(110px + env(safe-area-inset-bottom, 0px));
}

/* ---------- Écrans d'attente et d'erreur ---------- */
.ecran {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; text-align: center;
  padding: 24px max(24px, env(safe-area-inset-right, 0px)) 24px max(24px, env(safe-area-inset-left, 0px));
  background: radial-gradient(90% 70% at 50% 35%, #2b2259, var(--nuit) 75%);
}
.ecran .boite { max-width: 420px; display: grid; gap: 14px; justify-items: center; }
.ecran img { width: 96px; filter: drop-shadow(0 0 18px rgba(216,183,123,.4)); }
.ecran h2 { font-family: var(--f-titre); font-weight: 500; font-size: 28px; margin: 0; color: var(--neige); text-wrap: balance; }
.ecran p { margin: 0; color: var(--doux); }
.ecran .respire { animation: halo 2.4s ease-in-out infinite; }

/* ---------- En-tête ---------- */
.entete { position: relative; text-align: center; padding-block: 46px 14px; }
.guirlande { position: absolute; left: 50%; transform: translateX(-50%); top: 0; width: 100vw; height: 56px; pointer-events: none; }
.branche { position: absolute; top: -6px; width: 150px; height: 90px; pointer-events: none; opacity: .95; }
.branche.g { left: -30px; }
.branche.d { right: -30px; transform: scaleX(-1); }
.marque { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; color: var(--or); font-family: var(--f-titre); font-size: 15px; letter-spacing: .28em; text-transform: uppercase; }
.marque img { width: 74px; height: auto; filter: drop-shadow(0 0 14px rgba(216,183,123,.35)); }
h1 { font-family: var(--f-titre); font-weight: 500; font-size: clamp(30px, 8.4vw, 46px); line-height: 1.08; margin: 14px 0 8px; text-wrap: balance; color: var(--neige); }
h1 em { font-style: italic; background: linear-gradient(100deg, #c9a465, #f6e3b8 45%, #c9a465); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sous { margin: 0; color: var(--doux); font-size: 15px; }
.bandeau { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.date-jour, .passeport-bouton {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--trait); border-radius: 999px;
  font-size: 13px; letter-spacing: .04em; color: var(--or-clair); background: rgba(18, 15, 38, .5);
}
.date-jour::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--or); box-shadow: 0 0 10px var(--or); }
.passeport-bouton { cursor: pointer; transition: box-shadow .4s ease, border-color .4s ease; }
.passeport-bouton svg { width: 16px; height: 16px; }
.passeport-bouton b { font-weight: 500; font-variant-numeric: tabular-nums; }
.passeport-bouton.brille { border-color: var(--or); box-shadow: 0 0 0 1px rgba(216,183,123,.5), 0 0 26px rgba(216,183,123,.55); }

/* ---------- Barre d'aperçu (administration) ---------- */
.apercu {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px;
  margin: 4px auto 18px; padding: 10px 14px; max-width: 560px;
  border: 1px dashed rgba(103, 201, 194, .5); border-radius: 14px; background: rgba(103, 201, 194, .08); font-size: 13px; color: var(--doux);
}
.apercu strong { color: var(--turq); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; }
.apercu select { background: var(--nuit-2); color: var(--texte); border: 1px solid var(--trait); border-radius: 8px; padding: 5px 8px; font: inherit; }
.apercu button { background: none; border: 0; color: var(--turq); text-decoration: underline; cursor: pointer; padding: 4px; }

/* ---------- Message avant le 1er décembre ---------- */
.attente { text-align: center; margin: 0 auto 18px; max-width: 460px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--trait); background: var(--verre); }
.attente b { color: var(--or-clair); font-weight: 500; }

/* ---------- Vues ---------- */
.vue { animation: apparition .5s ease both; }
@keyframes apparition { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Grille ---------- */
.grille { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .grille { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; } }
.case {
  position: relative; aspect-ratio: 4 / 5; max-width: 100%;
  border: 1px solid var(--trait); border-radius: 16px;
  background: linear-gradient(170deg, rgba(255,255,255,.07), rgba(255,255,255,.015));
  padding: 0; cursor: pointer; overflow: visible;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.case:active { transform: scale(.96); }
@media (hover: hover) { .case:hover { transform: translateY(-3px); border-color: rgba(216,183,123,.5); } }
.case .art { position: absolute; inset: 4% 6% 2%; }
.case .art svg { width: 100%; height: 100%; overflow: visible; display: block; }
.case .numero {
  position: absolute; left: 50%; top: 69%; transform: translate(-50%, -50%);
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-titre); font-weight: 600; font-size: 17px; line-height: 1; color: #2a1f3f;
  background: radial-gradient(circle at 35% 30%, #fbecc6, #d8b77b 55%, #a98544);
  box-shadow: 0 2px 6px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.35);
}
.case .cadenas { position: absolute; right: 7%; bottom: 7%; width: 24px; height: 28px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); transform-origin: 50% 0; }
.case .etiquette {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  padding: 2px 8px; border-radius: 999px; color: #2a1f3f; background: var(--or); font-weight: 500;
}
.case.verrouille .art { filter: saturate(.35) brightness(.62); }
.case.verrouille .numero { filter: saturate(.5) brightness(.8); }
.case.verrouille { background: linear-gradient(170deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); border-color: rgba(216,183,123,.12); }
.case.secoue .cadenas { animation: cadenas .6s ease; }
.case.secoue .art { animation: refus .45s ease; }
@keyframes cadenas { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-16deg); } 45% { transform: rotate(13deg); } 70% { transform: rotate(-7deg); } }
@keyframes refus { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.case.dispo { border-color: rgba(216,183,123,.45); }
.case.dispo .art { transform-origin: 50% 92%; animation: frisson 3.2s ease-in-out infinite; filter: brightness(1.08); }
.case.aujourdhui .art { animation-duration: 2.4s; }
@keyframes frisson {
  0%, 62%, 100% { transform: translateY(0) rotate(0); }
  65% { transform: translateY(-3px) rotate(-4deg); }
  68% { transform: translateY(0) rotate(3.5deg); }
  71% { transform: translateY(-2px) rotate(-3deg); }
  74% { transform: translateY(0) rotate(2deg); }
  77% { transform: translateY(0) rotate(0); }
  82% { transform: translateY(-4px) scale(1.03, .97); }
  86% { transform: translateY(0) scale(.98, 1.02); }
  89% { transform: translateY(0) rotate(-1.5deg); }
  92% { transform: translateY(0) rotate(1deg); }
}
.case.dispo::after {
  content: ""; position: absolute; inset: -1px; border-radius: 16px; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(216,183,123,.4), 0 0 26px rgba(216,183,123,.32);
  animation: halo 3.6s ease-in-out infinite;
}
.case.aujourdhui { background: linear-gradient(170deg, rgba(216,183,123,.2), rgba(123,111,178,.12)); border-color: var(--or); }
.case.aujourdhui::after { box-shadow: 0 0 0 1px rgba(216,183,123,.6), 0 0 34px rgba(216,183,123,.45); }
@keyframes halo { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.case .eclat { position: absolute; width: 8px; height: 8px; pointer-events: none; opacity: 0; animation: eclat 2.8s ease-in-out infinite; }
.case .eclat::before, .case .eclat::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--or-clair); border-radius: 2px; transform: translate(-50%, -50%); }
.case .eclat::before { width: 2px; height: 8px; }
.case .eclat::after { width: 8px; height: 2px; }
@keyframes eclat { 0%,100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }

.case.ouvert { background: linear-gradient(160deg, rgba(216,183,123,.34), rgba(216,183,123,.12) 55%, rgba(216,183,123,.22)); border-color: rgba(216,183,123,.65); }
.case.ouvert .art { inset: 0 6% 12%; opacity: .5; filter: sepia(.35) saturate(.85); }
.case.ouvert .numero { top: 62%; opacity: .85; }
.case.ouvert::before {
  content: ""; position: absolute; top: 6px; right: 6px; z-index: 2; width: 18px; height: 18px; border-radius: 50%;
  background: var(--or) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4 L7.8 12 L13 6.2' fill='none' stroke='%232a1f3f' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.case.ouvert .titre-mini {
  position: absolute; left: 6px; right: 6px; bottom: 5px; text-align: center;
  font-size: 9.5px; line-height: 1.2; color: var(--or-clair);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.legende { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--doux); }
.legende li { display: inline-flex; align-items: center; gap: 7px; }
.legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- Coffre ---------- */
.coffre-tete { text-align: center; padding-block: 4px 18px; }
.coffre-tete svg { width: 120px; height: 104px; overflow: visible; }
.coffre-tete h2 { font-family: var(--f-titre); font-weight: 500; font-size: 30px; margin: 6px 0 2px; color: var(--neige); }
.coffre-tete p { margin: 0; color: var(--doux); }
.jauge { height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); max-width: 260px; margin: 12px auto 0; overflow: hidden; }
.jauge span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--or)); transition: width .6s ease; }
.annonce { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; margin: 0 0 14px; border-radius: 14px; border: 1px solid rgba(216,183,123,.35); background: rgba(216,183,123,.08); font-size: 14px; }
.bouton {
  border: 0; cursor: pointer; border-radius: 999px; padding: 10px 18px; font-weight: 500; font-size: 14px; letter-spacing: .03em;
  color: #2a1f3f; background: linear-gradient(120deg, #c9a465, #f3dfb1 50%, #c9a465); box-shadow: 0 4px 14px rgba(216,183,123,.25);
}
.bouton.discret { background: transparent; color: var(--or-clair); border: 1px solid var(--trait); box-shadow: none; }
.bouton:disabled { opacity: .5; cursor: default; }
.tresors { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .tresors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tresor { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--trait); background: var(--verre); cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.tresor:hover { border-color: rgba(216,183,123,.5); background: rgba(255,255,255,.07); }
.tresor .ico { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, rgba(216,183,123,.35), rgba(123,111,178,.25)); border: 1px solid var(--trait); color: var(--or-clair); }
.tresor .ico svg { width: 22px; height: 22px; }
.tresor .txt { min-width: 0; flex: 1; }
.tresor .type { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--or); }
.tresor .nom { display: block; font-family: var(--f-titre); font-size: 19px; font-weight: 500; line-height: 1.2; color: var(--neige); }
.tresor .fleche { color: var(--doux); flex: none; }
.vide { text-align: center; color: var(--doux); padding: 26px 10px; border: 1px dashed var(--trait); border-radius: 14px; }

/* ---------- Onglets ---------- */
.onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; gap: 6px;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(180deg, rgba(18,15,38,0), rgba(18,15,38,.92) 30%);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid rgba(216,183,123,.12);
}
.onglet { position: relative; flex: 1; max-width: 200px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px 6px; border: 0; background: none; cursor: pointer; color: var(--doux); font-size: 12px; letter-spacing: .06em; border-radius: 12px; }
.onglet svg { width: 26px; height: 26px; }
.onglet[aria-selected="true"] { color: var(--or-clair); background: rgba(216,183,123,.09); }
.onglet .pastille { position: absolute; top: 4px; left: calc(50% + 10px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--rouge); color: var(--neige); font-size: 11px; line-height: 18px; font-weight: 500; box-shadow: 0 0 0 2px var(--nuit); }

/* ---------- Message éphémère ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  width: min(92vw, 420px); padding: 12px 16px; border-radius: 14px; text-align: center;
  background: rgba(29, 24, 64, .96); border: 1px solid var(--trait); box-shadow: 0 10px 30px rgba(0,0,0,.4);
  font-size: 14px; transition: opacity .3s ease, transform .3s ease;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast b { color: var(--or-clair); font-weight: 500; }

/* ---------- Ouverture d'un cadeau ---------- */
.voile {
  position: fixed; inset: 0; z-index: 50;
  background: radial-gradient(90% 70% at 50% 40%, #2e2660, #0a0818); /* opaque : rien du calendrier ne transparaît */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .35s ease;
}
.voile.visible { opacity: 1; }
#etincelles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
.fermer { position: absolute; z-index: 6; top: calc(12px + env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--trait); background: rgba(18,15,38,.7); cursor: pointer; display: grid; place-items: center; }
.scene { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; transition: transform .9s cubic-bezier(.4,0,.2,1), opacity .7s ease; }
.scene .jour-grand { font-family: var(--f-titre); color: var(--or); letter-spacing: .3em; text-transform: uppercase; font-size: 14px; margin-bottom: 8px; }
.scene svg { width: min(68vw, 270px); height: auto; overflow: visible; cursor: pointer; }
.scene .indice { margin-top: 10px; color: var(--doux); font-size: 14px; animation: halo 2.4s ease-in-out infinite; text-align: center; }
.scene.entree svg { animation: arrivee .8s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes arrivee { from { transform: scale(.35) translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.scene svg #grandPaquet { transform-box: view-box; transform-origin: 50% 92%; }
.scene:not(.secousse):not(.envol) svg #grandPaquet { animation: frisson 2.6s ease-in-out .9s infinite; }
.scene.secousse svg #grandPaquet { animation: secousse .55s ease-in-out 2; }
@keyframes secousse { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-5deg) scale(1.02); } 75% { transform: rotate(5deg) scale(1.02); } }
.scene svg .mobile { transform-box: fill-box; }
#bBoucleG { transform-origin: 100% 80%; transition: transform .8s cubic-bezier(.5,0,.3,1), opacity .7s ease; }
#bBoucleD { transform-origin: 0% 80%; transition: transform .8s cubic-bezier(.5,0,.3,1), opacity .7s ease; }
#bNoeud, #bQueues { transform-origin: 50% 0%; transition: transform .7s ease, opacity .6s ease; }
#bRubanCouv { transform-origin: 50% 0%; transition: transform .55s ease .25s; }
#bRubanCorps { transform-origin: 50% 100%; transition: transform .6s ease .3s; }
.scene.denoue #bBoucleG { transform: translate(-10px, 10px) rotate(-70deg) scale(.2); opacity: 0; }
.scene.denoue #bBoucleD { transform: translate(10px, 10px) rotate(70deg) scale(.2); opacity: 0; }
.scene.denoue #bNoeud { transform: scale(.2); opacity: 0; }
.scene.denoue #bQueues { transform: translateY(14px) scaleY(.4); opacity: 0; }
.scene.denoue #bRubanCouv, .scene.denoue #bRubanCorps { transform: scaleY(0); }
#bCouvercle { transform-origin: 50% 50%; transition: transform 1.1s cubic-bezier(.15,.75,.3,1), opacity .9s ease .25s; }
.scene.envol #bCouvercle { transform: translate(26px, -120px) rotate(32deg); opacity: 0; }
#bLueur, #bRayons { opacity: 0; transition: opacity .6s ease; transform-origin: 50% 100%; }
.scene.envol #bLueur { opacity: 1; }
.scene.envol #bRayons { opacity: 1; animation: rayons 4s ease-in-out infinite; }
@keyframes rayons { 0%,100% { transform: rotate(-9deg) scale(.96); } 50% { transform: rotate(9deg) scale(1.06); } }
.scene.devoile { transform: translateY(-34vh) scale(.42); opacity: 0; pointer-events: none; }

/* Zone où chaque jour monte son expérience */
.experience {
  position: absolute; inset: 0; z-index: 3; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(64px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  opacity: 0; transform: translateY(24px); pointer-events: none; transition: opacity .7s ease, transform .8s cubic-bezier(.2,.8,.2,1);
}
.experience.visible { opacity: 1; transform: none; pointer-events: auto; }
.chargement { text-align: center; color: var(--doux); padding-top: 30vh; }

/* ---------- Présentation commune d'un cadeau ---------- */
.cadeau { max-width: 560px; margin: 0 auto; }
.cadeau .surtitre { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--or); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cadeau .surtitre svg { width: 16px; height: 16px; flex: none; }
.cadeau h2 { font-family: var(--f-titre); font-weight: 500; font-size: clamp(28px, 7.5vw, 38px); line-height: 1.1; margin: 8px 0 14px; color: var(--neige); text-wrap: balance; }
.cadeau p { margin: 0 0 14px; }
.cadeau .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.badge-exemple { display: inline-block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; color: var(--turq); border: 1px solid rgba(103,201,194,.5); background: rgba(103,201,194,.08); }
.note-dev { margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px dashed rgba(103,201,194,.45); color: var(--doux); font-size: 13px; }
.emplacement { display: grid; place-items: center; text-align: center; gap: 6px; min-height: 170px; padding: 18px; border-radius: 16px; border: 1.5px dashed rgba(216,183,123,.5); background: rgba(216,183,123,.05); color: var(--doux); font-size: 13px; margin: 0 0 14px; }
.emplacement b { color: var(--or-clair); font-weight: 500; }
.image-cadeau { display: block; margin: 0 auto 14px; max-height: 60vh; border-radius: 12px; filter: drop-shadow(0 0 24px rgba(216,183,123,.25)); }
.parchemin { white-space: pre-line; padding: 18px 18px; border-radius: 14px; background: linear-gradient(170deg, rgba(247,240,224,.1), rgba(216,183,123,.06)); border: 1px solid var(--trait); margin: 0 0 14px; font-family: var(--f-titre); font-size: 19px; line-height: 1.45; color: var(--or-clair); }
.liste-cadeau { margin: 0 0 14px; padding-left: 20px; }
.liste-cadeau li { margin: 4px 0; }
.champ-titre { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--or); margin: 18px 0 6px; }

/* Lecteur audio commun */
.audio { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--trait); margin: 0 0 14px; }
.audio .lire { flex: none; width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer; background: linear-gradient(120deg, #c9a465, #f3dfb1 50%, #c9a465); display: grid; place-items: center; box-shadow: 0 0 0 6px rgba(216,183,123,.12); }
.audio .piste { flex: 1; min-width: 0; }
.audio .ondes { display: flex; align-items: center; gap: 3px; height: 30px; }
.audio .ondes i { flex: 1; background: rgba(216,183,123,.45); border-radius: 2px; }
.audio.joue .ondes i { animation: onde 1s ease-in-out infinite; background: var(--or); }
@keyframes onde { 0%,100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
.audio input[type=range] { width: 100%; accent-color: var(--or); margin: 6px 0 0; }
.audio .temps { font-size: 12px; color: var(--doux); font-variant-numeric: tabular-nums; }

/* ---------- Passeport Sacré ---------- */
.feuille { position: fixed; inset: 0; z-index: 55; display: grid; align-items: end; background: rgba(8,6,20,.6); opacity: 0; transition: opacity .3s ease; }
.feuille.visible { opacity: 1; }
.feuille .panneau {
  width: 100%; max-width: 560px; margin: 0 auto; max-height: 88vh; overflow-y: auto;
  padding: 22px max(18px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  border-radius: 24px 24px 0 0; background: linear-gradient(175deg, #2e2660, #17132f); border: 1px solid rgba(216,183,123,.35); border-bottom: 0;
  transform: translateY(30px); transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.feuille.visible .panneau { transform: none; }
.panneau h2 { font-family: var(--f-titre); font-weight: 500; font-size: 28px; margin: 0; text-align: center; color: var(--neige); }
.panneau .sous-titre { text-align: center; color: var(--doux); margin: 4px 0 18px; }
.etoiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.emplacement-etoile { display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--doux); font-variant-numeric: tabular-nums; }
.emplacement-etoile svg { width: 100%; max-width: 46px; height: auto; overflow: visible; }
.emplacement-etoile.eteinte svg path { fill: none; stroke: rgba(216,183,123,.3); stroke-width: 1.2; }
.emplacement-etoile.allumee svg { filter: drop-shadow(0 0 8px rgba(241,220,174,.7)); }
.emplacement-etoile.allumee { color: var(--or-clair); }
.etoile-volante { position: fixed; z-index: 80; width: 34px; height: 34px; pointer-events: none; filter: drop-shadow(0 0 12px rgba(255,240,200,.9)); }

/* ---------- Fenêtre d'avis après le soin ---------- */
.formulaire { display: grid; gap: 12px; }
.formulaire label { display: grid; gap: 6px; font-size: 14px; color: var(--or-clair); }
.formulaire textarea { width: 100%; min-height: 96px; resize: vertical; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--trait); background: rgba(0,0,0,.2); color: var(--texte); font: inherit; }
.formulaire .case-accord { display: flex; gap: 10px; align-items: flex-start; color: var(--doux); font-size: 13px; }
.formulaire .case-accord input { margin-top: 3px; accent-color: var(--or); width: 18px; height: 18px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Couleur des étoiles selon l'intention du jour 1 ---------- */
.etoile-couleur { fill: url(#gOr); }
html[data-intention="amour"] .etoile-couleur { fill: url(#gEtoile-amour); }
html[data-intention="abondance"] .etoile-couleur { fill: url(#gEtoile-abondance); }
html[data-intention="paix"] .etoile-couleur { fill: url(#gEtoile-paix); }
html[data-intention="amour"] .emplacement-etoile.allumee svg { filter: drop-shadow(0 0 8px rgba(244,154,192,.75)); }
html[data-intention="abondance"] .emplacement-etoile.allumee svg { filter: drop-shadow(0 0 8px rgba(63,198,138,.7)); }
html[data-intention="paix"] .emplacement-etoile.allumee svg { filter: drop-shadow(0 0 8px rgba(124,200,240,.75)); }
html[data-intention="amour"] .emplacement-etoile.allumee { color: #f7c3d8; }
html[data-intention="abondance"] .emplacement-etoile.allumee { color: #9fe3c2; }
html[data-intention="paix"] .emplacement-etoile.allumee { color: #b6e1f7; }
/* Changement d'intention : les étoiles s'illuminent doucement en prenant leur nouvelle couleur */
html.etoiles-changent .emplacement-etoile.allumee svg, html.etoiles-changent .passeport-bouton svg { animation: etoileChange 1.6s ease both; }
@keyframes etoileChange { 0% { transform: scale(1); filter: brightness(1); } 35% { transform: scale(1.35) rotate(18deg); filter: brightness(2.2) drop-shadow(0 0 12px #fff6dc); } 100% { transform: scale(1); filter: brightness(1); } }

/* Avis sur le calendrier : note de 1 à 5 étoiles */
.formulaire .avis-etoiles { margin: 0; padding: 0; border: 0; text-align: center; }
.formulaire .avis-etoiles legend { width: 100%; margin-bottom: 6px; font-size: 14px; color: var(--doux); }
.avis-etoiles .rangee { display: flex; justify-content: center; gap: 6px; }
.avis-etoiles button { padding: 0 2px; border: 0; background: none; cursor: pointer; font-size: 38px; line-height: 1; color: rgba(216,183,123,.28); transition: color .2s ease, transform .2s ease, text-shadow .2s ease; }
.avis-etoiles button.on { color: #f1dcae; text-shadow: 0 0 12px rgba(241,220,174,.8); }
.avis-etoiles button:active { transform: scale(1.2); }

/* Étoile du Passeport qui tourne autour du cadeau à son ouverture */
.etoile-orbite { position: fixed; left: 0; top: 0; z-index: 9999; width: 34px; height: 34px; margin: -17px 0 0 -17px; pointer-events: none; opacity: 0; will-change: transform; }
.etoile-orbite svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 6px rgba(255,246,220,.95)) drop-shadow(0 0 16px rgba(255,246,220,.6)); }
