/* ================================================== */
/* 🎨 FORMULAIRE CITOYEN - VERSION FINALE AMÉLIORÉE */
/* ================================================== */

/* Style principal du formulaire - Fond gris */
.formulaire-citoyen {
    max-width: 900px;
    margin: 40px auto;
    background: #f8f9fa; /* Fond gris clair */
    border-radius: 12px;
    padding: 40px;
    border: 2px solid transparent;
    background: linear-gradient(#f8f9fa, #f8f9fa) padding-box,
                linear-gradient(135deg, var(--primaire) 0%, var(--secondaire) 100%) border-box;
    box-shadow: 0 8px 30px rgba(44, 95, 45, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.formulaire-citoyen::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 180, 0, 0.1), transparent);
    transition: left 0.6s;
}

.formulaire-citoyen:hover::before {
    left: 100%;
}

.formulaire-citoyen:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(44, 95, 45, 0.2);
}

/* En-tête du formulaire */
.en-tete-formulaire {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.icone-inspirante {
    font-size: 3.5rem;
    color: var(--primaire);
    margin-bottom: 1.5rem;
}

.titre-formulaire {
    color: var(--primaire) !important;
    font-family: "Open Sans", sans-serif;
    font-weight: 700;
    font-size: 28px;
    text-align: center;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.sous-titre {
    color: var(--texte);
    text-align: center;
    margin-bottom: 30px;
    font-size: 16px;
    opacity: 0.8;
}

/* Indicateur d'étapes */
.etape-indicateur {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.etape {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.etape.active {
    opacity: 1;
}

.etape .numero {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e6ed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #666;
    transition: all 0.3s ease;
}

.etape.active .numero {
    background: var(--primaire);
    color: white;
    box-shadow: 0 4px 15px rgba(44, 95, 45, 0.3);
}

.etape .texte {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--texte);
}

/* Sections du formulaire - Fond blanc pour contraste */
.section-formulaire {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    border: 1px solid #e8f5e8;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.en-tete-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e8f5e8;
}

.en-tete-section i {
    font-size: 1.5rem;
    color: var(--primaire);
}

.en-tete-section h2 {
    color: var(--primaire);
    font-size: 1.3rem;
    margin: 0;
    font-weight: 700;
}

/* Structure des champs */
.groupe-champs-vertical {
    margin-bottom: 1.5rem;
}

.label-champ {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primaire) !important;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.obligatoire { 
    color: var(--danger); 
    font-weight: bold; 
}

.facultatif {
    color: #7f8c8d;
    font-size: 0.9em;
    font-weight: normal;
}

/* Champs de formulaire */
.input-texte, .input-select, .input-textarea {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 8px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
    background: white;
}

.input-textarea {
    height: auto;
    padding: 15px;
    min-height: 140px;
    resize: vertical;
}

.input-texte:focus, .input-select:focus, .input-textarea:focus {
    outline: none;
    border-color: var(--secondaire) !important;
    box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.2);
    transform: translateY(-2px);
}

/* Grille des champs catégorie/quartier */
.groupe-champs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

/* Champ monnaie amélioré */
.input-groupe-monnaie {
    position: relative;
    display: flex;
    align-items: center;
}

.champ-monnaie {
    padding-right: 90px;
}

.suffixe-monnaie {
    position: absolute;
    right: 16px;
    color: var(--primaire);
    font-weight: 600;
    background: #e8f5e8;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    height: calc(100% - 16px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Indications sous les champs */
.indications-champ {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
    font-size: 0.85rem;
}

.indication-requis {
    color: var(--danger);
    font-weight: 600;
}

.indication-info {
    color: #7f8c8d;
    font-style: italic;
}

.compteur-caracteres {
    color: #95a5a6;
    font-weight: 600;
}

.compteur-caracteres.attention {
    color: #f39c12;
}

.compteur-caracteres.erreur {
    color: #e74c3c;
}

/* Zone d'upload moderne et fonctionnelle */
.zone-upload-modern {
    position: relative;
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9fa;
    cursor: pointer;
    margin-bottom: 8px;
}

.zone-upload-modern:hover {
    border-color: var(--primaire);
    background: #f0f9f0;
}

.zone-upload-modern.dragover {
    border-color: var(--primaire);
    background: #e8f5e8;
    transform: scale(1.02);
}

.input-upload-hidden {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.zone-drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.zone-drop-content i {
    font-size: 2.5rem;
    color: var(--primaire);
    margin-bottom: 0.5rem;
}

.texte-upload-centre {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.lien-upload-centre {
    color: var(--primaire);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}

.zone-drop-content small {
    color: #7f8c8d;
    margin-top: 0.5rem;
}

/* Liste des fichiers */
.liste-fichiers-preview {
    margin-top: 0.5rem;
}

.element-fichier {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border: 1px solid #e9ecef;
}

.element-fichier i {
    color: var(--primaire);
}

.nom-fichier {
    flex: 1;
    font-size: 0.9rem;
    color: var(--texte);
}

.taille-fichier {
    color: #7f8c8d;
    font-size: 0.8rem;
}

.supprimer-fichier {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.supprimer-fichier:hover {
    background: #fdf0f0;
}

/* Section soumission */
.section-soumission {
    text-align: center;
    padding: 2rem 0 1rem 0;
    margin-top: 1rem;
}

/* BOUTON PRINCIPAL */
.bouton-primaire {
    background: var(--primaire) !important;
    color: var(--blanc) !important;
    border: none;
    border-radius: 8px;
    padding: 18px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    font-family: 'Open Sans', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.bouton-primaire::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.bouton-primaire:hover:not(:disabled) {
    background: var(--secondaire) !important;
    color: var(--texte) !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 180, 0, 0.3);
}

.bouton-primaire:hover::before {
    left: 100%;
}

.bouton-primaire:active {
    transform: translateY(-1px);
}

.bouton-primaire:disabled {
    background: #bdc3c7 !important;
    color: #7f8c8d !important;
    cursor: not-allowed;
    transform: none !important;
}

.contenu-bouton, .loader-bouton {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.loader-bouton {
    display: none;
}

/* Loader */
.chargement {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primaire);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.note-soumission {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #e8f5e8;
    border-radius: 8px;
    color: var(--primaire);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

/* Message de connexion */
.message-connectez-vous {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f9f0 100%);
    border: 2px solid var(--primaire);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    margin: 2rem auto;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(44, 95, 45, 0.1);
}

.message-connectez-vous i {
    font-size: 3rem;
    color: var(--primaire);
    margin-bottom: 1rem;
    display: block;
}

.message-connectez-vous span {
    color: var(--primaire);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.6;
}

/* Messages de retour */
.message-retour-global {
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    text-align: center;
    border: 1px solid;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
    display: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-retour-global.succes {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
    border-left-color: var(--success);
    display: block;
}

.message-retour-global.erreur {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
    border-left-color: var(--danger);
    display: block;
}

/* Validation en temps réel */
.champ-valide {
    border-color: var(--success) !important;
}

.champ-invalide {
    border-color: var(--danger) !important;
}

/* ================================================== */
/* 📱 RESPONSIVE AMÉLIORÉ */
/* ================================================== */

@media (max-width: 768px) {
    .formulaire-citoyen {
        padding: 25px 20px;
        margin: 20px;
    }
    
    .en-tete-formulaire {
        margin-bottom: 2rem;
    }
    
    .titre-formulaire {
        font-size: 24px;
        flex-direction: column;
        gap: 8px;
    }
    
    .etape-indicateur {
        gap: 1rem;
    }
    
    .etape .texte {
        font-size: 0.8rem;
    }
    
    .section-formulaire {
        padding: 1.5rem;
    }
    
    .groupe-champs {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .en-tete-section {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    /* Centrer les indications en mobile */
    .indications-mobile {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
    
    .bouton-primaire {
        padding: 16px 20px;
    }
    
    /* Ajustement du FCFA en mobile */
    .suffixe-monnaie {
        right: 12px;
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .champ-monnaie {
        padding-right: 75px;
    }
    
    /* Zone upload centrée en mobile */
    .zone-upload-modern {
        padding: 1.5rem;
    }
    
    .zone-drop-content i {
        font-size: 2rem;
    }
    
    .lien-upload-centre {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .formulaire-citoyen {
        padding: 20px 15px;
        margin: 15px 10px;
    }
    
    .section-formulaire {
        padding: 1rem;
    }
    
    .input-texte, .input-select, .input-textarea {
        height: 48px;
        font-size: 15px;
    }
    
    .zone-upload-modern {
        padding: 1rem;
    }
    
    .note-soumission {
        font-size: 0.85rem;
        text-align: center;
        flex-direction: column;
        gap: 0.5rem;
    }
}










