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

body {
    font-family: Arial, sans-serif;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center; /* Desktop centré */
    overflow: hidden;
}

/* Images background */
.bg-desktop,
.bg-mobile {
    position: fixed;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.bg-mobile {
    display: none;
}

/* Container principal */
.layout {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Bloc blanc */
.card {
    background: white;
    padding: 18px;
    border-radius: 18px;
    width: 100%;
    max-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    text-align: center;
}

/* Texte haut */
.top-text {
    font-size: 15px;
    margin-bottom: 10px;
    font-weight: bold;
}

/* Form */
form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Champ email */
input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 13px;
}

/* Bouton */
button {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    border: none;
    background: black;
    color: white;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s ease;
}

button:hover {
    opacity: 0.85;
}

/* Message succès */
#successMessage {
    margin-top: 8px;
    font-size: 13px;
    font-weight: bold;
}

/* ========================= */
/*           MOBILE          */
/* ========================= */
@media (max-width: 768px) {
  
  body {
        min-height: 100svh; /* corrige espace blanc mobile */
        height: auto;
    }


    .bg-desktop {
        display: none;
    }

    .bg-mobile {
        display: block;
    }

    /* 🔥 Bloc blanc ajusté + remonté uniquement */
    .card {
        width: auto;
        max-width: none;
        padding: 12px 16px;
        border-radius: 14px;
        display: inline-block;
        transform: translateY(260px); /* ajuste ici si besoin */
    }

    .top-text {
        font-size: 13px;
        margin-bottom: 8px;
    }

    /* 🔥 Champs email plus compacts */
    input[type="text"] {
        width: 170px;
        padding: 6px;
        font-size: 12px;
        margin-bottom: 6px;
    }

    button {
        width: 170px;
        padding: 6px;
        font-size: 12px;
    }

    #successMessage {
        font-size: 12px;
        margin-top: 6px;
    }
}