/* =========================
   RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

/* =========================
   OVERLAY GLOBAL
========================= */

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1;
}

/* =========================
   PAGE 1 - ACCUEIL
========================= */

.home {
    background: url('img/bg1.jpg') center center no-repeat;
    background-size: contain; /* respecte le format */
    background-color: #000;   /* bandes noires propres */
    min-height: 100vh;
    display: flex;
    align-items: flex-end;    /* contenu en bas */
    justify-content: center;
    padding-bottom: 50px;
    position: relative;
}

.cta-wrapper {
    position: relative;
    z-index: 2;
    max-width: 750px;
    padding: 25px;
    background: rgba(0,0,0,0.65);
    border-radius: 16px;
    backdrop-filter: blur(6px);
    text-align: center;
}

/* =========================
   BOUTON PRINCIPAL
========================= */

.cta-button {
    display: inline-block;
    padding: 20px 30px;
    background: linear-gradient(135deg, #000, #222);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    animation: pulse 2.5s infinite;
}

.cta-button:hover {
    transform: scale(1.05);
}

/* Animation pulsation */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* =========================
   TEXTES CTA
========================= */

.cta-subtext,
.cta-counter,
.cta-stats {
    margin-top: 10px;
    font-size: 14px;
    opacity: 0.9;
}

.cta-counter {
    font-weight: bold;
    color: #ff4444;
}

.cta-stats {
    font-size: 13px;
}

.cta-deadline {
    margin-top: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #ffcc00;
}

.cta-deadline span {
    font-size: 18px;
    color: #ffffff;
    background: rgba(0,0,0,0.6);
    padding: 4px 8px;
    border-radius: 6px;
    margin: 0 3px;
}

/* =========================
   PAGE 2 - ENIGME
========================= */

.enigme {
    background: url('img/bg2.jpg') center center no-repeat;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    justify-content: flex-end;  /* formulaire à droite */
    align-items: center;
    padding: 0 8%;
    position: relative;
}

/* =========================
   FORMULAIRE
========================= */

.form-container {
    position: relative;
    z-index: 2;
    width: 420px;
    max-width: 95%;
    background: rgba(255,255,255,0.96);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    color: #000;
    animation: slideIn 0.8s ease forwards;
}

.form-container h2 {
    margin-bottom: 20px;
    text-align: center;
}

input,
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
}

textarea {
    resize: none;
    height: 120px;
}

button {
    width: 100%;
    padding: 14px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s ease;
}

button:hover {
    background: #222;
}

/* Animation entrée formulaire */
@keyframes slideIn {
    from {
        transform: translateX(80px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {

    .home {
        background-size: cover;
        align-items: center;
        padding-bottom: 0;
    }

    .cta-wrapper {
        margin: 20px;
    }

    .enigme {
        justify-content: center;
        padding: 20px;
    }

    .form-container {
        width: 100%;
    }
}