/* Escape game mathématique : même vert que le reste du site */
#features.ec-section { padding-top: 1em; }
.ec-section [hidden], .ec-voile[hidden] { display: none !important; }
.ec-carte { padding: 1.3em 1.3em 1.1em 1.3em; background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; text-align: left; }
.ec-carte h3 { margin: 0 0 .6em 0; color: #16855a; text-align: center; }
.ec-carte h3 .icon { margin-right: .3em; }
.ec-choix { display: grid; gap: 1.2em; max-width: 64em; margin: 0 auto; }
.ec-commandes { display: flex; flex-wrap: wrap; gap: .6em; justify-content: center; margin: .4em 0; }
.ec-info { margin: .9em 0 0 0; font-size: .85em; color: #666; }
.ec-centre { text-align: center; }
.ec-rgpd { margin: .8em 0 0 0; text-align: center; font-size: .78em; color: #999; }
.ec-lien { font: inherit; font-size: .85em; background: none !important; border: 0; padding: 0 !important; color: #16855a !important; text-decoration: underline; cursor: pointer; letter-spacing: 0; text-transform: none; text-shadow: none; box-shadow: none; width: auto !important; height: auto; line-height: 1.4; }
.ec-valeur { font-family: 'Fredoka', 'Nunito', sans-serif; color: #16855a; }

/* Choix de l'aventure */
.ec-onglets { display: flex; justify-content: center; gap: .5em; flex-wrap: wrap; margin-bottom: .9em; }
.ec-onglet { font: inherit; padding: .45em 1.3em; border-radius: 2em; cursor: pointer; letter-spacing: 0; text-transform: none; text-shadow: none; -webkit-appearance: none; appearance: none; border: 2px solid #e5e5e5; color: #878787 !important; background: #fff !important; box-shadow: none; transition: background-color .25s, border-color .25s, color .25s; }
.ec-onglet:hover { border-color: #5cc79a; color: #16855a !important; }
.ec-onglet.actif, .ec-onglet.actif:hover { background: #16855a !important; border-color: #16855a; color: #fff !important; }
.ec-onglet sup { font-size: .7em; }
.ec-vide { text-align: center; color: #878787; padding: 1.5em 0; }
.ec-scn { display: flex; flex-direction: column; width: 100%; padding: 0 !important; margin: 0; border: 2px solid #e5e5e5 !important; border-radius: 1em; background: #fff !important; overflow: hidden; text-align: left; cursor: pointer; font: inherit; letter-spacing: 0; text-transform: none; text-shadow: none; box-shadow: none; height: auto; line-height: 1.4; transition: border-color .2s, box-shadow .2s; }
.ec-scn:hover { border-color: #5cc79a !important; }
.ec-scn.actif { border-color: #16855a !important; box-shadow: 0 0 0 3px #d4efe3; }
.ec-scn-img { display: block; height: 9em; overflow: hidden; background: #14213d; }
.ec-scn-img svg { display: block; width: 100%; height: 100%; }
.ec-scn-txt { display: block; flex: 1; padding: .8em 1em .9em 1em; color: #555; }
.ec-scn-txt b { display: block; font-family: 'Fredoka', 'Nunito', sans-serif; font-size: 1.25em; color: #16855a; margin-bottom: .2em; font-weight: 600; }
.ec-scn-txt span { display: block; font-size: .92em; }
.ec-scn-txt em { display: block; margin-top: .4em; font-size: .8em; color: #878787; font-style: normal; }
.ec-scn-txt i { display: inline-block; margin-top: .5em; padding: .1em .7em; border-radius: 1em; background: #eaf7f1; color: #16855a; font-size: .78em; font-style: normal; font-weight: 700; }
.ec-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9em 1.2em; }
.ec-large { grid-column: 1 / -1; }
@media screen and (max-width: 736px) { .ec-champs { grid-template-columns: minmax(0, 1fr); } }
.ec-liste-scn { display: grid; grid-template-columns: repeat(auto-fill, minmax(19em, 1fr)); gap: 1em; align-items: stretch; }
.ec-liste-scn .ec-scn { margin: 0; }
.ec-lancer { margin-top: 1.2em; }
.ec-champ { display: block; margin: 0; }
.ec-champ > span { display: block; margin: 0 0 .3em 0; font-size: .82em; color: #878787; }
.ec-champ input, .ec-champ select { font: inherit; width: 100%; padding: .5em .7em; border: 2px solid #e5e5e5; border-radius: .6em; background: #fff; color: #555; box-sizing: border-box; height: auto; }
.ec-champ input:focus, .ec-champ select:focus { outline: none; border-color: #16855a; }
.ec-code-ligne { display: flex !important; gap: 1em; align-items: center; }
.ec-code-ligne input { flex: 1; font-family: 'Fredoka', monospace; font-size: 1.2em; letter-spacing: .25em; text-transform: uppercase; }
.ec-reprise-texte { margin: 1em 0 0 0; text-align: center; color: #555; font-size: .92em; }

/* La partie */
.ec-jeu { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 1.2em; align-items: start; max-width: 80em; margin: 0 auto; }
.ec-lateral { display: grid; gap: 1.1em; position: sticky; top: .8em; }
@media screen and (max-width: 980px) {
	.ec-jeu { grid-template-columns: minmax(0, 1fr); }
	.ec-lateral { display: contents; }
	.ec-jeu { padding-bottom: 6.2em; }
	.ec-chrono-carte { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0; padding: .35em 1em .5em 1em; border-radius: 1em 1em 0 0; border-bottom: 0; box-shadow: 0 -4px 14px rgba(0, 0, 0, .15); display: grid; grid-template-columns: auto 1fr auto; column-gap: .8em; align-items: center; text-align: left; }
	.ec-chrono-carte .ec-chrono { font-size: 2em; grid-row: 1; grid-column: 1; }
	.ec-chrono-carte .ec-chrono-legende { grid-row: 1; grid-column: 2; margin: 0; }
	.ec-chrono-carte .ec-barre { grid-column: 1 / -1; grid-row: 2; margin: .2em 0 0 0; }
	.ec-chrono-carte .ec-commandes { grid-row: 1; grid-column: 3; margin: 0; }
	#btn-plein { display: none; }
	#btn-pause { padding: .5em 1em !important; height: auto; }
}
}
.ec-scene { padding: 0 0 1.3em 0; overflow: hidden; }
.ec-corps { padding: 0 1.5em; }
.ec-zoom { display: none; }
.ec-decor { aspect-ratio: 12 / 5; background: #14213d; overflow: hidden; }
.ec-decor svg { display: block; width: 100%; height: 100%; }
.ec-histoire-titre { margin: .9em 0 .4em 0; text-align: center; color: #16855a; font-size: 1.7em; }
.ec-titre-salle { margin-top: 1em !important; margin-bottom: .4em; }
.ec-titre-salle h2 { margin: 0; color: #16855a; font-size: 1.7em; line-height: 1.2; }
.ec-num { display: inline-block; font-size: .78em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #878787; }
#features .ec-recit p { text-align: left; margin: .6em 0; color: #444; line-height: 1.55; }
.ec-recit q, .ec-enigme q { display: block; quotes: '« ' ' »'; margin: .7em 0; padding: .6em 1em; border-left: 5px solid #5cc79a; background: #f1faf6; border-radius: 0 .8em .8em 0; color: #2f5d4a; font-style: italic; }
.ec-enigme { margin-top: 1em !important; border: 2px solid #e3d2a4; border-radius: 1em; background: #fdf8ea; overflow: hidden; }
.ec-enigme-titre { padding: .5em 1em; background: #efe0b4; color: #6a5420; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .82em; }
.ec-enigme-titre .icon { margin-right: .4em; }
.ec-enigme-corps { display: flex; align-items: center; gap: 1.2em; padding: .8em 1.2em; flex-wrap: wrap; }
.ec-enigme-texte { flex: 1 1 14em; min-width: 0; color: #3b3320; font-size: 1.05em; line-height: 1.5; }
.ec-enigme-texte p { margin: .45em 0; }
.ec-enigme-fig { flex: 0 1 17em; min-width: 11em; }
.ec-figure { display: block; width: 100%; height: auto; }
.ec-f-nom { font-family: 'Fredoka', sans-serif; font-weight: 700; font-style: italic; font-size: 26px; fill: #555; }
.ec-f-val { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 23px; fill: #222; }
.ec-f-inc { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 34px; fill: #16855a; }
.ec-m { font-family: 'Fredoka', 'Nunito', sans-serif; font-weight: 600; white-space: nowrap; }
.ec-calcul { font-family: 'Fredoka', 'Nunito', sans-serif; font-size: 1.6em; font-weight: 600; color: #222; margin: .5em 0 !important; line-height: 1.5; overflow-wrap: anywhere; }
.ec-calcul .ec-m { white-space: normal; }
.ec-donnees { font-family: 'Fredoka', 'Nunito', sans-serif; font-weight: 600; font-size: 1.2em; color: #222; }
.ec-tableau { border-collapse: collapse; margin: .6em 0; background: #fff; }
.ec-tableau th, .ec-tableau td { border: 2px solid #cdbb8a; padding: .35em .9em; text-align: center; font-family: 'Fredoka', 'Nunito', sans-serif; font-weight: 600; font-size: 1.1em; min-width: 3em; }
.ec-tableau th { background: #f3e7c2; color: #6a5420; font-size: .95em; text-align: left; }
.ec-tableau .ec-inc { color: #16855a; border-style: dashed; border-color: #16855a; }

/* Cadenas, indices, réussite */
.ec-cadenas { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8em 1em; margin-top: 1.1em !important; margin-bottom: 0; padding: .9em 1em; border-radius: 1em; background: #14213d; }
.ec-cadenas label { margin: 0; color: #ffd166; font-weight: 700; letter-spacing: .04em; }
.ec-cadenas input[type="text"]:not(.ec-chiffre) { flex: 0 1 12em; font: inherit; font-family: 'Fredoka', monospace; font-size: 1.4em; font-weight: 600; text-align: center; padding: .25em .5em; border: 3px solid #4a5fa8; border-radius: .6em; background: #0c1626; color: #7dffc0; height: auto; box-sizing: border-box; }
.ec-cadenas input:focus { outline: none; border-color: #7dffc0; }
.ec-chiffres { display: inline-flex; gap: .5em; }
#features .ec-chiffre { width: 2.2em !important; font: inherit; font-family: 'Fredoka', monospace; font-size: 1.7em; font-weight: 600; text-align: center; padding: .15em 0 !important; border: 3px solid #4a5fa8 !important; border-radius: .5em; background: #0c1626 !important; color: #7dffc0 !important; height: auto; box-sizing: border-box; box-shadow: none; }
#features .ec-chiffre:focus { outline: none; border-color: #7dffc0 !important; }
.ec-cadenas .button { margin: 0; }
.secoue { animation: ec-secoue .45s; }
@keyframes ec-secoue { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }
.ec-retour { min-height: 1.5em; margin-top: .6em !important; margin-bottom: 0; text-align: center; font-weight: 700; }
.ec-retour.mal { color: #b3392b; }
.ec-indices { margin-top: .6em !important; margin-bottom: 0; text-align: center; }
.ec-liste-indices { margin: 0 0 .6em 1.2em; padding: 0; text-align: left; color: #555; font-size: .95em; }
.ec-liste-indices li { margin: .3em 0; }
.ec-btn-indice .icon { margin-right: .3em; color: #d68910; }
.ec-succes { margin-top: 1.1em !important; padding: 1em 1.2em; border-radius: 1em; background: #eaf7f1; border: 2px solid #5cc79a; animation: ec-pop .5s; }
@keyframes ec-pop { 0% { transform: scale(.94); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.ec-succes-texte { color: #1f5a43; line-height: 1.5; }
.ec-succes-texte .icon { color: #16855a; margin-right: .3em; }
.ec-objet { display: flex; align-items: center; gap: 1em; justify-content: center; margin: .8em 0; padding: .6em 1em; background: #fff; border-radius: .8em; border: 2px dashed #5cc79a; color: #444; }
.ec-objet .ec-valeur { font-size: 1.5em; }
.ec-cle { width: 4.2em; height: auto; flex: none; }
.ec-cles-recap { display: flex; flex-wrap: wrap; gap: .5em; margin: .5em 0; }
.ec-pastille-cle { display: inline-flex; align-items: center; gap: .3em; padding: .2em .8em .2em .5em; background: #fff; border: 2px solid #cdbb8a; border-radius: 2em; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.1em; }
.ec-pastille-cle .ec-cle { width: 2.4em; }

/* Colonne de droite */
.ec-chrono-carte { text-align: center; padding-bottom: .6em; }
.ec-chrono { font-family: 'Fredoka', 'Nunito', sans-serif; font-weight: 600; font-size: 3.2em; line-height: 1.1; color: #16855a; font-variant-numeric: tabular-nums; }
.ec-chrono.attention { color: #d68910; } .ec-chrono.urgent { color: #c0392b; animation: ec-pouls 1s infinite; } .ec-chrono.depasse { color: #878787; }
@keyframes ec-pouls { 50% { opacity: .55; } }
.ec-chrono-legende { font-size: .8em; color: #878787; margin-bottom: .5em; }
.ec-barre { height: .6em; background: #eaf7f1; border-radius: .4em; overflow: hidden; margin: 0 0 .7em 0; }
.ec-barre span { display: block; height: 100%; width: 100%; background: #16855a; transition: width .3s linear; }
.ec-barre span.attention { background: #d68910; } .ec-barre span.urgent { background: #c0392b; }
.ec-petit .button { margin: 0; }
.ec-plan { list-style: none; margin: 0; padding: 0; }
.ec-plan li { display: flex; align-items: center; gap: .7em; padding: .35em .4em; border-radius: .6em; color: #888; }
.ec-plan li.cours { background: #eaf7f1; color: #16855a; font-weight: 700; }
.ec-plan li.fait { color: #16855a; }
.ec-pt { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.8em; height: 1.8em; border-radius: 50%; border: 2px solid currentColor; font-size: .85em; font-weight: 700; }
.ec-plan li.fait .ec-pt { background: #16855a; border-color: #16855a; color: #fff; }
.ec-plan li.ferme .ec-pn { font-style: italic; opacity: .7; }
.ec-sac { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5em; }
.ec-emplacement { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 3.6em; border: 2px dashed #d5d5d5; border-radius: .7em; color: #bbb; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.1em; padding: .2em; }
.ec-emplacement.plein { border: 2px solid #cdbb8a; background: #fdf8ea; color: #3b3320; }
.ec-emplacement .ec-cle { width: 2.6em; }
#carnet { width: 100%; font: inherit; font-size: .92em; padding: .6em .8em; border: 2px solid #e5e5e5; border-radius: .7em; resize: vertical; box-sizing: border-box; background: #fffef8; color: #444; }
#carnet:focus { outline: none; border-color: #16855a; }
.ec-pause { text-align: center; padding: 3em 1.5em; }
.ec-pause .icon { font-size: 3.5em; color: #16855a; }
.ec-pause h2 { color: #16855a; }

/* Fin de partie */
.ec-etoiles { text-align: center; font-size: 3em; line-height: 1; margin: .1em 0 .2em 0; }
.ec-etoile { color: #e4e4e4; display: inline-block; margin: 0 .05em; }
.ec-etoile.on { color: #f2b01e; text-shadow: 0 2px 0 #c98a00; animation: ec-pop .6s backwards; }
.ec-bilan { display: flex; justify-content: center; gap: 1.2em; flex-wrap: wrap; margin-top: 1em !important; margin-bottom: 1em; }
.ec-bilan div { text-align: center; min-width: 7em; padding: .6em 1em; border-radius: .9em; background: #eaf7f1; }
.ec-bilan b { display: block; font-family: 'Fredoka', sans-serif; font-size: 1.6em; color: #16855a; }
.ec-bilan span { font-size: .8em; color: #666; }

/* Fenêtres */
.ec-voile { position: fixed; inset: 0; z-index: 10000; background: rgba(15, 24, 48, .78); display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 2em 1em; }
.ec-fenetre { background: #fff; border-radius: 1.2em; padding: 1.6em 1.8em; max-width: 46em; width: 100%; box-sizing: border-box; color: #444; }
.ec-fenetre h2 { color: #16855a; margin-top: 0; }
.ec-fenetre q { display: block; quotes: '« ' ' »'; margin: .7em 0; padding: .6em 1em; border-left: 5px solid #5cc79a; background: #f1faf6; border-radius: 0 .8em .8em 0; color: #2f5d4a; font-style: italic; }
.ec-corr-tete p { color: #666; }
.ec-corr { margin: 1.2em 0; padding: 1em 1.2em; border: 2px solid #e3d2a4; border-radius: 1em; background: #fdf8ea; page-break-inside: avoid; }
.ec-corr h3 { margin: 0 0 .4em 0; text-align: left; color: #6a5420; font-size: 1.05em; }
.ec-corr .ec-enigme-corps { padding: .3em 0; }
.ec-corr-rep { font-size: 1.1em; color: #16855a; font-weight: 700; margin: .3em 0; }
.ec-corr-expl { margin: .3em 0; color: #3b3320; }
.ec-corr-ind { margin: .3em 0 0 1.2em; padding: 0; color: #777; font-size: .88em; }
:fullscreen body, body:fullscreen { background: #fff; }
@media print {
	body.ec-fenetre-ouverte #page-wrapper { display: none !important; }
	.ec-voile { position: static; background: none; display: block !important; padding: 0; overflow: visible; }
	.ec-fenetre { box-shadow: none; max-width: none; padding: 0; }
	.ec-pas-impr { display: none !important; }
	.ec-corr { background: #fff; }
}

/* ================= Animations (désactivables) ================= */
.ec-tw { animation: ec-scintille 3.5s ease-in-out infinite; }
@keyframes ec-scintille { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.ec-fl { animation: ec-vacille 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ec-vacille { 0%, 100% { opacity: 1; transform: scale(1); } 22% { opacity: .78; transform: scale(.96); } 41% { opacity: .96; transform: scale(1.02); } 63% { opacity: .84; transform: scale(.98); } }
.ec-bob { animation: ec-flotte 3.4s ease-in-out infinite; }
@keyframes ec-flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.ec-oeil { animation: ec-cligne 5s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ec-cligne { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.ec-curseur { animation: ec-curseur 1s steps(1) infinite; }
@keyframes ec-curseur { 50% { opacity: 0; } }
.ec-led { animation: ec-led 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ec-led { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
.ec-balance { animation: ec-balance 4.5s ease-in-out infinite; transform-box: view-box; transform-origin: 400px 0; }
@keyframes ec-balance { 0%, 100% { transform: rotate(-2.2deg); } 50% { transform: rotate(2.2deg); } }
.ec-comete { animation: ec-comete 7s ease-in-out infinite alternate; }
@keyframes ec-comete { from { transform: translate(14px, -8px); } to { transform: translate(-16px, 10px); } }
.ec-planete { animation: ec-flotte 5s ease-in-out infinite; }
.ec-oeil-chiffre { animation: ec-chiffre-clignote 2.2s ease-in-out infinite; }
@keyframes ec-chiffre-clignote { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* Entrée dans une nouvelle pièce */
.ec-neuf .ec-decor svg { animation: ec-entree 1s ease-out; }
@keyframes ec-entree { from { transform: scale(1.18); filter: brightness(.35); } to { transform: scale(1); filter: brightness(1); } }
.ec-neuf .ec-corps > *, .ec-neuf .ec-bloc-hist > *, .ec-neuf .ec-bloc-jeu > * { animation: ec-monte .6s ease-out backwards; }
.ec-neuf .ec-corps > *:nth-child(2), .ec-neuf .ec-bloc-hist > *:nth-child(2), .ec-neuf .ec-bloc-jeu > *:nth-child(2) { animation-delay: .25s; }
.ec-neuf .ec-corps > *:nth-child(3), .ec-neuf .ec-bloc-jeu > *:nth-child(3) { animation-delay: .4s; }
.ec-neuf .ec-corps > *:nth-child(n+4), .ec-neuf .ec-bloc-jeu > *:nth-child(n+4) { animation-delay: .55s; }
@keyframes ec-monte { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Réussite : flash dans la pièce, clé qui tombe, étincelles */
.ec-decor { position: relative; }
.ec-flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, rgba(125, 255, 192, .85), rgba(125, 255, 192, 0) 62%); animation: ec-flash 1.4s ease-out forwards; pointer-events: none; }
@keyframes ec-flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
.ec-objet { position: relative; }
.ec-objet .ec-cle { animation: ec-tombe 1s cubic-bezier(.3, 1.6, .5, 1) .15s backwards; }
@keyframes ec-tombe { from { transform: translateY(-70px) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }
.ec-etincelle { position: absolute; left: 5em; top: 50%; font-size: 1.1em; color: #f2b01e; pointer-events: none; animation: ec-jaillit 1.1s ease-out .45s both; }
@keyframes ec-jaillit { 0% { opacity: 0; transform: translate(0, 0) scale(.3); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.2) rotate(120deg); } }
.ec-emplacement.nouvelle { animation: ec-pop .7s cubic-bezier(.3, 1.6, .5, 1); }
.ec-liste-indices li:last-child.nouveau { animation: ec-monte .5s ease-out; }
.ec-cadenas input.faux { animation: ec-faux .6s; }
@keyframes ec-faux { 0%, 100% { border-color: #4a5fa8; } 25%, 75% { border-color: #ff6b5b; box-shadow: 0 0 0 4px rgba(255, 107, 91, .35); } }
.ec-voile:not([hidden]) .ec-fenetre { animation: ec-pop .35s ease-out; }
#vue-jeu:not([hidden]) { animation: ec-fondu .5s ease-out; } /* fondu seul : un mouvement (transform) ici dérèglerait le mode projeté plein écran */
@keyframes ec-fondu { from { opacity: 0; } to { opacity: 1; } }

/* Victoire : confettis et étoiles qui arrivent une à une */
.ec-victoire { position: relative; }
.ec-confetti { position: absolute; top: -1.5em; width: .55em; height: .9em; border-radius: .1em; pointer-events: none; z-index: 3; animation: ec-chute linear forwards; }
@keyframes ec-chute { to { transform: translateY(32em) rotate(720deg); opacity: .9; } }
.ec-victoire .ec-etoile.on { animation: ec-pop-etoile .7s cubic-bezier(.3, 1.8, .5, 1) backwards; }
.ec-victoire .ec-etoile.on:nth-child(1) { animation-delay: .3s; } .ec-victoire .ec-etoile.on:nth-child(2) { animation-delay: .6s; } .ec-victoire .ec-etoile.on:nth-child(3) { animation-delay: .9s; }
@keyframes ec-pop-etoile { from { transform: scale(0) rotate(-120deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* Sans animations : réglage de la partie, ou réglage « réduire les animations » de l'ordinateur */
body.ec-sans-anim *, body.ec-sans-anim *:before, body.ec-sans-anim *:after { animation: none !important; transition: none !important; }
body.ec-sans-anim .ec-confetti, body.ec-sans-anim .ec-flash, body.ec-sans-anim .ec-etincelle { display: none; }
@media (prefers-reduced-motion: reduce) {
	.ec-section *, .ec-section *:before, .ec-section *:after, .ec-voile * { animation: none !important; transition: none !important; }
	.ec-confetti, .ec-flash, .ec-etincelle { display: none; }
}

/* ================= Affichage projeté au tableau ================= */
/* La partie occupe tout l'écran (rien ne défile) ; la taille du texte s'ajuste toute seule (voir escape.js) et se règle avec A− / A+. */
body.ec-projete #vue-jeu .ec-jeu { position: fixed; inset: 0; z-index: 200; margin: 0; max-width: none; padding: .7em; box-sizing: border-box; overflow: auto; background: #fff; grid-template-columns: minmax(0, 1fr) 17em; gap: .8em; align-items: stretch; font-size: 16px; }
body.ec-projete .ec-principal { min-width: 0; display: flex; flex-direction: column; }
body.ec-projete .ec-principal > .ec-carte { flex: 1; margin: 0; }
body.ec-projete .ec-lateral { display: grid; position: static; align-content: start; gap: .6em; }
body.ec-projete .ec-chrono-carte { position: static; display: block; text-align: center; padding: .6em 1em; border-radius: 1.2em; border-bottom: 2px solid #e5e5e5; box-shadow: none; }
body.ec-projete .ec-chrono-carte .ec-chrono { font-size: 3em; }
body.ec-projete .ec-chrono-carte .ec-barre { margin: .2em 0 .5em 0; }
body.ec-projete .ec-lateral .ec-carte { padding: .7em .9em; }
body.ec-projete .ec-lateral h3 { margin-bottom: .4em; font-size: .95em; }
body.ec-projete .ec-lateral .button { font-size: .72em; padding: 0 1.2em !important; height: 3em; line-height: 3em; margin: 0; }
body.ec-projete .ec-carte:has(#carnet) { display: none; }
body.ec-projete #btn-plein { display: inline-block; }
body.ec-projete .ec-zoom { display: inline-flex; gap: .3em; align-items: center; }
body.ec-projete .ec-zoom .button { padding: 0 .9em !important; min-width: 2.6em; }
body.ec-projete .ec-chrono-carte .ec-commandes { margin: 0; gap: .4em; }
body.ec-projete .ec-plan li { padding: .15em .3em; }
body.ec-projete .ec-sac .ec-emplacement { min-height: 3em; }
/* La pièce se range sur deux colonnes : décor et histoire à gauche, énigme et cadenas à droite */
body.ec-projete .ec-scene:has(.ec-bloc-jeu) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-rows: auto 1fr; padding: 0; overflow: hidden; }
body.ec-projete .ec-scene:has(.ec-bloc-jeu) .ec-decor { grid-column: 1; grid-row: 1; }
body.ec-projete .ec-scene:has(.ec-bloc-jeu) .ec-corps { display: contents; }
body.ec-projete .ec-bloc-hist { grid-column: 1; grid-row: 2; padding: 0 1.1em .8em 1.1em; }
body.ec-projete .ec-bloc-jeu { grid-column: 2; grid-row: 1 / 3; padding: .9em 1.1em .9em .4em; display: flex; flex-direction: column; justify-content: center; }
body.ec-projete .ec-bloc-jeu .ec-enigme { margin-top: 0 !important; }
body.ec-projete .ec-scene:not(:has(.ec-bloc-jeu)) .ec-decor { aspect-ratio: auto; height: 28vh; }
body.ec-projete .ec-calcul { font-size: 1.6em; }
body.ec-projete .ec-enigme-fig { flex-basis: 15em; }
body.ec-projete .ec-cadenas { padding: .7em .9em; }
.ec-discret { color: #aaa; text-decoration: none; border-bottom: 1px dotted #ccc; }
.ec-discret:hover { color: #16855a; border-color: #16855a; }
body.ec-mesure .ec-jeu * { transform: none !important; transition: none !important; }
/* Projeté : colonne de droite compacte pour laisser un maximum de place à l'énigme */
body.ec-projete .ec-plan { display: flex; flex-wrap: wrap; justify-content: center; gap: .35em; }
body.ec-projete .ec-plan li { padding: 0; background: none; }
body.ec-projete .ec-plan .ec-pn { display: none; }
body.ec-projete .ec-plan .ec-pt { width: 2.1em; height: 2.1em; font-size: .9em; }
body.ec-projete .ec-plan li.cours .ec-pt { background: #eaf7f1; box-shadow: 0 0 0 3px #bfe8d5; }
body.ec-projete .ec-sac { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3em; }
body.ec-projete .ec-sac .ec-emplacement { min-height: 2.4em; font-size: .85em; }
body.ec-projete .ec-sac .ec-emplacement .ec-cle { width: 1.8em; }
body.ec-projete .ec-lateral h3 { display: none; }
body.ec-projete .ec-plan li { display: block; margin: 0 !important; padding: 0 !important; border: 0 !important; }
@media print { #header, #banner, #footer { display: none !important; } }
.ec-verrou { max-width: 38em; margin: 0 auto; width: 100%; box-sizing: border-box; }
.ec-verrou input[type="text"] { flex: 0 1 14em; font: inherit; font-family: 'Fredoka', monospace; font-size: 1.3em; font-weight: 600; text-align: center; padding: .25em .5em; border: 3px solid #4a5fa8; border-radius: .6em; background: #0c1626 !important; color: #7dffc0 !important; height: auto; box-sizing: border-box; }
.ec-verrou input[type="text"]:focus { outline: none; border-color: #7dffc0; }
.ec-question { text-align:center; font-size:1.15em; margin:.6em 0; }

/* Choix des thèmes des salles */
.ec-themes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8em .7em; align-items: end; margin-top: .8em; }
.ec-themes .ec-champ { min-width: 0; }
.ec-themes .ec-champ > span { font-size: .8em; line-height: 1.25; }
.ec-themes .ec-champ select { font-size: .86em; padding: .5em .35em .5em .6em; text-overflow: ellipsis; }
@media (max-width: 980px) { .ec-themes { grid-template-columns: repeat(auto-fit, minmax(12em, 1fr)); } .ec-themes .ec-champ select { font-size: 1em; padding: .5em .7em; } }
.ec-fr { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.2; margin: 0 .15em; font-size: .95em; }
.ec-fr > span:first-child { border-bottom: .09em solid currentColor; padding: 0 .25em; }
.ec-fr > span:last-child { padding: 0 .25em; }

/* Décors composés : animations en plus */
.ec-tourne { animation: ec-tourne 14s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ec-tourne { to { transform: rotate(360deg); } }
.ec-vague { animation: ec-vague 6s ease-in-out infinite alternate; }
@keyframes ec-vague { to { transform: translateX(-26px); } }
.ec-bulle { animation: ec-bulle 5s linear infinite; }
@keyframes ec-bulle { from { transform: translateY(0); opacity: .9; } to { transform: translateY(-70px); opacity: 0; } }
.ec-nuage { animation: ec-nuage 45s ease-in-out infinite alternate; }
@keyframes ec-nuage { to { transform: translateX(60px); } }
