:root {
    --bg-top: #0b162b;
    --bg-bottom: #132a46;
    --surface: rgba(9, 21, 38, 0.78);
    --surface-strong: rgba(9, 21, 38, 0.95);
    --line: #f3f7ff;
    --text-main: #f5f9ff;
    --text-soft: #d6e3f8;
    --accent: #ff9f1c;
    --accent-dark: #d57800;
    --ok: #48c78e;
    --shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: "Anton", sans-serif;
    color: var(--text-main);
    letter-spacing: 1.2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 159, 28, 0.15), transparent 35%),
        radial-gradient(circle at 82% 10%, rgba(72, 199, 142, 0.15), transparent 35%),
        linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

header {
    width: min(1100px, 96vw);
    height: 260px;
    margin-top: 22px;
    border-radius: 28px 28px 0 0;
    border: 3px solid var(--accent);
    border-bottom: none;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.15)), url("../../assets/images/baniere.png");
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.jeu-contenant {
    width: min(1100px, 96vw);
    min-height: 640px;
    padding: 34px clamp(16px, 4vw, 44px) 88px;
    position: relative;
    border: 3px solid var(--accent);
    border-top: none;
    border-radius: 0 0 28px 28px;
    margin-bottom: 36px;
    overflow: hidden;
    background:
        linear-gradient(to bottom, rgba(4, 10, 20, 0.58), rgba(4, 10, 20, 0.78)),
        url("../../assets/images/paradis-terrestre.jpg") center bottom / cover no-repeat;
    box-shadow: var(--shadow);
}

.jeu-contenant > p {
    max-width: 64ch;
    margin: 14px 0 18px;
    color: var(--text-soft);
}

.figure-contenant {
    width: min(280px, 58vw);
    height: auto;
    display: block;
    margin-top: 18px;
    stroke: var(--line);
    stroke-width: 4px;
    stroke-linecap: round;
    fill: transparent;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.figure-partie {
    display: none;
}

.mauvaises-lettres-contenant {
    position: absolute;
    top: 34px;
    right: clamp(14px, 2.4vw, 32px);
    width: min(240px, 42vw);
    min-height: 170px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 14px;
    background: var(--surface);
    backdrop-filter: blur(2px);
    text-align: left;
}

.mauvaises-lettres-contenant p {
    margin-bottom: 8px;
    color: var(--text-soft);
    letter-spacing: 1px;
    text-transform: uppercase;
}

#mauvaises-lettres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mauvaises-lettres-contenant span {
    min-width: 30px;
    height: 32px;
    padding: 2px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #ffd9d2;
    background: rgba(151, 38, 38, 0.32);
}

.mot {
    display: flex;
    gap: 6px;
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 34px);
    overflow-x: auto;
    padding-bottom: 4px;
}

.lettre {
    border-bottom: 3px solid var(--line);
    display: inline-flex;
    font-size: clamp(1.55rem, 3.8vw, 2.1rem);
    align-items: center;
    justify-content: center;
    height: 52px;
    min-width: 24px;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.popup-contenant {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.42);
    z-index: 2000;
}

.popup {
    width: min(460px, 94vw);
    padding: 30px 24px;
    text-align: center;
    border-radius: 16px;
    border: 2px solid var(--accent);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.popup h2 {
    margin: 0;
    font-size: clamp(1.3rem, 3vw, 1.95rem);
}

.popup button {
    cursor: pointer;
    margin-top: 20px;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    letter-spacing: 1px;
    color: #1f1f1f;
    background: linear-gradient(180deg, #ffd28a, var(--accent));
    box-shadow: 0 6px 0 var(--accent-dark);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.popup button:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 0 var(--accent-dark);
}

.popup button:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 var(--accent-dark);
}

.popup button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.notification-contenant {
    position: fixed;
    left: 50%;
    bottom: -90px;
    transform: translateX(-50%);
    padding: 14px 22px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(15, 30, 52, 0.92);
    transition: bottom 0.3s ease;
    z-index: 2100;
}

.notification-contenant p {
    color: #ffe2bf;
}

.notification-contenant.afficher {
    bottom: 20px;
}

footer {
    width: min(1100px, 96vw);
    margin-bottom: 18px;
    padding: 8px 12px;
    border-radius: 14px;
    border-top: 3px solid var(--accent);
    background: rgba(4, 18, 36, 0.75);
    display: flex;
    justify-content: flex-end;
}

#contact {
    margin: 0;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-main);
    background: rgba(58, 120, 185, 0.45);
}

#contact a {
    color: #ffd28a;
}

#contact a:hover {
    color: #ffe3b3;
}

@media (max-width: 900px) {
    .jeu-contenant {
        min-height: 740px;
    }

    .mauvaises-lettres-contenant {
        position: static;
        width: 100%;
        min-height: auto;
        margin-top: 22px;
    }

    .figure-contenant {
        margin-inline: auto;
    }
}

@media (max-width: 560px) {
    header {
        height: 184px;
        border-radius: 22px 22px 0 0;
    }

    .jeu-contenant {
        padding: 22px 12px 94px;
        border-radius: 0 0 22px 22px;
    }

    h1 {
        letter-spacing: 1px;
    }

    p {
        font-size: 0.95rem;
    }

    .mot {
        justify-content: flex-start;
        left: 12px;
        right: 12px;
        transform: none;
    }
}