/* Conteneur général du quiz */
.wp-abc-quiz {
    margin: 1.5rem 0;
    padding: 1.5rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e0e7ff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    position: relative;
}

/* Question individuelle : fond blanc, cadre bleu léger */
.abc-quiz-question {
    margin-bottom: 1.5rem;
    padding: 1.2rem 1.4rem;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #dbeafe;
}

/* Texte de la question */
.quiz-header {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
    color: #1f2933;
}

/* Zone de partition */
.abc-render-area,
.answer-abc {
    margin: 0.6rem 0 0.8rem;
}

/* Ligne de la réponse ABC avec son bouton */
.answer-abc-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Boutons de contrôle (play, voir/masquer, fullscreen) – style "pill" bleu */
.abc-controls button,
.abc-fullscreen,
.abc-show-answer,
.abc-play-answer {
    border: none;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    background: #eff6ff;
    color: #1d4ed8;
    transition: background 0.15s ease, transform 0.1s ease;
}

.abc-controls button:hover,
.abc-fullscreen:hover,
.abc-show-answer:hover,
.abc-play-answer:hover {
    background: #dbeafe;
    transform: translateY(-1px);
}

/* Boutons play/stop (question + réponse)
   -> look "pill" bleu conservé, icône dessinée en CSS pour éviter les emojis */
.abc-play,
.abc-play-answer {
    position: relative;
    font-size: 0; /* on cache le texte éventuel, l'icône vient du ::before */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
}

/* Icône "play" (triangle) – par défaut */
.abc-play::before,
.abc-play-answer::before {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-left: 10px solid #1d4ed8;      /* triangle */
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

/* Icône "stop" (carré) quand la lecture est en cours */
.abc-play.is-playing::before,
.abc-play-answer.is-playing::before {
    border: none;
    width: 10px;
    height: 10px;
    background: #1d4ed8;
    border-radius: 2px;
}

/* Bouton plein écran : graphique, sans texte */
.abc-fullscreen {
    float: right;
    margin-bottom: 0.8rem;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Icône graphique pour le plein écran (rectangle / flèches) */
.abc-fullscreen::before {
    content: "⛶"; /* entrer en plein écran */
    font-size: 1.2rem;
}

/* Icône pour sortir du plein écran */
.abc-fullscreen.fs-exit::before {
    content: "⤢";
}

/* Zone de réponse (texte + ABC) en jaune pâle */
.abc-answer {
    margin-top: 0.8rem;
    padding: 0.8rem 1rem;
    background: #fff9d7;
    border-radius: 8px;
    border-left: 4px solid #facc15;
    color: #4b5563;
}

/* Texte de réponse */
.answer-text {
    margin-bottom: 0.4rem;
}

/* Plein écran natif : style appliqué quand l'élément est en fullscreen
   (la classe .fullscreen-mode est gérée par le JS via fullscreenchange) */
.wp-abc-quiz.fullscreen-mode {
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    width: 100vw;
    height: 100vh;
    max-width: none;
    padding: 2rem;
    background: #f3f4ff;
    font-size: 1.1rem;
    box-sizing: border-box;
    overflow: auto;
}

/* En plein écran, centrer les questions avec une largeur max */
.wp-abc-quiz.fullscreen-mode .abc-quiz-question {
    max-width: 900px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* En plein écran, le bouton fullscreen reste toujours visible en haut à droite */
.wp-abc-quiz.fullscreen-mode .abc-fullscreen {
    position: fixed;
    top: 12px;
    right: 16px;
    margin-bottom: 0;
    z-index: 1000;
}

/* Nettoyage flottant du bouton fullscreen en mode normal */
.wp-abc-quiz::after {
    content: "";
    display: block;
    clear: both;
}

/* --- Cacher le bouton plein écran sur les petits écrans (smartphones) --- */
@media (max-width: 700px) {
    .abc-fullscreen {
        display: none;
    }
}
