/* ============================================================================
   Labo attelage — façon B « Je suis au camion » (assets/attelage-tour.js). Classes tou-*.
   Reprend les variables de app.css (couleurs, police, boutons en relief).
   ========================================================================== */
.tou { display: flex; flex-direction: column; min-height: 100%; background: var(--fond, #EEF3FA); color: var(--encre, #0B1F3A); }
.tou-accueil .page { gap: 12px; }
.tou-ill svg { display: block; width: 100%; height: auto; border-radius: 14px; border: 3px solid var(--encre, #0B1F3A); }
.tou-accueil__t { font-size: 1.3rem; }
.tou-regles { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.tou-choix { background: var(--carte, #fff); border: 2px solid var(--trait, #C9D3E1); border-radius: 14px; padding: 10px 12px 6px; }
.tou-choix__t { font-size: 1.08rem; margin-bottom: 8px; }
.tou-choix__b { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tou-choix__b .btn { min-height: 52px; }
.tou-choix__s { color: var(--muted, #46566B); font-weight: 600; font-size: .92rem; }

/* ---- en jeu ---- */
.tou-jeu { gap: 8px; padding-bottom: 14px; }
.tou-haut { padding: 8px 12px 0; display: flex; flex-direction: column; gap: 4px; min-height: 40px; }
.tou-barre { display: flex; gap: 3px; }
.tou-barre__s { flex: 1; height: 8px; border-radius: 4px; background: var(--trait, #C9D3E1); }
.tou-barre__s.is-fait { background: var(--vert, #00843D); }
.tou-barre__s.is-ici { background: var(--jaune, #FFCC00); box-shadow: inset 0 0 0 2px var(--encre, #0B1F3A); }
.tou-etape { font-size: .86rem; font-weight: 700; color: var(--muted, #46566B); line-height: 1.25; }
.tou-chrono { font-size: 1rem; color: var(--encre, #0B1F3A); }
.tou-faire { background: var(--jaune, #FFCC00); color: var(--encre, #0B1F3A); border: 3px solid var(--encre, #0B1F3A); border-radius: 12px;
  padding: 7px 10px; font-weight: 800; font-size: 1.02rem; line-height: 1.25; }
.tou-faire:empty { display: none; }

.tou-scene { position: relative; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; background: #1A1F26; }
.tou-svg svg { display: block; width: 100%; height: auto; }
.tou-p { cursor: pointer; outline: none; }
/* le décor ne vole pas les touchers : seules les pièces (.tou-p) répondent */
.tou-vue > :not(.tou-p) { pointer-events: none; }
.tou-p:focus-visible .tou-hit { stroke: var(--jaune, #FFCC00); stroke-width: 4; stroke-opacity: 1; }
.tou-pedale { touch-action: none; }
.tou-halo { animation: tou-pulse 1.1s ease-in-out infinite; }
@keyframes tou-pulse { 0%, 100% { stroke-opacity: 1; stroke-width: 4; } 50% { stroke-opacity: .7; stroke-width: 7; } }
.tou-plan__cible { animation: tou-pulse 1.1s ease-in-out infinite; }

.tou-plan { position: absolute; top: 6px; right: 6px; pointer-events: none; line-height: 0; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.tou-ou { position: absolute; left: 8px; top: 6px; max-width: 64%; background: var(--encre, #0B1F3A); color: #fff; border: 2px solid #fff;
  border-radius: 999px; padding: 3px 10px; font-size: .82rem; font-weight: 700; pointer-events: none; }
.tou-fl, .tou-recul { position: absolute; display: grid; place-items: center; padding: 0; border: 3px solid #fff; color: #fff;
  background: rgba(11, 31, 58, .82); font-weight: 800; line-height: 1; }
.tou-fl { top: 50%; width: 44px; height: 64px; margin-top: -32px; font-size: 2.1rem; border-radius: 12px; }
.tou-fl--g { left: 4px; }
.tou-fl--d { right: 4px; }
.tou-zoomee .tou-fl { top: auto; }
.tou-recul { top: 6px; left: 6px; width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; }
.tou-fl.is-cible, .tou-recul.is-cible, .tou-fin.is-cible { box-shadow: 0 0 0 4px var(--jaune, #FFCC00); animation: tou-anneau 1.1s ease-in-out infinite; }
.tou-fl.is-cible, .tou-recul.is-cible { background: var(--jaune, #FFCC00); color: var(--encre, #0B1F3A); border-color: var(--encre, #0B1F3A); }
@keyframes tou-anneau { 0%, 100% { box-shadow: 0 0 0 4px var(--jaune, #FFCC00); } 50% { box-shadow: 0 0 0 8px rgba(255, 204, 0, .4); } }

.tou-msg { margin: 0 12px; }
.tou-bas { padding: 0 12px; display: flex; flex-direction: column; gap: 4px; }
.tou-quit { min-height: 46px; font-size: .95rem; }

/* le bilan (celui du simulateur), avec un petit en-tête */
.tou-tete { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--carte, #fff); color: var(--encre, #0B1F3A); border-bottom: 3px solid var(--trait, #C9D3E1); }
.tou-tete__r { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 2px solid var(--encre, #0B1F3A); background: transparent; color: var(--encre, #0B1F3A); font-size: 1.6rem; line-height: 1; padding: 0; }
.tou-tete__t { display: flex; flex-direction: column; min-width: 0; }
.tou-tete__t b { font-size: 1.05rem; }
.tou-tete__t span { font-size: .82rem; opacity: .95; }

@media (prefers-reduced-motion: reduce) {
  .tou-halo, .tou-plan__cible, .tou-fl.is-cible, .tou-recul.is-cible, .tou-fin.is-cible { animation: none; }
}
