/* Style pour chaque ligne de mondes */
.world-row {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 72px;
    flex-wrap: wrap;
}
/* Style pour le bouton reset (même couleur que le titre) */
.reset-btn, button.reset-btn {
    background: #10817D !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px;
    padding: 8px 24px;
    font-size: 1em;
    font-family: 'Montserrat', 'Segoe UI', 'Arial', sans-serif;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 12px #10817d22;
    transition: background 0.18s, box-shadow 0.18s;
}
.reset-btn:hover, button.reset-btn:hover {
    background: #0c6a65 !important;
    box-shadow: 0 4px 24px #10817d33;
}
html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    /* background: #f6f7fa; */
    font-family: sans-serif;
}
#launch-screen {
    position: fixed;
    left: 0; top: 0;
    width: 100vw;
    height: 100vh;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    flex-direction: column;
}
#launch-screen img {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    position: absolute;
    left: 0;
    top: 0;
}
#launching-text {
    position: absolute;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    color: #fff;
    font-family: sans-serif;
    font-size: 1.5em;
    letter-spacing: 0.08em;
    text-shadow: 0 2px 8px #000a;
    z-index: 100001;
    background: rgba(34,34,34,0.5);
    padding: 8px 28px;
    border-radius: 16px;
    pointer-events: none;
    user-select: none;
}
#container {
    min-height: 100vh;
    min-width: 100vw;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* background: #10817D; */
    padding-top: 5vh;
    box-sizing: border-box;
}
#welcome-title {
    font-size: clamp(1.7em, 4.5vw, 2.7em);
    font-weight: bold;
    margin-bottom: 10vh;
    color: #10817D;
    font-family: 'Montserrat', 'Segoe UI', 'Arial', sans-serif;
    letter-spacing: 0.06em;
    text-shadow: 0 4px 24px #0001;
    text-align: center;
}

#world-grid {
    /* ...existing code... */
    margin-top: 20px;
}
/* Correction : le JS gère les lignes, on laisse le layout flex par défaut */
#world-grid {
    display: block;
    width: 96vw;
    max-width: 1100px;
    margin-bottom: 4vh;
    padding-left: 2vw;
    padding-right: 2vw;
}
@media (max-width: 900px) {
    #container {
        padding-top: 2vh;
    }
    #welcome-title {
        font-size: clamp(1.3em, 4vw, 2.2em);
        margin-bottom: 3vh;
    }
    #world-grid {
        width: 99vw;
        max-width: 100vw;
        padding-left: 3vw;
        padding-right: 3vw;
    }
    .world-btn {
        width: 38vw;
        height: 38vw;
        min-width: 80px;
        min-height: 80px;
        max-width: 120px;
        max-height: 120px;
    }
    .world-btn img {
        width: 80%;
        height: 80%;
        min-width: 48px;
        min-height: 48px;
        max-width: 100px;
        max-height: 100px;
    }
}
@media (max-width: 600px) {
    #container {
        padding-top: 1vh;
    }
    #welcome-title {
        font-size: clamp(1em, 3vw, 1.3em);
        margin-bottom: 2vh;
    }
    #world-grid {
        width: 99vw;
        padding-left: 5vw;
        padding-right: 5vw;
    }
    .world-btn {
        width: 46vw;
        height: 46vw;
        min-width: 48px;
        min-height: 48px;
        max-width: 80px;
        max-height: 80px;
    }
    .world-btn img {
        width: 80%;
        height: 80%;
        min-width: 32px;
        min-height: 32px;
        max-width: 64px;
        max-height: 64px;
    }
}
.world-btn {
    padding: 0;
    width: 170px;
    height: 170px;
    border-radius: 22px;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    /* Supprime tout style hérité du parent grid */
    box-sizing: border-box;
}
#world-grid > .world-btn {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    outline: none !important;
}
#world-grid > .world-btn:focus,
#world-grid > .world-btn:active,
#world-grid > .world-btn:hover {
    border: none !important;
    outline: none !important;
    background: none !important;
    box-shadow: none !important;
    transition: none;
}
.world-btn img {
    width: 155px;
    height: 155px;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
    object-fit: contain;
    margin: 0;
    transition: box-shadow 0.2s, background 0.2s, width 0.2s, height 0.2s;
    border: none;
}
.world-btn:hover img,
.world-btn:focus img,
.world-btn:active img {
    box-shadow: 0 4px 24px #10817d33;
    background: rgba(16,129,125,0.10);
    border: none;
    transition: box-shadow 0.18s, background 0.18s, width 0.18s, height 0.18s;
}
@media (max-width: 900px) {
    .world-btn {
        width: 38vw;
        height: 38vw;
        min-width: 80px;
        min-height: 80px;
        max-width: 120px;
        max-height: 120px;
    }
    .world-btn img {
        width: 80%;
        height: 80%;
        min-width: 48px;
        min-height: 48px;
        max-width: 100px;
        max-height: 100px;
    }
}
@media (max-width: 600px) {
    .world-btn {
        width: 46vw;
        height: 46vw;
        min-width: 48px;
        min-height: 48px;
        max-width: 80px;
        max-height: 80px;
    }
    .world-btn img {
        width: 80%;
        height: 80%;
        min-width: 32px;
        min-height: 32px;
        max-width: 64px;
        max-height: 64px;
    }
}
.world-btn:focus,
.world-btn:active {
    border: none !important;
    outline: none !important;
    background: none !important;
    box-shadow: none !important;
}
.world-btn div {
    color: #10817D;
}
button.world-btn {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    outline: none !important;
}
#mail-icon {
    position: fixed;
    bottom: 24px;
    right: 32px;
    z-index: 2000;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: none;
    padding: 0;
    transition: box-shadow 0.2s;
}
#mail-icon img {
    width: 64px;
    height: 64px;
    display: block;
}
#mail-icon:hover {
    box-shadow: none;
}
#mail-popup {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #0007;
    z-index: 3000;
    align-items: center;
    justify-content: center;
}
#mail-popup-content {
    background: #fff;
    border-radius: 18px;
    padding: 32px 24px 24px 24px;
    min-width: 260px;
    box-shadow: 0 4px 32px #0004;
    position: relative;
    font-family: sans-serif;
}
#mail-popup-close {
    position: absolute;
    top: 8px;
    right: 16px;
    font-size: 2em;
    color: #888;
    cursor: pointer;
    user-select: none;
}
#block-mobile-popup {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

/* Taille et style du titre des mondes */
 .world-btn > div:first-of-type {
    font-size: 1.3em;
    font-weight: bold;
    color: #10817D;
    text-align: center;
    margin-top: 10px;
    /* margin-bottom: 10px; */
}

/* Taille et style des scores */
.world-btn .score {
    font-size: 1.2em;
    color: #10817D;
    /* opacity: 0.8; */
    text-align: center;
    margin-top: 4px;
    margin-bottom: 32px;
}

