/* --- NOUVEAU STYLE POUR LES ACTIONS DU FORMULAIRE --- */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 20px; /* Espace entre les boutons */
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    color: #cccccc;
    border: 1.5px solid #555555;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #2a2a2e;
    color: #ffffff;
    border-color: #cccccc;
}



/* On ajuste la largeur du bouton de soumission */
.btn-submit {
    flex-grow: 1; /* Le bouton principal prend plus de place */
}    


.select2-container .select2-selection--single {
    background-color: #0f0f10;
    color: white;
    height: 45px;
    border: 1.5px solid #333;
    border-radius: 6px;
}
.select2-dropdown {
    background-color: #1e1e1e;
    color: white;
}


#plugins-content {
    transition: max-height 0.4s ease;
    overflow: hidden;
}
#plugins-content.collapsed {
    max-height: 0;
    padding: 0;
    margin: 0;
}


.toggle-icon {
    float: right;
    cursor: pointer;
    font-size: 0.9rem;
    color: #00d0ff;
    padding: 3px 6px;
    border: 1px solid #00d0ff;
    border-radius: 3px;
    margin-left: 10px;
    transition: background 0.3s ease;
}

.btn-toggle:hover {
    background: #00d0ff;
    color: #fff;
}

#tech-info-section.collapsed {
    display: none;
}

#tech-content {
    transition: max-height 0.4s ease;
    overflow: hidden;
}
#tech-content.collapsed {
    max-height: 0;
    padding: 0;
    margin: 0;
}


.accordion-content {
    max-height: 0;
    opacity: 0;
    transform-origin: top;
    overflow: hidden;
    transition: max-height 0.6s ease, opacity 0.4s ease;
}

.accordion-content.open {
    max-height: 2000px;
    opacity: 1;
}

/* Effet escalier pour les enfants */
.accordion-content > .form-row,
.accordion-content > .form-group {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.accordion-content.open > .form-row,
.accordion-content.open > .form-group {
    opacity: 1;
    transform: translateY(0);
}

/* Ajoute un petit décalage pour l'effet escalier */
.accordion-content.open > *:nth-child(1) { transition-delay: 0.1s; }
.accordion-content.open > *:nth-child(2) { transition-delay: 0.2s; }
.accordion-content.open > *:nth-child(3) { transition-delay: 0.3s; }
.accordion-content.open > *:nth-child(4) { transition-delay: 0.4s; }






/* --- SECTION PRINCIPALE DU FORMULAIRE --- */
.form-section {
    max-width: 1100px;
    margin: 60px auto;
    background: linear-gradient(145deg, #362E2C, #111);
    padding: 40px;
    border-radius: 12px;
    color: #fff;
    border: 2px solid #9CB02A;
    transition: all 0.3s ease;

    /* CORRECTION : Les deux ombres sont maintenant combinées avec une virgule */
    box-shadow: 0 10px 25px rgba(0, 208, 255, 0.25), 
    0 0 25px 8px #00d0ff;
}

#autocomplete-city  {
    width : 93%  !important;
}

.form-section:hover {
    border-color: #00d0ff;
    /* On peut aussi ajuster l'ombre au survol pour un effet plus dynamique */
    box-shadow: 0 12px 30px rgba(0, 208, 255, 0.4), 
    0 0 35px 10px #00d0ff;
    transform: translateY(-2px);
}


/* --- CHAMPS DE SAISIE (INPUT, SELECT, TEXTAREA) --- */
/* CORRECTION : Fusion des deux blocs de règles en un seul, propre et sans !important */
input, select, textarea {
    width: 100%;
    padding: 14px;
    background: #0f0f10;
    color: #f5f5f5;
    border: 1.5px solid #333;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    /* On place ici l'ombre par défaut pour les champs */
    box-shadow: 0 0 10px 2px rgba(121, 122, 114, 0.5); /* #797A72 avec transparence */
}

input:hover, select:hover, textarea:hover {
    background: #2a2a2e;
    border-color: #777;
}

input:focus, select:focus, textarea:focus {
    background: #2a2a2e;
    border-color: #00d0ff;
    box-shadow: 0 0 8px 2px rgba(0, 208, 255, 0.6); /* Ombre plus prononcée au focus */
    outline: none;
}


/* --- GROUPES DE CHAMPS ET LABELS --- */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px 25px;
    margin-bottom: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
}
label {
    margin-bottom: 6px;
    font-weight: 600;
    color: #ccc;
    cursor: help;
}


/* --- FIELDSETS (SECTIONS INTERNES) --- */
.techno-section {
    margin-top: 25px;
    padding: 20px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #141414;
}
.techno-section legend {
    font-weight: 600;
    color: #00d0ff;
    margin-bottom: 10px;
    font-size: 1rem;
}


/* --- CHECKBOXES --- */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 10px;
}
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px; /* Un peu plus d'espace */
    background: #1e1e1e;
    padding: 8px 10px;
    border: 1px solid #333;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}
.checkbox-group label:hover {
    background: #2a2a2a;
    border-color: #00d0ff;
}
/* Le champ de formulaire Django pour les checkboxes est un ul, nous le stylons */
#id_plugins {
    list-style-type: none;
    padding: 0;
    margin: 0;
}


/* --- BOUTON ET MESSAGES --- */
.btn-submit {
    width: 100%;
    background: linear-gradient(90deg, #ff6600, #ff8533);
    border: none;
    padding: 14px;
    margin-top: 20px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 102, 0, 0.6);
}

.message {
    background: #003d1a;
    padding: 12px;
    border-left: 5px solid #00ff99;
    color: #00ff99;
    margin-bottom: 15px;
    border-radius: 4px;
    font-weight: 500;
}

.error-message {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 6px;
}