/* =============================================================================
   DISCERN — Jeu ENTREMOTS : mascottes Gaspard (corbeau, ambre) et Goupil (renard, turquoise)
   =============================================================================
   Fichier  : css/entremots_mascottes.css, chargé après css/entremots.css
   Principe : les mascottes restent DISCRÈTES. Le duo n'apparaît en grand qu'à l'accueil et en fin de partie ;
              ailleurs, une petite tête ronde signale simplement qui parle.
   Images   : img/ENTREMOTS/mascottes/*.png (fond transparent) ; têtes : gaspard_tete.png, goupil_tete.png
              (carrés, visage centré : un « médaillon » centré par construction).
   Préfixe  : entremots-mascottes, entremots-voix.
   ============================================================================= */

/* --- Duo d'accueil et de fin de partie : posé sur un halo, comme s'il se tenait dans le décor ------- */
.entremots-mascottes { position: relative; margin: 0 auto 2px; text-align: center; }
.entremots-mascottes::before {                      /* lueur au sol : ambre à gauche, turquoise à droite */
    content: ""; position: absolute; left: 50%; bottom: 2%; width: 78%; height: 26%; transform: translateX(-50%);
    background: radial-gradient(closest-side, color-mix(in srgb, var(--ambre, #F0A542) 32%, transparent), color-mix(in srgb, var(--turquoise, #4EC5B5) 18%, transparent) 60%, transparent);
    filter: blur(14px); pointer-events: none;
}
.entremots-mascottes__duo {
    position: relative; display: block; margin: 0 auto; width: auto; height: auto; max-width: 74%; max-height: min(28vh, 240px);
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.3)); animation: entremots-mascottes-respire 6s ease-in-out infinite;
}
.entremots-mascottes--fin .entremots-mascottes__duo { max-height: min(30vh, 260px); }
.entremots-mascottes__bulle {                       /* simple légende italique encadrée de deux filets, sans pastille */
    position: relative; display: block; margin: 6px auto 0; padding: 0; background: none; box-shadow: none;
    font-style: italic; font-size: 15.5px; line-height: 1.35; color: var(--os, #F4EFE6); opacity: 0.92;
}
.entremots-mascottes__bulle::before, .entremots-mascottes__bulle::after { content: ""; display: inline-block; width: 26px; height: 1px; margin: 0 10px; vertical-align: middle; background: currentColor; opacity: 0.5; }
@keyframes entremots-mascottes-respire { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* --- Médaillon : tête centrée dans un disque crème, fin anneau de la couleur du personnage -- */
.entremots-voix {
    flex: none; display: inline-block; width: 32px; height: 32px; margin-right: 10px; vertical-align: middle;
    border-radius: 50%; background-color: var(--carte-creme, #F7F3EE); background-repeat: no-repeat;
    background-size: 84%; background-position: 50% 50%;
    box-shadow: 0 0 0 1.5px var(--ambre, #F0A542);
}
.entremots-voix--gaspard { background-image: url("../img/ENTREMOTS/mascottes/gaspard_tete.png"); box-shadow: 0 0 0 1.5px var(--ambre, #F0A542); }
.entremots-voix--goupil  { background-image: url("../img/ENTREMOTS/mascottes/goupil_tete.png");  box-shadow: 0 0 0 1.5px var(--turquoise, #4EC5B5); }

/* Dans les titres de la restitution : le médaillon précède le titre, aligné sur sa ligne */
.entremots-eg-bloc h4, .entremots-bloc h4, .entremots-savoir summary { display: flex; align-items: center; }
.entremots-eg-bloc h4 .entremots-voix, .entremots-bloc h4 .entremots-voix, .entremots-savoir summary .entremots-voix { width: 30px; height: 30px; }

/* --- Écran « passe le téléphone » : une réplique discrète --------------------------- */
.entremots-passage__replique { display: flex; align-items: center; justify-content: center; gap: 0; min-height: 34px; margin: 14px auto 0; max-width: 90%; font-style: italic; font-size: 15.5px; line-height: 1.4; opacity: 0.92; text-align: left; }

/* Quand un médaillon précède un titre de la restitution, la petite puce de pôle devient inutile */
.entremots-bloc h4 .entremots-voix + i { display: none; }

@media (prefers-reduced-motion: reduce) { .entremots-mascottes__duo, .entremots-logo__image { animation: none; } }

/* --- Dialogues Gaspard / Goupil (règles, guide) : deux répliques, chacune précédée de sa tête ------- */
.entremots-dialogue { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 4px; }
.entremots-dialogue__ligne { display: flex; align-items: flex-start; margin: 0; font-size: 15.5px; line-height: 1.45; }
.entremots-dialogue__ligne .entremots-voix { margin-top: 1px; }
.entremots-dialogue__texte { padding: 7px 14px; border-radius: 4px 16px 16px 16px; background: rgba(244, 239, 230, 0.08); border: 1px solid rgba(244, 239, 230, 0.14); }
.entremots-dialogue__ligne--gaspard .entremots-dialogue__texte { border-left: 3px solid var(--ambre, #F0A542); font-style: italic; }
.entremots-dialogue__ligne--goupil .entremots-dialogue__texte { border-left: 3px solid var(--turquoise, #4EC5B5); }
.entremots-guide .entremots-dialogue { margin-bottom: 16px; }
.entremots-guide .entremots-dialogue__texte { background: rgba(26, 31, 45, 0.05); border-color: rgba(26, 31, 45, 0.12); color: var(--encre, #1A1F2D); }
/* Fenêtre de définition : la tête précède le mot et la définition */
.entremots-definition__terme .entremots-voix, .entremots-definition__texte .entremots-voix { width: 26px; height: 26px; margin-right: 8px; }
