:root {
    --bg-gradient-start: #1a212b;
    --bg-gradient-end: #2c3644;
    --cream: #f2e9dc;
    --dusty-rose: #dcaba5;
    --dusty-rose-dark: #c48f89;
    --sauge: #adc0a8;
    --sauge-dark: #8ea589;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    background: linear-gradient(160deg, var(--bg-gradient-start), var(--bg-gradient-end));
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: var(--cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4vh 4vw;
    text-align: center;
    gap: 3vh;
    overflow-x: hidden;
}

.mise-en-page {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5vw;
    width: 100%;
    max-width: 1400px;
}

@keyframes deroulement {
    from {
        opacity: 0;
        transform: translateY(-30px);
        clip-path: inset(0 0 100% 0);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0 0 0% 0);
    }
}

@keyframes glissement-gauche {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glissement-droite {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes deplacement-degrade {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

h1,
p.sous-titre,
.conteneur-jeu,
.copyright {
    animation: deroulement 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--dusty-rose);
    letter-spacing: 0.06em;
    background: linear-gradient(120deg, var(--dusty-rose), var(--cream) 60%, var(--dusty-rose));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: deroulement 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) both,
               deplacement-degrade 4s linear infinite;
}

p.sous-titre {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--cream);
    opacity: 0.85;
    max-width: 500px;
    animation-delay: 0.15s;
}

.conteneur-jeu {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.3));
    padding: 1.5vh 1.5vw;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
    border: 2px solid var(--dusty-rose-dark);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    animation-delay: 0.3s;
}

.conteneur-jeu:hover {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--dusty-rose);
    transform: translateY(-3px);
}

iframe {
    width: min(90vw, 480px);
    height: min(70vw, 360px);
    border: none;
    border-radius: 8px;
    display: block;
}

.box-laterale {
    flex: 1 1 220px;
    max-width: 260px;
    min-width: 180px;
    padding: 2vh 1.4vw;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    text-align: left;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    gap: 1vh;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.box-laterale:hover {
    transform: translateY(-3px);
}

.box-laterale h2 {
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.box-laterale p,
.box-laterale li {
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    opacity: 0.85;
    line-height: 1.5;
}

.box-laterale ul {
    padding-left: 1.1em;
}

.box-instructions {
    background: linear-gradient(160deg, rgba(168, 187, 163, 0.2), rgba(0, 0, 0, 0.3));
    border: 2px solid var(--sauge-dark);
    animation: glissement-gauche 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) 0.45s both;
}

.box-instructions:hover {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--sauge);
}

.box-instructions h2 {
    color: var(--sauge);
}

.box-notes {
    background: linear-gradient(160deg, rgba(216, 167, 161, 0.2), rgba(0, 0, 0, 0.3));
    border: 2px solid var(--dusty-rose-dark);
    animation: glissement-droite 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) 0.45s both;
}

.box-notes:hover {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--dusty-rose);
}

.box-notes h2 {
    color: var(--dusty-rose);
}

.copyright {
    position: absolute;
    bottom: 2vh;
    left: 0;
    width: 100%;

    font-size: clamp(0.7rem, 1vw, 0.85rem);
    color: var(--cream);
    opacity: 0.55;
    letter-spacing: 0.04em;
    text-align: center;

    animation: deroulement 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) 0.6s both;
}

.message-mobile {
    display: none;
    position: fixed;
    inset: 0;
    background: linear-gradient(160deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--cream);
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6vh 8vw;
    z-index: 999;
}

.message-mobile p {
    font-size: clamp(1.1rem, 5vw, 1.6rem);
    line-height: 1.6;
}

.message-mobile.actif {
    display: flex;
}

body.mobile-bloque > *:not(.message-mobile) {
    display: none;
}

@media (max-width: 900px) {
    .mise-en-page {
        flex-direction: column;
    }
    .box-laterale {
        max-width: 480px;
        width: 90vw;
    }
}

@media (prefers-reduced-motion: reduce) {
    h1, p.sous-titre, .conteneur-jeu, .box-laterale, .copyright {
        animation: none;
    }
}