
* {
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at top, #0a0f1a, #05070d);
    color: #c8aa6e;
    overflow-x: hidden;
    position: relative;
}

form {
    max-width: 400px;
    margin: 80px auto;
    padding: 30px;
    background: rgba(10, 15, 26, 0.95);
    border: 1px solid #c8aa6e;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(200, 170, 110, 0.2);
    text-align: center;
    overflow: hidden;
}

form h1 {
    color: #f0e6d2;
    margin-bottom: 10px;
}

form p {
    font-size: 14px;
    color: #a09b8c;
    margin-top: 10px;
}

.form-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 20px;
}

.wave-group {
    position: relative;
    width: 100%; /* Contient tout à l'intérieur */
    margin-top: 10px;
}

.input {
    font-size: 16px;
    padding: 10px 5px;
    width: 100%;
    border: none;
    border-bottom: 2px solid #785a28;
    background: transparent;
    color: #f0e6d2;
    display: block;
}

.input:focus {
    outline: none;
    border-bottom: 2px solid #c8aa6e;
}

.label {
    position: absolute;
    left: 5px;
    top: 10px;
    pointer-events: none;
    display: flex;
    white-space: nowrap;
}

.label-char {
    display: inline-block;
    font-size: 14px;
    color: #785a28;
    transition: 0.3s;
    transition-delay: calc(var(--index) * 0.05s);
}

/* Animation focus */
.input:focus ~ .label .label-char,
.input:valid ~ .label .label-char {
    transform: translateY(-20px);
    font-size: 12px;
    color: #c8aa6e;
}

.bar {
    position: relative;
    display: block;
    width: 100%;
}

.bar::before {
    content: "";
    height: 2px;
    width: 0;
    bottom: 0;
    position: absolute;
    background: #c8aa6e;
    transition: 0.3s;
}

.input:focus ~ .bar::before {
    width: 100%;
}

input[type="submit"] {
    background: linear-gradient(135deg, #c8aa6e, #785a28);
    border: none;
    padding: 12px;
    color: #0a0f1a;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

input[type="submit"]:hover {
    background: linear-gradient(135deg, #f0e6d2, #c8aa6e);
    box-shadow: 0 0 10px rgba(200, 170, 110, 0.6);
}


.separateur {
    height: 1px;
    background: #785a28;
    margin: 10px 0 15px 0;
    width: 100%;
}


form a {
    color: #c8aa6e;
    text-decoration: none;
    font-weight: bold;
    margin-left: 5px;
}

form a:hover {
    text-decoration: underline;
}

/* Responsive  */
@media (max-width: 768px) {
    form {
        margin: 20px 10px;
        padding: 30px 15px;
        width: auto;
        max-width: 100%;
    }

    form h1 {
        font-size: 20px;
    }

    form p {
        font-size: 13px;
    }

    .input {
        font-size: 14px;
    }

    .label-char {
        font-size: 12px;
    }

    .form-container {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    form {
        margin: 10px 5px;
        padding: 25px 10px;
    }
    
    form h1 {
        font-size: 18px;
    }
}