/* Module « carte3d » de l'accueil festif : la carte vivante (affiche de rodéo sur bande denim). */
.fete-carte {
  background:
    radial-gradient(circle at 12% 18%, rgba(232, 169, 58, .16) 0 2px, transparent 3px) 0 0 / 46px 46px,
    radial-gradient(circle at 70% 60%, rgba(255, 248, 236, .10) 0 1.5px, transparent 2.5px) 0 0 / 38px 38px,
    linear-gradient(180deg, #17324D 0%, #12283E 100%);
  color: var(--sable);
  border-top: var(--bord);
  border-bottom: var(--bord);
  overflow-x: clip;
}
.fete-carte .c3d-tete { padding-bottom: 22px; }
.fete-carte .surtitre { color: var(--moutarde); }
.fete-carte .titre-xl { color: var(--papier); }
.fete-carte .chapeau { color: #D9CDB4; }

/* Les deux modes */
.c3d-modes { display: inline-flex; flex-wrap: wrap; gap: 8px; padding: 6px; border-radius: var(--r-pilule); background: rgba(0, 0, 0, .22); border: 2px solid rgba(243, 229, 204, .25); }
.c3d-mode { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-pilule); border: 0; background: transparent; color: var(--sable); font: 800 15px var(--texte); cursor: pointer; }
.c3d-mode[aria-pressed="true"] { background: var(--moutarde); color: var(--encre); box-shadow: 0 3px 0 var(--moutarde-ombre); }
.c3d-mode:not([aria-pressed="true"]):hover { background: rgba(243, 229, 204, .12); }
.c3d-point-direct { width: 10px; height: 10px; border-radius: 50%; background: var(--bandana); box-shadow: 0 0 0 3px rgba(199, 54, 43, .3); }

/* L'affiche : carte encadrée, ombre dure, frise en bas */
.c3d-affiche { max-width: 1480px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.c3d-cadre { position: relative; border: var(--bord); border-radius: var(--r-carte); overflow: hidden; background: var(--sable); box-shadow: 8px 8px 0 #0A1726; }
.c3d-scene { position: relative; height: clamp(540px, 76vh, 820px); isolation: isolate; }
.c3d-carte { position: absolute; inset: 0; }
.c3d-carte-boite .c3d-gl { position: absolute; inset: 0; }
.c3d-voile { position: absolute; inset: 0; pointer-events: none; z-index: 1; --nuit: 0;
  background:
    radial-gradient(ellipse at 50% 55%, transparent 52%, rgba(92, 52, 18, calc(.30 - var(--nuit) * .1)) 100%),
    radial-gradient(ellipse at 50% 55%, transparent 60%, rgba(5, 12, 30, calc(var(--nuit) * .45)) 100%);
}
.c3d-feux { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.c3d-eclair { position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: 0; background: radial-gradient(ellipse at 62% 30%, color-mix(in srgb, var(--c, #E8A93A) 55%, transparent) 0%, transparent 60%); mix-blend-mode: screen; }
.c3d-eclair.c3d-flash { animation: c3dFlash .7s ease-out; }
@keyframes c3dFlash { 0% { opacity: .55; } 100% { opacity: 0; } }

/* Contrôles MapLibre aux couleurs de l'affiche */
.c3d-carte .maplibregl-ctrl-group { border: 3px solid var(--encre); border-radius: 12px; box-shadow: 0 3px 0 var(--encre); background: var(--papier); overflow: hidden; }
.c3d-carte .maplibregl-ctrl-group button { width: 36px; height: 36px; }
.c3d-carte .maplibregl-ctrl-group button + button { border-top: 2px solid #D8C6A6; }
.c3d-carte .maplibregl-ctrl-top-right { top: 6px; right: 6px; }
.c3d-carte .maplibregl-ctrl-attrib { background: rgba(255, 248, 236, .86); font: 500 11px var(--texte); color: var(--encre); border-radius: 8px 0 0 0; }
.c3d-carte .maplibregl-ctrl-attrib a { color: var(--encre); }
.c3d-carte .maplibregl-cooperative-gesture-screen { font: 800 18px var(--texte); background: rgba(23, 50, 77, .6); color: var(--papier); }
.c3d-carte .maplibregl-canvas:focus-visible { outline: 3px solid var(--moutarde); outline-offset: -3px; }

/* Filtres */
.c3d-filtres { position: absolute; z-index: 3; top: 10px; left: 10px; right: 60px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.c3d-chip { pointer-events: auto; min-height: 34px; padding: 0 11px; font-size: 13px; box-shadow: 0 2px 0 var(--encre); }
.c3d-chip[aria-pressed="false"] { background: rgba(255, 248, 236, .82); color: var(--gris); }
.c3d-chip[aria-pressed="false"] .point { opacity: .45; }
.c3d-chip-relief::before { content: ''; width: 14px; height: 10px; background: currentColor; clip-path: polygon(0 100%, 35% 20%, 55% 60%, 75% 0, 100% 100%); }

/* Légende des événements (tiers inférieur) */
.c3d-legende { position: absolute; z-index: 3; left: 14px; bottom: 14px; max-width: min(460px, calc(100% - 180px)); display: grid; gap: 1px; padding: 10px 14px 11px; background: var(--papier); color: var(--encre); border: 3px solid var(--encre); border-left-width: 10px; border-radius: 14px; box-shadow: 4px 4px 0 var(--encre); }
.c3d-legende[data-type="scene"], .c3d-legende[data-type="bientot"] { border-left-color: var(--bandana); }
.c3d-legende[data-type="feux"], .c3d-legende[data-type="finale"] { border-left-color: var(--moutarde); }
.c3d-legende[data-type="nuit"] { border-left-color: var(--prune); }
.c3d-legende[data-type="parking"] { border-left-color: var(--cactus); }
.c3d-legende[data-type="post"] { border-left-color: var(--ciel); }
.c3d-legende[data-type="train"] { border-left-color: #5A4632; }
.c3d-legende-heure { font: 900 11px var(--texte); letter-spacing: .5px; text-transform: uppercase; color: var(--brique); }
.c3d-legende strong { font: 900 18px/1.15 var(--texte); font-stretch: 110%; }
.c3d-legende-texte { font-size: 14px; color: var(--gris); }
.c3d-legende.c3d-entree { animation: c3dLegende .45s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes c3dLegende { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.c3d-camera { position: absolute; z-index: 3; top: 54px; left: 10px; min-height: 36px; padding: 0 14px; border-radius: var(--r-pilule); border: 2px solid var(--encre); background: var(--denim); color: #fff; font: 800 13px var(--texte); cursor: pointer; box-shadow: 0 2px 0 var(--encre); }

/* Attente du chargement */
.c3d-attente { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 14px; transition: opacity .8s ease;
  background:
    repeating-linear-gradient(45deg, rgba(120, 80, 40, .05) 0 2px, transparent 2px 9px),
    radial-gradient(ellipse at center, #F3E5CC 0%, #E2CA9E 100%);
}
.c3d-attente.c3d-fini { opacity: 0; pointer-events: none; }
.c3d-attente-boussole { width: 78px; height: 78px; border-radius: 50%; border: 4px solid var(--encre); background: conic-gradient(from 0deg, var(--bandana) 0 12.5%, var(--papier) 0 25%, var(--encre) 0 37.5%, var(--papier) 0 50%, var(--bandana) 0 62.5%, var(--papier) 0 75%, var(--encre) 0 87.5%, var(--papier) 0); animation: c3dBoussole 2.4s ease-in-out infinite; box-shadow: 0 4px 0 var(--encre); }
@keyframes c3dBoussole { 0%, 100% { transform: rotate(-25deg); } 50% { transform: rotate(35deg); } }
.c3d-attente-texte { margin: 0; font: 400 20px var(--display); color: var(--encre); }

/* ——— marqueurs */
.c3d-m { display: block; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; font: inherit; }
.c3d-m:focus-visible { outline: 3px solid var(--moutarde); outline-offset: 3px; border-radius: 50%; }
.c3d-pastille { display: flex; align-items: center; justify-content: center; border: 3px solid var(--encre); box-shadow: 0 3px 0 rgba(35, 27, 20, .45); }
.c3d-nouveau { animation: c3dPop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes c3dPop { from { transform: scale(0); opacity: 0; } to { transform: none; opacity: 1; } }
.c3d-sortie { transition: opacity .4s ease, transform .4s ease; opacity: 0; transform: scale(.4); pointer-events: none; }

/* Personnages : seulement les figurines 3D ; une zone de clic invisible suit chacune (souris, toucher, clavier). */
.c3d-cibles { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.c3d-cible { position: absolute; left: 0; top: 0; padding: 0; border: 0; border-radius: 45% 45% 18px 18px; background: transparent; pointer-events: auto; cursor: pointer; will-change: transform; }
.c3d-cible:hover { background: radial-gradient(ellipse at 50% 92%, rgba(255, 248, 236, .35), transparent 62%); }
.c3d-cible:focus-visible { outline: 3px solid var(--moutarde); outline-offset: 2px; }
.c3d-sans-personnages .c3d-cibles { display: none; }

/* Scènes */
.c3d-m-scene .c3d-pastille { width: 42px; height: 42px; border-radius: 50%; background: var(--bandana); color: #fff; }
.c3d-m-scene[data-statut="bientot"] .c3d-pastille { background: var(--moutarde); color: var(--encre); }
.c3d-m-scene[data-statut="a_venir"] .c3d-pastille { background: var(--ciel); color: var(--encre); }
.c3d-m-scene[data-statut="termine"] .c3d-pastille { background: #C9BDA6; color: var(--gris); width: 34px; height: 34px; }
.c3d-m-scene[data-statut="en_cours"] .c3d-pastille { animation: c3dBattement 1s ease-in-out infinite; }
@keyframes c3dBattement { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.c3d-etiquette { position: absolute; left: 50%; top: -20px; transform: translateX(-50%); white-space: nowrap; padding: 1px 8px; border-radius: var(--r-pilule); border: 2px solid var(--encre); background: var(--bandana); color: #fff; font: 900 11px/1.4 var(--texte); text-transform: uppercase; letter-spacing: .4px; }
.c3d-etiquette:empty { display: none; }
.c3d-m-scene[data-statut="bientot"] .c3d-etiquette { background: var(--moutarde); color: var(--encre); }

/* Parkings */
.c3d-m-parking .c3d-pastille { width: 36px; height: 36px; border-radius: 10px; background: var(--cactus); color: #fff; font: 900 21px/1 var(--texte); transition: background-color .35s ease; }
.c3d-m-parking[data-fraicheur="a_confirmer"] .c3d-pastille { border-style: dashed; background: #5E9C76; }
.c3d-m-parking.c3d-complet { pointer-events: none; transition: opacity 1.1s ease .7s, transform 1.1s ease .7s; opacity: 0; transform: translateY(6px) scale(.8); }
.c3d-m-parking.c3d-complet .c3d-pastille { background: var(--bandana); }

/* Bons coups : épingle en goutte */
.c3d-m-post { padding-bottom: 4px; }
.c3d-m-post .c3d-pastille { width: 36px; height: 36px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--ciel); color: var(--encre); }
.c3d-m-post .c3d-pastille svg { transform: rotate(45deg); }
.c3d-m-post[data-cat="proprete"] .c3d-pastille { background: #B9C7A5; }
.c3d-m-post[data-cat="poutine"] .c3d-pastille, .c3d-m-post[data-cat="frites"] .c3d-pastille { background: #F6D28B; }
.c3d-votes { position: absolute; top: -8px; right: -10px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pilule); border: 2px solid var(--encre); background: var(--moutarde); font: 900 11px/16px var(--texte); text-align: center; }
.c3d-votes:empty { display: none; }
.c3d-m-post.c3d-nouveau { animation: c3dTombe .9s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes c3dTombe { 0% { transform: translateY(-46px); opacity: 0; } 35% { opacity: 1; } 55% { transform: translateY(0) scaleY(.82); } 72% { transform: translateY(-10px); } 100% { transform: none; } }

/* Partenaires et lieux */
.c3d-m-partenaire .c3d-pastille { width: 30px; height: 30px; border-radius: 50%; background: var(--denim); color: #fff; border-width: 2px; }
.c3d-m-partenaire .c3d-pastille svg { width: 16px; height: 16px; }
.c3d-m-partenaire[data-cat="nourriture"] .c3d-pastille { background: var(--moutarde); color: var(--encre); }
.c3d-m-partenaire[data-cat="mode"] .c3d-pastille { background: var(--papier); color: var(--encre); }
/* Commerce en vedette (article gratuit ou lot à gagner) : plus grand, halo doré, étoile ; au-dessus des autres */
.c3d-m-partenaire .c3d-etoile { display: none; }
.c3d-m-partenaire.c3d-vedette { z-index: 2; }
.c3d-m-partenaire.c3d-vedette .c3d-pastille { width: 38px; height: 38px; border-width: 3px; box-shadow: 0 0 0 4px var(--moutarde), 0 0 14px 5px rgba(232, 169, 58, .55); }
.c3d-m-partenaire.c3d-vedette .c3d-pastille svg { width: 19px; height: 19px; }
.c3d-m-partenaire.c3d-vedette .c3d-etoile { display: flex; position: absolute; top: -9px; right: -9px; width: 21px; height: 21px; border-radius: 50%; border: 2px solid var(--encre); background: var(--moutarde); color: var(--encre); align-items: center; justify-content: center; }
.c3d-m-partenaire.c3d-vedette .c3d-etoile svg { width: 12px; height: 12px; }
@media (prefers-reduced-motion: no-preference) { .c3d-m-partenaire.c3d-vedette .c3d-pastille { animation: c3dVedette 2.6s ease-in-out infinite; } }
@keyframes c3dVedette { 0%, 100% { box-shadow: 0 0 0 4px var(--moutarde), 0 0 10px 3px rgba(232, 169, 58, .45); } 50% { box-shadow: 0 0 0 4px var(--moutarde), 0 0 22px 9px rgba(232, 169, 58, .8); } }
.c3d-fiche-offres { margin: 8px 0; }
.c3d-fiche-offres .c3d-fiche-offre { margin: 4px 0 2px; }
.c3d-m-lieu .c3d-pastille { width: 26px; height: 26px; border-radius: 50%; background: var(--prune); color: #fff; border-width: 2px; }
.c3d-m-lieu .c3d-pastille svg { width: 14px; height: 14px; }
.c3d-m-lieu[data-cat="service"] .c3d-pastille { background: #fff; color: var(--bandana); border-radius: 7px; }

/* Panneaux de bois des secteurs */
.c3d-panneau { pointer-events: none; padding-bottom: 12px; }
.c3d-panneau span { display: block; padding: 3px 10px 4px; border: 2px solid #4A2F18; border-radius: 4px; background: linear-gradient(180deg, #B07A44, #8E5D33); color: var(--papier); font: 400 13px/1.2 var(--display); letter-spacing: .3px; white-space: nowrap; text-shadow: 0 1px 0 #4A2F18; box-shadow: 0 2px 0 rgba(35, 27, 20, .4); }
.c3d-panneau::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 4px; height: 13px; margin-left: -2px; background: #4A2F18; }
.c3d-loin .c3d-panneau { opacity: 0; }
.c3d-nuit .c3d-panneau span { box-shadow: 0 0 14px 2px rgba(255, 190, 90, .55), 0 2px 0 rgba(0, 0, 0, .4); }

/* Filtres masqués */
.c3d-sans-scenes .c3d-m-scene, .c3d-sans-parkings .c3d-m-parking,
.c3d-sans-bonscoups .c3d-m-post, .c3d-sans-partenaires .c3d-m-partenaire, .c3d-sans-lieux .c3d-m-lieu { display: none; }
/* Bouton « Panneaux » : les panneaux de bois des secteurs et les noms de rues se cachent. */
.c3d-sans-panneaux .c3d-panneau { visibility: hidden; }

/* Éclat au départ d'une scène : anneaux posés à plat sur le sol */
.c3d-eclat { pointer-events: none; }
.c3d-eclat span { position: absolute; inset: 0; border-radius: 50%; border: 5px solid var(--c); box-shadow: 0 0 22px var(--c), inset 0 0 22px var(--c); opacity: 0; animation: c3dEclat 1.6s ease-out forwards; }
.c3d-eclat span:nth-child(2) { animation-delay: .22s; }
.c3d-eclat span:nth-child(3) { animation-delay: .44s; border-color: var(--moutarde); }
@keyframes c3dEclat { 0% { transform: scale(.08); opacity: 1; } 70% { opacity: .5; } 100% { transform: scale(1); opacity: 0; } }

/* ——— fiche au clic */
.c3d-fiche { position: absolute; z-index: 5; top: 54px; right: 52px; width: min(340px, calc(100% - 24px)); max-height: calc(100% - 120px); overflow: auto; padding: 16px 16px 14px; background: var(--papier); color: var(--encre); border: 3px solid var(--encre); border-radius: 18px; box-shadow: 6px 6px 0 var(--encre); animation: c3dFiche .3s cubic-bezier(.2, .9, .3, 1.15); }
.c3d-fiche:focus { outline: none; }
.c3d-fiche:focus-visible { outline: 3px solid var(--moutarde); outline-offset: 2px; }
@keyframes c3dFiche { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: none; } }
.c3d-fiche h3 { margin: 2px 0 6px; font: 900 22px/1.1 var(--texte); font-stretch: 112%; padding-right: 34px; }
.c3d-fiche p { margin: 6px 0; }
.c3d-fiche-fermer { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--encre); background: var(--sable); color: var(--encre); cursor: pointer; }
.c3d-fiche-type { font: 900 11px var(--texte); letter-spacing: .5px; text-transform: uppercase; color: var(--brique); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.c3d-fiche-tete { display: flex; gap: 12px; align-items: center; padding-right: 30px; }
.c3d-fiche-tete h3 { padding-right: 0; }
.c3d-fiche-portrait { width: 74px; height: 74px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; border: 4px solid var(--c); background: var(--pastel); box-shadow: 0 0 0 3px var(--encre); }
.c3d-fiche-portrait img { display: block; width: 200%; max-width: none; height: auto; margin: -1px 0 0 -50%; }
.c3d-fiche-role { font-size: 14px; color: var(--gris); }
.c3d-fiche-replique { font: 400 16px/1.35 var(--display); color: var(--brique); }
.c3d-fiche-maj { font-size: 12px; color: var(--gris-2); border-top: 2px dashed #E0CFAF; padding-top: 6px; }
.c3d-fiche-offre { font-weight: 900; font-size: 17px; color: var(--cactus); }
.c3d-fiche-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 2px solid var(--encre); }
.c3d-fiche-troupe { display: flex; padding-left: 8px; }
.c3d-fiche-troupe span { width: 38px; height: 38px; margin-left: -8px; border-radius: 50%; overflow: hidden; border: 2px solid var(--encre); background: var(--sable); }
.c3d-fiche-troupe img { display: block; width: 200%; max-width: none; height: auto; margin: 0 0 0 -50%; }
.statut.c3d-presence-actif { background: var(--cactus); color: #fff; }
.statut.c3d-presence-scene { background: var(--bandana); color: #fff; }

/* ——— frise de la journée */
.c3d-frise { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 14px 18px; padding: 14px 20px 12px; background: var(--denim); color: var(--sable); border-top: var(--bord); transition: background-color 1s ease; }
.c3d-frise.c3d-soir { background: #0F1E33; }
.c3d-jouer { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--encre); background: var(--bandana); color: #fff; cursor: pointer; box-shadow: 0 4px 0 var(--bandana-ombre); }
.c3d-jouer:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--bandana-ombre); }
.c3d-horloge { display: grid; justify-items: start; gap: 2px; min-width: 112px; }
.c3d-heure { font: 400 30px/1 var(--display); color: var(--papier); font-variant-numeric: tabular-nums; }
.c3d-sim { font: 800 11px var(--texte); text-transform: uppercase; letter-spacing: .6px; color: var(--moutarde); }
.c3d-piste { position: relative; padding-top: 14px; }
.c3d-curseur { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 30px; margin: 0; background: transparent; cursor: pointer; }
.c3d-curseur::-webkit-slider-runnable-track { height: 12px; border-radius: 999px; border: 2px solid var(--encre); background: linear-gradient(90deg, #F8DE9C 0%, #F2C46B 38%, #F28A3C 64%, #B5486A 74%, #4B3A7A 81%, #0B1631 100%); }
.c3d-curseur::-moz-range-track { height: 12px; border-radius: 999px; border: 2px solid var(--encre); background: linear-gradient(90deg, #F8DE9C 0%, #F2C46B 38%, #F28A3C 64%, #B5486A 74%, #4B3A7A 81%, #0B1631 100%); }
.c3d-curseur::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; border: 4px solid var(--encre); background: radial-gradient(circle, #FFF8EC 0 35%, var(--moutarde) 36%); box-shadow: 0 3px 0 var(--encre); }
.c3d-curseur::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; border: 4px solid var(--encre); background: radial-gradient(circle, #FFF8EC 0 35%, var(--moutarde) 36%); box-shadow: 0 3px 0 var(--encre); }
.c3d-curseur:focus-visible { outline: 3px solid var(--moutarde); outline-offset: 4px; border-radius: 999px; }
.c3d-reperes { position: absolute; top: 0; left: 14px; right: 14px; height: 14px; }
.c3d-repere { position: absolute; top: 0; width: 14px; height: 14px; margin-left: -7px; padding: 0; border: 2px solid var(--encre); border-radius: 3px; transform: rotate(45deg); background: var(--bandana); cursor: pointer; }
.c3d-repere:hover, .c3d-repere:focus-visible { transform: rotate(45deg) scale(1.3); }
.c3d-repere-feux { background: var(--moutarde); }
.c3d-repere-nuit { background: var(--prune); }
.c3d-repere-debut { background: var(--cactus); }
.c3d-repere-train { background: #5A4632; border-radius: 50%; transform: none; }
.c3d-repere-train:hover, .c3d-repere-train:focus-visible { transform: scale(1.3); }
.c3d-graduations { position: relative; height: 16px; margin: 2px 14px 0; font: 800 11px var(--texte); color: #BFB197; }
.c3d-graduations span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }

/* Barre du direct */
.c3d-barre-direct { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 20px; background: var(--denim); color: var(--sable); border-top: var(--bord); font-size: 15px; }
.c3d-en-direct { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: var(--r-pilule); background: var(--bandana); color: #fff; font: 900 13px var(--texte); text-transform: uppercase; letter-spacing: .5px; }
.c3d-maj { font-weight: 800; }
.c3d-compte { color: #CFC2A8; }

/* Pied de section */
.fete-carte .c3d-pied { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 24px; padding-block: 26px 64px; }
.fete-carte .c3d-pied p { margin: 0; max-width: 78ch; color: #CFC2A8; }

/* ——— repli Leaflet */
.c3d-repli { max-width: 1240px; margin: 0 auto; padding: 0 16px; display: grid; gap: 14px; }
.c3d-repli .message { margin: 0; }
.c3d-repli-grille { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.c3d-repli-carte { position: relative; }
.c3d-repli #carte-demo { height: 500px; border: var(--bord); border-radius: var(--r-carte); overflow: hidden; background: var(--sable-2); }
.c3d-repli #carte-attente { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--encre); }
.c3d-repli #carte-scene { color: var(--encre); }
.c3d-repli #carte-maj { color: #CFC2A8; }
.c3d-repli-filtres { gap: 8px; }

/* ——— téléphone et tablette */
@media (max-width: 900px) {
  .c3d-scene { height: clamp(440px, 68vh, 640px); }
  .c3d-filtres { flex-wrap: nowrap; overflow-x: auto; right: 54px; padding-bottom: 4px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .c3d-filtres::-webkit-scrollbar { display: none; }
  .c3d-chip { flex: 0 0 auto; }
  /* La légende passe en haut : le bas reste aux crédits de la carte et à la fiche. */
  .c3d-legende { max-width: none; left: 10px; right: 54px; top: 52px; bottom: auto; padding: 7px 11px 8px; border-left-width: 8px; box-shadow: 3px 3px 0 var(--encre); }
  .c3d-camera { top: auto; bottom: 40px; }
  .c3d-legende strong { font-size: 16px; }
  .c3d-legende-texte { font-size: 13px; }
  .c3d-fiche { top: auto; right: 10px; left: 10px; bottom: 10px; width: auto; max-height: 64%; }
  .c3d-repli-grille { grid-template-columns: 1fr; }
  .c3d-repli #carte-demo { height: 420px; }
}
@media (max-width: 560px) {
  .c3d-cadre { border-radius: 16px; box-shadow: 5px 5px 0 #0A1726; }
  .c3d-frise { grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; padding: 12px 14px 10px; }
  .c3d-piste { grid-column: 1 / -1; }
  .c3d-horloge { grid-auto-flow: column; align-items: center; gap: 8px; justify-content: start; }
  .c3d-heure { font-size: 26px; }
  .c3d-jouer { width: 50px; height: 50px; }
  .c3d-modes { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; border-radius: 18px; gap: 4px; padding: 5px; }
  .c3d-mode { justify-content: center; padding: 0 10px; font-size: 13.5px; gap: 6px; min-height: 42px; border-radius: 13px; }
  .c3d-legende-texte { display: none; }
  .c3d-panneau span { font-size: 11px; padding: 2px 7px 3px; }
  .c3d-barre-direct { font-size: 14px; padding: 12px 14px; }
}

/* ——— « Voir sur la carte » : l'épingle choisie passe devant, en moutarde, avec une onde qui bat */
.c3d-m.c3d-choisi { z-index: 4; }
.c3d-m.c3d-choisi .c3d-pastille { background: var(--moutarde); box-shadow: 0 0 0 3px var(--papier), 0 0 0 6px var(--encre); }
.c3d-m-post.c3d-choisi::before { content: ''; position: absolute; left: 50%; top: 18px; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; border: 4px solid var(--moutarde); pointer-events: none; animation: c3dVise 1.6s ease-out infinite; }
@keyframes c3dVise { 0% { transform: scale(.45); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.c3d-voir-note { position: absolute; z-index: 6; left: 50%; bottom: 64px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); margin: 0; padding: 8px 14px; border-radius: 12px; border: 2px solid var(--encre); background: var(--papier); color: var(--encre); font-weight: 800; font-size: 14px; box-shadow: 3px 3px 0 var(--encre); }

/* Pendant le passage du train, les étiquettes et épingles qu'il croise s'estompent pour le laisser voir. */
.maplibregl-marker.c3d-sous-train { opacity: .16 !important; transition: opacity .25s ease; }
.maplibregl-marker { transition: opacity .25s ease; }

/* ——— « L'Appel de la rivière » : lieux éclairés (membres), pied des totems, légende de la brume (tout public) ——— */
.c3d-m-quete { position: relative; }
.c3d-m-quete .c3d-pastille { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; background: #0F261C; color: #B9F28F; border-color: #7BE36A; box-shadow: 0 0 0 3px rgba(123, 227, 106, .25), 0 0 16px #7BE36A; }
.c3d-m-quete .c3d-pastille svg { width: 15px; height: 15px; }
.c3d-halo-quete { position: absolute; left: 50%; top: 50%; width: 86px; height: 86px; margin: -43px 0 0 -43px; border-radius: 50%; background: radial-gradient(circle, rgba(123, 227, 106, .6), rgba(123, 227, 106, 0) 66%); animation: c3dHaloQuete 2.8s ease-out infinite; pointer-events: none; }
.c3d-halo-quete.b { animation-delay: 1.4s; }
@keyframes c3dHaloQuete { 0% { transform: scale(.3); opacity: .95; } 100% { transform: scale(1.4); opacity: 0; } }
.c3d-m-totem { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.c3d-pied-totem { width: 12px; height: 12px; border-radius: 50%; background: #7BE36A; box-shadow: 0 0 10px 3px rgba(123, 227, 106, .7); opacity: .9; }
.c3d-m-totem:focus-visible { outline: 3px solid #7BE36A; outline-offset: 2px; }
.c3d-badge-quete { background: #0F261C; color: #B9F28F; }
.c3d-fiche-quete { margin-top: 4px; }
.c3d-brume-legende { position: absolute; z-index: 3; right: 58px; top: 60px; margin: 0; max-width: min(420px, calc(100% - 140px)); padding: 6px 12px; border-radius: 999px; background: rgba(8, 21, 15, .82); color: #CFF7BE; font: italic 700 13.5px/1.3 var(--texte); box-shadow: 0 0 16px rgba(123, 227, 106, .35); pointer-events: none; }
@media (max-width: 700px) { .c3d-brume-legende { top: auto; bottom: 84px; right: auto; left: 10px; font-size: 12.5px; } }
@media (prefers-reduced-motion: reduce) { .c3d-halo-quete { animation: none; opacity: .5; transform: scale(.9); } }
.reduit .c3d-halo-quete { animation: none; opacity: .5; transform: scale(.9); }
.c3d-m-totem[data-statut="scelle"] .c3d-pied-totem { background: #8E8577; box-shadow: none; opacity: .7; }
