/* Pi et la Citadelle des Nombres : même vert que le reste du site (#16855a, #5cc79a) — base commune au Labyrinthe */
#features.td-section { padding-top: 1em; }
.td-outil { max-width: 72em; width: 100%; box-sizing: border-box; margin: 0 auto; text-align: left; }
.td { position: relative; font-family: 'Nunito', 'Segoe UI', Arial, sans-serif; color: #444; -webkit-user-select: none; user-select: none; }
.td [hidden] { display: none !important; }
.td h2 { margin: 0 0 .4em; color: #16855a; font-size: 1.6em; line-height: 1.2; }
.td h3 { margin: 1.3em 0 .6em; color: #16855a; font-size: 1.05em; text-align: center; letter-spacing: .04em; }
.td [role="button"] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.td [role="button"]:focus-visible { outline: 3px solid #f2b01e; outline-offset: 2px; }
.td-rgpd { text-align: center; color: #999; font-size: .85em; margin: 1em 0 0; }
.td-ecran { background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; padding: 1em 1.2em 1.4em; }
.td-info { color: #888; text-align: center; font-size: .95em; }
.td-centre { text-align: center; margin-top: 1em; }
.td-bts { display: flex; flex-wrap: wrap; gap: .8em; justify-content: center; margin-top: 1.2em; }
.td-go { display: inline-flex; align-items: center; gap: .4em; padding: .7em 1.4em; border-radius: .8em; background: #16855a; color: #fff; font-weight: 600; font-size: 1.02em; box-shadow: 0 .2em 0 #0e5c3d; }
.td-go:hover { background: #127048; }
.td-go:active { transform: translateY(.15em); box-shadow: 0 .05em 0 #0e5c3d; }
.td-go2 { background: #fff; color: #16855a; border: 2px solid #16855a; box-shadow: none; }
.td-go2:hover { background: #eaf7f1; }
.td-mini { display: inline-flex; align-items: center; justify-content: center; min-width: 2.4em; height: 2.4em; padding: 0 .7em; border-radius: 1.2em; background: #f3f5f4; color: #555; font-weight: 700; }
.td-mini:hover { background: #eaf7f1; color: #16855a; }

/* Accueil */
.td-intro { display: flex; align-items: center; gap: 1.2em; max-width: 52em; margin: 0 auto; }
.td-intro p { line-height: 1.6; margin: 0; }
.td-portrait { width: 160px; height: 120px; flex: none; animation: td-hop 2.2s ease-in-out infinite; }
@keyframes td-hop { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-.5em); } }
.td-et { color: #f2b01e; letter-spacing: .1em; font-size: 1.05em !important; }
.td-et i { color: #ddd; font-style: normal; }
.td-tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14em, 1fr)); gap: .8em; }
.td-tuile { display: flex; flex-direction: column; gap: .2em; padding: .85em 1em; border: 2px solid #e5e5e5; border-radius: 1em; color: #777; line-height: 1.4; text-align: center; transition: border-color .2s, transform .15s; }
.td-tuile b { color: #16855a; font-size: 1.12em; font-weight: 600; }
.td-tuile span { font-size: .88em; }
.td-tuile:hover { border-color: #5cc79a; transform: translateY(-2px); }
.td-tuile.actif { border-color: #16855a; box-shadow: 0 0 0 3px #d4efe3; background: #f6fcf9; }
.td-regles { max-width: 52em; margin: 0 auto; }
.td-regles ul { margin: 0; padding-left: 1.2em; line-height: 1.6; }
.td-regles li { margin-bottom: .35em; list-style: disc; }

/* Le jeu : toujours entièrement visible à l'écran */
.td-jeu { max-width: calc((100vh - 13em) * 600 / 360); min-width: min(100%, 30em); margin: 0 auto; }
.td-jeu.tactile { max-width: calc((100vh - 22em) * 600 / 360); }
.td-hud { display: flex; flex-wrap: wrap; align-items: center; gap: .4em 1.1em; padding: .5em .8em; margin-bottom: .5em; background: #fff; border: 2px solid #e5e5e5; border-radius: 1em; font-weight: 700; color: #333; }
.td-titre { color: #16855a; font-family: 'Fredoka', 'Nunito', sans-serif; }
.td-droite { margin-left: auto; display: flex; gap: .4em; }
.td-cadre { position: relative; border-radius: 1em; overflow: hidden; border: 2px solid #e5e5e5; background: #10261b; line-height: 0; }
.td-toile { display: block; width: 100%; aspect-ratio: 600 / 360; touch-action: none; }
.td-voile { position: absolute; inset: 0; background: rgba(30, 50, 40, .45); display: flex; align-items: center; justify-content: center; line-height: 1.4; }
.td-voile > div { background: #fff; border-radius: 1em; padding: 1em 1.6em; display: flex; flex-direction: column; gap: .7em; align-items: center; font-size: 1.2em; }
.td-aide { text-align: center; color: #999; font-size: .85em; margin: .5em 0 0; }
.tactile .td-pad { display: flex; }
.tactile .td-aide { display: none; }

/* Fin de niveau */
.td-fin { text-align: center; padding: 2em 1em; }
.td-grand-et { font-size: 2.6em; }
.td-bilan { display: inline-block; text-align: left; margin: .5em 0; padding: 0; line-height: 1.9; font-size: 1.1em; }
.td-bilan li { list-style: none; }

/* Fenêtre de question (comme les autres jeux du site) */
#td-modale { position: fixed; inset: 0; z-index: 10000; background: rgba(30, 50, 40, .5); display: flex; align-items: center; justify-content: center; padding: 1em; overflow: auto; }
#td-modale > div { margin: auto; }
.td-question { background: #fff; border-radius: 1.2em; width: 100%; max-width: 34em; padding: 1em 1.3em 1.3em; box-shadow: 0 1em 3em rgba(0, 0, 0, .25); border-top: .5em solid #f2b01e; animation: td-pop .25s ease; }
@keyframes td-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.td-q-haut { display: flex; flex-wrap: wrap; gap: .4em 1em; align-items: center; font-weight: 700; color: #555; }
.td-etoiles { color: #f2b01e; letter-spacing: .1em; }
.td-th { margin-left: auto; padding: .1em .7em; border-radius: 1em; background: #eaf7f1; color: #16855a; font-size: .8em; }
.td-enonce { font: 600 clamp(1.4em, 3.6vw, 2.1em)/1.4 'Fredoka', 'Nunito', sans-serif; color: #222; text-align: center; margin: .7em 0 .5em; }
.td-enonce small { display: block; font: 400 .45em/1.4 'Nunito', sans-serif; color: #888; margin-top: .4em; }
.td-verdict { text-align: center; font: 700 1.5em 'Fredoka', sans-serif; margin: .5em 0; animation: td-pop .3s ease; }
.td-verdict.ok { color: #16855a; } .td-verdict.ko { color: #c0392b; font-size: 1.25em; }
.td-verdict.crit { color: #d48c00; font-size: 1.8em; }
.td-verdict small { font-size: .6em; } .td-verdict b { color: inherit; }
.td-correction { background: #f6fcf9; border-left: 4px solid #5cc79a; border-radius: .5em; padding: .7em 1em; line-height: 1.6; color: #333; }
.td-chrono { position: relative; height: 2em; max-width: 22em; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06); margin: 0 auto .7em; border-radius: 1em; background: #eef1ef; overflow: hidden; }
.td-chrono > div { height: 100%; width: 100%; background: #16855a; border-radius: 1em; transition: width .1s linear, background .3s; }
.td-chrono.crit > div { background: linear-gradient(90deg, #f2b01e, #ffd95e); }
.td-chrono.urgent > div { background: #e0524d; }
.td-chrono span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1em; color: #222; }
.td .tn-f { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 .12em; line-height: 1.1; }
.td .tn-f > span { padding: 0 .2em; }
.td .tn-f > span:first-child { border-bottom: .08em solid currentColor; }
.td .tn-rac { border-top: .08em solid currentColor; padding: 0 .1em; }
.td sup { font-size: .6em; vertical-align: super; line-height: 0; }

#td-toast { position: fixed; left: 50%; bottom: 1.5em; transform: translate(-50%, 1em); z-index: 10001; background: #333; color: #fff; padding: .6em 1.1em; border-radius: .8em; max-width: 90%; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
#td-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Plein écran (tablette projetée) : le jeu prend toute la hauteur */
.td-outil:fullscreen { background: #fff; max-width: none; padding: .8em; overflow: auto; display: flex; flex-direction: column; justify-content: center; }
.td-outil:fullscreen .td-rgpd { display: none; }
.td-outil:fullscreen .td-jeu { width: min(100%, calc((100vh - 10em) * 600 / 360)); max-width: none; margin: 0 auto; }
.td-outil:fullscreen .tactile { width: min(100%, calc((100vh - 19em) * 600 / 360)); }
.td-outil:fullscreen .td-ecran { max-height: calc(100vh - 2em); overflow: auto; }

@media (max-width: 640px) {
	.td-intro { flex-direction: column; text-align: center; }
}

/* Vies perdues */
.td-vies { display: inline-block; }
.td-vies.perdu { color: #e0524d; animation: td-secoue .35s ease 3; }
@keyframes td-secoue { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.td-vie { text-align: center; color: #c0392b; font-weight: 800; margin: .1em 0 .6em; }

/* Classes et mondes */
.td-classes { grid-template-columns: repeat(4, 1fr); }
.td-classe b { font-size: 1.5em !important; }
.td-themes { margin: -.2em 0 .7em; font-size: .85em; color: #777; line-height: 1.4; }
@media (max-width: 640px) { .td-classes { grid-template-columns: repeat(2, 1fr); } }

.td-choix { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6em; margin: .4em 0 .2em; }
.td-choix > div { display: flex; flex-direction: column; align-items: center; gap: .1em; padding: .6em .4em; border: 3px solid #16855a; border-radius: .9em; background: #fff; font: 600 1.4em 'Fredoka', 'Nunito', sans-serif; color: #222; box-shadow: 0 .15em 0 #0e5c3d; }
.td-choix > div small { font: 700 .55em 'Nunito', sans-serif; color: #16855a; }
.td-choix > div:hover { background: #eaf7f1; }
.td-choix > div.bon { background: #16855a; color: #fff; }
.td-choix > div.bon small { color: #fff; }
.td-choix > div.faux { background: #fbe3e1; border-color: #c0392b; }
.td-croix [data-k="h"] { grid-column: 2; grid-row: 1; }
.td-croix [data-k="g"] { grid-column: 1; grid-row: 2; }
.td-croix [data-k="d"] { grid-column: 3; grid-row: 2; }
.td-croix [data-k="b"] { grid-column: 2; grid-row: 3; }
.td-niveaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(15em, 1fr)); gap: .8em; }
.td-niveau { display: flex; flex-direction: column; gap: .25em; padding: .8em 1em; border: 2px solid #e5e5e5; border-left: .6em solid var(--c); border-radius: 1em; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 14%, #fff), #fff 70%); transition: border-color .2s, transform .15s; }
.td-niveau b { color: #333; font-size: 1.1em; }
.td-niveau .td-lieu { color: #16855a; font-weight: 700; font-size: .9em; }
.td-niveau .td-themes { margin: 0; }
.td-niveau:hover { transform: translateY(-2px); border-color: #5cc79a; }
.td-niveau.off { opacity: .55; }
.td-niveau.off:hover { transform: none; border-color: #e5e5e5; }
/* croix tactile : une seule zone, on glisse le doigt d'une direction à l'autre (diagonales comprises) */
.td-croix { touch-action: none; padding: .3em; border-radius: 50%; background: radial-gradient(circle, #eef1ef 55%, transparent 56%); }
.td-croix .td-btn { pointer-events: none; transition: background .08s; }

/* Propre au Labyrinthe : joueurs, bandeau des fruits-réponses, croix tactiles */
.td-joueurs { display: inline-flex; gap: .9em; }
.td-j b { color: var(--c); text-shadow: 0 0 1px #888; }
.td-vies { font-style: normal; color: var(--c); letter-spacing: .05em; text-shadow: 0 0 1px #999; }
.td-vies s { text-decoration: none; color: #ddd; text-shadow: none; }
.td-rage { color: #c0392b; }
.td-rec { color: #888; font-size: .85em; font-weight: 700; }
.td-bandeau { margin-bottom: .5em; min-height: 3.4em; }
.td-bq { display: flex; align-items: center; gap: .4em 1em; flex-wrap: wrap; min-height: 3.2em; box-sizing: border-box; padding: .45em .9em; background: #fffaf0; border: 2px solid #f6d58e; border-radius: 1em; line-height: 1.35; }
.td-bq-fruits { font-size: 1.5em; letter-spacing: .1em; }
.td-bq-txt { flex: 1; min-width: 12em; display: flex; flex-direction: column; }
.td-bq-txt small { color: #b07a00; font-weight: 700; font-size: .8em; }
.td-bq-q { font: 600 clamp(1.05em, 2.4vw, 1.4em)/1.35 'Fredoka', 'Nunito', sans-serif; color: #222; }
.td-bq-ok { background: #f6fcf9; border-color: #5cc79a; color: #16855a; font: 700 1.15em 'Fredoka', 'Nunito', sans-serif; justify-content: center; }
.td-bq-ok small { font: 600 .75em 'Nunito', sans-serif; color: #555; }
.td-bq-ko { background: #fdf0ef; border-color: #f0b4ad; color: #c0392b; font-weight: 700; flex-direction: column; align-items: flex-start; gap: .2em; }
.td-bq-ko b { color: #222; }
.td-bq-corr { color: #555; font-weight: 400; font-size: .92em; }
.td-bq-repos { background: #f6f8f7; border-color: #e5e5e5; color: #888; font-size: .9em; justify-content: center; text-align: center; }
.td-bq .td-chrono { margin: 0; width: 12em; height: 1.6em; font-size: .8em; flex: none; }
.td-bq .td-th { margin-left: 0; }
.td-pad { display: none; justify-content: center; gap: 2em; margin-top: .6em; touch-action: none; }
.tactile .td-pad { display: flex; }
.tactile.td-duo .td-pad { justify-content: space-between; }
.tactile .td-aide { display: none; }
.td-croix { display: grid; grid-template-columns: repeat(3, 3.6em); grid-template-rows: repeat(3, 3.6em); gap: .2em; touch-action: none; padding: .3em; border-radius: 50%; background: radial-gradient(circle, #eef1ef 55%, transparent 56%); }
.td-btn { width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #f3f5f4; border: 2px solid #d5dad7; color: #16855a; font-size: 1.3em; box-shadow: 0 .2em 0 #d5dad7; pointer-events: none; transition: background .08s; }
.td-btn.on { background: #d4efe3; transform: scale(.94); box-shadow: none; }
.td-duo .td-croix[data-p="1"] .td-btn { color: #2f8f55; }
.td-croix[data-p="0"] { --c: #f6c915; }
.td-croix [data-k="h"] { grid-column: 2; grid-row: 1; }
.td-croix [data-k="g"] { grid-column: 1; grid-row: 2; }
.td-croix [data-k="d"] { grid-column: 3; grid-row: 2; }
.td-croix [data-k="b"] { grid-column: 2; grid-row: 3; }
.td-niveau { text-align: left; }
@media (max-width: 640px) { .td-croix { grid-template-columns: repeat(3, 3em); grid-template-rows: repeat(3, 3em); } }

/* Hauteurs fixes : les messages ne font plus bouger le labyrinthe ni les croix tactiles */
.td-hud { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; height: 3.2em; box-sizing: border-box; }
.td-hud > span { flex: none; }
.td-hud > .td-titre { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.td-bandeau { height: 5em; min-height: 0; }
.td-bq { height: 100%; min-height: 0; flex-wrap: nowrap; overflow: hidden; }
.td-bq-txt { min-width: 0; overflow: auto; max-height: 100%; }
.td-bq-q { font-size: clamp(1em, 2.2vw, 1.3em); }
.td-bq-ko { justify-content: center; overflow: auto; }
.td-bq-ko > span { max-width: 100%; }
.td-bq-repos { white-space: normal; }
@media (max-width: 640px) { .td-hud { font-size: .85em; } .td-bq-fruits { display: none; } }
.td-long .td-bq-txt small, .td-long .td-th { display: none; }
.td-long .td-bq-q { font-size: clamp(.85em, 1.6vw, 1em); line-height: 1.3; }

/* Question des fruits : en grand dans la bande, sur toute la largeur, chrono en fine barre en bas */
.td-bandeau { height: 5.4em; }
.td-bq-fruit { position: relative; justify-content: center; text-align: center; padding: .3em 4.2em .6em; border-width: 3px; border-color: #f2b01e; background: #fff8e6; }
.td-bq-fruit .td-bq-q { font: 700 clamp(1.3em, 3vw, 2em)/1.25 'Fredoka', 'Nunito', sans-serif; color: #222; overflow: auto; max-height: 100%; }
.td-bq-fruit.td-long .td-bq-q { font-size: clamp(1.1em, 2.2vw, 1.45em); }
.td-bq-fruit.td-tres-long .td-bq-q { font-size: clamp(.95em, 1.7vw, 1.15em); font-weight: 600; }
.td-bq-s { position: absolute; right: .7em; top: 50%; transform: translateY(-50%); font: 800 1.1em 'Fredoka', sans-serif; color: #16855a; }
.td-bq-barre { position: absolute; left: 0; right: 0; bottom: 0; height: .4em; background: #f1e6c8; }
.td-bq-barre > div { height: 100%; background: #16855a; transition: width .1s linear; }
.td-bq-barre.crit > div { background: #f2b01e; }
.td-bq-barre.urgent > div { background: #e0524d; }
/* Temps de lecture : la question au milieu du labyrinthe */
.td-lire { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .35); line-height: 1.35; pointer-events: none; }
.td-lire > div { pointer-events: auto; max-width: 78%; padding: .8em 1.4em 1em; background: #fff; border: 4px solid #f2b01e; border-radius: 1.2em; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .5em; box-shadow: 0 .6em 2em rgba(0, 0, 0, .35); animation: td-pop .25s ease; }
.td-lire small { color: #b07a00; font-weight: 800; font-size: .95em; }
.td-lire-q { font: 700 clamp(1.3em, 3.4vw, 2.3em)/1.3 'Fredoka', 'Nunito', sans-serif; color: #222; }
.td-lire .td-go { font-size: .95em; padding: .5em 1.1em; }
.td-bq-fruit .tn-f { font-size: .8em; }

/* Propre à la Citadelle : barre des tours, question du boss, préparation des vagues */
.td-toile { cursor: pointer; }
.td-vies-h, .td-or { display: inline-block; }
.td-vies-h.perdu { color: #e0524d; animation: td-secoue .35s ease 3; }
.td-renf { color: #c0392b; }
.td-mini.actif { background: #16855a; color: #fff; }
.td-alerte { color: #c0392b; font-weight: 800; }
.td-barres { display: flex; gap: 1em; margin-top: .6em; }
.td-barre { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: .5em; align-items: stretch; }
.td-duo .td-barre { grid-template-columns: auto repeat(2, 1fr); }
.td-barre-j { grid-row: span 2; display: flex; align-items: center; justify-content: center; padding: 0 .5em; border-radius: .8em; background: var(--c); color: #333; font: 800 1.1em 'Fredoka', sans-serif; }
.td-choix-tour { position: relative; display: flex; align-items: center; gap: .5em; padding: .45em .6em; border: 2px solid #e5e5e5; border-radius: .9em; background: #fff; line-height: 1.2; transition: border-color .15s, transform .15s; }
.td-choix-tour:hover { border-color: #5cc79a; transform: translateY(-1px); }
.td-choix-tour.actif { border-color: #16855a; box-shadow: 0 0 0 3px #d4efe3; background: #f6fcf9; }
.td-choix-tour.cher { opacity: .55; }
.td-choix-tour kbd { position: absolute; top: .25em; right: .4em; font: 700 .7em 'Nunito', sans-serif; color: #aaa; }
.td-bt-txt { display: flex; flex-direction: column; min-width: 0; }
.td-bt-txt b { color: #333; font-size: .92em; }
.td-bt-txt small { color: #888; font-size: .75em; }
.td-mini-tour { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--c); color: #fff; font: 800 1.05em 'Fredoka', sans-serif; box-shadow: inset 0 -.15em 0 rgba(0, 0, 0, .2); vertical-align: middle; }
.td-regles .td-mini-tour { width: 1.5em; height: 1.5em; font-size: .9em; margin-right: .3em; }
.td-regles li:has(.td-mini-tour) { margin-left: 1.2em; }
.td-petit { font-size: .85em; padding: .4em 1em; }
.td-bq-prep { justify-content: space-between; background: #f6fcf9; border-color: #b9e3cf; }
.td-bq-prep .td-bq-txt { color: #444; font-size: .95em; overflow: hidden; }
.td-bq-prep .td-bq-txt small { font-size: .85em; }
.td-bq-prep .td-go { flex: none; padding: .5em 1em; font-size: .95em; }
.td-bq-prep .td-go small { font-size: .75em; opacity: .9; }
.td-bq-boss { position: relative; border-width: 3px; border-color: #5aa9e6; background: #eef7ff; padding-bottom: .6em; }
.td-bq-boss .td-bq-txt small { color: #2a64a8; }
.td-bq-boss .td-bq-q { font-size: clamp(1.05em, 2.4vw, 1.45em); }
.td-bq-boss.td-long .td-bq-q { font-size: clamp(.9em, 1.7vw, 1.1em); }
.td-bq-s { font-weight: 800; color: #16855a; margin-left: .4em; }
.td-bq-choix { flex: none; display: flex; gap: .4em; }
.td-rep { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 4.6em; padding: .2em .6em; border: 3px solid #2a64a8; border-radius: .8em; background: #fff; font: 600 1.2em 'Fredoka', 'Nunito', sans-serif; color: #222; line-height: 1.15; box-shadow: 0 .15em 0 #2a64a8; }
.td-rep small { font: 700 .55em 'Nunito', sans-serif; color: #2a64a8; }
.td-rep:hover { background: #dcecff; }
.td-bq-boss .td-bq-barre { background: #d6e6f5; }
.td-bq .tn-f { font-size: .85em; }
.tactile .td-aide { display: none; }
@media (max-width: 760px) {
	.td-barre { grid-template-columns: repeat(2, 1fr); }
	.td-barres { flex-direction: column; }
	.td-bt-txt small { display: none; }
	.td-bq-choix { flex-direction: column; gap: .2em; }
	.td-rep { min-width: 3.6em; font-size: 1em; padding: 0 .4em; }
}
.td-outil:fullscreen .td-jeu { width: min(100%, calc((100vh - 15em) * 600 / 360)); }
.td-jeu.tactile { max-width: calc((100vh - 20em) * 600 / 360); }
.td-jeu:not(.tactile) { max-width: calc((100vh - 17em) * 600 / 360); }
.td-bq-boss .td-bq-s { position: static; transform: none; font-size: 1em; }
.td-bq-prep .td-bq-txt { display: block; }
.td-bq-prep .td-bq-txt small { display: block; margin-top: .2em; }
.td-bt-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-barre .td-mini-tour { font-size: 1.25em; }
.td-choix-tour { padding-right: 1.1em; }
/* Tours dessinées (barre et règles), fiche du pouvoir, info dans la question */
.td-ico-tour { flex: none; width: 3em; height: 3em; margin: -.3em 0; }
.td-choix-tour { padding-left: .3em; }
.td-li-tour { display: flex; align-items: center; gap: .6em; list-style: none; margin-left: -1.2em; }
.td-li-tour .td-ico-tour { width: 3.4em; height: 3.4em; }
.td-fiche { margin: .5em 0 0; padding: .55em .9em; border-radius: .9em; background: #f6fcf9; border: 2px solid #d4efe3; color: #444; font-size: .92em; line-height: 1.45; }
.td-fiche b { color: #16855a; }
.td-fiche span { color: #888; }
.td-q-info { margin: .6em 0 0; padding: .45em .8em; border-radius: .7em; background: #fffaf0; border: 1px solid #f6d58e; color: #555; font-size: .9em; line-height: 1.4; }
.td-jeu:not(.tactile) { max-width: calc((100vh - 21em) * 600 / 360); }
.td-jeu.tactile { max-width: calc((100vh - 24em) * 600 / 360); }
.td-outil:fullscreen .td-jeu { width: min(100%, calc((100vh - 19em) * 600 / 360)); }
@media (max-width: 760px) { .td-fiche { font-size: .82em; } }
.td-barre { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.td-duo .td-barre { grid-template-columns: auto repeat(2, minmax(0, 1fr)); }
.td-choix-tour { min-width: 0; }
.td-bt-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .td-barre { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.td-bt-txt b { white-space: normal; overflow: visible; line-height: 1.1; }
/* Menu d'une tour construite : améliorer, déplacer, revendre */
.td-menu { position: absolute; z-index: 3; transform: translate(-50%, calc(-100% - 1.6em)); min-width: 15em; padding: .45em; background: #fff; border-radius: .9em; box-shadow: 0 .4em 1.4em rgba(0, 0, 0, .3); line-height: 1.3; display: flex; flex-direction: column; gap: .3em; animation: td-pop .15s ease; }
.td-menu-bas { transform: translate(-50%, 1.4em); }
.td-menu-t { display: flex; align-items: center; gap: .3em; padding: .1em .3em .2em; color: #555; font-size: .9em; }
.td-menu-t b { color: #16855a; }
.td-menu-x { margin-left: auto; width: 1.6em; height: 1.6em; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #f3f5f4; font-weight: 800; color: #777; }
.td-menu-b { display: flex; align-items: center; gap: .45em; padding: .45em .6em; border: 2px solid #e5e5e5; border-radius: .7em; font-weight: 700; color: #333; font-size: .92em; white-space: nowrap; }
.td-menu-b:hover { border-color: #5cc79a; background: #f6fcf9; }
.td-menu-b small { font-weight: 400; color: #888; }
.td-menu-b kbd { font: 700 .75em 'Nunito', sans-serif; color: #aaa; min-width: 1em; }
.td-menu-b.off { opacity: .5; pointer-events: none; }
.tactile .td-menu-b kbd { display: none; }
.td-en-deplacement .td-toile { cursor: move; }
