/* === CLIENTS CSS OPTIMISÉ === */

:root {
    --primary-color: #2c5aa0;
    --secondary-color: #f8f9fa;
    --accent-color: #3498db;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --text-dark: #2d3748;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 25px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === STYLES COMMUNS === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
    background: #007bff;
    color: white;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1a365d;
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.header-content {
    display: flex;
    justify-content : space-between;
    align-items: center;
    gap: 20px;
}

/* === BADGES === */
.role-badge, .status-badge, .family-badge, .version-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* CORRECTION: Suppression des couleurs violettes/roses */
.role-admin { 
    background: var(--primary-color); 
    color: white; 
}

.role-family_manager { 
    background: var(--info-color); 
    color: white; 
}

.role-client { 
    background: var(--success-color); 
    color: white; 
}

.status-active { 
    background: #e8f5e8; 
    color: #2e7d32; 
}

.status-inactive { 
    background: #ffebee; 
    color: #c62828; 
}

/* CORRECTION: Famille badges avec couleurs de la charte */
.family-dubus {
    background: #e3f2fd;
    color: var(--primary-color);
}

.family-corba {
    background: #e8f5e8;
    color: var(--success-color);
}

.version-badge {
    background: var(--accent-color);
    color: white;
}

/* === PAGE INDEX CLIENTS === */
.clients-index {
    min-height: calc(100vh - 200px);
}

/* === HERO SECTION === */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a365d 100%);
    color: white;
    padding-top:40px;
    padding-bottom:80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><pattern id="grain" width="100" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="20" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.hero-decoration {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    clip-path: polygon(0 100%, 100% 100%, 100% 60%, 0 100%);
}

/* === SECTION PRINCIPALE === */
.main-content-section {
    padding: 80px 0;
    background: var(--secondary-color);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: start;
}

/* === SECTION INFO === */
.info-section {
    padding: 120px 0 80px 0;
    background: var(--secondary-color);
}

.info-section .container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 60px;
    align-items: start;
}

.login-container {
    width: 100%;
}

/* === LAYOUT CÔTE À CÔTE === */
.side-by-side-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: start;
    padding: 120px 0 80px 0;
    background: var(--secondary-color);
}

/*.left-content {*/
    /* Contenu de gauche - informations */
/*}*/

/* .right-content { */
    /* Contenu de droite - formulaire */
/* } */

/* === INFORMATIONS === */
.info-content h2 {
    color: var(--text-dark);
    margin-bottom: 40px;
    font-size: 2rem;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
}

.feature-icon {
    font-size: 2.5rem;
    min-width: 60px;
}

.feature-text h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.feature-text p {
    color: var(--text-light);
    margin: 0;
}

/* === CARTE DE CONNEXION === */
.login-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    overflow: hidden;
    position: sticky;
    top: 20px;
}

.login-header {
    background: var(--secondary-color);
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.login-header h1, .login-header h3 {
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.login-header p {
    color: var(--text-light);
    margin: 0;
}

.login-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-dark);
    font-weight: 600;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 6px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    box-sizing: border-box;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}


.alert {
    margin: 20px 30px;
    padding: 15px;
    border-radius: 6px;
}

.alert-error {
    background: #fed7d7;
    color: var(--error-color);
    border: 1px solid #feb2b2;
}

/* === DASHBOARD === */
.dashboard-page {
    min-height: calc(100vh - 200px);
    background: var(--secondary-color);
}

.dashboard-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 80px 0 40px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 60px;
}

.welcome-info h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.user-info {
    font-size: 1.1rem;
    margin-bottom: 5px;
    opacity: 0.9;
}

.dashboard-content {
    padding: 60px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.service-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.service-card h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 700;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* === TABLEAUX === */
.table-container, .software-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.admin-table, .software-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .software-table th {
    background: var(--text-dark);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.software-table thead {
    background: var(--primary-color);
}

.software-table th {
    padding: 20px 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td, .software-table td {
    padding: 15px 12px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.software-table td {
    padding: 20px 15px;
}

.admin-table tbody tr:hover, .software-table tbody tr:hover {
    background: rgba(44, 90, 160, 0.05);
}

.software-table tbody tr:last-child td {
    border-bottom: none;
}

.software-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-dark);
}

.software-name .software-icon {
    font-size: 1.5rem;
}

.btn-download {
    background: var(--success-color);
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-download:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* === ADMIN === */
.admin-page {
    min-height: calc(100vh - 200px);
    background: var(--secondary-color);
}

.admin-header {
    background: white;
    padding: 30px 0;
    box-shadow: var(--shadow-light);
}

.admin-content {
    padding: 40px 0;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.tab-btn:hover, .tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin: 0;
}

/* === MODALES === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-content h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* === WIDGETS ET CARTES === */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.widget, .info-card, .assignment-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.widget h3, .info-card h3, .assignment-card h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 700;
}

.info-card {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.info-card p, .assignment-card p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.6;
}

.info-card a {
    color: var(--primary-color);
    text-decoration: none;
}

.assignment-card {
    text-align: center;
}

/* === ÉLÉMENTS DIVERS === */
.no-software {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
}

.no-software p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.description-cell {
    max-width: 250px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.login-help {
    background: var(--secondary-color);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-light);
}

.support-section {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    text-align: center;
    border: 1px solid var(--border-color);
}

.support-contacts {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.support-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.support-link:hover {
    color: #1a365d;
}

/* === ANIMATIONS === */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
    background: var(--success-color);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* === RESPONSIVE === */
@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .info-section .container,
    .side-by-side-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .login-card {
        position: static;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .main-content-section, .info-section, .side-by-side-layout {
        padding: 80px 0 60px 0;
    }

    .info-content h2 {
        font-size: 1.8rem;
    }

    .feature-item {
        padding: 20px;
    }

    .login-form, .login-header {
        padding: 25px;
    }

    .admin-tabs {
        flex-direction: column;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .admin-table, .software-table {
        font-size: 0.8rem;
    }
    
    .admin-table th, .admin-table td,
    .software-table th, .software-table td {
        padding: 8px 6px;
    }

    .services-grid, .dashboard-widgets {
        grid-template-columns: 1fr;
    }

    .support-contacts {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .feature-icon {
        min-width: auto;
    }

    .service-card, .widget, .support-section, .info-card, .assignment-card {
        padding: 20px;
    }

    .dashboard-content {
        padding: 60px 0;
    }
}