/* ==========================================================================
   AWALNUT — page plein écran (page-awalnut.php)
   Même présentation sur téléphone et sur ordinateur : une colonne de jeu,
   un peu plus large sur grand écran ; la page ne défile jamais.
   ========================================================================== */
/* Page seule (?integre=1) : la fenêtre entière est au jeu. */
html.aw-html, html.aw-html body { height: 100%; margin: 0; padding: 0; overflow: hidden; overscroll-behavior: none; }
body.aw-page {
  font-family: "Noto Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: #12212E; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
  background: radial-gradient(120% 80% at 50% 0%, #FBF8EF 0%, #F3EEE1 55%, #EDE5D2 100%);
}
*, *::before, *::after { box-sizing: border-box; }
button { font-family: inherit; }
.aw-page .jeu { height: 100vh; height: 100dvh; padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
/* ==========================================================================
   AWALNUT — moteur des jeux (dérivé des jeux d’Amselya)
   Tout tient sur un écran, sans défilement, sur téléphone comme sur ordinateur :
   jeu.js mesure la place sous l'en-tête et la donne dans --dispo.
   ========================================================================== */

.jeu { padding: .6rem .6rem 0; }
.jeu__cadre {
  box-sizing: border-box;
  max-width: 56rem; margin: 0 auto; padding: .55rem;
  /* Réglages : le cadre épouse son contenu (jamais plus haut que l'écran).
     Partie et fin : le cadre prend toute la hauteur disponible. */
  max-height: var(--dispo, none);
  display: flex; flex-direction: column;
  /* Fond propre au jeu, nettement distinct du blanc de la page. */
  background: linear-gradient(180deg, #F5E9CF 0%, #E9D7B2 100%);
  border: 1px solid #D4BC8C; border-radius: 20px;
  box-shadow: 0 14px 34px -22px rgba(18,33,46,.55);
}
.jeu__cadre.est-plein { height: var(--dispo, auto); min-height: 380px; }
.jeu__chargement { margin: auto; text-align: center; color: var(--ardoise, #5B6875); font-weight: 600; }
.jeu__etiquette { margin: 0 0 .3rem; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #2E4152; }

/* ---------- Réglages ---------- */
.jeu__reglages { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; gap: .5rem; }

/* Frise berbère (losanges) en tête du cadre : pur CSS, aucune image. */
.jeu__frise {
  flex: none; height: 12px; margin: -.55rem -.55rem .45rem;
  border-radius: 18px 18px 0 0; border-top: 3px solid #1F7A3D; border-bottom: 3px solid #1F7A3D;
  background:
    linear-gradient(135deg, #B4321F 25%, transparent 25%) -6px 0 / 12px 12px,
    linear-gradient(225deg, #B4321F 25%, transparent 25%) -6px 0 / 12px 12px,
    linear-gradient(315deg, #B4321F 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(45deg,  #B4321F 25%, transparent 25%) 0 0 / 12px 12px,
    #F2B705;
}

.jeu__entete { display: flex; align-items: center; justify-content: space-between; gap: .5rem .6rem; flex-wrap: wrap; }
.jeu__entete-droite { display: flex; align-items: center; gap: .45rem; margin-inline-start: auto; }
/* Langue des réponses : petites pastilles en haut, à côté de la série et des points. */
.jeu__langues .jeu__choix { --g: #0F4F8A; gap: .2rem; padding: .2rem; border-radius: 999px; background: #fff; box-shadow: 0 6px 14px -10px rgba(0,0,0,.4); }
.jeu__langues .jeu__puce { flex: none; min-height: 2.1rem; min-width: 2.6rem; padding: .1rem .5rem; font-size: .82rem; border-width: 0; }
.jeu__entete-titres { min-width: 0; }
.jeu__titre { margin: 0; font-size: clamp(1.3rem, 5cqw, 2rem); font-weight: 900; letter-spacing: -.02em; color: #1B2A22; line-height: 1.1; }
.jeu__titre-kab { color: #1F7A3D; }
.jeu__sous { margin: .15rem 0 0; color: #4A3B22; font-size: .9rem; font-weight: 600; }

.jeu__compteurs { flex: none; display: flex; gap: .3rem; padding: .25rem; border-radius: 14px; background: #fff; box-shadow: 0 6px 14px -10px rgba(0,0,0,.4); }
.jeu__compteur { display: flex; flex-direction: column; align-items: center; padding: .1rem .45rem; line-height: 1.1; }
.jeu__compteur + .jeu__compteur { border-inline-start: 1px solid #EADFC8; }
.jeu__compteur strong { font-size: 1rem; font-weight: 900; color: #1B2A22; white-space: nowrap; }
.jeu__compteur span { font-size: .62rem; font-weight: 700; color: #6B5A3C; }

/* Catégories : 2 colonnes sur téléphone, 4 sur ordinateur ; dégradé, nom kabyle, flèche, filigrane. */
.jeu__categories {
  flex: 0 1 auto; min-height: 0; overflow-y: auto;   /* dernier recours si l'écran est minuscule */
  display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(3.3rem, auto);
  gap: .45rem; align-content: start; padding: 4px;   /* place pour l'anneau de sélection */
}
.jeu__categorie {
  --c: #1F7A3D;
  position: relative; overflow: hidden; min-width: 0; min-height: 0;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: .45rem;
  padding: .45rem .5rem; border: 2px solid transparent; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 78%, #fff) 0%, var(--c) 55%, color-mix(in srgb, var(--c) 82%, #000) 100%);
  color: #fff; text-align: start; font: inherit; cursor: pointer;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.18), 0 6px 14px -10px rgba(0,0,0,.6);
  opacity: .9; transition: opacity .12s, transform .12s; -webkit-tap-highlight-color: transparent;
}
.jeu__categorie:hover { opacity: 1; transform: translateY(-1px); }
.jeu__categorie[aria-pressed="true"] { opacity: 1; border-color: #fff; box-shadow: 0 0 0 3px var(--c), 0 10px 18px -10px var(--c); }
.jeu__categorie-fond {
  position: absolute; inset-inline-end: -.3rem; bottom: -.7rem; font-size: 3.4rem; line-height: 1;
  opacity: .16; transform: rotate(-12deg); pointer-events: none; filter: grayscale(1) brightness(3);
}
.jeu__categorie-icone { position: relative; font-size: 1.55rem; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.jeu__categorie-textes { position: relative; display: flex; flex-direction: column; min-width: 0; }
.jeu__categorie-nom { font-weight: 900; font-size: .95rem; line-height: 1.15; overflow-wrap: normal; text-shadow: 0 1px 1px rgba(0,0,0,.2); }
.jeu__categorie-trad { font-weight: 700; font-size: .76rem; line-height: 1.15; color: rgba(255,255,255,.9); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jeu__categorie-fleche { position: relative; font-size: 1.35rem; font-weight: 900; opacity: .85; }

/* Beaucoup de catégories : cartes plus compactes pour toujours tenir dans l'écran. */
.jeu__categories--dense { grid-auto-rows: minmax(2.9rem, auto); }
.jeu__categories--dense .jeu__categorie-icone { font-size: 1.2rem; }
.jeu__categories--dense .jeu__categorie-nom { font-size: .82rem; }
.jeu__categories--dense .jeu__categorie-fond { display: none; }
.jeu__categories--tres-dense { grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(2.6rem, auto); gap: .3rem; }
.jeu__categories--tres-dense .jeu__categorie { grid-template-columns: auto 1fr; padding: .3rem .35rem; }
.jeu__categories--tres-dense .jeu__categorie-icone { font-size: 1rem; }
.jeu__categories--tres-dense .jeu__categorie-nom { font-size: .72rem; }
.jeu__categories--tres-dense .jeu__categorie-trad, .jeu__categories--tres-dense .jeu__categorie-fleche, .jeu__categories--tres-dense .jeu__categorie-fond { display: none; }

/* Réglages en pastilles, une couleur par réglage. */
.jeu__options { display: grid; grid-template-columns: 1fr; gap: .4rem; }
.jeu__groupe {
  --g: #12212E; --g-fond: #fff;
  display: grid; grid-template-columns: 4.9rem 1fr; align-items: center; gap: .35rem;
  padding: .3rem .4rem; border-radius: 14px; background: var(--g-fond);
  box-shadow: 0 4px 10px -8px rgba(0,0,0,.35);
}
.jeu__groupe--langue  { --g: #0F4F8A; --g-fond: #D7E8F8; }
.jeu__groupe--cases   { --g: #5A2E8F; --g-fond: #E6DAF6; }
.jeu__groupe--vitesse { --g: #9A3A08; --g-fond: #FBE2C7; }
.jeu__groupe--niveau  { --g: #1F6B35; --g-fond: #D3EEDB; }
.jeu__groupe .jeu__etiquette { margin: 0; color: var(--g); text-transform: none; letter-spacing: 0; font-size: .82rem; }
.jeu__choix { display: flex; gap: .3rem; }
.jeu__puce {
  flex: 1 1 0; min-width: 0; min-height: 2.5rem; padding: .25rem .3rem;
  border-radius: 999px; border: 2px solid color-mix(in srgb, var(--g, #12212E) 22%, #fff); background: #fff;
  font: inherit; font-weight: 800; font-size: .88rem; color: var(--encre, #12212E); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jeu__groupe--vitesse .jeu__puce, .jeu__groupe--niveau .jeu__puce { font-size: .8rem; padding-inline: .15rem; }
.jeu__puce[aria-pressed="true"] { background: var(--g, #12212E); border-color: var(--g, #12212E); color: #fff; }

.jeu__depart { display: flex; flex-direction: column; align-items: stretch; gap: .3rem; padding-bottom: .2rem; }
.jeu__note { margin: 0 auto; padding: .2rem .7rem; border-radius: 999px; background: rgba(255,255,255,.75); text-align: center; font-size: .78rem; font-weight: 700; color: #4A3B22; }
.jeu__jouer-kab { opacity: .85; }
.jeu__gain { margin: 0; font-weight: 900; font-size: 1.1rem; color: #9A6A00; }

.jeu__jouer, .jeu__secondaire {
  box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  width: 100%; min-height: 3.2rem; padding: 0 1.2rem;
  border: 0; border-radius: 16px; background: linear-gradient(180deg, #2E9A55, #1F7A3D 60%, #17602F); color: #fff !important;
  font: inherit; font-size: 1.2rem; font-weight: 900; text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 22px -12px var(--vert, #0C7D46);
}
.jeu__jouer:active { transform: translateY(1px); }
.jeu__secondaire { background: #fff; color: var(--encre, #12212E) !important; border: 2px solid var(--brume, #E4E7EA); box-shadow: none; font-size: 1rem; }

/* ---------- Partie : barre en haut, la grille prend tout le reste ---------- */
.jeu__partie { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: .5rem; }
.jeu__barre { display: flex; align-items: center; gap: .45rem; }
.jeu__ecouter {
  display: inline-flex; align-items: center; gap: .3rem; min-height: 2.7rem; padding: 0 1rem;
  border: 0; border-radius: 999px; background: var(--bleu, #1B7FC4); color: #fff;
  font: inherit; font-weight: 900; font-size: 1rem; cursor: pointer; white-space: nowrap;
}
.jeu__score { font-weight: 800; font-size: .9rem; color: var(--encre, #12212E); white-space: nowrap; }
.jeu__chrono { margin-inline-start: auto; font-weight: 900; font-variant-numeric: tabular-nums; font-size: 1.1rem; }
/* Actions pendant la partie : débloquer (essai), rejouer, retour aux catégories.
   Sur téléphone : icônes seules ; sur ordinateur : icône + libellé. */
.jeu__actions { flex: none; display: flex; gap: .3rem; }
.jeu__action {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; height: 2.6rem; padding: 0 .55rem;
  border-radius: 999px; border: 2px solid #D4BC8C; background: #fff; color: #1B2A22 !important;
  font: inherit; font-weight: 800; font-size: 1.05rem; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.jeu__action span { display: none; font-size: .9rem; }
.jeu__ecouter span { display: none; }
@media (max-width: 400px) { .jeu__score-mot { display: none; } .jeu__barre { gap: .3rem; } }
.jeu__action--offre { background: var(--jaune, #F2B705); border-color: #C99600; }

.jeu__temps { flex: none; height: 9px; margin: .5rem 0 .2rem; border-radius: 999px; background: var(--brume, #E4E7EA); overflow: hidden; }
.jeu__temps span { display: block; height: 100%; background: var(--vert, #0C7D46); transform-origin: left; }
[dir="rtl"] .jeu__temps span { transform-origin: right; }
.jeu__temps.est-urgent span { background: var(--rouge, #D4342A); }

.jeu__message { flex: none; min-height: 1.4rem; margin: .1rem 0 .35rem; text-align: center; font-weight: 800; font-size: .92rem; line-height: 1.4rem; color: var(--ardoise, #5B6875); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jeu__message--bravo { color: var(--vert, #0C7D46); }
.jeu__message--rate  { color: var(--rouge, #D4342A); }

.jeu__grille {
  flex: 1; min-height: 0;
  display: grid; gap: .4rem;
  grid-template-columns: repeat(var(--cols-mobile, 3), 1fr);
  grid-template-rows: repeat(var(--rows-mobile, 4), 1fr);
}
.jeu__case {
  --c: #1565A8;
  position: relative; min-height: 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  padding: .3rem .25rem; border: 0; border-radius: 14px;
  background: var(--c); color: #fff; cursor: pointer;
  font: inherit; font-weight: 900; font-size: clamp(.85rem, 1.6vh + .9cqw, 1.35rem); line-height: 1.12;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.18); transition: transform .1s, box-shadow .1s, background .2s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; overflow: hidden; overflow-wrap: normal; word-break: normal; hyphens: manual; text-align: center;
}
.jeu__case:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.jeu__case-kab { display: none; font-size: .78em; font-weight: 800; }
.jeu__case.est-trouve { background: #fff; color: var(--c); box-shadow: inset 0 0 0 3px var(--c); cursor: default; }
.jeu__case.est-trouve .jeu__case-kab { display: block; color: var(--encre, #12212E); }
.jeu__case.est-trouve::after { content: "✓"; position: absolute; top: .2rem; inset-inline-end: .4rem; font-size: .8rem; }
.jeu__case.est-faux { animation: jeu-secoue .35s; }
.jeu__case.est-indice { animation: jeu-indice .9s; }
@keyframes jeu-secoue { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes jeu-indice { 0%, 100% { box-shadow: inset 0 -5px 0 rgba(0,0,0,.18); } 50% { box-shadow: 0 0 0 5px var(--jaune, #F2B705); transform: scale(1.04); } }

/* ---------- Fin de partie : tient dans l'écran, la liste à revoir défile seule ---------- */
.jeu__fin { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .5rem; text-align: center; padding-bottom: .5rem; }
.jeu__fin-titre { margin: 0; font-size: clamp(1.3rem, 5cqw, 1.9rem); font-weight: 900; }
.jeu__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.jeu__stats > div { padding: .6rem .3rem; border-radius: 14px; background: var(--vert-clair, #E6F4EC); }
.jeu__stats strong { display: block; font-size: clamp(1.15rem, 5cqw, 1.6rem); font-weight: 900; color: var(--vert, #0C7D46); }
.jeu__stats span { font-size: .75rem; font-weight: 700; color: var(--ardoise, #5B6875); }
.jeu__fin .jeu__etiquette { margin: .2rem 0 0; }
.jeu__revoir { flex: 1 1 auto; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 0; text-align: start; }
.jeu__revoir li { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--brume, #E4E7EA); }
.jeu__mini { flex: none; border-radius: 50%; border: 0; background: var(--bleu-clair, #E8F2FA); font-size: 1rem; cursor: pointer; }
.jeu__fin-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: auto; }
.jeu__fin-actions .jeu__jouer, .jeu__fin-actions .jeu__secondaire { min-height: 3rem; font-size: 1rem; }

/* ---------- Écrans bas (petits téléphones, paysage) : on resserre ---------- */
@media (max-height: 700px) {
  .jeu__categories { grid-auto-rows: minmax(2.8rem, auto); gap: .35rem; }
  .jeu__categorie { padding: .3rem .4rem; }
  .jeu__categorie-icone { font-size: 1.2rem; }
  .jeu__categorie-nom { font-size: .84rem; }
  .jeu__categorie-trad { font-size: .68rem; }
  .jeu__categorie-fond { display: none; }
  .jeu__sous { display: none; }
  .jeu__puce { min-height: 2.3rem; }
  .jeu__jouer { min-height: 2.9rem; }
}

/* ---------- Grand écran ---------- */


@media (prefers-reduced-motion: reduce) {
  .jeu__case { transition: none; }
  .jeu__case.est-faux, .jeu__case.est-indice { animation: none; }
}

/* Page du jeu : pas de pied de page, l'écran reste au jeu (get_footer() reste appelé pour les scripts). */

/* ==========================================================================
   AMSELYA — URAREN — suite : accueil des jeux, réglages, plateaux
   S'appuie sur jeu.css (cadre sable, frise, puces, boutons, grille d'écoute, fin).
   Ici : l'accueil des jeux, l'écran de réglages (blocs colorés), les plateaux.
   Tout tient dans l'écran : le cadre prend la hauteur --dispo, rien ne défile.
   ========================================================================== */

.jx .jeu__cadre { overflow: hidden; position: relative; }


.jx-bandeau { position: absolute; left: 50%; bottom: 1rem; z-index: 21; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2rem); margin: 0; padding: .6rem 1rem; border-radius: 999px; background: #0C7D46; color: #fff; font-weight: 800; text-align: center; box-shadow: 0 10px 22px -12px rgba(0,0,0,.6); }

/* ---------- Accueil : une carte par jeu ---------- */
.jx-accueil { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .55rem; }
.jx-accueil__jeux {
  flex: 1; min-height: 0; display: grid; gap: .5rem;
  grid-template-columns: 1fr; grid-auto-rows: minmax(0, 1fr);
}
.jx-carte {
  --c: #1F7A3D;
  position: relative; overflow: hidden; min-width: 0; min-height: 0;
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: .7rem;
  padding: .5rem .9rem; border: 0; border-radius: 18px; text-align: start; font: inherit; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 72%, #fff) 0%, var(--c) 55%, color-mix(in srgb, var(--c) 80%, #000) 100%);
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.18), 0 8px 16px -12px rgba(0,0,0,.6);
  transition: transform .12s; -webkit-tap-highlight-color: transparent;
}
.jx-carte:hover { transform: translateY(-2px); }
.jx-carte:active { transform: translateY(1px); }
.jx-carte__fond { position: absolute; inset-inline-end: -.4rem; bottom: -1.2rem; font-size: 5.5rem; line-height: 1; opacity: .15; transform: rotate(-12deg); pointer-events: none; filter: grayscale(1) brightness(3); }
.jx-carte__icone { position: relative; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: rgba(255,255,255,.22); font-size: 1.7rem; line-height: 1; }
.jx-carte__textes { position: relative; display: flex; flex-direction: column; min-width: 0; }
.jx-carte__nom { font-weight: 900; font-size: 1.15rem; line-height: 1.15; text-shadow: 0 1px 1px rgba(0,0,0,.2); }
.jx-carte__kab { font-weight: 800; font-size: .78rem; opacity: .9; }
.jx-carte__desc { font-weight: 700; font-size: .8rem; line-height: 1.2; opacity: .92; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Réglages d'un jeu ---------- */
.jx-reglages { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .45rem; }
.jx-haut { flex: none; display: flex; align-items: center; gap: .4rem .5rem; flex-wrap: wrap; }
.jx-retour {
  flex: none; display: inline-flex; align-items: center; gap: .2rem; min-height: 2.4rem; padding: 0 .8rem;
  border: 2px solid #D4BC8C; border-radius: 999px; background: #fff; color: #1B2A22; font: inherit; font-weight: 900; font-size: .9rem; cursor: pointer;
}
.jx-haut__titre { margin: 0; min-width: 0; font-size: clamp(1.05rem, 4.5cqw, 1.5rem); font-weight: 900; color: var(--jx, #1B2A22); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jx-haut .jeu__entete-droite { margin-inline-start: auto; }

/* Blocs : un fond par menu. */
.jx-bloc { min-height: 0; padding: .45rem .5rem; border-radius: 16px; box-shadow: 0 6px 14px -10px rgba(0,0,0,.4); }
.jx-bloc--familles { --g: #0F4F8A; flex: 1; display: flex; flex-direction: column; gap: .35rem; background: #DCEBF8; border: 2px solid #B9D4EE; }
.jx-bloc--difficulte { --g: var(--jx, #1F6B35); flex: none; display: flex; flex-direction: column; gap: .35rem; background: var(--jx-fond, #D3EEDB); border: 2px solid color-mix(in srgb, var(--jx, #1F6B35) 30%, #fff); }
.jx-bloc__tete { flex: none; display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.jx-bloc__titre { margin: 0; font-size: .85rem; font-weight: 900; color: var(--g); white-space: nowrap; }
.jx-bloc__ligne { display: grid; grid-template-columns: 1fr; gap: .25rem; }
.jx-bloc--difficulte .jeu__puce { font-size: .85rem; }

.jx-pages { display: flex; align-items: center; gap: .3rem; }
.jx-pages__btn { border: 0; border-radius: 999px; background: #258255; color: #fff; font: inherit; font-size: 1.3rem; font-weight: 900; line-height: 1; cursor: pointer; }
.jx-pages__btn:disabled { opacity: .3; cursor: default; }
.jx-pages__num { font-weight: 900; font-size: .85rem; color: var(--g); min-width: 2.6rem; text-align: center; }

.jx-familles {
  --carte-h: 3.1rem;
  flex: 1; min-height: 0; overflow: hidden;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 3.1rem; gap: .4rem; align-content: start; padding: 3px;
}
.jx-familles .jeu__categorie { height: 3.1rem; padding: .3rem .45rem; grid-template-columns: auto 1fr; }
.jx-familles .jeu__categorie-icone { font-size: 1.25rem; }
.jx-familles .jeu__categorie-nom { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jx-familles .jeu__categorie-trad { font-size: .7rem; }

.jx-depart { flex: none; display: flex; flex-direction: column; align-items: stretch; gap: .3rem; }
.jx .jx-jouer { min-height: 3.1rem; background: linear-gradient(180deg, #2E9A55, #1F7A3D 60%, #17602F); }
.jx-jouer__detail { font-weight: 700; font-size: .85em; opacity: .9; }

/* ---------- Partie : cadre commun ---------- */
.jx__partie .jeu__barre { flex-wrap: nowrap; }
.jx-retour-jeux { background: #1B2A22; border-color: #1B2A22; color: #fff !important; }
.jx-fin-actions { grid-template-columns: 1fr 1fr 1fr; }
.jx .jeu__fin .jeu__jouer { background: linear-gradient(180deg, #2E9A55, #1F7A3D 60%, #17602F); }
/* ---------- Partie : cadre commun ---------- */
.jx__badge { display: inline-flex; align-items: center; justify-content: center;  border-radius: 50%; background: var(--c); font-size: 1.3rem; }
.jx__zone { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .4rem; }
.jx__outils { flex: none; display: flex; justify-content: center; gap: .4rem; }
.jx__outils .jeu__action span { display: inline; }
.jx__indice { margin: .2rem 0 0; text-align: center; font-size: clamp(1.15rem, 4cqw, 1.7rem); font-weight: 900; color: #1B2A22; }
.jx__rang { margin: 0; text-align: center; font-size: .82rem; font-weight: 800; color: #6B5A3C; }

/* ---------- 1. Mots mêlés ---------- */
.jx-mm { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: .45rem; }
.jx-mm__grille {
  justify-self: center; align-self: start; box-sizing: border-box;
  /* Carré : limité par la largeur et par la hauteur disponible (--dispo, mesurée par le script). */
  width: min(100%, calc(var(--dispo, 100vh) - 13.5rem)); aspect-ratio: 1 / 1;
  display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: repeat(var(--n), 1fr); gap: 2px;
  padding: 6px; border-radius: 14px; background: #fff; box-shadow: 0 8px 18px -12px rgba(0,0,0,.5);
}
.jx-mm__case {
  min-width: 0; min-height: 0; padding: 0; border: 1px dashed #D9CBAE; border-radius: 6px;
  background: #FFFDF8; color: #1B2A22; cursor: pointer;
  font: inherit; font-weight: 800; line-height: 1; font-size: clamp(.62rem, calc(62cqmin / var(--n) * .5), 1.35rem);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background .12s, color .12s;
}
.jx-mm__grille { -webkit-user-select: none; user-select: none; }
.jx-mm__case.est-choisi { background: #F57C00; border-color: #F57C00; color: #fff; }
.jx-mm__case.est-vert { background: #0C7D46; border-color: #0C7D46; color: #fff; }
.jx-mm__case.est-vert.est-choisi { background: #F57C00; border-color: #F57C00; }
/* Les cases restent toujours touchables, quoi que disent les autres styles du site. */
.jx .jx-mm__grille, .jx .jx-mm__case, .jx .jx-mc__case { pointer-events: auto !important; }
.jx-mm__case.est-faux { animation: jeu-secoue .35s; background: #FBD5D2; }

.jx-mm__liste {
  list-style: none; margin: 0; padding: 0; min-height: 0; overflow-y: auto; align-content: flex-start;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem;
}
.jx-mm__mot {
  display: inline-flex; align-items: baseline; gap: .3rem; padding: .25rem .6rem; border-radius: 999px;
  background: #fff; border: 2px solid #E2D4B5; cursor: pointer; font-size: .82rem; line-height: 1.2;
}
.jx-mm__mot strong { font-weight: 900; color: #1B2A22; letter-spacing: .03em; }
.jx-mm__mot span { font-weight: 700; color: #6B5A3C; font-size: .72rem; }
.jx-mm__mot.est-courant { background: #F57C00; border-color: #F57C00; box-shadow: 0 0 0 3px #FFD7A8; }
.jx-mm__mot.est-courant strong, .jx-mm__mot.est-courant span { color: #fff; }
.jx-mm__mot.est-trouve { background: #0C7D46; border-color: #0C7D46; cursor: default; }
.jx-mm__mot.est-trouve strong, .jx-mm__mot.est-trouve span { color: #fff; }
.jx-mm__mot.est-trouve strong { text-decoration: line-through; text-decoration-thickness: 2px; }

/* ---------- 2. Lettres mélangées (cases et tuiles, aussi utilisées par le pendu) ---------- */
.jx-lm, .jx-pe { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: .6rem; }
.jx-lm__cases { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem; }
.jx-lm__case {
  display: inline-flex; align-items: center; justify-content: center;
  width: clamp(1.6rem, calc(78cqw / var(--n)), 3.2rem); aspect-ratio: 1 / 1.1; box-sizing: border-box;
  border-radius: 10px; border: 2px dashed #C9B48A; background: rgba(255,255,255,.6);
  font-weight: 900; font-size: clamp(1rem, 4.5cqw, 1.6rem); color: #1B2A22;
}
.jx-lm__case.est-plein { border-style: solid; border-color: #F57C00; background: #fff; cursor: pointer; }
.jx-lm__cases.est-juste .jx-lm__case { border-color: #0C7D46; background: #0C7D46; color: #fff; }
.jx-lm__cases.est-faux { animation: jeu-secoue .35s; }
.jx-lm__cases.est-faux .jx-lm__case { border-color: #D4342A; background: #FBD5D2; }
.jx-lm__cases.est-revele .jx-lm__case { border-color: #D4342A; background: #fff; color: #D4342A; }
.jx-lm__tuiles { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.jx-lm__tuile {
  --c: #1565A8;
  min-width: 3rem; height: 3.2rem; padding: 0 .6rem; border: 0; border-radius: 14px;
  background: var(--c); color: #fff; cursor: pointer;
  font: inherit; font-weight: 900; font-size: clamp(1.15rem, 4.5cqw, 1.6rem);
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.18); -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.jx-lm__tuile:active { transform: translateY(2px); }
.jx-lm__tuile:disabled { opacity: .18; cursor: default; }

/* ---------- 3. Pendu ---------- */
.jx-pe__vies { color: #D4342A; letter-spacing: .1em; }
.jx-pe__clavier { display: grid; grid-template-columns: repeat(9, 1fr); gap: .3rem; max-width: 34rem; width: 100%; margin: 0 auto; }
.jx-pe__touche {
  min-width: 0; height: 2.6rem; padding: 0; border: 2px solid #D4BC8C; border-radius: 10px;
  background: #fff; color: #1B2A22; cursor: pointer; font: inherit; font-weight: 900; font-size: 1.05rem;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.jx-pe__touche.est-bon { background: #0C7D46; border-color: #0C7D46; color: #fff; }
.jx-pe__touche.est-mauvais { background: #EADFC8; border-color: #EADFC8; color: #9A8B6E; }
.jx-pe__touche:disabled { cursor: default; }

/* ---------- 4. Memory ---------- */
.jx-me__grille {
  flex: 1; min-height: 0; display: grid; gap: .4rem;
  grid-template-columns: repeat(var(--cols-mobile, 3), 1fr); grid-template-rows: repeat(var(--rows-mobile, 4), 1fr);
}
.jx-me__carte {
  --c: #1565A8;
  position: relative; min-width: 0; min-height: 0; padding: .3rem; border: 0; border-radius: 14px;
  background: var(--c); color: #fff; cursor: pointer; overflow: hidden;
  font: inherit; font-weight: 900; font-size: clamp(.8rem, 1.5vh + .8cqw, 1.25rem); line-height: 1.12; text-align: center;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.18); -webkit-tap-highlight-color: transparent; touch-action: manipulation; overflow-wrap: normal; word-break: normal; hyphens: manual;
}
.jx-me__dos { font-size: 1.6em; opacity: .55; }
.jx-me__face { display: none; }
.jx-me__carte.est-ouverte { background: #fff; color: #1B2A22; box-shadow: inset 0 0 0 3px #F57C00; }
.jx-me__carte.est-ouverte .jx-me__dos { display: none; }
.jx-me__carte.est-ouverte .jx-me__face { display: block; }
.jx-me__carte.est-trouve { background: #D8F5E1; color: #0B5A33; box-shadow: inset 0 0 0 3px #2EB872; cursor: default; }
.jx-me__carte.est-trouve::after { content: "✓"; position: absolute; top: .3rem; inset-inline-end: .5rem; font-size: .9rem; color: #2EB872; }

.jx-son-mini { display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; padding: 0; border: 0; border-radius: 50%; background: #1B7FC4; color: #fff; font-size: 1rem; cursor: pointer; vertical-align: middle; }
.jx-son-mini span { display: none; }
.jx-son { background: #1B7FC4; border-color: #1B7FC4; color: #fff !important; }

/* ---------- 5. Mots croisés ---------- */
.jx-mc { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .4rem; }
.jx-mc__plateau { flex: 1; min-height: 0; display: flex; gap: .6rem; }
.jx-mc__cadre { flex: 1; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; }
.jx-mc__grille { --t: 28px; display: grid; grid-template-columns: repeat(var(--w), var(--t)); grid-template-rows: repeat(var(--h), var(--t)); gap: 2px; }
.jx-mc__vide { display: block; }
.jx-mc__case {
  position: relative; min-width: 0; min-height: 0; padding: 0; border: 2px solid #C9B48A; border-radius: 6px;
  background: #fff; color: #1B2A22; cursor: pointer; font: inherit; font-weight: 900; line-height: 1;
  font-size: calc(var(--t) * .55); -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.jx-mc__num { position: absolute; top: 1px; inset-inline-start: 2px; font-size: max(.5rem, calc(var(--t) * .26)); font-weight: 800; color: #6B5A3C; line-height: 1; }
.jx-mc__case.est-donne { background: #F1E6CC; color: #6B5A3C; }
.jx-mc__case.est-mot { background: #FFE3C2; border-color: #F57C00; }
.jx-mc__case.est-curseur { background: #F57C00; border-color: #F57C00; color: #fff; }
.jx-mc__case.est-curseur .jx-mc__num { color: #fff; }
.jx-mc__case.est-vert { background: #D8F5E1; border-color: #2EB872; color: #0B5A33; }
.jx-mc__case.est-faux { animation: jeu-secoue .35s; background: #FBD5D2; border-color: #D4342A; }
.jx-mc__liste { display: none; }
.jx-mc__barre { flex: none; display: flex; align-items: center; gap: .4rem; padding: .25rem; border-radius: 999px; background: #fff; box-shadow: 0 6px 14px -10px rgba(0,0,0,.4); --g: #B0306A; }
.jx-mc__indice { flex: 1; min-width: 0; margin: 0; text-align: center; font-weight: 800; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jx-mc__indice strong { color: #F57C00; }
.jx-mc__clavier { flex: none; }
.jx-mc__clavier .jx-pe__touche { height: 2.35rem; }
.jx-mc__touche { background: #FFE3C2; border-color: #F57C00; }
.jx-me__carte.est-trouve .jx-me__face { display: block; }
.jx-me__carte.est-trouve .jx-me__dos { display: none; }


/* ---------- Grand écran ---------- */


@media (max-height: 700px) {
  .jx-carte__desc { display: none; }
  .jx-carte__icone { width: 2.4rem; height: 2.4rem; font-size: 1.3rem; }
  .jx-reglages .jeu__note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .jx-mm__case.est-faux, .jx-lm__cases.est-faux, .jx-mc__case.est-faux { animation: none; }
  .jx-carte { transition: none; }
}





/* Mots mêlés : la grille prend exactement la place disponible (ni sur la consigne, ni sur les boutons). */


/* ---------- Téléphone : barre de partie sur une ligne, mots mêlés en grand ---------- */
/* (identique sur ordinateur) */
  /* Barre : tout tient dans la largeur (plus rien de caché à droite). */
  .jx__partie .jeu__barre { gap: .3rem; }
  .jx__partie .jx__badge, .jx__partie .jeu__score-mot { display: none; }
  .jx__partie .jeu__score, .jx__partie .jeu__chrono { font-size: .95rem; }
  .jx__partie .jeu__actions { gap: .25rem; margin-inline-start: auto; }
  .jx__partie .jeu__action { min-width: 2.3rem; height: 2.3rem; padding: 0 .4rem; font-size: .95rem; }
  .jx__partie .jx__outils .jeu__action { height: 2.6rem; padding: 0 .9rem; }
  .jx__partie .jeu__chrono { margin-inline-start: 0; }

  /* Accueil des jeux : jamais de carte coupée (navigateurs aux barres hautes, bandeaux) ;
     si la place manque, la liste défile au lieu d'écraser les cartes. */
  .jx-accueil__jeux { grid-auto-rows: minmax(min-content, 1fr); overflow-y: auto; overscroll-behavior: contain; padding-bottom: 2px; }
  .jx-carte { padding-block: .45rem; }

  /* Mots mêlés : le mot à chercher en étiquette orange ; la grille prend toute la hauteur. */
  .jx__partie--mm .jeu__message:not(.jeu__message--bravo):not(.jeu__message--rate) { display: none; }
  .jx__partie--mm .jeu__message--bravo, .jx__partie--mm .jeu__message--rate {
    position: absolute; top: 3.4rem; left: 50%; z-index: 6; transform: translateX(-50%); max-width: 90%;
    margin: 0; padding: .25rem .9rem; border-radius: 999px; background: #fff; box-shadow: 0 6px 14px -8px rgba(0,0,0,.5);
  }
  .jx-mm__cible {
    flex: none; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: .5rem;
    margin: .3rem 0 .1rem; padding: .35rem .75rem .45rem; border-radius: 16px;
    background: #107946; color: #fff; box-shadow: 0 0 0 3px #FFD7A8, 0 8px 16px -10px rgba(0,0,0,.5);
  }
  .jx-mm__cible-etiquette { grid-column: 1 / -1; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
  .jx-mm__cible-ligne { min-width: 0; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
  .jx-mm__cible-mot { font-size: 1.45rem; font-weight: 900; letter-spacing: .04em; line-height: 1.1; }
  .jx-mm__cible-trad { font-size: .95rem; font-weight: 700; opacity: .95; }
  .jx-mm__cible-lettres { padding: .15rem .55rem; border-radius: 999px; background: rgba(255,255,255,.25); font-weight: 900; font-size: .9rem; white-space: nowrap; }
  .jx-mm { container-type: size; grid-template-rows: minmax(0, 1fr); }
  .jx-mm__liste { display: none; }
  /* Grille étirée en hauteur : cases plus hautes que larges, plus faciles à toucher. */
  .jx-mm__grille { width: 100cqw; height: min(100cqh, 100cqw * 1.45); aspect-ratio: auto; max-width: 100%; align-self: start; padding: 4px; }
  .jx-mm__case { font-size: clamp(.9rem, calc(100cqw / var(--n) * .55), 1.6rem); }



/* Écoute et Memory sur téléphone : le texte suit la taille des cases (beaucoup de
   cases = police plus petite), jamais coupé. */
/* (identique sur ordinateur) */
  .jeu__grille, .jx-me__grille { container-type: size; }
  .jeu__case, .jx-me__carte {
    font-size: clamp(.62rem, min(calc(100cqw / var(--cols-mobile, 3) * .18), calc(100cqh / var(--rows-mobile, 4) * .3)), 1.3rem);
    line-height: 1.1; overflow-wrap: normal; word-break: normal; hyphens: manual;
  }


/* ==========================================================================
   AWALNUT — habillage
   ========================================================================== */
.aw-page .jeu__cadre { width: 100%; max-width: 44rem; margin: 0 auto; container-type: inline-size; }
.aw-page .jeu__cadre.est-plein { min-height: 0; }
.jeu__note { flex: none; }

/* ---------- En-tête : ciel, soleil, montagnes, frise ---------- */
.aw-tete {
  position: relative; flex: none; overflow: hidden; isolation: isolate;
  padding: .7rem .8rem 1.15rem; border-radius: 18px; border: 2px solid #E2D3AE;
  background: linear-gradient(180deg, #D7ECF6 0%, #EAF3EE 45%, #F6EFD9 100%);
  box-shadow: 0 8px 18px -14px rgba(18,33,46,.6);
}
.aw-tete__soleil { position: absolute; z-index: -1; top: .7rem; inset-inline-end: 4.2rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: #F8DE8D; box-shadow: 0 0 0 6px rgba(248,222,141,.35); }
.aw-tete__monts, .aw-tete__monts::after { position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 62%; content: ""; }
.aw-tete__monts { background: #BCD3C5; clip-path: polygon(0 62%, 14% 30%, 27% 58%, 41% 12%, 56% 52%, 70% 24%, 84% 50%, 100% 18%, 100% 100%, 0 100%); opacity: .85; }
.aw-tete__monts::after { background: #A8C6B4; clip-path: polygon(0 80%, 18% 52%, 33% 74%, 50% 40%, 66% 72%, 82% 46%, 100% 70%, 100% 100%, 0 100%); }
.aw-tete__frise {
  position: absolute; left: 0; right: 0; bottom: 0; height: 11px;
  border-top: 3px solid #1F4F9A;
  background: repeating-linear-gradient(-45deg, #D9452B 0 9px, #F2B705 9px 18px);
}
.aw-tete__haut { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.aw-tete__logo { flex: none; width: 3.5rem; height: 3.5rem; padding: .25rem; border-radius: 16px; background: #fff; box-shadow: 0 6px 14px -9px rgba(0,0,0,.45); object-fit: contain; }
.aw-tete__titres { min-width: 0; }
.aw-tete__titre { margin: 0; font-size: clamp(1.7rem, 8cqw, 2.5rem); font-weight: 900; line-height: 1; letter-spacing: .02em; text-transform: uppercase; color: #1B4F9C; text-shadow: 0 2px 0 rgba(255,255,255,.7); }
.aw-tete__sous { margin: .2rem 0 0; font-size: clamp(.95rem, 4cqw, 1.2rem); font-weight: 800; color: #1B2A22; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-tete__bas { display: flex; align-items: center; gap: .4rem; margin-top: .6rem; }
.aw-tete .jeu__langues .jeu__puce { min-height: 2.3rem; min-width: 2.7rem; font-size: .95rem; }
.aw-tete .jeu__langues .jeu__puce[aria-pressed="true"] { background: #1B4F9C; border-color: #1B4F9C; }
.aw-tete .jeu__compteurs { border-radius: 999px; padding: .2rem .5rem; }
.aw-roue {
  flex: none; margin-inline-start: auto; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; padding: 0;
  border: 2px solid #E2D3AE; border-radius: 50%; background: #fff; color: #1B4F9C; font-size: 1.35rem; line-height: 1; cursor: pointer;
}
.aw-retour {
  flex: none; display: inline-flex; align-items: center; gap: .2rem; min-height: 2.5rem; padding: 0 .9rem;
  border: 2px solid #E2D3AE; border-radius: 999px; background: #fff; color: #1B2A22; font-weight: 900; font-size: 1rem; cursor: pointer;
}
.aw-tete--jeu .aw-tete__logo { width: 2.9rem; height: 2.9rem; border-radius: 13px; }
.aw-tete--jeu .aw-tete__titre { font-size: clamp(1.35rem, 6cqw, 2rem); }
.aw-tete--jeu .aw-tete__sous { font-size: clamp(.9rem, 3.6cqw, 1.1rem); color: #1B4F9C; }
@container (max-width: 380px) {
  .aw-tete__logo { width: 2.8rem; height: 2.8rem; }
  .aw-tete--jeu .aw-tete__logo { display: none; }
  .aw-tete .jeu__compteur span { display: none; }
}

/* ---------- Accueil : grandes cartes de jeux ---------- */
.jx-accueil { gap: .6rem; }
.jx-accueil__jeux { gap: .55rem; }
.jx-carte { border-radius: 20px; padding: .55rem 1rem; column-gap: .9rem; }
.jx-carte__icone { width: 3.4rem; height: 3.4rem; font-size: 1.9rem; }
.jx-carte__nom { font-size: clamp(1.15rem, 5cqw, 1.6rem); }
.jx-carte__desc { font-size: clamp(.8rem, 3.2cqw, 1rem); white-space: normal; }
.jx-carte__fond { font-size: 6.5rem; inset-inline-end: .4rem; bottom: -1.6rem; }

/* ---------- Réglages : familles en tuiles (3 colonnes), difficulté, Jouer ---------- */
.jx-reglages { gap: .55rem; }
.jx-familles { --carte-h: 5.6rem; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 5.6rem; gap: .5rem; padding: 4px; }
.jx-familles .jeu__categorie {
  height: 5.6rem; grid-template-columns: 1fr; grid-template-rows: auto auto; justify-items: center; align-content: center; row-gap: .15rem;
  padding: .35rem .3rem; text-align: center; border-radius: 16px;
}
.jx-familles .jeu__categorie-icone { font-size: 1.6rem; }
.jx-familles .jeu__categorie-textes { align-items: center; max-width: 100%; }
.jx-familles .jeu__categorie-nom { font-size: clamp(.78rem, 3.3cqw, 1rem); white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.12; }
.jx-familles .jeu__categorie-trad { font-size: clamp(.68rem, 2.8cqw, .85rem); }
.jx-familles .jeu__categorie[aria-pressed="true"] { box-shadow: 0 0 0 3px #12212E, 0 10px 18px -10px var(--c); border-color: #fff; }
.jx-bloc__titre { font-size: 1.05rem; }
.jx-bloc--difficulte .jeu__puce { min-height: 2.8rem; font-size: 1rem; }
.jx .jx-jouer, .jx .jeu__fin .jeu__jouer {
  min-height: 3.4rem; border-radius: 22px; font-size: 1.4rem;
  background: linear-gradient(180deg, #2C7FD0, #1B5FA8 60%, #154C88); box-shadow: inset 0 -5px 0 rgba(0,0,0,.18), 0 10px 22px -12px #1B5FA8;
}

/* ---------- Partie ---------- */
.jx-retour-jeux { min-width: 2.7rem; border-radius: 50%; }
.jeu__action { border-radius: 999px; }

/* Mot éclair (sans audio) : le mot à traduire, en grand */
.aw-cible { flex: none; margin: 0; padding: .35rem .6rem; border-radius: 16px; background: #fff; box-shadow: 0 6px 14px -10px rgba(0,0,0,.4);
  text-align: center; font-size: clamp(1.4rem, 7cqw, 2.2rem); font-weight: 900; letter-spacing: .03em; color: #1B4F9C; min-height: 3.2rem; line-height: 2.4rem; white-space: nowrap; overflow: hidden; }
.aw-cible:empty { visibility: hidden; }

/* ---------- Réglages (roue) ---------- */
.aw-panneau { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(27,42,34,.55); border-radius: inherit; }
.aw-panneau__carte { position: relative; width: min(100%, 22rem); display: flex; flex-direction: column; gap: .6rem; padding: 1.3rem 1.1rem 1.1rem; border-radius: 18px; background: #FFFDF8; border: 3px solid #1B4F9C; box-shadow: 0 20px 40px -18px rgba(0,0,0,.6); text-align: center; }
.aw-panneau__titre { margin: 0; font-size: 1.3rem; font-weight: 900; color: #1B2A22; }
.aw-panneau__txt { margin: 0; font-size: .95rem; font-weight: 600; color: #4A3B22; line-height: 1.4; }
.aw-panneau__fermer { position: absolute; top: .45rem; inset-inline-end: .45rem; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #6B5A3C; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.aw-panneau .jeu__secondaire { min-height: 2.8rem; font-size: .95rem; }

/* Focus clavier visible partout */
.aw-page button:focus-visible { outline: 3px solid #F2B705; outline-offset: 2px; }
@media (max-height: 640px) {
  .aw-tete { padding-bottom: 1rem; }
  .aw-tete__logo { width: 2.8rem; height: 2.8rem; }
  .aw-tete__bas { margin-top: .4rem; }
  .jx-familles { --carte-h: 4.4rem; grid-auto-rows: 4.4rem; }
  .jx-familles .jeu__categorie { height: 4.4rem; }
  .jx-familles .jeu__categorie-icone { font-size: 1.2rem; }
}

/* Mots jamais coupés : le texte rétrécit (awalnut.js) au lieu de passer à la ligne au milieu d'un mot. */
.jeu__case, .jx-me__carte, .jx-mm__mot, .aw-cible, .jx-mc__indice, .jx__indice { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: normal; word-break: normal; }

/* ---------- Page du site (avec l'en-tête et le menu d'Amselya) ----------
   Le jeu prend la hauteur sous l'en-tête (--sm-entete-h, mesurée par header.php) :
   la page ne défile pas, le pied de page est masqué (comme le Jeu des mots). */
.aw-site .jeu { height: calc(100vh - var(--sm-entete-h, 4.5rem)); height: calc(100dvh - var(--sm-entete-h, 4.5rem)); padding: 8px 8px max(8px, env(safe-area-inset-bottom)); }
.admin-bar.aw-site .jeu { height: calc(100dvh - var(--sm-entete-h, 4.5rem) - 32px); }
@media (max-width: 782px) { .admin-bar.aw-site .jeu { height: calc(100dvh - var(--sm-entete-h, 4.5rem) - 46px); } }
.aw-site .sm-bas { display: none; }
/* Écrans peu hauts (portable 768 px, téléphone + barre du navigateur) : cartes resserrées, les six jeux restent visibles. */
@media (max-height: 860px) {
  .aw-site .jx-accueil { gap: .45rem; }
  .aw-site .jx-accueil__jeux { gap: .4rem; }
  .aw-site .jx-carte { padding-block: .3rem; }
  .aw-site .jx-carte__icone { width: 2.6rem; height: 2.6rem; font-size: 1.4rem; }
  .aw-site .jx-carte__nom { font-size: clamp(1.05rem, 4.4cqw, 1.35rem); }
  .aw-site .jx-carte__desc { font-size: clamp(.74rem, 2.9cqw, .88rem); }
}

/* Mots à revoir : bouton 🔊 pour réécouter chaque mot (tous les jeux). */
.jeu__revoir .jeu__mini { width: 2.4rem; height: 2.4rem; padding: 0; display: grid; place-items: center; font-size: 1.1rem; cursor: pointer; }