/* =====================================================================
   LES GARDIENS DU TRÉSOR DE SAINT-CYR — V0.2
   Direction artistique : parchemin lumineux, carnet d'exploration,
   archéologie douce, vieux secret local. Aucune ressource externe.
   Référence créative : UNIVERS_GARDIENS.md (§5, §6, §12).
   ===================================================================== */

:root {
  /* === TOKENS NOCTURNES — FABLE DA A1 === */
  --nuit: #0e1c1e;
  --nuit-claire: #172b2d;
  --sapin: #1f3a33;
  --brume: #8ea9a1;
  --lueur: #a9d8c9;
  --luciole: #ffd98a;

  --papier: #f6eed9;
  --papier-2: #efe3c4;
  --papier-3: #e6d5a9;
  --creme: #fbf6e8;
  --encre: #3a2c18;
  --sepia: #6f5636;
  --sepia-clair: #8a6a38;
  --or: #b8862f;
  --or-clair: #d8b26a;
  --vert: #43603c;
  --vert-clair: #5c7350;
  --cire: #9c3524;
  --cire-sombre: #6f2317;
  --cuivre: #b87333;

  --ombre-carte: 0 18px 40px -18px rgba(58, 44, 24, 0.45);
  --ombre-douce: 0 6px 16px -8px rgba(58, 44, 24, 0.35);

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  --hauteur-nav: 62px;
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--serif);
  color: var(--encre);
  background-color: var(--papier);
  background-image:
    radial-gradient(ellipse at 15% 6%, rgba(184, 134, 47, 0.10), transparent 45%),
    radial-gradient(ellipse at 85% 12%, rgba(67, 96, 60, 0.08), transparent 40%),
    radial-gradient(ellipse at 78% 92%, rgba(111, 86, 54, 0.10), transparent 45%),
    radial-gradient(ellipse at 18% 96%, rgba(184, 134, 47, 0.09), transparent 40%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Grain de papier : bruit SVG embarqué en data-URI, aucun réseau */
.grain-papier {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.42 0 0 0 0 0.33 0 0 0 0 0.20 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)'/%3E%3C/svg%3E");
}

img { max-width: 100%; }

/* ===================== BOUTONS & LIENS ===================== */

.btn {
  display: inline-block;
  padding: 14px 26px;
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.05em;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
  text-decoration: none;
  text-align: center;
}
.btn:active { transform: translateY(1px) scale(0.985); }

.btn-or {
  background: linear-gradient(165deg, #c99b46, var(--or) 55%, #96691f);
  color: var(--creme);
  box-shadow: var(--ombre-douce), inset 0 1px 0 rgba(255, 248, 226, 0.4);
  text-shadow: 0 1px 1px rgba(80, 55, 10, 0.4);
}
.btn-or:hover { filter: brightness(1.07); }

.btn-cire {
  background: linear-gradient(165deg, #b2452f, var(--cire) 55%, var(--cire-sombre));
  color: #fdf3e4;
  font-size: 1.05rem;
  padding: 16px 30px;
  box-shadow: 0 14px 30px -10px rgba(111, 35, 23, 0.55), inset 0 1px 0 rgba(255, 226, 205, 0.35);
  text-shadow: 0 1px 1px rgba(60, 15, 8, 0.5);
}
.btn-cire:hover { filter: brightness(1.08); }

.btn-contour {
  background: transparent;
  color: var(--sepia);
  border: 1.5px solid var(--sepia-clair);
}
.btn-contour:hover { background: rgba(138, 106, 56, 0.08); }

.btn-bloc { width: 100%; }

.lien-discret {
  background: none;
  border: none;
  padding: 6px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--sepia);
  text-decoration: underline dotted;
  cursor: pointer;
  opacity: 0.85;
}
.lien-discret:hover { color: var(--encre); }

/* ===================== ÉCRANS PLEIN FORMAT ===================== */

.plein-ecran {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  background-color: var(--papier);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(216, 178, 106, 0.25), transparent 55%),
    radial-gradient(ellipse at 20% 90%, rgba(67, 96, 60, 0.08), transparent 45%);
  overflow-y: auto;
}
.plein-ecran[hidden] { display: none; }

/* ---------- Ouverture ---------- */

.ouverture-contenu {
  position: relative;
  z-index: 2;
  max-width: 420px;
  text-align: center;
  padding-bottom: 90px;
}

.ouverture-sceau {
  width: 130px;
  height: 130px;
  margin-bottom: 18px;
  filter: drop-shadow(0 10px 18px rgba(58, 44, 24, 0.35));
  animation: sceau-entre 1.1s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

.ouverture-eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sepia);
  animation: monte-fond 0.9s ease 0.35s both;
}

.ouverture-dossier {
  display: inline-block;
  margin: 0 0 14px;
  padding: 3px 12px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--vert);
  border: 1.5px solid var(--vert);
  border-radius: 3px;
  transform: rotate(-2.5deg);
  opacity: 0.9;
  animation: tampon-pose 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) 0.9s both;
}

.ouverture-titre {
  margin: 0 0 6px;
  font-size: clamp(2rem, 8vw, 2.7rem);
  line-height: 1.1;
  font-weight: normal;
  letter-spacing: 0.02em;
  color: var(--encre);
  animation: monte-fond 1s ease 0.55s both;
}

.ouverture-lieu {
  margin: 0 0 18px;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cuivre);
  animation: monte-fond 1s ease 0.7s both;
}

.ouverture-phrase {
  margin: 0 auto 16px;
  max-width: 34ch;
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--sepia);
  padding: 12px 6px;
  border-top: 1px solid rgba(138, 106, 56, 0.35);
  border-bottom: 1px solid rgba(138, 106, 56, 0.35);
  animation: monte-fond 1s ease 0.9s both;
}

.ouverture-meta {
  margin: 0 0 26px;
  font-size: 0.82rem;
  color: var(--sepia);
  opacity: 0.85;
  animation: monte-fond 1s ease 1.05s both;
}

#btn-ouvrir { animation: monte-fond 0.9s ease 1.25s both; }
#btn-recommencer { display: block; margin: 14px auto 0; animation: monte-fond 0.9s ease 1.5s both; }

.ouverture-crete {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 90px;
  animation: crete-leve 1.4s ease 0.4s both;
}

@keyframes sceau-entre {
  from { opacity: 0; transform: scale(1.6) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes monte-fond {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes tampon-pose {
  from { opacity: 0; transform: rotate(-2.5deg) scale(1.8); }
  to   { opacity: 0.9; transform: rotate(-2.5deg) scale(1); }
}
@keyframes crete-leve {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Dialogue (Cercle des Gardiens) ---------- */

.dialogue-scene {
  max-width: 440px;
  width: 100%;
  text-align: center;
}

.dialogue-portrait {
  width: 74px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 12px rgba(58, 44, 24, 0.3));
}
.dialogue-portrait.grand {
  width: 150px;
  margin-bottom: 16px;
  animation: monte-fond 0.8s ease both;
}

.dialogue-cadre {
  position: relative;
  text-align: left;
  background: var(--creme);
  border: 1px solid rgba(138, 106, 56, 0.5);
  border-radius: 6px;
  padding: 18px 20px;
  box-shadow: var(--ombre-douce);
}
.dialogue-cadre::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(184, 134, 47, 0.35);
  border-radius: 3px;
  pointer-events: none;
}

.dialogue-nom {
  margin: 0 0 6px;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--or);
}

.dialogue-texte {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.62;
  font-style: italic;
  color: var(--encre);
}

.intro-points {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 18px 0;
}
.intro-points span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(138, 106, 56, 0.3);
  transition: background 0.3s ease, transform 0.3s ease;
}
.intro-points span.actif {
  background: var(--or);
  transform: scale(1.25);
}

#ecran-intro .btn { min-width: 200px; }
#btn-intro-passer { display: block; margin: 12px auto 0; }

.intro-volet { animation: monte-fond 0.5s ease both; }

/* ===================== COQUILLE DE L'APPLICATION ===================== */

#app {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 14px 16px calc(var(--hauteur-nav) + 40px);
}

.app-entete {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 12px;
  border-bottom: 2px solid rgba(138, 106, 56, 0.35);
  margin-bottom: 16px;
}

.entete-sceau { width: 44px; height: 44px; flex-shrink: 0; }

.entete-textes { flex: 1; min-width: 0; }

.entete-dossier {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sepia);
}
.entete-titre {
  margin: 2px 0 0;
  font-size: 1.02rem;
  color: var(--encre);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.entete-etape {
  margin: 0;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--or);
  white-space: nowrap;
}

/* ---------- Navigation du carnet ---------- */

.app-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, var(--papier-2), var(--papier-3));
  border-top: 2px solid rgba(138, 106, 56, 0.45);
  box-shadow: 0 -8px 24px -12px rgba(58, 44, 24, 0.4);
}

.nav-onglet {
  flex: 1;
  max-width: 108px;
  padding: 8px 2px 6px;
  background: none;
  border: none;
  border-radius: 6px;
  font-family: var(--serif);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--sepia);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-onglet .onglet-marque {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-style: italic;
}
.nav-onglet.actif {
  color: var(--encre);
  background: rgba(251, 246, 232, 0.85);
  box-shadow: inset 0 0 0 1px rgba(184, 134, 47, 0.4);
}
.nav-onglet.actif .onglet-marque {
  background: var(--or);
  border-color: var(--or);
  color: var(--creme);
  font-style: normal;
}
.nav-onglet.onglet-cire.deverrouille { color: var(--cire); }
.nav-onglet.onglet-cire.deverrouille .onglet-marque {
  background: var(--cire);
  border-color: var(--cire);
  color: #fdf3e4;
}
.nav-onglet .pastille {
  position: absolute;
}

/* ---------- Vues ---------- */

.vue { animation: monte-fond 0.4s ease both; }
.vue[hidden] { display: none; }

.page-carnet {
  position: relative;
  background: var(--creme);
  border: 1px solid rgba(138, 106, 56, 0.45);
  border-radius: 6px;
  padding: 22px 20px 24px;
  box-shadow: var(--ombre-carte);
  margin-bottom: 18px;
}
.page-carnet::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(138, 106, 56, 0.18);
  border-radius: 3px;
  pointer-events: none;
}
.page-carnet > * { position: relative; }

.titre-page {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: normal;
  color: var(--encre);
}
.soustitre-page {
  margin: 0 0 16px;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--sepia);
}

.tampon {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--vert);
  border: 1.5px solid var(--vert);
  border-radius: 3px;
  padding: 3px 10px;
  transform: rotate(-2.5deg);
  margin-bottom: 12px;
  opacity: 0.9;
}
.tampon-cire { color: var(--cire); border-color: var(--cire); }

/* ===================== VUE MISSION ===================== */

.etape-tete { margin-bottom: 14px; }

.etape-lieu-titre {
  margin: 6px 0 4px;
  font-size: 1.4rem;
  font-weight: normal;
  line-height: 1.2;
  color: var(--encre);
}

.etape-objectif {
  margin: 0;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--sepia);
}

.etape-media {
  margin: 0 0 16px;
  border: 1px solid rgba(138, 106, 56, 0.5);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: var(--ombre-douce);
  background: var(--papier-2);
}
.etape-media img, .etape-media video { display: block; width: 100%; }
.etape-media figcaption {
  padding: 7px 12px;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--sepia);
  border-top: 1px solid rgba(138, 106, 56, 0.3);
}

.etape-galerie {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  overflow-x: auto;
}
.etape-galerie img {
  height: 74px;
  border: 1px solid rgba(138, 106, 56, 0.5);
  border-radius: 4px;
}

.etape-embed { margin: 0 0 16px; }
.etape-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(138, 106, 56, 0.5);
  border-radius: 5px;
}

.etape-recit {
  margin: 0 0 16px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--encre);
  padding-left: 14px;
  border-left: 3px solid var(--or-clair);
}

.mission-dialogue {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.mission-dialogue .dialogue-cadre { flex: 1; padding: 13px 16px; }
.mission-dialogue .dialogue-texte { font-size: 0.95rem; }

/* Bouton d'écoute du signal (son de cloche synthétisé, aucun fichier) */
.bloc-son { margin: 0 0 16px; }
.btn-son {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(184, 134, 47, 0.1);
  border: 1.5px solid var(--or);
  border-radius: 24px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--sepia);
  cursor: pointer;
}
.btn-son::before { content: "◠"; font-style: normal; color: var(--or); font-size: 1.1rem; }
.btn-son:hover { background: rgba(184, 134, 47, 0.18); }
.btn-son.joue { animation: pulse-son 0.9s ease infinite; }
@keyframes pulse-son {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 134, 47, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(184, 134, 47, 0); }
}

.bloc-indice { margin-bottom: 18px; }
.texte-indice {
  margin: 10px 0 0;
  padding: 11px 14px;
  background: rgba(67, 96, 60, 0.08);
  border-left: 3px solid var(--vert);
  font-size: 0.92rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--sepia);
  border-radius: 2px;
  animation: monte-fond 0.35s ease both;
}

.bloc-reponse label {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sepia);
  margin-bottom: 6px;
}
.reponse-ligne { display: flex; gap: 8px; }
.reponse-ligne input {
  flex: 1;
  min-width: 0;
  padding: 12px 13px;
  font-size: 1rem;
  font-family: var(--serif);
  color: var(--encre);
  background: #fdfaf0;
  border: 1.5px solid rgba(138, 106, 56, 0.5);
  border-radius: 4px;
}
.reponse-ligne input:focus {
  outline: none;
  border-color: var(--or);
  box-shadow: 0 0 0 3px rgba(184, 134, 47, 0.18);
}

.feedback { margin: 10px 0 0; font-size: 0.9rem; font-style: italic; }
.feedback.correct { color: var(--vert); }
.feedback.incorrect { color: var(--cire); animation: secousse 0.4s ease; }
@keyframes secousse {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ---------- Preuve photo simulée ---------- */

.bloc-photo {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed rgba(138, 106, 56, 0.4);
  animation: monte-fond 0.4s ease both;
}
.photo-instruction {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--sepia);
}

.viseur {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: #1d1710;
  margin-bottom: 12px;
}
.viseur img {
  display: block;
  width: 100%;
  opacity: 0.92;
}
.viseur::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(29, 23, 16, 0.18), transparent 18%, transparent 82%, rgba(29, 23, 16, 0.18));
  pointer-events: none;
}
.viseur .coin {
  position: absolute;
  width: 26px; height: 26px;
  border: 2.5px solid rgba(251, 246, 232, 0.9);
  pointer-events: none;
}
.viseur .coin.hg { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.viseur .coin.hd { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.viseur .coin.bg { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.viseur .coin.bd { bottom: 10px; right: 10px; border-left: none; border-top: none; }
.viseur .viseur-info {
  position: absolute;
  bottom: 12px;
  left: 0; right: 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(251, 246, 232, 0.95);
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  pointer-events: none;
}

.btn-declencheur {
  display: block;
  width: 64px; height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid var(--sepia);
  background: radial-gradient(circle at 35% 30%, #fdfaf0, var(--papier-3));
  cursor: pointer;
  box-shadow: var(--ombre-douce);
  transition: transform 0.1s ease;
}
.btn-declencheur:active { transform: scale(0.92); }
.btn-declencheur::after {
  content: "";
  display: block;
  width: 44px; height: 44px;
  margin: 7px auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c25436, var(--cire));
}

#flash-photo {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #fffdf4;
  opacity: 0;
  pointer-events: none;
}
#flash-photo.declenche { animation: eclair 0.55s ease-out; }
@keyframes eclair {
  0% { opacity: 0; }
  12% { opacity: 1; }
  100% { opacity: 0; }
}

/* Cliché épinglé */
.polaroid {
  position: relative;
  background: #fdfaf0;
  border: 1px solid rgba(58, 44, 24, 0.2);
  padding: 10px 10px 14px;
  box-shadow: var(--ombre-douce);
  transform: rotate(-2deg);
  animation: cliche-pose 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  max-width: 300px;
  margin: 0 auto;
}
.polaroid img {
  display: block;
  width: 100%;
  filter: sepia(0.45) saturate(0.85) contrast(0.96);
}
.polaroid .polaroid-tampon {
  position: absolute;
  right: 14px;
  bottom: 16px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cire);
  border: 1.2px solid var(--cire);
  padding: 2px 7px;
  transform: rotate(-6deg);
  background: rgba(253, 250, 240, 0.85);
}
.polaroid figcaption {
  margin-top: 8px;
  text-align: center;
  font-style: italic;
  font-size: 0.8rem;
  color: var(--sepia);
}
@keyframes cliche-pose {
  from { opacity: 0; transform: rotate(-2deg) translateY(-22px) scale(1.06); }
  to   { opacity: 1; transform: rotate(-2deg) translateY(0) scale(1); }
}

/* ---------- Fragment gagné ---------- */

.bloc-fragment {
  margin-top: 20px;
  animation: fragment-revele 0.7s cubic-bezier(0.2, 0.85, 0.3, 1.25) both;
}
@keyframes fragment-revele {
  from { opacity: 0; transform: scale(0.7) rotate(-5deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

.fragment-carte {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background:
    radial-gradient(circle at 18% 30%, rgba(216, 178, 106, 0.5), transparent 60%),
    linear-gradient(135deg, #f4e7c4, #e8d5a0);
  border: 1px solid var(--or);
  border-radius: 5px;
  box-shadow: var(--ombre-douce), 0 0 24px -4px rgba(216, 178, 106, 0.65);
}
.fragment-carte img { width: 64px; height: 64px; flex-shrink: 0; filter: drop-shadow(0 4px 6px rgba(58,44,24,0.3)); }
.fragment-carte .fragment-etiquette {
  margin: 0 0 3px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--or);
}
.fragment-carte .fragment-nom { margin: 0 0 3px; font-size: 1.05rem; color: var(--encre); }
.fragment-carte .fragment-desc { margin: 0; font-size: 0.84rem; font-style: italic; color: var(--sepia); }

/* ---------- Après résolution : signe, SIT, à proximité ---------- */

.bloc-signe {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px dashed rgba(67, 96, 60, 0.5);
  border-radius: 5px;
  animation: monte-fond 0.5s ease 0.2s both;
}
.bloc-signe img { width: 46px; height: 46px; flex-shrink: 0; }
.bloc-signe .signe-nom { margin: 0 0 2px; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--vert); }
.bloc-signe .signe-legende { margin: 0; font-size: 0.83rem; font-style: italic; color: var(--sepia); }

.bloc-sit {
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(67, 96, 60, 0.06);
  border: 1px solid rgba(67, 96, 60, 0.35);
  border-radius: 5px;
}
.bloc-sit .sit-etiquette {
  margin: 0 0 4px;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--vert);
}
.bloc-sit .sit-titre { margin: 0 0 2px; font-size: 0.95rem; color: var(--encre); }
.bloc-sit .sit-detail { margin: 0; font-size: 0.8rem; color: var(--sepia); }
.bloc-sit a { color: var(--vert); font-size: 0.85rem; }

.bloc-proximite { margin-top: 16px; }
.bloc-proximite > p {
  margin: 0 0 8px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sepia);
}
.proximite-rubrique { margin-bottom: 10px; }
.proximite-rubrique h4 {
  margin: 0 0 4px;
  font-size: 0.82rem;
  font-weight: normal;
  font-style: italic;
  color: var(--vert);
}
.proximite-entree {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  margin-bottom: 4px;
  background: var(--creme);
  border: 1px solid rgba(138, 106, 56, 0.3);
  border-radius: 4px;
  font-size: 0.85rem;
}
.proximite-entree .entree-type { font-size: 0.74rem; color: var(--sepia); font-style: italic; white-space: nowrap; }
.proximite-entree a { color: var(--vert); }

.btn-continuer { margin-top: 20px; }

/* ===================== VUE CARTE ===================== */

#carte-svg { display: block; width: 100%; height: auto; }

.carte-noeud circle {
  fill: var(--papier-2);
  stroke: rgba(111, 86, 54, 0.5);
  stroke-width: 2;
  transition: fill 0.5s ease, stroke 0.5s ease;
}
.carte-noeud .noeud-num { font-family: Georgia, serif; font-size: 10px; fill: rgba(111, 86, 54, 0.6); }
.carte-noeud .noeud-nom { font-family: Georgia, serif; font-size: 8.5px; font-style: italic; fill: rgba(58, 44, 24, 0.55); }

.carte-noeud.courant circle {
  fill: var(--creme);
  stroke: var(--or);
  animation: noeud-pulse 1.6s ease infinite;
}
.carte-noeud.courant .noeud-num { fill: var(--or); }
.carte-noeud.courant .noeud-nom { fill: var(--encre); }

.carte-noeud.fait circle { fill: var(--or-clair); stroke: var(--or); }
.carte-noeud.fait .noeud-num { fill: var(--creme); }
.carte-noeud.fait .noeud-nom { fill: var(--encre); }

@keyframes noeud-pulse {
  0%, 100% { stroke-width: 2; }
  50% { stroke-width: 4; }
}

.carte-segment {
  fill: none;
  stroke: var(--sepia);
  stroke-width: 2.4;
  stroke-dasharray: 2 8;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.carte-segment.trace { opacity: 1; }
.carte-segment-final { stroke: var(--or); }

#carte-mont { opacity: 0.75; transition: opacity 0.8s ease; }
#carte-svg.final #carte-mont { opacity: 1; }
#carte-svg.final #carte-soleil { opacity: 0.9; }

.carte-legende {
  margin: 12px 0 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--sepia);
  text-align: center;
}

/* ===================== VUE CARNET ===================== */

.carnet-section { margin-bottom: 20px; }
.carnet-section h3 {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sepia);
  border-bottom: 1px solid rgba(138, 106, 56, 0.3);
  padding-bottom: 5px;
}

.note-eliane {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.note-eliane img { width: 34px; height: auto; flex-shrink: 0; align-self: flex-start; }
.note-eliane blockquote {
  margin: 0;
  padding: 9px 13px;
  background: var(--creme);
  border-left: 3px solid var(--or-clair);
  border-radius: 3px;
  font-style: italic;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--encre);
}
.note-eliane .note-lieu {
  display: block;
  margin-top: 5px;
  font-size: 0.72rem;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sepia);
}

.lieux-releves { list-style: none; margin: 0; padding: 0; }
.lieux-releves li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 4px;
  font-size: 0.92rem;
  color: var(--sepia);
  border-bottom: 1px dotted rgba(138, 106, 56, 0.3);
}
.lieux-releves li.releve { color: var(--encre); }
.lieux-releves .coche {
  width: 20px; height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(138, 106, 56, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: transparent;
}
.lieux-releves li.releve .coche {
  background: var(--vert);
  border-color: var(--vert);
  color: var(--creme);
}

.grille-cliches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}
.grille-cliches .polaroid { max-width: none; margin: 0; padding: 7px 7px 10px; }
.grille-cliches .polaroid:nth-child(even) { transform: rotate(1.8deg); }
.grille-cliches .polaroid figcaption { font-size: 0.7rem; }
.grille-cliches .polaroid .polaroid-tampon { right: 9px; bottom: 11px; font-size: 0.52rem; }

.carnet-vide {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--sepia);
  opacity: 0.85;
}

/* ===================== VUE FRAGMENTS ===================== */

.grille-fragments {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.fragment-case {
  text-align: center;
  padding: 16px 10px 14px;
  border-radius: 5px;
  border: 1.5px dashed rgba(138, 106, 56, 0.45);
  background: rgba(251, 246, 232, 0.5);
}
.fragment-case img { width: 66px; height: 66px; }
.fragment-case .case-nom { margin: 8px 0 3px; font-size: 0.9rem; color: var(--encre); }
.fragment-case .case-desc { margin: 0; font-size: 0.76rem; font-style: italic; color: var(--sepia); }

.fragment-case.trouve {
  border: 1px solid var(--or);
  background:
    radial-gradient(circle at 50% 20%, rgba(216, 178, 106, 0.4), transparent 65%),
    var(--creme);
  box-shadow: var(--ombre-douce);
  animation: fragment-revele 0.5s ease both;
}
.fragment-case.mystere img { display: none; }
.fragment-case.mystere .case-inconnu {
  width: 66px; height: 66px;
  margin: 0 auto;
  border-radius: 50%;
  border: 1.5px dashed rgba(138, 106, 56, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-style: italic;
  color: rgba(138, 106, 56, 0.55);
}

.fragments-badge {
  margin-top: 18px;
  text-align: center;
  padding: 18px 14px;
  border: 1px solid var(--cire);
  border-radius: 6px;
  background: radial-gradient(circle at 50% 0%, rgba(156, 53, 36, 0.08), transparent 70%);
}
.fragments-badge img { width: 84px; height: 84px; }
.fragments-badge p { margin: 8px 0 0; font-size: 0.95rem; color: var(--cire); letter-spacing: 0.06em; }

/* ===================== VUE MONTMELARD ===================== */

#vue-montmelard .montmelard-scene {
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  border: 1px solid rgba(138, 106, 56, 0.5);
  border-bottom: none;
  box-shadow: var(--ombre-carte);
}
.montmelard-ciel { display: block; width: 100%; height: auto; }

#vue-montmelard.verrouille .montmelard-scene { filter: saturate(0.55) brightness(0.97); }

.montmelard-contenu {
  background: var(--creme);
  border: 1px solid rgba(138, 106, 56, 0.5);
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 24px 22px 26px;
  text-align: center;
  box-shadow: var(--ombre-carte);
}

.montmelard-contenu .final-titre {
  margin: 0 0 14px;
  font-size: 1.55rem;
  font-weight: normal;
  line-height: 1.2;
  color: var(--encre);
}
.montmelard-contenu .final-texte {
  margin: 0 auto 18px;
  max-width: 40ch;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--encre);
}
.montmelard-contenu .final-soustexte {
  margin: 0 auto 20px;
  max-width: 44ch;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--sepia);
}

.phrase-mere {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--cire);
  padding: 14px 8px;
  margin: 0 auto 24px;
  max-width: 40ch;
  border-top: 1px solid rgba(156, 53, 36, 0.35);
  border-bottom: 1px solid rgba(156, 53, 36, 0.35);
}

.montmelard-verrou {
  margin: 0 auto;
  max-width: 40ch;
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--sepia);
}

.presentation-jeu {
  margin-top: 22px;
  padding: 18px 16px;
  text-align: left;
  border: 1px solid rgba(156, 53, 36, 0.4);
  border-radius: 6px;
  background: rgba(156, 53, 36, 0.05);
  animation: monte-fond 0.5s ease both;
}
.presentation-jeu h3 { margin: 0 0 8px; font-size: 1.1rem; font-weight: normal; color: var(--cire); }
.presentation-jeu p { margin: 0 0 10px; font-size: 0.92rem; line-height: 1.6; color: var(--encre); }
.presentation-jeu ul { margin: 0; padding-left: 18px; }
.presentation-jeu li { font-size: 0.88rem; color: var(--sepia); margin-bottom: 4px; }

/* ===================== CÉRÉMONIE DU BADGE ===================== */

#ecran-badge {
  background-image:
    radial-gradient(ellipse at 50% 30%, rgba(216, 178, 106, 0.4), transparent 60%),
    radial-gradient(ellipse at 20% 90%, rgba(67, 96, 60, 0.08), transparent 45%);
}

.badge-scene { max-width: 420px; width: 100%; text-align: center; }

.badge-dialogue {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
  margin-bottom: 30px;
  animation: monte-fond 0.7s ease both;
}

.badge-cachet {
  width: 150px;
  height: 150px;
  margin: 0 auto 16px;
}
.badge-cachet img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 12px 20px rgba(111, 35, 23, 0.45));
  animation: sceau-frappe 0.9s cubic-bezier(0.3, 1.6, 0.4, 1) 0.8s both;
}
@keyframes sceau-frappe {
  0% { opacity: 0; transform: scale(2.6) rotate(-16deg); }
  55% { opacity: 1; transform: scale(0.92) rotate(2deg); }
  75% { transform: scale(1.05) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.badge-titre {
  margin: 0 0 8px;
  font-size: 1.7rem;
  color: var(--cire);
  letter-spacing: 0.03em;
  animation: monte-fond 0.6s ease 1.5s both;
}
.badge-texte {
  margin: 0 auto 26px;
  max-width: 36ch;
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--sepia);
  animation: monte-fond 0.6s ease 1.7s both;
}
#btn-badge-continuer { animation: monte-fond 0.6s ease 2s both; }

/* ===================== MISSION TERMINÉE (récapitulatif) ===================== */

.mission-close { text-align: center; }
.mission-close img { width: 96px; height: 96px; margin-bottom: 10px; }
.mission-close p { font-style: italic; color: var(--sepia); max-width: 40ch; margin: 0 auto 18px; line-height: 1.6; }

/* ===================== PIED DE PAGE ===================== */

.app-pied {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 10px 16px calc(var(--hauteur-nav) + 16px);
}
.app-pied p { font-size: 0.72rem; color: var(--sepia); opacity: 0.75; }
.lien-admin { color: var(--sepia); }

/* ===================== ACCESSIBILITÉ & RESPONSIVE ===================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media (min-width: 720px) {
  #app { max-width: 640px; padding-top: 22px; }
  .page-carnet { padding: 30px 34px 32px; }
  .grille-fragments { grid-template-columns: repeat(4, 1fr); }
  .ouverture-sceau { width: 156px; height: 156px; }
  .montmelard-contenu .final-titre { font-size: 1.9rem; }
  .nav-onglet { font-size: 0.8rem; }
}

/* ---------------------------------------------------------------------
   Galerie des parcours — passe 2C bestiaire premium
   --------------------------------------------------------------------- */
#ecran-galerie {
  align-items: flex-start;
  background:
    radial-gradient(circle at 50% -10%, rgba(216, 178, 106, 0.22), transparent 38%),
    radial-gradient(circle at 12% 18%, rgba(89, 146, 142, 0.22), transparent 34%),
    radial-gradient(circle at 86% 70%, rgba(168, 77, 43, 0.16), transparent 34%),
    linear-gradient(180deg, #172321 0%, #15130f 46%, #0e0c09 100%);
  color: #f6ecd6;
}

.galerie-conteneur {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 38px 18px 54px;
  text-align: center;
}

.galerie-conteneur::before {
  content: "";
  display: block;
  width: 78px;
  height: 78px;
  margin: 0 auto 18px;
  border: 1px solid rgba(216, 178, 106, 0.55);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(216, 178, 106, 0.22), transparent 62%),
    url("assets/logo-gardiens.svg") center / 58px auto no-repeat;
  box-shadow: 0 0 36px rgba(216, 178, 106, 0.22);
}

.galerie-conteneur .kicker {
  margin: 0 0 8px;
  color: var(--or);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.galerie-conteneur h1 {
  margin: 0 0 14px;
  font-size: clamp(2.35rem, 10vw, 4.8rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: #fff4dc;
  text-shadow: 0 8px 34px rgba(0, 0, 0, 0.45);
}

.galerie-intro {
  max-width: 680px;
  margin: 0 auto 30px;
  color: rgba(246, 236, 214, 0.84);
  font-size: 1.04rem;
  line-height: 1.6;
}

.liste-quetes {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.carte-quete {
  position: relative;
  min-height: 330px;
  padding: 22px;
  border: 1px solid rgba(216, 178, 106, 0.42);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 178, 106, 0.20), transparent 42%),
    radial-gradient(circle at 18% 82%, rgba(89, 146, 142, 0.18), transparent 42%),
    linear-gradient(160deg, rgba(38, 33, 27, 0.96), rgba(16, 14, 12, 0.98));
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: left;
  overflow: hidden;
  isolation: isolate;
  transform: translateY(0);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.carte-quete::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(216, 178, 106, 0.20);
  border-radius: 18px;
  pointer-events: none;
  z-index: -1;
}

.carte-quete::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -58px;
  top: -42px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 178, 106, 0.18), transparent 66%);
  pointer-events: none;
}

.carte-quete:hover {
  transform: translateY(-3px);
  border-color: rgba(216, 178, 106, 0.72);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.42),
    0 0 36px rgba(216, 178, 106, 0.16);
}

.quete-statut {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 6px 10px;
  border: 1px solid rgba(216, 178, 106, 0.26);
  border-radius: 999px;
  background: rgba(10, 8, 6, 0.28);
  color: var(--or);
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.quete-verrou {
  position: absolute;
  right: 22px;
  top: 22px;
  color: rgba(216, 178, 106, 0.55);
  font-size: 1.1rem;
}

.quete-medaillon {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 4px 0 14px;
  border: 1px solid rgba(216, 178, 106, 0.58);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(246, 236, 214, 0.10), transparent 55%),
    linear-gradient(145deg, rgba(31, 64, 66, 0.92), rgba(10, 10, 9, 0.94));
  box-shadow:
    0 0 28px rgba(216, 178, 106, 0.20),
    inset 0 0 0 6px rgba(216, 178, 106, 0.07);
}

.medaillon-signe {
  color: #f7e6b7;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.quete-medaillon-final {
  width: 112px;
  height: 112px;
  margin-left: auto;
  margin-right: auto;
  background:
    radial-gradient(circle, rgba(216, 178, 106, 0.28), transparent 58%),
    linear-gradient(145deg, rgba(111, 35, 23, 0.96), rgba(19, 12, 8, 0.98));
}

.quete-medaillon-final .medaillon-signe {
  font-size: 2.2rem;
}

.quete-animal {
  margin: 0 0 4px;
  color: rgba(246, 236, 214, 0.78);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quete-commune {
  margin: 0 0 6px;
  color: rgba(216, 178, 106, 0.86);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.carte-quete h2 {
  margin: 0 0 10px;
  color: #fff2d5;
  font-size: clamp(1.45rem, 6vw, 2.1rem);
  line-height: 1.05;
}

.quete-element {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 6px 10px;
  border: 1px solid rgba(246, 236, 214, 0.16);
  border-radius: 999px;
  background: rgba(246, 236, 214, 0.07);
  color: rgba(246, 236, 214, 0.86);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quete-meta {
  margin: 0 0 12px;
  color: rgba(246, 236, 214, 0.60);
  font-size: 0.86rem;
}

.quete-description {
  margin: 0 0 20px;
  color: rgba(246, 236, 214, 0.82);
  line-height: 1.5;
}

.btn-quete {
  width: 100%;
}

.carte-quete.scellee {
  opacity: 0.92;
}

.carte-quete.scellee .quete-medaillon {
  filter: grayscale(0.35);
  opacity: 0.72;
}

.carte-quete[data-element="eau"] {
  background:
    radial-gradient(circle at 50% 0%, rgba(127, 208, 214, 0.20), transparent 42%),
    linear-gradient(160deg, rgba(25, 54, 60, 0.98), rgba(15, 14, 12, 0.98));
}

.carte-quete[data-element="air"] {
  background:
    radial-gradient(circle at 50% 0%, rgba(196, 225, 229, 0.18), transparent 42%),
    linear-gradient(160deg, rgba(30, 46, 54, 0.98), rgba(15, 14, 12, 0.98));
}

.carte-quete[data-element="terre"] {
  background:
    radial-gradient(circle at 50% 0%, rgba(150, 177, 109, 0.18), transparent 42%),
    linear-gradient(160deg, rgba(43, 46, 32, 0.98), rgba(15, 14, 12, 0.98));
}

.carte-quete[data-element="feu-ancien"] {
  background:
    radial-gradient(circle at 50% 0%, rgba(224, 149, 74, 0.22), transparent 42%),
    linear-gradient(160deg, rgba(66, 32, 22, 0.98), rgba(15, 14, 12, 0.98));
}

.carte-quete.reservation {
  min-height: 360px;
  text-align: center;
  border-color: rgba(216, 178, 106, 0.82);
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 178, 106, 0.28), transparent 45%),
    radial-gradient(circle at 50% 105%, rgba(111, 35, 23, 0.44), transparent 48%),
    linear-gradient(155deg, rgba(56, 24, 18, 0.98), rgba(14, 10, 8, 0.99));
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.46),
    0 0 42px rgba(216, 178, 106, 0.20);
}

.carte-quete.reservation h2::before {
  content: "Grand final";
  display: block;
  margin-bottom: 10px;
  color: #e0a45c;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.carte-quete.reservation .quete-description {
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 720px) {
  .liste-quetes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .carte-quete.reservation {
    grid-column: 1 / -1;
  }

  .carte-quete.reservation .btn-quete {
    width: auto;
    min-width: 320px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .carte-quete {
    animation: apparition-quete 520ms ease both;
  }

  .carte-quete:nth-child(2) { animation-delay: 70ms; }
  .carte-quete:nth-child(3) { animation-delay: 140ms; }
  .carte-quete:nth-child(4) { animation-delay: 210ms; }
  .carte-quete:nth-child(5) { animation-delay: 280ms; }

  @keyframes apparition-quete {
    from {
      opacity: 0;
      transform: translateY(18px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}


/* Images animaux dans les médaillons de la galerie */
.medaillon-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  filter: saturate(1.08) contrast(1.05);
  transform: scale(1.04);
}

.carte-quete:hover .medaillon-image {
  transform: scale(1.10);
  transition: transform 240ms ease;
}

.carte-quete.scellee .medaillon-image {
  filter: saturate(0.82) brightness(0.82) contrast(1.04);
}



/* Passe 2D — alignement cartes, boutons lisibles et cartouche d'émergence */
.carte-quete {
  display: flex;
  flex-direction: column;
}

.carte-quete .btn-quete {
  margin-top: auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.carte-quete .btn-secondaire,
.carte-quete .btn-secondaire:disabled {
  background: rgba(246, 236, 214, 0.12);
  border: 1px solid rgba(216, 178, 106, 0.38);
  color: rgba(246, 236, 214, 0.78);
  opacity: 1;
  cursor: not-allowed;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.carte-quete.scellee .btn-secondaire {
  color: rgba(246, 236, 214, 0.72);
}

.cartouche-emergence {
  grid-column: 1 / -1;
  position: relative;
  padding: 18px 18px 20px;
  border: 1px solid rgba(216, 178, 106, 0.34);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 178, 106, 0.18), transparent 48%),
    linear-gradient(135deg, rgba(22, 35, 32, 0.88), rgba(15, 13, 10, 0.94));
  color: rgba(246, 236, 214, 0.86);
  text-align: center;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
  overflow: hidden;
}

.cartouche-emergence::before,
.cartouche-emergence::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 178, 106, 0.55));
}

.cartouche-emergence::before {
  left: 18px;
}

.cartouche-emergence::after {
  right: 18px;
  transform: rotate(180deg);
}

.cartouche-kicker {
  margin: 0 0 8px;
  color: var(--or);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.cartouche-emergence p:not(.cartouche-kicker) {
  max-width: 58ch;
  margin: 0 auto 12px;
  line-height: 1.5;
}

.cartouche-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid rgba(216, 178, 106, 0.36);
  border-radius: 999px;
  background: rgba(216, 178, 106, 0.10);
  color: rgba(246, 236, 214, 0.82);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 719px) {
  .cartouche-emergence::before,
  .cartouche-emergence::after {
    display: none;
  }
}


/* Passe 2D — statuts galerie affinés */
.quete-statuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.carte-quete.disponible .quete-statut {
  background: linear-gradient(135deg, rgba(216, 178, 106, 0.34), rgba(216, 178, 106, 0.12));
  border-color: rgba(216, 178, 106, 0.72);
  color: #fff0bf;
  box-shadow:
    0 0 18px rgba(216, 178, 106, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.carte-quete.scellee .quete-statut {
  background: transparent;
  border-color: rgba(216, 178, 106, 0.24);
  color: rgba(216, 178, 106, 0.72);
  box-shadow: none;
}

.quete-statut-disponible {
  background: linear-gradient(135deg, rgba(216, 178, 106, 0.34), rgba(216, 178, 106, 0.12));
  border-color: rgba(216, 178, 106, 0.72);
  color: #fff0bf;
  box-shadow:
    0 0 18px rgba(216, 178, 106, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.quete-statut-reservation {
  background: rgba(111, 35, 23, 0.28);
  border-color: rgba(216, 178, 106, 0.46);
  color: rgba(246, 236, 214, 0.86);
}


/* Passe 2E — accueil jeu / marque, pas accueil circuit */
#ecran-ouverture {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(216, 178, 106, 0.22), transparent 30%),
    radial-gradient(circle at 18% 22%, rgba(89, 146, 142, 0.22), transparent 36%),
    radial-gradient(circle at 82% 74%, rgba(168, 77, 43, 0.16), transparent 38%),
    linear-gradient(180deg, #1b2b29 0%, #15130f 52%, #0d0b08 100%);
}

#ecran-ouverture::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.06), transparent 32%),
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  pointer-events: none;
}

#ecran-ouverture .ouverture-contenu {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 36px 20px 90px;
}

.ouverture-sceau {
  width: clamp(108px, 28vw, 156px);
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid rgba(216, 178, 106, 0.52);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(216, 178, 106, 0.20), transparent 62%),
    rgba(12, 10, 8, 0.34);
  box-shadow:
    0 0 46px rgba(216, 178, 106, 0.26),
    inset 0 0 0 8px rgba(216, 178, 106, 0.07);
}

.ouverture-eyebrow {
  color: var(--or);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.ouverture-dossier,
.ouverture-lieu {
  color: rgba(216, 178, 106, 0.82);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ouverture-titre {
  max-width: 760px;
  margin-inline: auto;
  color: #fff3d7;
  font-size: clamp(2.3rem, 9vw, 5.2rem);
  line-height: 0.92;
  text-shadow:
    0 3px 22px rgba(0, 0, 0, 0.55),
    0 0 42px rgba(216, 178, 106, 0.18);
}

.ouverture-phrase {
  max-width: 58ch;
  margin-inline: auto;
  color: rgba(246, 236, 214, 0.88);
  font-size: 1.05rem;
  line-height: 1.55;
}

.ouverture-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 16px;
  border: 1px solid rgba(216, 178, 106, 0.34);
  border-radius: 999px;
  background: rgba(10, 8, 6, 0.28);
  color: rgba(246, 236, 214, 0.78);
}

.ouverture-crete {
  z-index: 1;
  opacity: 0.95;
  filter: drop-shadow(0 -10px 24px rgba(216, 178, 106, 0.10));
}

/* === PASSE 2F MICRO : ACCUEIL GALERIE LUMIERE === */

/* Accueil : profondeur lumineuse derrière la crête du Mont Saint-Cyr */
#ecran-ouverture {
  background:
    radial-gradient(ellipse at 50% 42%, transparent 58%, rgba(4, 3, 2, 0.50) 100%),
    radial-gradient(circle at 50% 112%, rgba(232, 196, 120, 0.26), transparent 44%),
    radial-gradient(circle at 50% 16%, rgba(216, 178, 106, 0.15), transparent 32%),
    radial-gradient(circle at 16% 20%, rgba(89, 146, 142, 0.20), transparent 38%),
    radial-gradient(circle at 84% 72%, rgba(168, 77, 43, 0.14), transparent 38%),
    linear-gradient(180deg, #141f1e 0%, #1b2b29 34%, #171410 66%, #0c0a07 100%);
}

/* Galerie : ciel plus profond, halo doré et ambiance codex */
#ecran-galerie {
  background:
    radial-gradient(ellipse at 50% 30%, transparent 55%, rgba(4, 3, 2, 0.45) 100%),
    radial-gradient(circle at 50% -12%, rgba(216, 178, 106, 0.26), transparent 40%),
    radial-gradient(circle at 12% 18%, rgba(89, 146, 142, 0.20), transparent 34%),
    radial-gradient(circle at 86% 74%, rgba(168, 77, 43, 0.16), transparent 36%),
    linear-gradient(180deg, #141f1e 0%, #172321 26%, #15130f 58%, #0c0a07 100%);
}

/* Filet d'or sous le grand titre de la galerie */
.galerie-conteneur h1::after {
  content: "";
  display: block;
  width: 140px;
  height: 1px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, rgba(216, 178, 106, 0.75), transparent);
  box-shadow: 0 0 12px rgba(216, 178, 106, 0.35);
}

/* === FIN PASSE 2F MICRO === */

/* === PASSE 2G MICRO : CARTOUCHE GARDIENS EVEIL === */

/* Cartouche central : moment de bascule entre les pistes gratuites et Montmelard */
.cartouche-emergence {
  position: relative;
  padding: 26px 20px;
  border-color: rgba(216, 178, 106, 0.55);
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 178, 106, 0.22), transparent 52%),
    linear-gradient(135deg, rgba(24, 38, 35, 0.92), rgba(14, 12, 9, 0.96));
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.30),
    0 0 38px rgba(216, 178, 106, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.cartouche-kicker {
  color: #f5d78e;
  letter-spacing: 0.30em;
  text-shadow: 0 0 20px rgba(216, 178, 106, 0.50);
}

.cartouche-emergence .pastille {
  border-color: rgba(216, 178, 106, 0.55);
  background:
    linear-gradient(180deg, rgba(216, 178, 106, 0.16), rgba(10, 8, 6, 0.72));
  box-shadow:
    0 0 0 1px rgba(255, 236, 180, 0.12),
    0 0 24px rgba(216, 178, 106, 0.22);
}

/* === FIN PASSE 2G MICRO === */

/* === PASSE 3A PROPRE : HOME MARQUE KEY VISUAL === */

#ecran-ouverture {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(8, 13, 10, 0.58) 0%, rgba(12, 19, 16, 0.46) 36%, rgba(8, 8, 6, 0.92) 100%),
    radial-gradient(circle at 50% 38%, rgba(232, 196, 120, 0.24), transparent 44%),
    url("assets/img/home/gardiens-affiche-mobile.png") center center / cover no-repeat;
}

#ecran-ouverture::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 0%, rgba(0, 0, 0, 0.18) 42%, rgba(0, 0, 0, 0.72) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.62), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.62));
  pointer-events: none;
}

#ecran-ouverture::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8%;
  z-index: 1;
  width: min(760px, 92vw);
  height: 42%;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at 50% 100%, rgba(216, 178, 106, 0.24), transparent 68%),
    linear-gradient(180deg, transparent, rgba(8, 8, 6, 0.72));
  pointer-events: none;
}

#ecran-ouverture .ouverture-contenu {
  position: relative;
  z-index: 3;
  max-width: 900px;
  margin: 0 auto;
  padding: 34px 20px 46px;
}

#ecran-ouverture .ouverture-sceau {
  width: clamp(150px, 34vw, 220px);
  height: auto;
  margin-bottom: 20px;
  filter:
    drop-shadow(0 0 28px rgba(216, 178, 106, 0.42))
    drop-shadow(0 10px 26px rgba(0, 0, 0, 0.72));
}

#ecran-ouverture .ouverture-titre {
  font-size: clamp(2.55rem, 10vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-shadow:
    0 5px 20px rgba(0, 0, 0, 0.82),
    0 0 42px rgba(216, 178, 106, 0.22);
}

#ecran-ouverture .ouverture-lieu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 14px auto 20px;
  color: #ffe9ae;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.75);
}

#ecran-ouverture .ouverture-lieu::before,
#ecran-ouverture .ouverture-lieu::after {
  content: "";
  width: clamp(32px, 8vw, 88px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 196, 120, 0.9), transparent);
}

#ecran-ouverture .ouverture-texte,
#ecran-ouverture .ouverture-description,
#ecran-ouverture .ouverture-accroche {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.82);
}

#btn-ouvrir {
  position: relative;
  z-index: 4;
  margin-top: 12px;
  padding: 17px 42px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.42),
    0 0 42px rgba(216, 178, 106, 0.34),
    inset 0 1px 0 rgba(255, 248, 226, 0.42);
}

@media (max-width: 520px) {
  #ecran-ouverture {
    background-position: center center;
  }

  #ecran-ouverture .ouverture-contenu {
    padding-top: 28px;
    padding-bottom: 34px;
  }

  #ecran-ouverture .ouverture-sceau {
    width: clamp(142px, 42vw, 190px);
  }
}

@media (min-width: 900px) {
  #ecran-ouverture {
    background-position: center 42%;
  }

  #ecran-ouverture .ouverture-contenu {
    padding-top: 42px;
  }
}

/* === PASSE 4 PROPRE : HOME AFFICHE GARDIENS === */

/* L'affiche porte déjà le concept : on ne rajoute pas d'animaux en HTML/CSS */
#ecran-ouverture {
  background-color: #070907;
}

/* Desktop : l'affiche portrait reste entière, centrée */
@media (min-width: 900px) {
  #ecran-ouverture {
    background-size: auto 100%;
    background-position: center center;
    background-repeat: no-repeat;
  }
}

/* Mobile : l'affiche remplit l'écran */
@media (max-width: 899px) {
  #ecran-ouverture {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }
}

/* L'affiche contient déjà le titre : on garde seulement le bouton */
#ecran-ouverture .ouverture-sceau,
#ecran-ouverture .ouverture-titre,
#ecran-ouverture .ouverture-lieu,
#ecran-ouverture .ouverture-phrase,
#ecran-ouverture .ouverture-meta,
#ecran-ouverture .ouverture-eyebrow,
#ecran-ouverture .ouverture-dossier {
  display: none !important;
}

#ecran-ouverture .ouverture-contenu {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  max-width: none;
  padding: 0 20px 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

#btn-ouvrir {
  margin-bottom: 18px;
  padding: 16px 42px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.55),
    0 0 42px rgba(216, 178, 106, 0.36);
}

/* On enlève la crête SVG qui parasite l'affiche */
#ecran-ouverture .ouverture-crete {
  display: none !important;
}

/* === PASSE 5A PROPRE : INTRO NARRATIVE PREMIUM === */

#ecran-intro {
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 178, 106, 0.22), transparent 38%),
    radial-gradient(circle at 16% 22%, rgba(89, 146, 142, 0.16), transparent 34%),
    linear-gradient(180deg, #121f1d 0%, #172320 42%, #0d0b08 100%);
}

#ecran-intro .dialogue-scene {
  padding: 28px 20px 32px;
}

#ecran-intro .dialogue-portrait.grand {
  width: clamp(120px, 32vw, 156px);
  height: auto;
  padding: 14px;
  border-radius: 999px;
  border: 1px solid rgba(216, 178, 106, 0.62);
  background:
    radial-gradient(circle, rgba(216, 178, 106, 0.18), transparent 66%),
    rgba(10, 8, 6, 0.38);
  box-shadow:
    0 0 42px rgba(216, 178, 106, 0.26),
    inset 0 0 0 7px rgba(216, 178, 106, 0.08);
}

#ecran-intro .dialogue-cadre {
  border-radius: 12px;
  border: 1px solid rgba(216, 178, 106, 0.58);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.46),
    0 0 34px rgba(216, 178, 106, 0.12);
}

#ecran-intro .dialogue-nom {
  padding-bottom: 9px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(184, 134, 47, 0.38);
  letter-spacing: 0.2em;
  color: #8a5a1f;
}

#ecran-intro .dialogue-texte {
  font-size: clamp(1.04rem, 3.8vw, 1.16rem);
  line-height: 1.68;
}

#ecran-intro .intro-points span {
  width: 9px;
  height: 9px;
  background: rgba(216, 178, 106, 0.34);
}

#ecran-intro .intro-points span.actif {
  background: #f2dda6;
  box-shadow: 0 0 12px rgba(216, 178, 106, 0.62);
}

#ecran-intro .btn-or {
  min-height: 54px;
  padding: 15px 36px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.45),
    0 0 34px rgba(216, 178, 106, 0.28);
}

#ecran-intro .lien-discret {
  color: rgba(246, 236, 214, 0.76);
}

#ecran-intro .lien-discret:hover,
#ecran-intro .lien-discret:focus {
  color: #fff3d7;
}

/* === PASSE 6B : DOCUMENT ENQUETE SANS VISUEL LIEU === */

.document-enquete {
  position: relative;
  margin: 16px 0;
  padding: 18px 18px 16px;
  border-radius: 12px;
  border: 1px solid rgba(138, 106, 56, 0.58);
  background:
    linear-gradient(135deg, rgba(58, 44, 24, 0.08), rgba(255, 255, 255, 0.22)),
    repeating-linear-gradient(
      -8deg,
      rgba(138, 106, 56, 0.045) 0,
      rgba(138, 106, 56, 0.045) 1px,
      transparent 1px,
      transparent 9px
    ),
    #f7edd2;
  box-shadow:
    0 14px 28px rgba(58, 44, 24, 0.18),
    inset 0 0 32px rgba(184, 134, 47, 0.08);
}

.document-enquete::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(184, 134, 47, 0.22);
  border-radius: 7px;
  pointer-events: none;
}

.document-label {
  margin: 0 0 8px;
  color: #8a5a1f;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.document-titre {
  margin: 0;
  color: #2f2417;
  font-family: Georgia, serif;
  font-size: clamp(1.25rem, 5vw, 1.55rem);
  line-height: 1.1;
}

.document-note {
  margin: 12px 0 0;
  color: #5d4a2d;
  font-size: 0.98rem;
  line-height: 1.55;
}

.document-cachet {
  display: inline-flex;
  margin-top: 14px;
  padding: 6px 10px;
  border: 1px solid rgba(156, 53, 36, 0.44);
  border-radius: 999px;
  color: #9c3524;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(-2deg);
  background: rgba(156, 53, 36, 0.06);
}



/* === PASSE A2 — FOND MONDE NUIT DERRIÈRE LE CARNET === */

body {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 217, 138, 0.10), transparent 28%),
    radial-gradient(circle at 12% 22%, rgba(169, 216, 201, 0.10), transparent 24%),
    linear-gradient(180deg, var(--nuit) 0%, var(--sapin) 52%, #071011 100%);
  color: var(--papier);
}

.app {
  background:
    radial-gradient(circle at 85% 8%, rgba(255, 217, 138, 0.08), transparent 18%),
    radial-gradient(circle at 15% 35%, rgba(169, 216, 201, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(14, 28, 30, 0.96), rgba(7, 16, 17, 0.98));
}

.ecran,
.page {
  background: transparent;
}

.page-carnet,
.carnet,
.carte,
.panneau,
.card,
.bloc-mission,
.bloc-question,
.bloc-reponse,
.bloc-fragment,
.bloc-signe {
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(184, 134, 47, 0.16);
}

.page-carnet,
.carnet {
  border: 1px solid rgba(184, 134, 47, 0.32);
}

.app-header {
  background:
    linear-gradient(180deg, rgba(7, 16, 17, 0.96), rgba(14, 28, 30, 0.84));
  border-bottom: 1px solid rgba(184, 134, 47, 0.24);
  color: var(--papier);
}

.app-nav {
  background:
    linear-gradient(180deg, rgba(23, 43, 45, 0.94), rgba(7, 16, 17, 0.98));
  border-top: 1px solid rgba(184, 134, 47, 0.28);
  box-shadow: 0 -16px 36px rgba(0, 0, 0, 0.36);
}

.app-nav button {
  color: rgba(251, 246, 232, 0.72);
}

.app-nav button.actif,
.app-nav button[aria-current="page"] {
  color: var(--luciole);
}


/* === PASSE A2B — PIMPAGE NUIT / CONSTELLATIONS / LUCIOLES === */

.app::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 217, 138, 0.34) 0 1px, transparent 2px),
    radial-gradient(circle at 31% 11%, rgba(169, 216, 201, 0.32) 0 1px, transparent 2px),
    radial-gradient(circle at 44% 17%, rgba(255, 217, 138, 0.28) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 14%, rgba(255, 217, 138, 0.24) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 29%, rgba(169, 216, 201, 0.22) 0 1px, transparent 2px),
    linear-gradient(115deg, transparent 17%, rgba(255, 217, 138, 0.10) 17.2%, transparent 17.5%),
    linear-gradient(24deg, transparent 31%, rgba(169, 216, 201, 0.08) 31.2%, transparent 31.5%),
    radial-gradient(circle at 50% 42%, transparent 0%, rgba(0, 0, 0, 0.18) 70%, rgba(0, 0, 0, 0.50) 100%);
  opacity: 0.8;
}

.app::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 12% 64%, rgba(255, 217, 138, 0.20) 0 2px, transparent 4px),
    radial-gradient(circle at 88% 58%, rgba(255, 217, 138, 0.16) 0 2px, transparent 5px),
    radial-gradient(circle at 74% 82%, rgba(169, 216, 201, 0.16) 0 1px, transparent 4px),
    radial-gradient(circle at 23% 84%, rgba(255, 217, 138, 0.12) 0 1px, transparent 4px);
  opacity: 0.75;
}

.app > * {
  position: relative;
  z-index: 1;
}

.page-carnet,
.carnet {
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(216, 178, 106, 0.22),
    0 0 42px rgba(255, 217, 138, 0.06);
}

.app-header {
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.26),
    inset 0 -1px 0 rgba(255, 217, 138, 0.10);
}

.app-nav {
  min-height: 68px;
  box-shadow:
    0 -18px 42px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 217, 138, 0.12);
}

.app-nav button {
  min-height: 56px;
  letter-spacing: 0.03em;
}

.app-nav button.actif,
.app-nav button[aria-current="page"] {
  text-shadow: 0 0 12px rgba(255, 217, 138, 0.34);
}

.app-nav button.actif::after,
.app-nav button[aria-current="page"]::after {
  content: "";
  display: block;
  width: 5px;
  height: 5px;
  margin: 3px auto 0;
  border-radius: 999px;
  background: var(--luciole);
  box-shadow: 0 0 10px rgba(255, 217, 138, 0.75);
}


/* === PASSE A4 — VOIX DU CERCLE / ENCART NUIT === */

.mission-dialogue {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: start;
  margin: 18px 0;
  padding: 12px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 0%, rgba(169, 216, 201, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(23, 43, 45, 0.98), rgba(14, 28, 30, 0.98));
  border: 1px solid rgba(169, 216, 201, 0.34);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.32),
    inset 0 0 28px rgba(255, 217, 138, 0.04);
  color: var(--papier);
}

.mission-dialogue::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(216, 178, 106, 0.16);
  border-radius: 11px;
  pointer-events: none;
}

.dialogue-portrait {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  object-fit: cover;
  padding: 5px;
  background: rgba(251, 246, 232, 0.08);
  border: 1px solid rgba(255, 217, 138, 0.34);
  box-shadow: 0 0 18px rgba(255, 217, 138, 0.16);
}

.dialogue-cadre {
  position: relative;
  padding-top: 2px;
}

.dialogue-nom {
  margin: 0 0 6px;
  color: var(--luciole);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.dialogue-texte {
  margin: 0;
  color: var(--papier);
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.48;
}

.bloc-indice {
  margin: 16px 0;
  padding: 13px 14px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(23, 43, 45, 0.94), rgba(14, 28, 30, 0.96));
  border: 1px solid rgba(169, 216, 201, 0.26);
  box-shadow: inset 0 0 20px rgba(169, 216, 201, 0.04);
}

.bloc-indice .lien-discret {
  color: var(--luciole);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.bloc-indice p {
  color: var(--papier);
}


/* === PASSE A4B — PAPIER CARNET PLUS ANCIEN / MOINS BLANC === */

.page-carnet,
.carnet {
  background:
    linear-gradient(135deg, rgba(90, 67, 36, 0.10), rgba(255, 246, 220, 0.10)),
    repeating-linear-gradient(
      -7deg,
      rgba(90, 67, 36, 0.035) 0,
      rgba(90, 67, 36, 0.035) 1px,
      transparent 1px,
      transparent 9px
    ),
    #eadbb8;
  color: #2f2417;
}

.page-carnet::before,
.carnet::before {
  opacity: 0.18;
}

.page-carnet h1,
.page-carnet h2,
.page-carnet h3,
.page-carnet p,
.carnet h1,
.carnet h2,
.carnet h3,
.carnet p {
  color: #2f2417;
}

.document-enquete {
  background:
    linear-gradient(135deg, rgba(58, 44, 24, 0.10), rgba(255, 255, 255, 0.12)),
    repeating-linear-gradient(
      -8deg,
      rgba(138, 106, 56, 0.045) 0,
      rgba(138, 106, 56, 0.045) 1px,
      transparent 1px,
      transparent 9px
    ),
    #efe0bd;
}

.bloc-reponse input,
.bloc-reponse textarea {
  background: #f2e2bd;
  color: #2f2417;
  border-color: rgba(138, 91, 31, 0.55);
}


/* === PASSE A5 — DOCUMENT COLLÉ / PREUVE DE TERRAIN === */

.document-enquete {
  position: relative;
  transform: rotate(-0.35deg);
  margin: 18px 0 20px;
  padding: 18px 18px 16px;
  border-radius: 8px 13px 10px 8px;
  border: 1px solid rgba(111, 86, 54, 0.42);
  box-shadow:
    0 16px 30px rgba(47, 36, 23, 0.24),
    0 2px 0 rgba(255, 255, 255, 0.24) inset,
    0 0 0 1px rgba(184, 134, 47, 0.14);
}

.document-enquete::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 42px;
  height: 42px;
  border-radius: 12px 0 8px 0;
  background:
    linear-gradient(135deg, rgba(111, 86, 54, 0.05) 0%, rgba(111, 86, 54, 0.22) 48%, rgba(255, 246, 220, 0.50) 52%, rgba(255, 246, 220, 0.90) 100%);
  box-shadow: -5px -5px 12px rgba(47, 36, 23, 0.12);
  pointer-events: none;
}

.document-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #7b5526;
}

.document-label::before {
  content: "◆";
  color: var(--or);
  font-size: 0.62rem;
}

.document-titre {
  border-bottom: 1px solid rgba(111, 86, 54, 0.24);
  padding-bottom: 8px;
}

.document-note {
  max-width: 58ch;
}

.document-cachet {
  box-shadow: 0 0 0 1px rgba(156, 53, 36, 0.12) inset;
}

.bloc-photo {
  position: relative;
  margin: 18px 0;
  padding: 16px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(23, 43, 45, 0.96), rgba(14, 28, 30, 0.98));
  border: 1px solid rgba(169, 216, 201, 0.24);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.28),
    inset 0 0 24px rgba(255, 217, 138, 0.035);
  color: var(--papier);
}

.bloc-photo::before {
  content: "Preuve de terrain";
  display: block;
  margin-bottom: 8px;
  color: var(--luciole);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.bloc-photo p {
  color: var(--papier);
}

.bloc-photo .btn,
.bloc-photo button {
  border-color: rgba(255, 217, 138, 0.38);
}

.etape-galerie img,
.etape-media img {
  border: 8px solid var(--creme);
  box-shadow:
    0 16px 26px rgba(47, 36, 23, 0.24),
    0 0 0 1px rgba(111, 86, 54, 0.18);
  transform: rotate(-0.5deg);
}

.etape-media figcaption {
  color: #5d472a;
  font-size: 0.78rem;
  font-style: italic;
}


/* === FIX A5 — LISIBILITÉ TEXTE INDICE === */

.bloc-indice,
.bloc-indice * {
  color: var(--papier) !important;
}

.bloc-indice .lien-discret,
.bloc-indice button {
  color: var(--luciole) !important;
}

.bloc-indice p,
.bloc-indice span,
.bloc-indice div {
  color: rgba(251, 246, 232, 0.92) !important;
}


/* === PASSE A6 — MENU BAS MOBILE CODEX / TACTILE === */

.app-nav {
  min-height: 74px;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  gap: 2px;
  background:
    linear-gradient(180deg, rgba(23, 43, 45, 0.96), rgba(7, 16, 17, 0.99));
  border-top: 1px solid rgba(216, 178, 106, 0.34);
}

.app-nav button {
  position: relative;
  min-height: 62px;
  padding: 7px 4px 6px;
  border-radius: 10px;
  color: rgba(251, 246, 232, 0.72);
  font-size: 0.72rem;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: none;
  background: transparent;
  border: 1px solid transparent;
}

.app-nav button svg,
.app-nav button img {
  width: 24px;
  height: 24px;
  margin-bottom: 3px;
  opacity: 0.86;
  filter: drop-shadow(0 0 4px rgba(255, 217, 138, 0.10));
}

.app-nav button.actif,
.app-nav button[aria-current="page"] {
  color: var(--luciole);
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 217, 138, 0.12), transparent 52%),
    linear-gradient(180deg, rgba(31, 58, 51, 0.64), rgba(14, 28, 30, 0.54));
  border-color: rgba(216, 178, 106, 0.28);
}

.app-nav button.actif svg,
.app-nav button[aria-current="page"] svg,
.app-nav button.actif img,
.app-nav button[aria-current="page"] img {
  opacity: 1;
  filter:
    drop-shadow(0 0 6px rgba(255, 217, 138, 0.34))
    drop-shadow(0 0 12px rgba(169, 216, 201, 0.12));
}

.app-nav button.actif::after,
.app-nav button[aria-current="page"]::after {
  width: 6px;
  height: 6px;
  margin-top: 4px;
  background: var(--luciole);
  box-shadow:
    0 0 8px rgba(255, 217, 138, 0.85),
    0 0 18px rgba(169, 216, 201, 0.22);
}

@media (max-width: 380px) {
  .app-nav button {
    font-size: 0.66rem;
    letter-spacing: 0.02em;
  }

  .app-nav button svg,
  .app-nav button img {
    width: 22px;
    height: 22px;
  }
}


/* === PASSE A7 — GALERIE DES PISTES / CODEX DES GARDIENS === */

.carte-quete {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(216, 178, 106, 0.32);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 217, 138, 0.08), transparent 34%),
    linear-gradient(135deg, rgba(23, 43, 45, 0.96), rgba(7, 16, 17, 0.96));
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 217, 138, 0.06);
}

.carte-quete::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(216, 178, 106, 0.14);
  border-radius: 13px;
  pointer-events: none;
}

.carte-quete::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -34px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 217, 138, 0.14), transparent 68%);
  pointer-events: none;
}

.quete-statut {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--luciole);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.quete-statut::before {
  content: "✦";
  color: var(--luciole);
  font-size: 0.66rem;
}

.quete-animal,
.quete-commune {
  color: rgba(251, 246, 232, 0.72);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.carte-quete h2 {
  color: var(--papier);
  text-shadow: 0 0 16px rgba(255, 217, 138, 0.14);
}

.quete-description {
  color: rgba(251, 246, 232, 0.82);
  line-height: 1.45;
}

.quete-medaillon,
.medaillon-image {
  border-color: rgba(216, 178, 106, 0.42);
  box-shadow:
    0 0 0 1px rgba(255, 217, 138, 0.12),
    0 0 20px rgba(255, 217, 138, 0.10);
}

.carte-quete[data-element="eau"] {
  background:
    radial-gradient(circle at 12% 10%, rgba(169, 216, 201, 0.16), transparent 36%),
    linear-gradient(135deg, rgba(23, 43, 45, 0.98), rgba(7, 16, 17, 0.96));
}

.carte-quete[data-element="air"] {
  background:
    radial-gradient(circle at 12% 10%, rgba(142, 169, 161, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(20, 34, 40, 0.98), rgba(7, 16, 17, 0.96));
}

.carte-quete[data-element="terre"] {
  background:
    radial-gradient(circle at 12% 10%, rgba(216, 178, 106, 0.13), transparent 38%),
    linear-gradient(135deg, rgba(31, 58, 51, 0.90), rgba(18, 22, 15, 0.96));
}

.carte-quete[data-element="feu-ancien"] {
  background:
    radial-gradient(circle at 12% 10%, rgba(156, 53, 36, 0.24), transparent 38%),
    linear-gradient(135deg, rgba(62, 28, 18, 0.92), rgba(14, 20, 18, 0.98));
}

.carte-quete.scellee {
  opacity: 0.88;
  filter: saturate(0.82);
}

.carte-quete.reservation {
  margin-top: 22px;
  border: 1px solid rgba(156, 53, 36, 0.58);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 217, 138, 0.18), transparent 26%),
    radial-gradient(circle at 50% 34%, rgba(156, 53, 36, 0.24), transparent 42%),
    linear-gradient(180deg, rgba(58, 23, 18, 0.96), rgba(15, 12, 10, 0.98));
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 217, 138, 0.10),
    inset 0 0 42px rgba(156, 53, 36, 0.12);
}

.carte-quete.reservation::before {
  border-color: rgba(255, 217, 138, 0.22);
}

.carte-quete.reservation h2 {
  color: #fff0c7;
  text-align: center;
}

.carte-quete.reservation h2::before {
  content: "✦";
  display: block;
  margin-bottom: 10px;
  color: var(--luciole);
  font-size: 1.2rem;
  text-shadow: 0 0 18px rgba(255, 217, 138, 0.68);
}

.carte-quete.reservation .quete-animal,
.carte-quete.reservation .quete-commune,
.carte-quete.reservation .quete-description {
  text-align: center;
}

.carte-quete.reservation .quete-description {
  color: rgba(251, 246, 232, 0.86);
}

.carte-quete .btn-quete,
.carte-quete .btn-secondaire {
  min-height: 42px;
  border-radius: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.carte-quete.disponible .btn-quete {
  background:
    linear-gradient(180deg, rgba(216, 178, 106, 0.96), rgba(184, 134, 47, 0.96));
  color: #1b140b;
  border: 1px solid rgba(255, 217, 138, 0.45);
}

.carte-quete.scellee .btn-secondaire,
.carte-quete .btn-secondaire:disabled {
  background: rgba(251, 246, 232, 0.05);
  color: rgba(251, 246, 232, 0.56);
  border: 1px solid rgba(216, 178, 106, 0.22);
}


/* === PASSE A8 — CARNET DU VOYAGEUR / DOSSIER DE TERRAIN === */

#vue-carnet .page-carnet {
  position: relative;
  max-width: 420px;
  margin-inline: auto;
  padding: 26px 22px 28px;
  border-radius: 18px 18px 12px 12px;
  background:
    linear-gradient(135deg, rgba(90, 67, 36, 0.12), rgba(255, 246, 220, 0.08)),
    repeating-linear-gradient(
      0deg,
      rgba(90, 67, 36, 0.035) 0,
      rgba(90, 67, 36, 0.035) 1px,
      transparent 1px,
      transparent 18px
    ),
    #eadbb8;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(216, 178, 106, 0.26);
}

#vue-carnet .page-carnet::before {
  content: "Carnet du voyageur";
  display: block;
  margin-bottom: 8px;
  color: #7b5526;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#vue-carnet .titre-page {
  margin: 0;
  color: #2f2417;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 7vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#vue-carnet .soustitre-page {
  margin: 8px 0 20px;
  color: #6f5636;
  font-style: italic;
  line-height: 1.45;
}

#vue-carnet .carnet-section {
  position: relative;
  margin: 18px 0;
  padding: 16px 14px;
  border-radius: 14px;
  border: 1px solid rgba(111, 86, 54, 0.25);
  background: rgba(251, 246, 232, 0.28);
  box-shadow:
    0 12px 24px rgba(47, 36, 23, 0.10),
    inset 0 0 22px rgba(255, 246, 220, 0.18);
}

#vue-carnet .carnet-section h3 {
  margin: 0 0 12px;
  color: #2f2417;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(111, 86, 54, 0.24);
  padding-bottom: 8px;
}

#vue-carnet .note-eliane {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: start;
  margin: 12px 0;
  padding: 12px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 0%, rgba(169, 216, 201, 0.10), transparent 36%),
    linear-gradient(135deg, rgba(23, 43, 45, 0.96), rgba(14, 28, 30, 0.96));
  border: 1px solid rgba(169, 216, 201, 0.24);
  color: var(--papier);
}

#vue-carnet .note-eliane img {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 217, 138, 0.34);
  background: rgba(251, 246, 232, 0.10);
}

#vue-carnet .note-eliane blockquote {
  margin: 0;
  color: var(--papier);
  font-family: var(--serif);
  font-size: 0.96rem;
  line-height: 1.42;
}

#vue-carnet .note-lieu {
  display: block;
  margin-top: 7px;
  color: var(--luciole);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#vue-carnet .lieux-releves {
  list-style: none;
  margin: 0;
  padding: 0;
}

#vue-carnet .lieux-releves li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(111, 86, 54, 0.24);
  color: #5d472a;
  font-size: 0.92rem;
}

#vue-carnet .lieux-releves li:last-child {
  border-bottom: 0;
}

#vue-carnet .lieux-releves .coche {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  border: 1px solid rgba(111, 86, 54, 0.34);
  color: transparent;
  font-size: 0.72rem;
}

#vue-carnet .lieux-releves li.releve {
  color: #2f2417;
  font-weight: 700;
}

#vue-carnet .lieux-releves li.releve .coche {
  color: #1f3a33;
  background: rgba(169, 216, 201, 0.18);
  border-color: rgba(31, 58, 51, 0.45);
}

#vue-carnet .grille-cliches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#vue-carnet .polaroid {
  margin: 0;
  padding: 8px 8px 12px;
  border-radius: 5px;
  background: var(--creme);
  border: 1px solid rgba(111, 86, 54, 0.18);
  box-shadow: 0 14px 24px rgba(47, 36, 23, 0.20);
  transform: rotate(-1deg);
}

#vue-carnet .polaroid:nth-child(even) {
  transform: rotate(1deg);
}

#vue-carnet .polaroid img {
  width: 100%;
  aspect-ratio: 1 / 0.72;
  object-fit: cover;
  border-radius: 3px;
  background: #d8c9a4;
}

#vue-carnet .polaroid-tampon {
  display: inline-flex;
  margin-top: 7px;
  padding: 3px 7px;
  border: 1px solid rgba(156, 53, 36, 0.38);
  border-radius: 999px;
  color: #9c3524;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

#vue-carnet .polaroid figcaption {
  margin-top: 5px;
  color: #5d472a;
  font-size: 0.72rem;
  font-style: italic;
  line-height: 1.2;
}

#vue-carnet .carnet-vide {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  color: #6f5636;
  background: rgba(255, 246, 220, 0.38);
  border: 1px dashed rgba(111, 86, 54, 0.26);
  font-style: italic;
}


/* === FIX A8B — LISIBILITÉ CARNET DU VOYAGEUR === */

#vue-carnet .page-carnet {
  width: min(92vw, 460px);
  padding: 28px 24px 30px;
}

#vue-carnet .note-eliane {
  grid-template-columns: 34px 1fr;
  background:
    radial-gradient(circle at 12% 0%, rgba(169, 216, 201, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(18, 34, 36, 0.98), rgba(8, 18, 20, 0.98));
  border-color: rgba(255, 217, 138, 0.28);
}

#vue-carnet .note-eliane img {
  width: 34px;
  height: 34px;
}

#vue-carnet .note-eliane blockquote,
#vue-carnet .note-eliane blockquote * {
  color: rgba(251, 246, 232, 0.94) !important;
}

#vue-carnet .note-eliane blockquote {
  font-size: 0.92rem;
}

#vue-carnet .note-lieu {
  color: var(--luciole) !important;
}

#vue-carnet .polaroid {
  min-height: 96px;
}

#vue-carnet .polaroid img[src=""],
#vue-carnet .polaroid img:not([src]) {
  display: none;
}

#vue-carnet .polaroid::before {
  content: "Cliché versé";
  display: block;
  min-height: 44px;
  border-radius: 3px;
  background:
    linear-gradient(135deg, rgba(234, 219, 184, 0.82), rgba(251, 246, 232, 0.54));
  border: 1px dashed rgba(111, 86, 54, 0.24);
}


/* === PASSE A9 — FRAGMENTS / COLLECTION CODEX === */

#vue-fragments .page-carnet {
  position: relative;
  width: min(92vw, 460px);
  max-width: 460px;
  margin-inline: auto;
  padding: 28px 22px 30px;
  border-radius: 18px 18px 12px 12px;
}

#vue-fragments .titre-page {
  margin: 0;
  color: #2f2417;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 7vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#vue-fragments .soustitre-page {
  margin: 8px 0 20px;
  color: #6f5636;
  font-style: italic;
}

#vue-fragments .grille-fragments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#vue-fragments .fragment-case {
  position: relative;
  min-height: 168px;
  padding: 15px 12px 14px;
  border-radius: 16px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 217, 138, 0.10), transparent 42%),
    linear-gradient(180deg, rgba(23, 43, 45, 0.96), rgba(7, 16, 17, 0.98));
  border: 1px solid rgba(216, 178, 106, 0.28);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.30),
    inset 0 0 0 1px rgba(255, 217, 138, 0.06);
  color: var(--papier);
}

#vue-fragments .fragment-case::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(216, 178, 106, 0.13);
  border-radius: 11px;
  pointer-events: none;
}

#vue-fragments .fragment-case img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  margin: 4px auto 10px;
  filter:
    drop-shadow(0 0 10px rgba(255, 217, 138, 0.28))
    drop-shadow(0 8px 10px rgba(0, 0, 0, 0.32));
}

#vue-fragments .fragment-case .case-nom {
  margin: 8px 0 5px;
  color: var(--luciole);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#vue-fragments .fragment-case .case-desc {
  margin: 0;
  color: rgba(251, 246, 232, 0.78);
  font-size: 0.74rem;
  line-height: 1.32;
  font-style: italic;
}

#vue-fragments .fragment-case.trouve {
  border-color: rgba(255, 217, 138, 0.46);
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 217, 138, 0.20), transparent 36%),
    radial-gradient(circle at 50% 44%, rgba(169, 216, 201, 0.10), transparent 42%),
    linear-gradient(180deg, rgba(31, 58, 51, 0.96), rgba(7, 16, 17, 0.98));
}

#vue-fragments .fragment-case.trouve::after {
  content: "Révélé";
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #1b140b;
  background: var(--luciole);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#vue-fragments .fragment-case.mystere {
  filter: saturate(0.82);
}

#vue-fragments .fragment-case.mystere .case-inconnu {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 4px auto 10px;
  border-radius: 18px;
  border: 1px dashed rgba(216, 178, 106, 0.38);
  color: rgba(255, 217, 138, 0.72);
  font-family: var(--serif);
  font-size: 2rem;
  background:
    radial-gradient(circle, rgba(255, 217, 138, 0.08), transparent 60%),
    rgba(251, 246, 232, 0.04);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.18);
}

#vue-fragments .fragments-badge {
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 217, 138, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(58, 23, 18, 0.94), rgba(14, 28, 30, 0.98));
  border: 1px solid rgba(156, 53, 36, 0.46);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.30);
}

#vue-fragments .fragments-badge img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(255, 217, 138, 0.26));
}

#vue-fragments .fragments-badge p {
  margin: 10px 0 0;
  color: var(--luciole);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 380px) {
  #vue-fragments .grille-fragments {
    gap: 10px;
  }

  #vue-fragments .fragment-case {
    min-height: 152px;
    padding: 13px 10px;
  }
}



/* === PASSE PROFIL JOUEUR === */

.profil-identite {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  margin: 18px 0;
  padding: 14px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 217, 138, 0.14), transparent 36%),
    linear-gradient(135deg, rgba(23, 43, 45, 0.96), rgba(7, 16, 17, 0.96));
  border: 1px solid rgba(216, 178, 106, 0.28);
  color: var(--papier);
}

.profil-identite img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255, 217, 138, 0.22));
}

.profil-pseudo {
  margin: 0 0 4px;
  color: var(--luciole);
  font-size: 1.1rem;
  font-weight: 900;
}

.profil-rang,
.profil-enquete {
  margin: 0;
  color: rgba(251, 246, 232, 0.84);
  font-size: 0.9rem;
}

.profil-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.profil-stats div {
  padding: 14px 10px;
  border-radius: 15px;
  text-align: center;
  background: rgba(14, 28, 30, 0.88);
  border: 1px solid rgba(216, 178, 106, 0.22);
  color: var(--papier);
}

.profil-stats strong {
  display: block;
  color: var(--luciole);
  font-size: 1.25rem;
}

.profil-stats span {
  display: block;
  margin-top: 4px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(251, 246, 232, 0.72);
}

.profil-appel-montmelard {
  margin: 18px 0;
  padding: 14px;
  border-left: 3px solid var(--or-clair);
  background: rgba(14, 28, 30, 0.72);
  color: var(--papier);
  font-style: italic;
  border-radius: 10px;
}


/* === FIX PROFIL — lisibilité identité === */

.profil-identite,
.profil-identite * {
  color: var(--papier) !important;
}

.profil-identite .profil-pseudo {
  color: var(--luciole) !important;
}

.profil-identite .profil-rang,
.profil-identite .profil-enquete {
  color: rgba(251, 246, 232, 0.84) !important;
}



/* === PASSE BADGES COLLECTIONS === */

.collections-page .soustitre-page {
  margin-bottom: 16px;
}

.collections-section {
  margin-top: 20px;
}

.collections-titre-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.collections-titre-ligne h3 {
  margin: 0;
  color: var(--papier);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.collections-titre-ligne span {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(216, 178, 106, 0.34);
  color: var(--luciole);
  background: rgba(14, 28, 30, 0.78);
  font-size: 0.72rem;
  font-weight: 900;
}

.grille-badges {
  display: grid;
  gap: 10px;
}

.badge-collection {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 217, 138, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(23, 43, 45, 0.96), rgba(7, 16, 17, 0.96));
  border: 1px solid rgba(216, 178, 106, 0.24);
  color: var(--papier);
}

.badge-collection.verrouille {
  opacity: 0.62;
  filter: grayscale(0.45);
}

.badge-collection.debloque {
  border-color: rgba(255, 217, 138, 0.52);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 217, 138, 0.08);
}

.badge-collection img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  padding: 7px;
  border-radius: 14px;
  background: rgba(251, 246, 232, 0.08);
  border: 1px solid rgba(216, 178, 106, 0.24);
}

.badge-statut {
  margin: 0 0 2px;
  color: var(--luciole);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.badge-nom {
  margin: 0 0 4px;
  color: var(--papier);
  font-size: 0.96rem;
  font-weight: 900;
}

.badge-desc {
  margin: 0;
  color: rgba(251, 246, 232, 0.76);
  font-size: 0.82rem;
  line-height: 1.35;
}


/* === FIX COLLECTIONS — lisibilité badges === */

.badge-collection,
.badge-collection * {
  color: var(--papier) !important;
}

.badge-collection .badge-statut {
  color: var(--luciole) !important;
}

.badge-collection .badge-nom {
  color: var(--papier) !important;
}

.badge-collection .badge-desc {
  color: rgba(251, 246, 232, 0.82) !important;
}

.badge-collection.verrouille {
  opacity: 0.72;
}



/* === PASSE BESTIAIRE === */

.bestiaire-compteur {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 18px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(14, 28, 30, 0.78);
  border: 1px solid rgba(216, 178, 106, 0.26);
  color: var(--papier);
}

.bestiaire-compteur span {
  display: grid;
  place-items: center;
  min-width: 54px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 217, 138, 0.12);
  color: var(--luciole);
  font-weight: 900;
}

.bestiaire-compteur p {
  margin: 0;
  color: rgba(251, 246, 232, 0.76);
  font-size: 0.86rem;
  font-style: italic;
}

.grille-bestiaire {
  display: grid;
  gap: 13px;
}

.carte-bestiaire {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 13px;
  align-items: stretch;
  padding: 12px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 14% 16%, rgba(255, 217, 138, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(23, 43, 45, 0.98), rgba(7, 16, 17, 0.98));
  border: 1px solid rgba(216, 178, 106, 0.24);
  color: var(--papier);
  overflow: hidden;
}

.carte-bestiaire.verrouille {
  opacity: 0.66;
  filter: grayscale(0.5);
}

.carte-bestiaire.revele,
.carte-bestiaire.collecte {
  border-color: rgba(255, 217, 138, 0.50);
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 217, 138, 0.08);
}

.bestiaire-visuel {
  min-height: 112px;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(216, 178, 106, 0.30);
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 217, 138, 0.12), transparent 50%),
    rgba(251, 246, 232, 0.08);
}

.bestiaire-visuel img {
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
  display: block;
}

.bestiaire-silhouette {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 112px;
  color: rgba(255, 217, 138, 0.62);
  font-size: 2rem;
  font-weight: 900;
}

.bestiaire-statut {
  margin: 0 0 4px;
  color: var(--luciole) !important;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bestiaire-contenu h3 {
  margin: 0 0 3px;
  color: var(--papier) !important;
  font-size: 1rem;
  line-height: 1.1;
}

.bestiaire-titre {
  margin: 0 0 4px;
  color: rgba(251, 246, 232, 0.84) !important;
  font-style: italic;
  font-size: 0.82rem;
}

.bestiaire-territoire {
  margin: 0 0 8px;
  color: var(--luciole) !important;
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.bestiaire-legende {
  margin: 0 0 8px;
  color: rgba(251, 246, 232, 0.78) !important;
  font-size: 0.82rem;
  line-height: 1.34;
}

.bestiaire-constellation {
  margin: 0;
  padding-top: 7px;
  border-top: 1px solid rgba(216, 178, 106, 0.18);
  color: rgba(255, 217, 138, 0.76) !important;
  font-size: 0.76rem;
  font-style: italic;
}

@media (max-width: 380px) {
  .carte-bestiaire {
    grid-template-columns: 74px 1fr;
  }

  .bestiaire-visuel,
  .bestiaire-visuel img,
  .bestiaire-silhouette {
    min-height: 100px;
  }
}


/* =====================================================================
   MODE DÉMO / TESTEUR — panneau interne (?debug=1), pas une UI publique
   ===================================================================== */
#panneau-demo {
  position: fixed;
  right: 10px;
  bottom: 84px;
  z-index: 999;
  min-width: 148px;
  padding: 8px 10px 10px;
  background: rgba(18, 29, 25, 0.94);
  border: 1px solid rgba(216, 178, 106, 0.45);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  font-size: 0.72rem;
}

#panneau-demo .demo-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: rgba(255, 217, 138, 0.85);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#panneau-demo .demo-fermer {
  border: none;
  background: none;
  color: rgba(251, 246, 232, 0.7);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

#panneau-demo .demo-boutons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

#panneau-demo .demo-boutons button {
  padding: 5px 6px;
  border: 1px solid rgba(216, 178, 106, 0.42);
  border-radius: 5px;
  background: rgba(58, 81, 72, 0.6);
  color: #fbf6e8;
  font-size: 0.72rem;
  cursor: pointer;
}

#panneau-demo .demo-boutons button:hover {
  background: rgba(216, 178, 106, 0.25);
}


/* === PROFIL TABLEAU DE BORD — raccourcis === */

.profil-progression,
.profil-objectif {
  margin: 16px 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(14, 28, 30, 0.78);
  border: 1px solid rgba(216, 178, 106, 0.24);
  color: var(--papier);
}

.profil-bloc-titre {
  margin: 0 0 8px;
  color: var(--luciole);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profil-jauge {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(251, 246, 232, 0.14);
  border: 1px solid rgba(216, 178, 106, 0.18);
}

.profil-jauge-barre {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--or), var(--luciole));
}

.profil-jauge-legende,
.profil-objectif-texte {
  margin: 8px 0 0;
  color: rgba(251, 246, 232, 0.82);
  font-size: 0.86rem;
}

.profil-raccourcis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.btn-raccourci {
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid rgba(216, 178, 106, 0.32);
  background: rgba(14, 28, 30, 0.84);
  color: var(--papier);
  font-family: var(--serif);
  font-size: 0.78rem;
  cursor: pointer;
}

.btn-raccourci:hover {
  background: rgba(216, 178, 106, 0.18);
}

.profil-appel-montmelard.verrouille {
  opacity: 0.88;
}

.profil-cadenas {
  margin-right: 4px;
}


/* === CORRECTION LISIBILITÉ PROFIL — contraste jaune/or === */

.profil-page .profil-bloc-titre {
  color: #fff3cf;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.profil-page .profil-jauge-legende,
.profil-page .profil-objectif-texte {
  color: #fbf6e8;
}

.profil-page .profil-stats strong,
.profil-page .profil-stats span {
  color: #fbf6e8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.profil-page .btn-raccourci {
  color: #fbf6e8;
  font-weight: 700;
}

.profil-page .profil-appel-montmelard {
  color: #fbf6e8;
  background: rgba(14, 28, 30, 0.82);
  border: 1px solid rgba(216, 178, 106, 0.32);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.profil-page .btn-or,
.profil-page .btn-bloc {
  color: #1b211d;
  font-weight: 900;
  text-shadow: none;
}



/* === COLLECTIONS PAR CIRCUIT — rattachement enquête Matour === */

.collections-enquete {
  margin: 16px 0 20px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(14, 28, 30, 0.82);
  border: 1px solid rgba(216, 178, 106, 0.30);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.enquete-etiquette {
  margin: 0 0 6px;
  color: #fff3cf;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.enquete-nom {
  margin: 0 0 12px;
  color: #fbf6e8;
  font-size: 1.08rem;
}

.enquete-jauge {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(251, 246, 232, 0.14);
  border: 1px solid rgba(216, 178, 106, 0.20);
}

.enquete-jauge span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--or), var(--luciole));
}

.enquete-compte,
.collections-transition {
  margin: 10px 0 0;
  color: #fbf6e8;
  font-size: 0.9rem;
  line-height: 1.45;
}

.collections-transition {
  padding: 14px;
  border-radius: 16px;
  background: rgba(216, 178, 106, 0.12);
  border: 1px solid rgba(216, 178, 106, 0.25);
  font-weight: 800;
}

.fragment-case .case-statut {
  margin: 0 0 8px;
  color: #fff3cf;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}


/* === CORRECTION LISIBILITÉ COLLECTIONS — bloc enquête gratuite === */

.collections-page .collections-enquete {
  background: rgba(10, 24, 24, 0.92);
  border: 1px solid rgba(216, 178, 106, 0.42);
}

.collections-page .enquete-etiquette {
  color: #fff3cf;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.collections-page .enquete-nom {
  color: #fbf6e8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.collections-page .enquete-compte {
  color: #fbf6e8;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.collections-page .collections-titre-ligne h3,
.collections-page .collections-titre-ligne span {
  color: #fff3cf;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.collections-page .collections-transition {
  color: #fbf6e8;
  background: rgba(10, 24, 24, 0.88);
  border: 1px solid rgba(216, 178, 106, 0.42);
}



/* === BESTIAIRE LIÉ AU JEU SIMPLE === */

.bestiaire-lien {
  margin: 7px 0 0;
  color: #fbf6e8;
  font-size: 0.84rem;
  line-height: 1.4;
}

.bestiaire-lien strong {
  color: #fff3cf;
}

.carte-bestiaire.verrouille .bestiaire-lien {
  color: rgba(251, 246, 232, 0.78);
}



/* === PASSE FRAGMENTS WOW — reliques photoréalistes partout === */

/* Composant global : toute image de fragment porte .frag-wow
   + une taille (mini | std | hero) + l'identité de la relique. */

img.frag-wow {
  object-fit: contain;
  filter:
    drop-shadow(0 2px 3px rgba(20, 14, 6, 0.30))
    drop-shadow(0 9px 14px rgba(0, 0, 0, 0.26));
}

img.frag-wow--mini { width: 54px; height: 54px; }
img.frag-wow--std  { width: 76px; height: 76px; }
img.frag-wow--hero { width: 148px; height: 148px; }

/* Le parchemin est cadré large (3:2) : on le grossit pour l'aligner
   optiquement sur les reliques carrées. Pas en mini (pastilles cadrées). */
img.frag-wow--std.frag-wow--parchemin,
img.frag-wow--hero.frag-wow--parchemin {
  transform: scale(1.3);
}
