:root {
    --vh: 100%;
    --vh2: 80%;
}

@media screen and (max-width: 768px) {
    :root {
        --vh: 100vh;
        --vh2: 80vh;
    }
}

.screen-container,
.screen {
    height: calc(var(--vh));
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: url('images/plage.jpeg') center center no-repeat;
    background-size: cover;
    color: #002244;
    font-size: 16px;
    height: calc(var(--vh, 1vh) * 100);
    /* ✅ corrige le problème sur iOS */
    box-sizing: border-box;
}


.screen-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: calc(var(--vh, 1vh) * 100);
    /* ✅ corrige le problème sur iOS */
    box-sizing: border-box;
    border-radius: 16px;
    overflow-y: scroll;
}

.screen {
    position: absolute;
    top: 10vh;
    bottom: 10vh;
    left: 100%;
    width: 80%;
    padding: 2rem;
    height: calc(var(--vh, 1vh) * 80);
    /* ✅ corrige le problème sur iOS */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    margin: auto;
    /* box-shadow: 0 0 20px rgba(0,0,0,0.2); */
    transition: left 0.5s ease-in-out;
    box-sizing: border-box;
}

.screen {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* important */
}

.screen.active,
.screen.final {
    left: 10%;
}

button {
    margin-top: 2rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background: #0057b8;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #003f91;
}

h1,
h2 {
    text-align: center;
    color: #001a33;
    text-transform: uppercase;
}

form {
    display: flex;
    flex-direction: column;
    width: 80%;
    max-width: 300px;
    margin: auto;
}

form label {
    margin-top: 1rem;
    font-weight: bold;
}

form input {
    padding: 0.5rem;
    font-size: 1rem;
    margin-top: 0.5rem;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.img-defi {
    max-width: 100%;
    max-height: 30vh;
    border-radius: 8px;
    margin: 1rem 0;
}

#etat-validation {
    transition: opacity 0.5s ease, color 0.5s ease;
}

#anniversaire-etape1,
#anniversaire-etape2 {
    text-align: center;
}