/* ======================================= */
/* STYLES COMMUNS (login & register)     */
/* ======================================= */



.login-page-container, .register-choice-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 1rem 2rem; 
    text-align: center;
}

.form-header {
    margin-bottom: 2rem;
    max-width: 450px;
}

.form-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #1d1d1f;
}

.form-header p {
    font-size: 1.1rem;
    color: #6e6e73;
}

.form-footer-switch {
    margin-top: 1.5rem;
}

.form-footer-switch a {
    color: #3e2372;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.form-footer-switch a:hover {
    opacity: 0.8;
}

/* ======================================= */
/* STYLES SPÉCIFIQUES : FORMULAIRES        */
/* ======================================= */

.login-form-wrapper {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 450px;
    text-align: left;
}

.user-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: #e3ddf1;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 1.5rem;
}

.user-type-btn {
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    background-color: transparent;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.user-type-btn.active {
    background-color: #ffffff;
    color: #3e2372;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    background-color: #6140b2;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background-color: #3e2372;
}

/* ======================================= */
/* STYLES SPÉCIFIQUES : PAGE DE CHOIX      */
/* ======================================= */

.choices-wrapper {
    display: flex;
    gap: 2rem;
    width: 100%;
    max-width: 900px;
    justify-content: center;
}

.choice-box {
    flex: 1;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.choice-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.choice-icon svg {
    color: #3e2372;
}

.choice-text h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1d1d1f;
}

.choice-text p {
    font-size: 1rem;
    color: #6e6e73;
    line-height: 1.6;
}

/* ======================================= */
/* STYLES CONNEXION SOCIALE & CHECKBOX     */
/* ======================================= */

.social-login {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.btn-social {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: background-color 0.2s;
}

.btn-social.apple {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.btn-social:hover { background-color: #f5f5f5; }
.btn-social.apple:hover { background-color: #333; }

.btn-social img {
    height: 20px;
    width: 20px;
}

.form-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #999;
    margin-bottom: 1rem;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.form-divider:not(:empty)::before { margin-right: .5em; }
.form-divider:not(:empty)::after { margin-left: .5em; }

.form-group-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.form-group-checkbox input[type="checkbox"] {
    margin-top: 4px;
    accent-color: #3e2372;
}

.form-group-checkbox label {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
}

.form-group-checkbox label a {
    color: #3e2372;
    text-decoration: none;
    font-weight: 600;
}

.form-group-checkbox label a:hover {
    text-decoration: underline;
}

/* ======================================= */
/* STYLE CRITÈRES MOT DE PASSE             */
/* ======================================= */

.password-criteria {
    margin-top: 0.75rem;
}

.password-criteria ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.password-criteria li {
    font-size: 0.85rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.3s ease;
}

.password-criteria .icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #e0e0e0;
    transition: background-color 0.3s ease;
}

.password-criteria li.valid {
    color: #28a745;
}

.password-criteria li.valid .icon {
    background-color: #28a745;
}

/* ======================================= */
/* STYLE FORMULAIRE MULTI-ÉTAPES           */
/* ======================================= */

.login-form-wrapper.multi-step-form {
    max-width: 600px;
}

/* --- LE CODE MANQUANT ÉTAIT ICI --- */
.form-step {
    display: none;
}
.form-step.active {
    display: block;
}
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background-color: #fff;
}
.step-buttons {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}
.step-buttons .btn-submit {
    flex: 1; 
}
.btn-secondary {
    background-color: #e0e0e0;
    color: #333;
}
.btn-secondary:hover {
    background-color: #ccc;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.progress-bar .step {
    flex: 1;
    text-align: center;
    padding-bottom: 1rem;
    color: #999;
    font-weight: 600;
    position: relative;
}

.progress-bar .step.active {
    color: #3e2372;
}

.progress-bar .step.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #3e2372;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    background-color: #f5f5f7;
    padding: 1rem;
    border-radius: 8px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-item label {
    font-weight: 500;
}

.form-group input[type="file"] {
    padding: 0.5rem;
}

.form-hint {
    font-size: 0.85rem;
    color: #e53e3e;
    margin-top: 0.5rem;
}

/* ======================================= */
/* RESPONSIVE (MOBILES ET TABLETTES)     */
/* ======================================= */

@media (max-width: 768px) {
    .choices-wrapper {
        flex-direction: column;
    }
    
    .login-form-wrapper {
        padding: 1.5rem;
    }
}

@media (max-width: 500px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* login.css */

@media (max-width: 768px) {
    /* ... (règles existantes) ... */

    /* NOUVEAU : Réduction de la taille des polices */
    .form-header h1 {
        font-size: 2rem; /* Plus petit que 2.5rem */
    }

    .form-header p {
        font-size: 1rem; /* Plus petit que 1.1rem */
    }

    .choice-text h2 {
        font-size: 1.3rem; /* Plus petit que 1.5rem */
    }
}

/* login.css */

@media (max-width: 768px) {
    /* ... (règles existantes et celles qu'on vient d'ajouter) ... */

    /* NOUVEAU : Fait passer les champs côte à côte en colonne */
    .form-row {
        flex-direction: column;
        gap: 0; /* On retire l'écart, car les .form-group ont déjà une marge */
    }
}

/* login.css */

/* Style pour la carte de zone d'intervention */
#service-map {
    height: 300px;
    width: 100%;
    border-radius: 8px;
    margin-top: 1rem;
    z-index: 1; /* S'assure que la carte est bien positionnée */
}

/* Style pour les sous-labels */
.sub-label {
    font-size: 0.9rem;
    font-weight: 500 !important;
}



/* login.css */

/* NOUVEAU : Style pour le bouton d'upload personnalisé */
.form-group input[type="file"] {
    display: none; /* On cache le bouton moche par défaut */
}

.custom-file-upload {
    border: 1px solid #ccc;
    display: inline-flex; /* Pour aligner l'icône et le texte */
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    background-color: #f5f5f7;
    font-weight: 600;
    transition: background-color 0.2s;
}

.custom-file-upload:hover {
    background-color: #e0e0e0;
}

.file-name {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #6e6e73;
    font-style: italic;
}




/* Conteneur pour les "tags" des services choisis */
#selected-services-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem; /* Espace avant le bouton */
}

.service-tag {
    background-color: #eef5ff;
    color: #3e2372;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-tag button {
    background: #3e2372;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fenêtre Modale (Popup) */
.modal-hidden {
    display: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 100;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    z-index: 101;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-top: 0;
    font-size: 1.8rem;
}

#selection-counter {
    color: #6e6e73;
    font-weight: 500;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}

/* Grille des services dans la modale */
.modal-content .service-item {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    transition: border-color 0.2s, background-color 0.2s;
    cursor: pointer;
}

.modal-content .service-item:hover {
    border-color: #3e2372;
}

/* Style quand une carte est sélectionnée */
.modal-content .service-item.selected {
    border-color: #6140b2;
    background-color: #eef5ff;
}

.modal-content .service-item label {
    font-weight: 600;
    cursor: pointer;
    width: 100%; /* Permet de cliquer partout dans la carte */
}


/* login.css */

/* Style pour les boutons à contour */
/* login.css */

/* Style pour les boutons à contour */
.login-form-wrapper .btn-outline {
    background-color: #ffffff; /* Fond blanc par défaut */
    border: 2px solid #3e2372; /* Contour bleu */
    color: #3e2372; /* Texte bleu par défaut */
    padding: 0.8rem 1.5rem;
    border-radius: 25px; /* Coins bien arrondis */
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease-in-out;
}

/* Au survol, on inverse les couleurs */
.login-form-wrapper .btn-outline:hover {
    background-color: #3e2372; /* Fond bleu */
    color: #ffffff; /* Texte blanc */
}

.login-form-wrapper .btn-outline .plus-icon {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
}


/* login.css */

@media (max-width: 768px) {
    /* ... (les autres règles responsives) ... */

    /* NOUVEAU : Rend la fenêtre modale responsive */
    .modal-content {
        padding: 1.5rem;
    }

    .modal-content h3 {
        font-size: 1.5rem;
    }
    
    .modal-content .services-grid {
        grid-template-columns: 1fr 1fr; /* 2 colonnes sur tablette */
    }
}

/* On avait déjà cette règle pour les plus petits écrans, elle reste utile */
@media (max-width: 500px) {
    .modal-content .services-grid {
        grid-template-columns: 1fr; /* 1 colonne sur petit mobile */
    }
}