/* Police d'écriture de google */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital@1&family=Poppins:wght@400;500;600&display=swap');

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

/* Change la couleur de la selection des textes */
::selection {
    color: #fff;
    background: #00ffcc;
}

/* Style du body - FOND ADAPTÉ AU THÈME */
body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a1e 0%, #1a1a3e 50%, #2a2a5e 100%);
}

.wrapper {
    position: relative;
    max-width: 485px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 255, 204, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wrapper h3 {
    color: #00ffcc;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 5px;
}

/* Préparer la position du captcha */
.wrapper .captcha-area {
    display: flex;
    height: 65px;
    margin: 30px 0 20px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.captcha-area .captcha-img {
    height: 100%;
    flex: 1;
    user-select: none;
    background: #000;
    border-radius: 10px;
    position: relative;
}

.captcha-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    opacity: 0.95;
}

/* Style de l'écriture dans l'image captcha */
.captcha-img .captcha {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    color: #ffffffea;
    font-size: 35px;
    text-align: center;
    letter-spacing: 10px;
    transform: translate(-50%, -50%);
    text-shadow: 0px 0px 2px #b1b1b1;
    font-family: 'Noto Serif', serif;
    font-weight: bold;
}

.wrapper button {
    outline: none;
    border: none;
    color: #000;
    cursor: pointer;
    background: linear-gradient(135deg, #00ffcc 0%, #667eea 100%);
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.wrapper button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 204, 0.4);
}

.captcha-area .reload-btn {
    width: 75px;
    height: 100%;
    font-size: 25px;
}

.captcha-area .reload-btn i {
    transition: transform 0.3s ease;
}

.captcha-area .reload-btn:hover i {
    transform: rotate(180deg);
}

.wrapper .input-area {
    height: 60px;
    width: 100%;
    position: relative;
}

.input-area input[type="text"] {
    width: 100%;
    height: 100%;
    outline: none;
    padding-left: 20px;
    padding-right: 100px;
    font-size: 20px;
    border-radius: 10px;
    border: 2px solid rgba(0, 255, 204, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transition: all 0.3s ease;
}

.input-area input[type="text"]:focus {
    padding-left: 19px;
    border: 2px solid #00ffcc;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.3);
}

.input-area input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-area .check-btn {
    position: absolute;
    right: 7px;
    top: 50%;
    font-size: 16px;
    height: 45px;
    padding: 0 20px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
}

.input-area input:valid + [type="hidden"] + .check-btn,
.input-area input:valid ~ .check-btn {
    opacity: 1;
    pointer-events: auto;
}

/* Si l'input a du contenu, montrer le bouton */
.input-area:has(input[type="text"]:not(:placeholder-shown)) .check-btn {
    opacity: 1;
    pointer-events: auto;
}

.wrapper .status-text {
    display: none;
    font-size: 16px;
    text-align: center;
    margin: 20px 0 0;
    padding: 15px;
    border-radius: 10px;
    font-weight: 600;
}

.wrapper .status-text.error {
    background: rgba(255, 65, 108, 0.2);
    border: 1px solid #ff416c;
    color: #ff6b6b;
    display: block;
}

.wrapper .status-text.success {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid #28a745;
    color: #51cf66;
    display: block;
}

/* Lien retour */
.back-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.back-link a {
    color: #00ffcc;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: #667eea;
}

/* RESPONSIVE */
@media (max-width: 506px) {
    body {
        padding: 0 10px;
    }

    .wrapper {
        padding: 25px 20px;
    }

    .wrapper h3 {
        font-size: 22px;
    }

    .wrapper .captcha-area {
        height: 60px;
    }

    .captcha-img .captcha {
        font-size: 28px;
        letter-spacing: 5px;
    }

    .captcha-area .reload-btn {
        width: 60px;
        margin-left: 5px;
        font-size: 20px;
    }

    .wrapper .input-area {
        height: 55px;
    }

    .input-area input[type="text"] {
        font-size: 18px;
        padding-right: 90px;
    }

    .input-area .check-btn {
        height: 40px;
        font-size: 14px;
        padding: 0 15px;
    }

    .wrapper .status-text {
        font-size: 14px;
    }

    .captcha-area .captcha-img {
        width: 250px;
    }
}
