* {
    box-sizing: border-box;
}

body {
    min-height: 100vh; /* Prend toute la hauteur */
    font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
    padding: 20px;
    color: #ffffff;
    overflow: hidden;
    background: radial-gradient(ellipse at bottom, #0d1b2a 0%, #000000 100%);
}

.form-container {
    background-color: rgba(20, 10, 50, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    box-shadow: 0 0 25px #dda0ff80;
    width: 90%;
    max-width: 500px;
    padding: 20px;
    margin: 50px auto;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-container input ,
.form-container textarea {
    display: block;
    margin: 10px auto;
    width: 90%;
    max-width: 400px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -3;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle infinite alternate;
}

#galaxy-container {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
}
#spiral-galaxy {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}
.rotation {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotate 160s linear infinite;
}
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.spiral-star {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4), rgba(0, 0, 0, 0));
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15), 0 0 40px rgba(255, 255, 255, 0.05);
    opacity: 0.7;
    pointer-events: none;
    filter: blur(1px);
    transition: all 0.3s ease;
}
@keyframes twinkle {
    from { opacity: 0.2; }
    to { opacity: 1; }
}
.form-fields h2 {
    color: #ffe6ff;
    text-align: center;
    width: 100%;
    font-size: 32px;
    margin-bottom: 25px;
    text-shadow: 0 0 15px #dda0ff;
}
.form-group label {
    color: #ffccff;
}
input[type="text"],
input[type="email"],
textarea {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid #d8b0ff;
    width: 95%;
    color: #fff;
    padding: 12px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}
input:focus,
textarea:focus {
    border-color: #ffb3ff;
    outline: none;
    background-color: rgba(255, 255, 255, 0.12);
}
.btn-submit {
    background: linear-gradient(to right, #c77dff, #9d4edd);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 0 10px #d8b0ff;
}
.btn-submit:hover {
    transform: scale(1.05);
    background: linear-gradient(to right, #e0aaff, #b185db);
}
.form-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}
.btn-back {
    background: transparent;
    border: 1px solid #9d4edd;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
    display: inline-block;
    box-shadow: 0 0 10px #d8b0ff20;
    transition: all 0.3s ease;
}
.btn-back:hover {
    background-color: #d8b0ff20;
    color: #ffe6ff;
    transform: scale(1.05);
    box-shadow: 0 0 15px #d8b0ff;
}
label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}
.messages {
    list-style: none;
    padding: 10px;
    text-align: center;
    font-size: 16px;
}
.messages li {
    background-color: #ffccff33;
    color: #ffe6ff;
    border: 1px solid #ffb3ff;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 10px;
    box-shadow: 0 0 10px #ffb3ff80;
}
.errorlist {
    margin: 5px 0 10px 0;
    padding-left: 0;
    color: red;
    list-style: none;
    font-size: 14px;
}
.error {
    color: red;
    font-size: 14px;
}
.success-message {
    color: green;
    font-size: 16px;
    text-align: center;
    margin-bottom: 15px;
}
#id_captcha_answer {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #d8b0ff;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    width: 95%;
    margin-top: 8px;
    transition: all 0.3s ease;
}
#id_captcha_answer:focus {
    border-color: #ffb3ff;
    background-color: rgba(255, 255, 255, 0.15);

}
label[for="id_captcha_answer"] {
    color: #ffccff;
    font-weight: bold;
    text-shadow: 0 0 5px #d8b0ff;
    display: block;
    margin-bottom: 5px;
}

/* tablette 
@media (max-width: 768px) {
    .form-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .form-fields {
        padding-left: 0;
        padding-right: 0;
    }
}
   */ 

/* mobile 
@media (max-width: 500px) {
    html, body {
        min-height: auto !important;
        height: auto !important;
        overflow: auto !important;
    }
    .form-container {
        padding: 2rem 1rem;
    }

    .form-fields {
        max-width: 400px;
        width: 95%;
        padding: 1rem;
    }
    .form-fields h2 {
        font-size: 1.4rem;
    }

    .form-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    #stars-container,
    #galaxy-container {
        position: absolute !important;
        min-height: 100%;
        height: auto;
    }    
}
    */