/* ============================================================
   arithmetik.css — arithmétiK
   ============================================================
   La page de préparation reprend game-ux.css (setup-card, btn-go,
   btn-rules, vignette, carrousel des règles). Ici : la question dans le
   cadre plein écran, le KodeX des nombres, la fiche de la date de
   naissance et la fin de série.

   Chaque zone de la question a une hauteur fixe : game-focus ajuste
   l'échelle à la hauteur du contenu, et une question plus haute que la
   précédente ferait « respirer » tout le jeu d'une question à l'autre.
   ============================================================ */

/* Le cadre de la page, comme memorY (chaque jeu le pose dans son <style>). */
main { flex: 1; max-width: 800px; margin: 0 auto; padding: 1rem; width: 100%; box-sizing: border-box; }

.ak-titre { text-align: center; font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 900; margin: 1rem 0 0.1rem; }
.ak-sous-titre { text-align: center; font-style: italic; color: #666; margin: 0 0 0.9rem; font-size: 0.95rem; }

/* ---- L'annonce, jusqu'au 27 octobre (comme taKin) ---- */
.ak-bientot { max-width: 520px; margin: 0 auto; padding: 1rem 0 2rem; text-align: center; display: flex; flex-direction: column; gap: 14px; }
.ak-bientot[hidden] { display: none; }
.ak-bientot-date { align-self: center; background: #FFD700; color: #3a2a22; font-weight: 800; border-radius: 50px; padding: 0.5rem 1.2rem; margin: 0; font-size: 1.05rem; }
.ak-bientot-intro { margin: 0; font-size: 1rem; line-height: 1.5; color: #3a2a22; }

/* ---- Les boutons de niveau, comme memorY ---- */
.ak-niveaux { display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.ak-niveaux .level-btn {
    min-height: 44px; padding: 0.45rem 0.75rem; border: none; border-radius: 8px; cursor: pointer;
    font-family: inherit; font-weight: 700; font-size: 0.9rem; line-height: 1.25; opacity: 0.45;
    transition: opacity 0.15s, transform 0.15s;
}
.ak-niveaux .level-btn > span { display: block; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.ak-niveaux .level-btn[data-level="1"] { background-color: #c2185b; color: #fff; }
.ak-niveaux .level-btn[data-level="2"] { background-color: #FFD700; color: #333; }
.ak-niveaux .level-btn[data-level="3"] { background-color: #0089D4; color: #fff; }
.ak-niveaux .level-btn[data-level="4"] { background-color: #4CAF50; color: #fff; }
.ak-niveaux .level-btn[data-level="5"] { background-color: #333333; color: #fff; }
.ak-niveaux .level-btn.active { opacity: 1; transform: scale(1.05); }
/* Sur téléphone, les cinq niveaux sur une seule rangée : la place gagnée
   remonte le GO. */
@media (max-width: 480px) {
    .ak-niveaux { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.25rem; }
    .ak-niveaux .level-btn { padding: 0.35rem 0.1rem; font-size: 0.875rem; min-width: 0; }
    .ak-niveaux .level-btn.active { transform: scale(1.04); }
}

/* La vignette : l'exemple des règles, en réduction. */
.ak-vignette .ak-question { zoom: 0.62; }
.ak-kodex-ligne { text-align: center; font-size: 0.875rem; color: #8b7d6f; margin: 0.5rem 0 0; }
.ak-kodex-ligne a { color: #0089D4; font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }

/* ---- La question ---- */
.ak-jeu {
    width: 340px; padding: 10px 8px 6px; box-sizing: border-box; display: flex; flex-direction: column; align-items: stretch; gap: 8px; font-family: inherit;
    background: rgba(255, 255, 255, 0.9); border-radius: 18px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
/* La rangée du haut : la progression, et le joK à droite (niveaux 1 à 3). */
.ak-haut { position: relative; display: flex; align-items: center; justify-content: center; min-height: 12px; }
.ak-jeu.avec-jok .ak-haut { min-height: 44px; }
.ak-progression { display: flex; gap: 5px; justify-content: center; }
.ak-progression i { width: 24px; height: 7px; border-radius: 4px; background: #e6dccb; display: block; }
.ak-jeu.avec-jok .ak-progression { gap: 4px; }
.ak-jeu.avec-jok .ak-progression i { width: 19px; }

/* Le joK (Julien, 5 oct.) : cerclé de rose, il montre les numéros — en
   rose, eux aussi ; sans cercle, il est éteint, mais toujours net (« pas
   transparent »). */
.ak-jok {
    position: absolute; right: 0; top: 0; width: 44px; height: 44px; padding: 0; border-radius: 50%;
    border: 3px solid transparent; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent; transition: opacity 0.15s, border-color 0.15s;
}
.ak-jok .ak-img { width: 32px; height: 32px; }
.ak-jok[aria-pressed="true"] { border-color: #C8267D; background: #fff; }
.ak-jok:focus-visible { outline: 3px solid #0089D4; outline-offset: 2px; }
.ak-jok-texte { white-space: nowrap; font-weight: 800; }
.ak-jok-texte img { width: 1.35em; height: 1.35em; vertical-align: -0.35em; }
/* Les numéros montrés par le joK : présents, mais cachés tant qu'il est éteint.
   visibility, et non display : rien ne bouge quand ils apparaissent. */
.par-jok { visibility: hidden; }
.ak-jeu.jok-actif .par-jok { visibility: visible; }
.ak-progression i.ok { background: #2e7d32; }
.ak-progression i.ko { background: #B21553; }
.ak-progression i.ici { background: #0089D4; }

.ak-tete { height: 78px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center; }
.ak-consigne { font-size: 1.05rem; font-weight: 800; color: #3f362b; line-height: 1.2; }
.ak-sous { font-size: 0.875rem; color: #7a6c5d; line-height: 1.3; }
.ak-mot-ecrit { font-weight: 900; letter-spacing: 0.12em; color: #3f362b; }
.ak-bande { display: flex; align-items: flex-start; justify-content: center; gap: 2px; margin-top: 3px; }
.ak-bande-pk { position: relative; display: flex; align-items: center; justify-content: center; padding: 2px; border-radius: 8px; border: 2px solid transparent; }
.ak-bande-pk .ak-img { width: 28px; height: 28px; }
.ak-bande-pk.marque { border-color: #F4A300; background: #fff7e0; }
.ak-bande-pk small { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 0.75rem; font-weight: 800; color: #C8267D; line-height: 1; margin-top: 1px; }
.ak-bande-sep { font-size: 1.3rem; font-weight: 900; color: #a2957f; align-self: center; padding: 0 2px; }

.ak-enonce { height: 112px; display: flex; align-items: center; justify-content: center; border-radius: 16px; transition: background 0.2s; }
.ak-enonce.corrige { background: #f3faf3; }
.ak-ligne { display: flex; align-items: center; justify-content: center; gap: 7px; }
.ak-img { width: 60px; height: 60px; object-fit: contain; display: block; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; pointer-events: none; }
.ak-pk { display: inline-flex; align-items: center; justify-content: center; position: relative; }
.ak-groupe { flex-direction: row; gap: 1px; padding: 3px 4px; border: 2px solid #d9cfbf; border-radius: 12px; background: #fffdf8; }
.ak-groupe .ak-img { width: 40px; height: 40px; }
.ak-groupe.n3 .ak-img { width: 32px; height: 32px; }
/* Le numéro sous un piKto : l'aide (première apparition) ou le corrigé. */
/* Le numéro se pose EN PLUS, sous le piKto, hors du flux (Julien, 5 oct. :
   « ils ne doivent pas impacter la position des piKto ») : la boîte du
   piKto reste celle de son image, et la ligne se centre par le centre des
   piKto, qu'ils portent un numéro ou non. */
.ak-etiquette {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 3px;
    font-size: 0.95rem; font-weight: 900; color: #C8267D; line-height: 1; font-style: normal; white-space: nowrap; pointer-events: none;
}
.ak-nb { font-size: 2.6rem; font-weight: 900; color: #3f362b; line-height: 1; font-variant-numeric: tabular-nums; }
.ak-signe { font-size: 2.1rem; font-weight: 900; color: #0089D4; line-height: 1; }
.ak-sep { font-size: 1.6rem; font-weight: 900; color: #a2957f; line-height: 1; align-self: flex-end; margin: 0 -3px 14px; }
.ak-inconnu {
    width: 58px; height: 58px; border: 2.5px dashed #c9bba6; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 900; color: #b3a795; background: #fffdf8;
}
.ak-trouve { display: inline-flex; padding: 2px; border-radius: 14px; outline: 3px solid #2e7d32; outline-offset: 1px; background: #e8f5e9; }
.ak-trouve .ak-groupe { border-color: transparent; background: none; }
/* Une suite de quatre termes : un cran plus petit, pour tenir sur la ligne. */
/* Une suite : l'escalier (Julien, 6 oct.). Une colonne par terme, le
   terme posé sur sa marche ; la marche, une face beige au nez plus foncé.
   Hauteur fixe : passer de la question à la correction ne bouge rien. */
.ak-escalier { display: flex; align-items: stretch; justify-content: center; gap: 2px; width: 318px; height: 140px; box-sizing: border-box; border-bottom: 3px solid #b8a88f; }
.ak-esc-marche { width: 62px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.ak-escalier .ak-img { width: 32px; height: 32px; }
.ak-escalier .ak-groupe { padding: 1px; gap: 1px; border-width: 1.5px; border-radius: 9px; }
.ak-escalier .ak-groupe .ak-img { width: 26px; height: 26px; }
.ak-escalier .ak-nb { font-size: 1.6rem; line-height: 34px; }
.ak-esc-pied { display: block; width: 100%; box-sizing: border-box; background: #ebe2d1; border-top: 4px solid #c9b794; border-radius: 6px 6px 0 0; }
/* Le numéro (aide, correction) se pose sur la face de la marche. */
.ak-escalier .ak-etiquette { font-size: 0.75rem; padding: 1px 5px; margin-top: 3px; }
.ak-esc-q { width: 40px; height: 36px; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
    border: 2.5px dashed #c9bba6; border-radius: 12px; background: #fffdf8; font-size: 1.7rem; font-weight: 900; color: #b3a795; line-height: 1; }
.ak-esc-marche.attend .ak-esc-pied { background: #fffdf8; border: 2.5px dashed #c9bba6; border-bottom: none; }
.ak-esc-marche.trouvee .ak-esc-pied { background: #e8f5e9; border: 2.5px solid #2e7d32; border-bottom: none; }
.ak-esc-marche.trouvee > .ak-pk { border: 2.5px solid #2e7d32; border-radius: 10px; background: #e8f5e9; padding: 2px; }
/* Aux niveaux 4 et 5, l'énoncé fait la hauteur de l'escalier pour toutes les
   questions : la carte garde sa taille d'une question à l'autre. */
.ak-jeu.niveau-4 .ak-enonce, .ak-jeu.niveau-5 .ak-enonce { height: 146px; }
/* Un mot : ses lettres serrées, comme un mot. */
.ak-mot { display: inline-flex; gap: 2px; padding: 4px 6px; border-radius: 12px; background: #faf7f0; }
.ak-mot .ak-img { width: 44px; height: 44px; }
/* Un long mot (un prénom) : des lettres plus petites, la ligne tient. */
.ak-ligne.avec-mot .ak-mot .ak-img { width: clamp(28px, calc(210px / var(--n, 4)), 44px); height: clamp(28px, calc(210px / var(--n, 4)), 44px); }
.ak-lettre .ak-etiquette { font-size: 0.85rem; }

.ak-zone-choix { min-height: 170px; display: flex; align-items: flex-start; }
/* Trois réponses sur une rangée (niveau 1) : la zone n'a qu'une rangée. */
.ak-jeu.niveau-1 .ak-zone-choix { min-height: 88px; }
.ak-choix { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: 100%; }
.ak-choix.n3 { grid-template-columns: repeat(3, 1fr); }
.ak-btn {
    font: inherit; color: #3f362b; background: #fff; border: 2.5px solid #e6dccb; border-radius: 16px;
    min-height: 78px; padding: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: transform 0.08s, border-color 0.12s, background 0.12s; -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none; user-select: none;
}
.ak-btn .ak-nb { font-size: 2.1rem; }
.ak-btn .ak-img { width: 54px; height: 54px; }
.ak-btn .ak-groupe { border: none; background: none; padding: 0; }
.ak-btn .ak-groupe .ak-img { width: 40px; height: 40px; }
.ak-btn .ak-groupe.n3 .ak-img { width: 30px; height: 30px; }
.ak-choix.n3 .ak-btn { min-height: 84px; }
/* Avec le joK, un piKto de réponse porte son numéro dessous : le bouton
   garde la place de le montrer sans que le piKto bouge. */
.ak-jeu.avec-jok .ak-choix.en-pikto .ak-btn { min-height: 90px; }
.ak-jeu.avec-jok .ak-choix.en-pikto .ak-btn .ak-img { width: 46px; height: 46px; }
.ak-jeu.avec-jok .ak-zone-choix { min-height: 190px; }
.ak-jeu.avec-jok.niveau-1 .ak-zone-choix { min-height: 92px; }
.ak-btn:active { transform: scale(0.97); }
.ak-btn:disabled { cursor: default; }
.ak-btn.juste, .ak-btn[data-bonne] { background: #e8f5e9; border-color: #2e7d32; }
.ak-btn.faux { background: #fde7ef; border-color: #B21553; animation: ak-secouer 0.35s; }
@keyframes ak-secouer { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .ak-btn.faux { animation: none; } }

.ak-suite { height: 52px; display: flex; align-items: center; justify-content: center; }
.ak-continuer {
    min-height: 48px; padding: 0 2rem; border: none; border-radius: 50px; font: inherit; font-size: 1.05rem; font-weight: 800;
    background: linear-gradient(145deg, #0089D4, #00699f); color: #fff; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 137, 212, 0.3);
}
.ak-continuer[hidden] { display: none; }

/* La question figée (règles, vignette) : rien ne se touche. */
.ak-question.statique { width: 340px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; pointer-events: none; }
.ak-question.statique .ak-consigne { text-align: center; }
.ak-question.statique .ak-ligne { min-height: 80px; }
.instr-visuel .ak-question.statique { width: 100%; max-width: 340px; margin: 0 auto; }

/* ---- Le KodeX des nombres (règles) ---- */
.ak-kodex { display: grid; gap: 3px 4px; align-items: center; justify-items: center; max-width: 300px; margin: 0 auto; }
.ak-kx-tete .ak-img { width: 18px; height: 18px; opacity: 0.75; }
.ak-kx-cell { display: flex; flex-direction: column; align-items: center; padding: 2px 3px; border-radius: 8px; border: 2px solid transparent; }
.ak-kx-cell .ak-img { width: 32px; height: 32px; }
.ak-kx-cell b { font-size: 0.9rem; font-weight: 900; color: #C8267D; line-height: 1.05; }
.ak-kx-cell.neuf { border-color: #F4A300; background: #fff7e0; }
.ak-kx-extras { display: flex; justify-content: center; gap: 10px; margin-top: 6px; }
.ak-kx-grands { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; margin-top: 8px; font-size: 0.875rem; color: #5b4f42; }
.ak-kx-grands .ak-groupe .ak-img, .ak-kx-grands .ak-img { width: 24px; height: 24px; }
.ak-kx-grands .ak-groupe { padding: 1px 3px; border-radius: 8px; }

/* ---- La fin de série ---- */
.ak-fin { position: fixed; inset: 0; z-index: 20000; background: rgba(40, 28, 18, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ak-fin-cadre { background: #fff; border-radius: 20px; padding: 20px 18px 16px; width: min(100%, 360px); max-height: 96vh; overflow-y: auto; text-align: center; box-shadow: 0 18px 50px rgba(0,0,0,0.3); }
.ak-fin-titre { font-size: 1.5rem; font-weight: 900; color: #3f362b; }
.ak-fin-score { font-size: 3.2rem; font-weight: 900; color: #0089D4; line-height: 1.1; margin: 4px 0; }
.ak-fin-score span { font-size: 1.4rem; color: #a2957f; }
.ak-fin-texte { color: #4a4238; font-size: 0.95rem; line-height: 1.5; margin: 0 0 10px; }
.ak-fin-texte small { color: #7a6c5d; font-size: 0.875rem; }
.ak-fin-revoir { background: #faf7f0; border-radius: 14px; padding: 8px 8px 6px; margin: 0 0 12px; }
.ak-fin-revoir > span { display: block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #8b7d6f; margin-bottom: 4px; }
.ak-fin-revoir > div { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.ak-fin-pk { display: flex; flex-direction: column; align-items: center; }
.ak-fin-pk .ak-img { width: 40px; height: 40px; }
.ak-fin-pk b { font-size: 1rem; font-weight: 900; color: #C8267D; }
.ak-fin-boutons { display: flex; flex-direction: column; gap: 8px; }
.ak-fin-btn { font: inherit; font-weight: 800; font-size: 1rem; min-height: 48px; padding: 0.7rem 1rem; border-radius: 50px; border: none; cursor: pointer; }
.ak-fin-btn.principal { background: #0089D4; color: #fff; }
.ak-fin-btn.suivant { background: #2e7d32; color: #fff; }
.ak-fin-btn.doux { background: #f3efe7; color: #3f362b; }

/* ============================================================
   Les niveaux 1 à 3 par tours (arithmetik-tours.js) : présentation, quiz.
   La carte garde une hauteur fixe d'un écran à l'autre : game-focus
   règle l'échelle sur la hauteur, et un écran plus haut que le
   précédent ferait respirer tout le jeu.
   ============================================================ */
/* min-height et non height : un texte agrandi par le téléphone fait grandir
   la carte (et game-focus la réduit) au lieu de cacher « Au quiz ! ». */
.ak-jeu.tours { min-height: 500px; gap: 6px; }
.ak-jeu.tours.corrige .par-jok { visibility: visible; }
.ak-progression i.aide { background: #b8aea0; }

/* ---- La présentation ---- */
.tr-pres { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; min-height: 0; }
/* Pas de capitales : « Les piKto noirs » deviendrait « PIKTO ». */
.tr-entete { font-size: 0.95rem; font-weight: 800; color: #7a6c5d; margin-top: 2px; }
.tr-phrase { font-size: 1rem; line-height: 1.45; color: #3f362b; margin: 0; padding: 0 4px; }
.tr-pied { margin-top: auto; height: 56px; display: flex; align-items: center; justify-content: center; }
/* Ce qui attend que tous les piKto soient découverts garde sa place. */
.tr-pres .cache { visibility: hidden; }

/* Niveau 1 : on touche chaque piKto pour découvrir son numéro. */
.tr-decouvrir { display: grid; gap: 10px; width: 100%; margin: 6px 0 2px; }
.tr-decouvrir.n3 { grid-template-columns: repeat(3, 1fr); }
.tr-decouvrir.n4 { grid-template-columns: repeat(2, 1fr); }
.tr-decouvrir.n5 { grid-template-columns: repeat(3, 1fr); }
.tr-carte {
    font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 112px; padding: 8px 4px; border-radius: 16px; border: 2.5px solid #e6dccb; background: #fff; cursor: pointer;
    -webkit-tap-highlight-color: transparent; transition: border-color 0.15s, background 0.15s, transform 0.08s;
}
.tr-decouvrir.n5 .tr-carte { min-height: 100px; }
.tr-carte:active { transform: scale(0.97); }
.tr-carte .ak-img { width: 60px; height: 60px; }
.tr-decouvrir.n5 .tr-carte .ak-img { width: 52px; height: 52px; }
.tr-num { font-size: 1.6rem; font-weight: 900; line-height: 1; color: #c9bba6; min-width: 2ch; }
.tr-carte.vu { border-color: #C8267D; background: #fff7fb; cursor: default; }
.tr-carte.vu .tr-num { color: #C8267D; animation: tr-apparaitre 0.25s ease-out; }
@keyframes tr-apparaitre { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tr-carte.vu .tr-num { animation: none; } }

/* Le KodeX complet : six rangées de cinq, puis les trois à part. */
/* Le numéro collé à son piKto, et un vrai écart entre les rangées : sans
   lui, le numéro semblait appartenir au piKto du dessous. */
.tr-kodex { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px 4px; width: 100%; max-width: 300px; margin: 0 auto; }
.tr-kx { display: flex; justify-content: center; align-items: flex-start; height: 44px; }
.tr-kx .ak-img { width: 28px; height: 28px; }
.tr-kx .ak-etiquette { font-size: 0.875rem; margin-top: 1px; }
.instr-visuel .tr-kodex { max-width: 280px; }
/* Au tour « Tout le KodeX », la grille partage l'écran avec la phrase et le
   bouton : un cran plus petite. */
.tr-pres .tr-kodex { row-gap: 4px; }
.tr-pres .tr-kx { height: 40px; }
.tr-pres .tr-kx .ak-img { width: 25px; height: 25px; }

/* Une maison : le toit (le piKto et son numéro), la phrase, les vedettes. */
.tr-maison { width: 100%; border: 2px solid #e2d8c8; border-radius: 18px; background: #fffdf8; padding: 10px 8px 14px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tr-toit { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; }
.tr-toit .ak-img { width: 56px; height: 56px; }
.tr-toit strong { font-size: 1.15rem; font-weight: 900; color: #3f362b; }
.tr-vedettes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; width: 100%; }
.tr-habitant { display: flex; align-items: center; justify-content: center; gap: 4px; height: 60px; padding-bottom: 14px; border-radius: 12px; background: #faf7f0; }
.tr-habitant .ak-img { width: 36px; height: 36px; }
.tr-habitant .ak-signe { font-size: 1.4rem; }
.tr-habitant .ak-etiquette { font-size: 0.875rem; margin-top: 1px; }
/* Les maisons d'un bilan, côte à côte. */
.tr-maisons { display: grid; gap: 8px; width: 100%; margin: 8px 0; }
.tr-maisons.n3 { grid-template-columns: repeat(3, 1fr); }
.tr-maisons.n8 { grid-template-columns: repeat(4, 1fr); }
.tr-maison-mini { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 10px 4px 8px; border: 2px solid #e2d8c8; border-radius: 14px; background: #fffdf8; }
.tr-maison-mini .ak-img { width: 52px; height: 52px; }
.tr-maisons.n8 .tr-maison-mini .ak-img { width: 40px; height: 40px; }
.tr-maison-mini > span { font-size: 0.875rem; font-weight: 800; color: #5b4f42; }

/* ---- Le quiz ---- */
.tr-tete { height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.tr-toit-mini { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 4px; border: 1.5px solid #e2d8c8; border-radius: 50px; font-size: 0.875rem; font-weight: 800; color: #5b4f42; background: #fffdf8; }
.tr-toit-mini .ak-img { width: 28px; height: 28px; }
.tr-enonce { height: 150px; display: flex; align-items: center; justify-content: center; border-radius: 16px; }
.ak-jeu.corrige .tr-enonce { background: #f3faf3; }
.tr-grand .ak-img { width: 110px; height: 110px; }
.tr-grand .ak-etiquette { font-size: 1.3rem; }
.tr-grand-nb { font-size: 4.2rem; }
.tr-correction { min-height: 44px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 0.95rem; font-weight: 800; line-height: 1.3; color: #B21553; padding: 0 4px; }
.tr-zone-choix { min-height: 104px; }
/* 100 px : le piKto centré, et sa pastille (joK, correction) dans le bouton. */
.ak-choix.tr-choix .ak-btn { min-height: 100px; }
.tr-choix.tr-q-numero .ak-nb { font-size: 2.2rem; }
.tr-choix .ak-btn .ak-img { width: 50px; height: 50px; }
.tr-maison-btn { display: inline-flex; padding: 6px 8px 18px; border: 2px solid #d9cfbf; border-radius: 12px; background: #fffdf8; }
.tr-maison-btn .ak-img { width: 44px; height: 44px; }

/* L'exemple des règles et de la vignette, figé. */
.tr-statique { gap: 6px; align-items: center; }
.tr-statique .tr-enonce { height: auto; min-height: 120px; }
.tr-statique .ak-choix { width: 100%; }

/* ---- La fin d'un tour ---- */
.tr-rappel { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 2px 0 26px; }
.tr-rappel-pk { display: inline-flex; padding: 3px; border-radius: 12px; border: 2.5px solid transparent; }
.tr-rappel-pk .ak-img { width: 40px; height: 40px; }
.tr-rappel-pk.manque { border-color: #B21553; }
.tr-fin-boutons { display: flex; flex-direction: column; gap: 8px; }
.tr-fin-autres { display: flex; gap: 8px; }
.tr-fin-autres .ak-fin-btn { flex: 1; padding: 0.6rem 0.5rem; font-size: 0.95rem; }

/* ---- La carte des règles d'arithmétiK (Julien, 5 oct. : « plus
   harmonieuses, attention aux espaces et au centrage ») ---- */
/* Le titre sans capitales : « Les 33 piKto » ne devient pas « PIKTO ». */
.ak-instr .instr-step { text-transform: none; letter-spacing: 0.01em; font-size: 0.9rem; text-align: center; padding: 0 2.2rem; margin: 0 0 0.5rem; text-wrap: balance; }
.ak-instr .instr-text { text-align: center; margin: 0 0 0.8rem; }
.ak-instr .instr-visuel { display: flex; justify-content: center; }
/* La pastille du toit, centrée au lieu d'étirée. */
.tr-statique .tr-toit-mini { align-self: center; }
.tr-statique .ak-consigne { margin-bottom: 2px; }

/* ---- Les numéros, harmonisés (Julien, 5 oct. : « les numéros qui
   s'affichent, c'est pas très joli / harmonieux ») : partout la même
   pastille — le chiffre rose en gras sur un rose pâle, arrondie — et deux
   tailles seulement : la courante (une version serrée pour les grilles), et
   la grande (la découverte, le piKto de la question). Toujours posée sous
   le piKto, en plus, sans le déplacer. */
.ak-etiquette, .ak-bande-pk small, .ak-kx-cell b, .ak-fin-pk b {
    display: inline-block; box-sizing: border-box; min-width: 1.7em; padding: 2px 6px; border-radius: 999px;
    background: #fdeaf2; color: #C8267D; font-size: 0.8rem; font-weight: 800; font-style: normal; line-height: 1;
    letter-spacing: 0; text-align: center; font-variant-numeric: tabular-nums;
}
.ak-etiquette { margin-top: 3px; }
.tr-kx .ak-etiquette, .ak-bande-pk small, .ak-kx-cell b, .tr-habitant .ak-etiquette, .ak-lettre .ak-etiquette {
    font-size: 0.75rem; padding: 1px 5px; margin-top: 2px;
}
.ak-kx-cell b, .ak-fin-pk b { margin-top: 3px; }
.tr-grand .ak-etiquette { font-size: 1.15rem; padding: 3px 11px; margin-top: 6px; }
/* La découverte : la même pastille, en grand ; avant le toucher, un « ? »
   sur sable. */
.tr-num { display: inline-block; box-sizing: border-box; min-width: 2.6em; padding: 4px 12px; border-radius: 999px; background: #f3efe7; color: #b3a795;
    font-size: 1.2rem; font-weight: 800; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.tr-carte.vu .tr-num { background: #fdeaf2; color: #C8267D; }
/* La place des pastilles dans les blocs serrés. */
.tr-habitant { padding-bottom: 18px; }
.tr-toit { padding-bottom: 20px; }
