/* ===== STYLES SPÉCIFIQUES AUX REQUÉRANTS ===== */

/* Container principal - même style que les expertises */
.requerents-container {
    padding: 0;
    max-width: none;
    margin: 0;
    background: var(--bg-primary);
    min-height: 100vh;
}

/* Styles du header - copiés depuis dashboard.css pour éviter la dépendance au container */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 20px 0;
    border-bottom: 1px solid var(--primary-color);
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-header .search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    padding: 10px 14px;
}

.dashboard-header .search-bar img {
    width: 20px;
    height: 20px;
}

.dashboard-header .search-bar input {
    width: 100%;
    padding: 10px;
    margin: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-weight: 400;
    color: var(--primary-color);
}

.dashboard-header .search-bar input::placeholder {
    color: #2260FF80;
}

.dashboard-header h1 {
    color: var(--primary-black);
    display: flex;
    align-items: center;
    font-size: 30px;
    font-weight: 600;
    margin: 0;
}

.dashboard-header h1 img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
}

.dashboard-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0;
}

.dashboard-subheader .dashboard-stats {
    font-size: 20px;
    font-weight: 500;
    color: var(--primary-black);
}

.dashboard-subheader #addRequerentBtn {
    padding: 20px;
    max-width: 250px;
}

/* Responsive pour le header */
@media (max-width: 750px) {
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .dashboard-header .search-bar {
        width: -webkit-fill-available;
    }
    
    .dashboard-subheader #addRequerentBtn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .dashboard-subheader #addRequerentBtn span {
        display: none;
    }
    
    .dashboard-subheader #addRequerentBtn i {
        margin: 0;
        font-size: 18px;
    }
}

/* Liste des requérants */
.requerents-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.requerent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.requerent-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.requerent-info {
    flex: 1;
}

.requerent-title {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.requerent-details {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.requerent-details span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.requerent-details i {
    color: var(--primary-color);
}

.requerent-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.requerent-actions .view-expertises-btn {
    white-space: nowrap;
}

/* Bouton de suppression - toujours visible */
.delete-requerent-btn {
    opacity: 1;
    background: #dc2626;
    border-color: #dc2626;
    box-shadow: var(--shadow-sm);
    transform: scale(1);
    transition: all 0.3s ease;
    color: white;
    padding: 0.5rem;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.delete-requerent-btn:hover {
    transform: scale(1.05);
    
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px dashed var(--border-medium);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--border-medium);
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.empty-state p {
    margin: 0;
    font-size: 1.1rem;
}

/* Styles pour la modal des utilisateurs */

#usersModal .modal-content {
    max-width: 1000px;
    max-height: calc(100vh - 80px);
    margin: 40px auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#usersModal .modal-body {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    flex: 1;
}


/* Section d'ajout d'utilisateur */
.add-user-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.add-user-section h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.add-user-section .form-group {
    margin-bottom: 1rem;
}

.add-user-section label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.add-user-section input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-medium);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.add-user-section input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.add-user-section .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

/* Séparateur */
.separator {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 2rem 0;
}

/* Section des utilisateurs */
.users-section h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

#usersModal .modal-body .error {
    color: var(--danger-color);
    text-align: center;
    padding: 1rem;
}

#usersModal .modal-body .no-users {
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
    font-style: italic;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.user-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.user-info {
    flex: 1;
}

.user-email {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    font-family: monospace;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.user-actions .btn {
    padding: 0.5rem;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.user-actions .btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
}

.user-actions .reset-password-btn {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.user-actions .remove-user-btn {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

/* Styles pour le formulaire d'ajout de requérant */
.requerent-email-input {
    flex: 1;
    margin-bottom: 0;
    padding: 8px;
    border: 1px solid var(--border-medium);
    border-radius: 4px;
    font-size: 0.875rem;
}

.requerent-email-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

#addRequerentEmailBtn {
    margin-top: 0.5rem;
}

/* Responsive - Basé sur la largeur effective du container .site */
/* 
   Sidebar ouverte (240px) + container (1200px) = 1440px total
   Sidebar fermée (60px) + container (1200px) = 1260px total
   On utilise des breakpoints qui fonctionnent dans les deux cas
   
   Pour une approche plus précise, on peut aussi utiliser:
   - @media (max-width: 1440px) and (min-width: 1260px) pour sidebar ouverte
   - @media (max-width: 1260px) pour sidebar fermée ou petits écrans
*/

/* Quand le container .site fait moins de 1200px de large */
@media (max-width: 1440px) {
    .requerent-actions {
        gap: 0.5rem;
    }
    
    .requerent-actions .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .requerent-actions .view-expertises-btn {
        white-space: nowrap;
    }
}

/* Quand le container .site fait moins de 900px de large */
@media (max-width: 1140px) {
    .requerents-container {
        padding: 15px;
    }
    
    .requerent-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }
    
    .requerent-details {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
        font-size: 0.85rem;
    }
    
    .requerent-details span {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .requerent-actions {
        width: 100%;
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .requerent-actions .btn {
        width: 100%;
        justify-content: center;
        flex: 1;
        min-width: 0;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        text-align: center;
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .requerent-actions .view-expertises-btn {
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }
    
    .delete-requerent-btn {
        opacity: 1;
        transform: scale(1);
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .user-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .user-actions {
        justify-content: center;
    }
    
    .add-user-section {
        padding: 1rem;
    }
}

/* Quand le container .site fait moins de 600px de large */
@media (max-width: 840px) {
    .requerents-container {
        padding: 10px;
    }
    
    .requerent-item {
        padding: 0.75rem;
    }
    
    .requerent-title {
        font-size: 1.1rem;
    }
    
    .requerent-details {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    
    .requerent-details span {
        min-width: auto;
    }
    
    .requerent-actions .btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .delete-requerent-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* ===== STYLES POUR L'UPLOAD D'IMAGE ===== */

.image-upload-container {
    margin-top: 10px;
}

.image-upload-container .image-preview {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    border: 2px solid var(--border-light);
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-upload-container .image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.image-upload-container .image-preview p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
    text-align: center;
}

.image-upload-container input[type="file"] {
    display: none;
}

.image-upload-container .upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-right: 10px;
}

.image-upload-container .upload-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.image-upload-container .upload-btn i {
    font-size: 16px;
}

.image-upload-container .remove-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload-container .remove-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.image-upload-container .remove-btn i {
    font-size: 16px;
}

/* ===== STYLES POUR LA MODIFICATION DU REQUÉRANT ===== */

.edit-requerent-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

/* Styles pour les informations légales */
.legal-info-form {
    margin-top: 20px;
    padding: 20px;
}

.legal-info-form h5 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-row .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.form-row .form-group input[type="text"],
.form-row .form-group input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: var(--white);
    box-sizing: border-box;
}

.form-row .form-group input[type="text"]:focus,
.form-row .form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--primary-focus);
}

.form-row .form-group input[type="text"]:hover,
.form-row .form-group input[type="email"]:hover {
    border-color: var(--border-medium);
}

.edit-requerent-section h4 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.edit-requerent-section .form-group {
    margin-bottom: 20px;
}

.edit-requerent-section label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.edit-requerent-section input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.edit-requerent-section input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.separator {
    margin: 30px 0;
    border: none;
    border-top: 1px solid var(--border-light);
    opacity: 0.5;
}

/* Responsive pour la modal de modification */
@media (max-width: 768px) {
    #usersModal .modal-content {
        width: 95%;
        max-width: none;
        max-height: calc(100vh - 40px);
        margin: 20px auto;
    }
    
    #usersModal .modal-body {
        max-height: calc(100vh - 160px);
    }
    
    .edit-requerent-section {
        padding: 15px;
    }
    
    .image-upload-container .image-preview {
        height: 120px;
    }
    
    .image-upload-container .upload-btn,
    .image-upload-container .remove-btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .image-upload-container .upload-btn {
        margin-right: 0;
    }
    
    /* Responsive pour les informations légales */
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .legal-info-form {
        padding: 15px;
    }
}


