/* ============================================================
   LE GRAND DÉPART — styles globaux
   Palette OM : bleu ciel, blanc, or — fond bleu nuit.
   ============================================================ */

:root {
    --om-bleu: #2FAEE0;
    --om-bleu-clair: #7FD4F5;
    --om-nuit: #071B33;
    --om-nuit-2: #0D2C50;
    --or: #F5C542;
    --blanc: #FFFFFF;
    --rouge: #E74C3C;
    --vert: #2ECC71;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(ellipse 90% 50% at 50% -10%, rgba(255, 255, 255, 0.18), transparent 60%),
        radial-gradient(ellipse 70% 45% at 12% 100%, rgba(255, 255, 255, 0.12), transparent 65%),
        linear-gradient(170deg, #0E4D7E 0%, #1173AD 45%, #2FAEE0 100%);
    background-attachment: fixed;
    color: var(--blanc);
    min-height: 100vh;
    min-height: 100dvh;
    overscroll-behavior: none;
}

/* Ballons et éclairs qui flottent en fond d'écran */
.fond-anim { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.fond-anim span {
    position: absolute;
    bottom: -70px;
    opacity: 0.13;
    animation: flotte-haut linear infinite;
}
@keyframes flotte-haut {
    to { transform: translateY(-130vh) rotate(360deg); }
}

button { font-family: inherit; }

/* ---------- Barre du haut (HUD) ---------- */
#hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 2px solid var(--om-bleu);
    position: sticky;
    top: 0;
    z-index: 50;
}
.hud-retour {
    color: var(--om-bleu-clair);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}
.hud-titre {
    font-weight: 800;
    font-size: 0.95rem;
    text-align: center;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hud-droite { display: flex; align-items: center; gap: 8px; }
.hud-batterie { font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.hud-mute {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    font-size: 1rem;
    padding: 2px 7px;
    cursor: pointer;
    color: var(--blanc);
}

/* ---------- Boutons ---------- */
.btn {
    display: block;
    width: 100%;
    padding: 14px 18px;
    margin-top: 12px;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.1s, filter 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-principal {
    background: linear-gradient(180deg, var(--om-bleu-clair), var(--om-bleu));
    color: var(--om-nuit);
    animation: lueur 2.2s infinite;
}
@keyframes lueur {
    0%, 100% { box-shadow: 0 4px 14px rgba(47, 174, 224, 0.45); }
    50% { box-shadow: 0 4px 26px rgba(47, 174, 224, 0.85); }
}
.btn-secondaire {
    background: rgba(255, 255, 255, 0.12);
    color: var(--blanc);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ---------- Overlay (intro / victoire / défaite) ---------- */
#overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 14, 28, 0.86);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 100;
    backdrop-filter: blur(3px);
}
#overlay.visible { display: flex; }
.overlay-boite {
    background: linear-gradient(180deg, #10355e, #0B2544);
    border: 2px solid var(--om-bleu);
    border-radius: 20px;
    padding: 24px 20px;
    max-width: 540px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.6);
    animation: apparition 0.3s ease-out;
}
@keyframes apparition {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}
.overlay-boite h2 { color: var(--om-bleu-clair); margin-bottom: 10px; font-size: 1.4rem; }
.overlay-boite p { line-height: 1.5; margin-bottom: 8px; }
.fin-emoji {
    font-size: 3rem;
    margin-bottom: 6px;
    animation: saut-emoji 0.9s ease-in-out infinite alternate;
}
@keyframes saut-emoji {
    from { transform: translateY(0); }
    to   { transform: translateY(-9px); }
}
.fin-message { font-size: 1.02rem; }
.fin-score { color: var(--or); font-size: 1.05rem; }
.intro-regles {
    text-align: left;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 12px 0;
    font-size: 0.95rem;
    line-height: 1.6;
}
.intro-lieu { font-style: italic; color: var(--om-bleu-clair); font-size: 0.92rem; }

/* Barre de batterie */
.fin-batterie { margin: 14px 0 4px; }
.fin-batterie-txt { font-size: 0.95rem; margin-bottom: 6px; }
.barre {
    height: 16px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.barre-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--om-bleu), var(--om-bleu-clair));
    border-radius: 10px;
    transition: width 1.2s ease-out;
    position: relative;
    overflow: hidden;
}
.barre-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 25%, rgba(255,255,255,0.55) 50%, transparent 75%);
    transform: translateX(-100%);
    animation: brillance 2.4s infinite;
}
@keyframes brillance {
    to { transform: translateX(100%); }
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 80px);
    background: var(--om-nuit);
    border: 2px solid var(--or);
    color: var(--blanc);
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    max-width: 90vw;
    text-align: center;
    z-index: 200;
    opacity: 0;
    transition: transform 0.35s, opacity 0.35s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.toast.visible { transform: translate(-50%, 0); opacity: 1; }

/* ============================================================
   PAGE D'ACCUEIL — carte du road-trip
   ============================================================ */
.accueil { max-width: 680px; margin: 0 auto; padding: 24px 12px 40px; position: relative; z-index: 1; }

.accueil-header { text-align: center; margin-bottom: 20px; }
.accueil-header .drapeaux { font-size: 1.6rem; letter-spacing: 6px; }
.accueil-header .drapeaux span { display: inline-block; animation: vague 1.6s infinite ease-in-out; }
.accueil-header .drapeaux span:nth-child(2) { animation-delay: 0.2s; }
.accueil-header .drapeaux span:nth-child(3) { animation-delay: 0.4s; }
.accueil-header .drapeaux span:nth-child(4) { animation-delay: 0.6s; }
@keyframes vague {
    0%, 100% { transform: translateY(0) rotate(-7deg); }
    50% { transform: translateY(-7px) rotate(7deg); }
}
.accueil-header h1 {
    font-size: clamp(2rem, 9vw, 3rem);
    font-weight: 900;
    background: linear-gradient(90deg, var(--blanc) 0%, var(--om-bleu-clair) 30%, var(--blanc) 50%, var(--om-bleu) 75%, var(--blanc) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.05;
    margin: 6px 0;
    animation: reflet 5s linear infinite;
}
@keyframes reflet {
    from { background-position: 0% 0; }
    to   { background-position: 200% 0; }
}

/* L'écharpe de supporter */
.echarpe {
    height: 12px;
    max-width: 340px;
    margin: 14px auto;
    border-radius: 999px;
    background: repeating-linear-gradient(90deg, var(--om-bleu) 0 22px, var(--blanc) 22px 44px);
    box-shadow: 0 2px 12px rgba(47, 174, 224, 0.45);
}
.accueil-header .sous-titre { color: var(--om-bleu-clair); font-weight: 700; font-size: 1.05rem; }
.accueil-header .tagline { color: rgba(255,255,255,0.75); font-style: italic; margin-top: 6px; font-size: 0.95rem; }

.batterie-carte {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 22px;
}
.batterie-carte .ligne {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    margin-bottom: 8px;
    font-size: 0.98rem;
}
.batterie-carte .destination { color: rgba(255,255,255,0.7); font-size: 0.85rem; margin-top: 8px; text-align: center; }

/* Étapes du trajet */
.trajet { position: relative; padding-left: 34px; }

/* La petite Tesla blanche qui descend la route */
.voiture-blanche {
    position: absolute;
    left: -3px;
    top: 0;
    width: 40px;
    z-index: 5;
    transition: top 1.8s cubic-bezier(0.45, 0.05, 0.35, 1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.55));
    animation: roule 0.5s infinite ease-in-out alternate;
    pointer-events: none;
}
@keyframes roule {
    from { transform: translateX(-1.5px) rotate(-1deg); }
    to   { transform: translateX(1.5px) rotate(1deg); }
}
.trajet::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 10px;
    bottom: 10px;
    width: 4px;
    border-radius: 2px;
    background: repeating-linear-gradient(180deg, #FFFFFF 0 14px, rgba(7, 27, 51, 0.4) 14px 24px);
}
.etape {
    position: relative;
    display: block;
    background: linear-gradient(135deg, rgba(9, 42, 75, 0.62), rgba(13, 58, 100, 0.45));
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    padding: 14px 14px 12px;
    margin-bottom: 14px;
    color: var(--blanc);
    text-decoration: none;
    transition: transform 0.12s, border-color 0.2s;
    animation: arrivee-etape 0.5s both;
}
@keyframes arrivee-etape {
    from { opacity: 0; transform: translateX(-18px); }
    to   { opacity: 1; transform: none; }
}
.etape::before {
    content: attr(data-point);
    position: absolute;
    left: -34px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--om-nuit);
    border: 2px solid var(--om-bleu);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}
.etape.jouable { border-color: var(--or); box-shadow: 0 0 18px rgba(245, 197, 66, 0.25); animation: pulse 1.8s infinite; }
.etape.jouable:active { transform: scale(0.98); }
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(245, 197, 66, 0.15); }
    50% { box-shadow: 0 0 22px rgba(245, 197, 66, 0.4); }
}
.etape.faite { border-color: var(--vert); opacity: 0.92; }
.etape.verrouillee { opacity: 0.45; pointer-events: none; filter: grayscale(0.6); }
.etape .etape-haut { display: flex; align-items: center; gap: 10px; }
.etape .etape-emoji { font-size: 1.7rem; }
.etape .etape-titre { font-weight: 800; font-size: 1.05rem; flex: 1; }
.etape .etape-statut { font-size: 1.1rem; }
.etape .etape-lieu { color: rgba(255,255,255,0.65); font-size: 0.85rem; margin-top: 5px; font-style: italic; }

.etape-finale { text-align: center; }
.etape-finale .etape-titre { color: var(--or); }

.accueil-footer { text-align: center; margin-top: 26px; color: rgba(255,255,255,0.9); font-size: 0.85rem; line-height: 1.6; text-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.accueil-footer button {
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 8px;
}

/* ============================================================
   PAGES DE JEU — génériques
   ============================================================ */
.page-jeu #jeu { max-width: 720px; margin: 0 auto; padding: 12px 8px; }

.stats-jeu {
    display: flex;
    justify-content: space-around;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    text-align: center;
}
.stats-jeu .valeur { color: var(--or); }

canvas.plein {
    display: block;
    width: 100%;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.consigne-jeu {
    text-align: center;
    color: rgba(255,255,255,0.92);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    font-size: 0.85rem;
    margin-top: 10px;
    font-style: italic;
}

/* ---------- Jeu 1 : bureau ---------- */
.bureau-grille {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: linear-gradient(180deg, #8B5A2B, #6E4520);
    border: 3px solid #4d2f14;
    border-radius: 16px;
    padding: 12px;
    min-height: 46vh;
}
.bureau-case {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 84px;
}
.bureau-item {
    border: none;
    background: none;
    font-size: 2.6rem;
    cursor: pointer;
    animation: pop 0.18s ease-out;
    line-height: 1;
    padding: 8px;
}
.bureau-item:active { transform: scale(0.85); }
@keyframes pop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}
.collegue-banniere {
    position: fixed;
    inset: 0;
    background: rgba(4, 14, 28, 0.9);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.collegue-boite {
    background: #10355e;
    border: 3px solid var(--or);
    border-radius: 20px;
    padding: 22px;
    text-align: center;
    max-width: 380px;
    animation: apparition 0.25s ease-out;
}
.collegue-boite .grand { font-size: 3rem; }
.collegue-boite p { margin: 10px 0; font-weight: 700; line-height: 1.4; }

/* ---------- Jeu 3 : memory ---------- */
.memory-grille {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.carte-memory {
    aspect-ratio: 3 / 4;
    perspective: 600px;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}
.carte-interieur {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.4s;
    transform-style: preserve-3d;
}
.carte-memory.retournee .carte-interieur,
.carte-memory.trouvee .carte-interieur { transform: rotateY(180deg); }
.carte-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px;
}
.carte-dos {
    background: linear-gradient(135deg, var(--om-bleu), #1B7FB0);
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--blanc);
}
.carte-avant {
    background: var(--blanc);
    color: var(--om-nuit);
    transform: rotateY(180deg);
    border: 2px solid var(--om-bleu);
    text-align: center;
}
.carte-avant .maillot-mini { font-size: 1.5rem; }
.carte-avant .nom { font-weight: 900; font-size: 0.72rem; text-transform: uppercase; }
.carte-avant .detail { font-size: 0.58rem; color: #666; }
.carte-memory.trouvee .carte-avant { background: #d9f7e8; border-color: var(--vert); }

/* ---------- Jeu 4 : quiz ---------- */
.quiz-boite {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 18px;
}
.quiz-progression { font-size: 0.85rem; color: var(--om-bleu-clair); font-weight: 800; margin-bottom: 10px; }
.quiz-question { font-size: 1.15rem; font-weight: 800; line-height: 1.45; margin-bottom: 16px; }
.quiz-choix {
    display: block;
    width: 100%;
    text-align: left;
    padding: 13px 15px;
    margin-bottom: 9px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: var(--blanc);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.quiz-choix:active { background: rgba(47, 174, 224, 0.3); }
.quiz-choix.bonne { background: rgba(46, 204, 113, 0.35); border-color: var(--vert); }
.quiz-choix.mauvaise { background: rgba(231, 76, 60, 0.35); border-color: var(--rouge); }
.quiz-choix:disabled { cursor: default; }
.quiz-info {
    background: rgba(0, 0, 0, 0.3);
    border-left: 4px solid var(--or);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 10px;
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ============================================================
   PAGE FINALE — maillot + diplôme
   ============================================================ */
.final-scene {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 12px 50px;
    text-align: center;
    position: relative;
    z-index: 2;
}
#confettis {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.final-scene h1 {
    font-size: clamp(1.7rem, 7.5vw, 2.6rem);
    font-weight: 900;
    color: var(--or);
    margin-bottom: 8px;
    text-shadow: 0 3px 12px rgba(0,0,0,0.5);
}
.final-scene .final-texte { font-size: 1.05rem; line-height: 1.6; margin: 12px 0; }
.final-etape { display: none; animation: apparition 0.5s ease-out; }
.final-etape.visible { display: block; }

/* Le maillot floqué */
.maillot-scene {
    margin: 26px auto;
    width: 260px;
    animation: descente 1s ease-out, flotter 3.5s 1.2s ease-in-out infinite alternate;
}
@keyframes flotter {
    from { transform: translateY(0) rotate(0deg); }
    to   { transform: translateY(-10px) rotate(1.2deg); }
}
@keyframes descente {
    from { transform: translateY(-60px) scale(0.7); opacity: 0; }
    to   { transform: none; opacity: 1; }
}
.maillot {
    position: relative;
    width: 260px;
    height: 300px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F2FAFF 70%, #E8F6FF 100%);
    clip-path: polygon(30% 0, 40% 5%, 60% 5%, 70% 0, 100% 13%, 90% 32%, 81% 27%, 81% 100%, 19% 100%, 19% 27%, 10% 32%, 0 13%);
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
    color: var(--om-bleu);
}
.maillot .col {
    position: absolute;
    top: 0;
    left: 30%;
    width: 40%;
    height: 5%;
    background: var(--om-bleu);
    clip-path: polygon(0 0, 25% 100%, 75% 100%, 100% 0);
}
.maillot .manche-g, .maillot .manche-d {
    position: absolute;
    top: 12%;
    width: 12%;
    height: 12%;
    background: var(--om-bleu);
}
.maillot .manche-g { left: 1%; transform: rotate(28deg); }
.maillot .manche-d { right: 1%; transform: rotate(-28deg); }
.maillot .flocage-nom {
    position: absolute;
    top: 26%;
    width: 100%;
    text-align: center;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.maillot .flocage-num {
    position: absolute;
    top: 37%;
    width: 100%;
    text-align: center;
    font-weight: 900;
    font-size: 6.2rem;
    line-height: 1;
}
.maillot .flocage-surnom {
    position: absolute;
    bottom: 7%;
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    font-style: italic;
    color: #6BA8C9;
}

/* Le diplôme */
.diplome {
    background: linear-gradient(160deg, #FFFDF5, #F7EFD8);
    color: #2C2416;
    border: 6px double var(--or);
    border-radius: 6px;
    padding: 26px 20px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.diplome .diplome-entete { font-size: 0.8rem; letter-spacing: 3px; text-transform: uppercase; color: #8a7340; }
.diplome h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    margin: 10px 0 2px;
    color: #1a3a5c;
}
.diplome .diplome-promo { font-style: italic; color: #8a7340; margin-bottom: 14px; font-size: 0.95rem; }
.diplome .diplome-nom {
    font-family: Georgia, serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: #0D2C50;
    margin: 8px 0;
}
.diplome .diplome-surnom { font-style: italic; font-size: 1rem; margin-bottom: 14px; color: #555; }
.diplome ul { list-style: none; text-align: left; margin: 14px 0; }
.diplome li {
    padding: 7px 0 7px 26px;
    position: relative;
    font-size: 0.93rem;
    line-height: 1.45;
    border-bottom: 1px dashed rgba(138, 115, 64, 0.3);
}
.diplome li::before { content: "⚽"; position: absolute; left: 0; top: 7px; font-size: 0.85rem; }
.diplome .diplome-signature { font-style: italic; font-size: 0.85rem; margin-top: 14px; color: #6b5a33; }
.diplome .diplome-tampon {
    display: inline-block;
    margin-top: 12px;
    border: 3px solid var(--om-bleu);
    color: var(--om-bleu);
    border-radius: 50%;
    padding: 16px 10px;
    font-weight: 900;
    font-size: 0.75rem;
    transform: rotate(-12deg);
    letter-spacing: 1px;
}

/* Buffalo Grill : la danse des petits indiens */
.danse {
    font-size: 2.4rem;
    letter-spacing: 14px;
    margin: 18px 0;
}
.danse.en-fete span, .danse.en-fete { animation: danser 0.45s infinite alternate ease-in-out; }
@keyframes danser {
    from { transform: translateY(0) rotate(-4deg); }
    to   { transform: translateY(-14px) rotate(4deg); }
}
.petite-note { font-style: italic; font-size: 0.85rem; color: rgba(255,255,255,0.65); }
.cache { display: none; }

/* La boîte rouge */
.boite-rouge {
    position: relative;
    width: 170px;
    height: 140px;
    margin: 26px auto 14px;
    animation: rebond 1.3s infinite ease-in-out;
    filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.5));
}
@keyframes rebond {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px) rotate(-1.5deg); }
}
.boite-corps {
    position: absolute;
    bottom: 0;
    left: 5px;
    width: 160px;
    height: 95px;
    background: linear-gradient(180deg, #E03131, #A61212);
    border-radius: 8px;
}
.boite-couvercle {
    position: absolute;
    top: 22px;
    left: 0;
    width: 170px;
    height: 34px;
    background: linear-gradient(180deg, #F04A4A, #C42020);
    border-radius: 7px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}
.boite-ruban {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 118px;
    background: linear-gradient(180deg, var(--or), #d9a832);
    border-radius: 4px;
}
.boite-ruban::before {
    content: "🎀";
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
}

/* Impression : seulement le diplôme */
@media print {
    body { background: #fff; }
    body * { visibility: hidden; }
    .diplome, .diplome * { visibility: visible; }
    .diplome { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; }
}

/* Petits écrans : maximiser l'espace utile */
@media (max-width: 600px) {
    .accueil { padding: 14px 6px 30px; }
    .page-jeu #jeu { padding: 8px 4px; }
    .final-scene { padding: 16px 6px 40px; }
    .overlay-boite { padding: 18px 12px; border-radius: 16px; }
    .etape { padding: 12px 10px 10px; }
    .batterie-carte { padding: 10px 10px; }
    .stats-jeu { padding: 8px 6px; font-size: 0.9rem; }
    .bureau-grille { padding: 8px; gap: 7px; }
    .memory-grille { gap: 5px; }
    .quiz-boite { padding: 12px 10px; }
}

/* Grand écran : on aère un peu */
@media (min-width: 700px) {
    .page-jeu #jeu { padding-top: 24px; }
    .accueil { padding-top: 40px; }
}

/* ---------- Bouton de Mute Flottant (Musique de fond) ---------- */
.floating-mute {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 999;
    background: rgba(13, 44, 80, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(47, 174, 224, 0.4);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
    color: var(--blanc);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s, border-color 0.2s;
}

.floating-mute:hover {
    background: rgba(47, 174, 224, 0.8);
    border-color: var(--om-bleu-clair);
    transform: scale(1.1);
}

.floating-mute:active {
    transform: scale(0.9);
}

/* Cacher le bouton flottant lors de l'impression */
@media print {
    .floating-mute { display: none !important; }
}
