/**
 * Styles des dashboards
 * Thème Transcription
 */

/* =============================================
   WRAPPER DES DASHBOARDS
   ============================================= */

.dashboard-page-wrapper {
    background: #f0f2f5;
    padding: 30px 0 60px;
    min-height: calc(100vh - 300px);
}

.dashboard-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.dashboard-header .subtitle {
    color: #666;
    margin: 5px 0 0;
}

/* =============================================
   CARTES STATISTIQUES
   ============================================= */

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #0073aa;
    display: block;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

/* =============================================
   TABLEAUX
   ============================================= */

.table-responsive {
    overflow-x: auto;
}

.tableau-projets,
.tableau-enseignants,
.tableau-factures {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tableau-projets th,
.tableau-enseignants th,
.tableau-factures th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
}

.tableau-projets td,
.tableau-enseignants td,
.tableau-factures td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.tableau-projets tr:hover,
.tableau-enseignants tr:hover,
.tableau-factures tr:hover {
    background: #f8f9fa;
}

/* =============================================
   CARTES PROJETS
   ============================================= */

.projets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.projet-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.projet-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.projet-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #1a1a2e;
}

.projet-card .projet-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.projet-card .projet-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* =============================================
   BOUTONS DES DASHBOARDS
   ============================================= */

.btn-dashboard-primary {
    background: #0073aa;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-dashboard-primary:hover {
    background: #005a87;
}

.btn-accept {
    background: #28a745;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}

.btn-accept:hover {
    background: #218838;
}

.btn-refuse {
    background: #dc3545;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}

.btn-refuse:hover {
    background: #c82333;
}

.btn-download {
    background: #17a2b8;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}

.btn-download:hover {
    background: #138496;
}

.btn-assign {
    background: #6c757d;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 13px;
}

.btn-assign:hover {
    background: #5a6268;
}

.btn-devis {
    background: #e94560;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}

.btn-devis:hover {
    background: #c73652;
}

.btn-upload {
    background: #28a745;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}

.btn-upload:hover {
    background: #218838;
}

.btn-etat {
    background: #6c757d;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}

.btn-etat:hover {
    background: #5a6268;
}

.btn-termine {
    background: #ffc107;
    color: #333;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}

.btn-termine:hover {
    background: #e0a800;
}

.btn-facture {
    background: #17a2b8;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}

.btn-facture:hover {
    background: #138496;
}

.btn-take {
    background: #28a745;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.btn-take:hover {
    background: #218838;
}

.btn-view {
    background: #17a2b8;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
}

.btn-view:hover {
    background: #138496;
}

.btn-danger {
    color: #dc3545;
    text-decoration: none;
    padding: 4px 8px;
    font-size: 14px;
}

.btn-danger:hover {
    color: #c82333;
}

/* =============================================
   ÉLÈVES
   ============================================= */

.eleves-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.eleve-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.2s;
}

.eleve-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.eleve-card h4 {
    margin: 0 0 8px;
    font-size: 16px;
}

.eleve-card .badge {
    font-size: 12px;
}

.eleve-card .eleve-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

/* =============================================
   SECTION CARD
   ============================================= */

.section-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* =============================================
   ACTIONS FOOTER
   ============================================= */

.actions-footer {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projets-grid {
        grid-template-columns: 1fr;
    }
    
    .eleves-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .tableau-projets thead,
    .tableau-enseignants thead,
    .tableau-factures thead {
        display: none;
    }
    
    .tableau-projets tbody tr,
    .tableau-enseignants tbody tr,
    .tableau-factures tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 15px;
    }
    
    .tableau-projets td,
    .tableau-enseignants td,
    .tableau-factures td {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: 1px solid #e9ecef;
    }
    
    .tableau-projets td:last-child,
    .tableau-enseignants td:last-child,
    .tableau-factures td:last-child {
        border-bottom: none;
    }
    
    .tableau-projets td::before,
    .tableau-enseignants td::before,
    .tableau-factures td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #495057;
    }
    
    .actions-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .actions-footer a {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .eleves-grid {
        grid-template-columns: 1fr;
    }
}