/**
 * Accessdoc Platform - Styles généraux
 */

/* Container principal */
.accessdoc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Cartes statistiques */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card h3 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #6c757d;
    text-transform: uppercase;
}

.big-number {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

/* Cartes par type */
.card-hours .big-number { color: #17a2b8; }
.card-amount .big-number { color: #28a745; }
.card-projets .big-number { color: #0073aa; }
.card-termines .big-number { color: #ffc107; }
.card-factures .big-number { color: #6f42c1; }

/* Cartes établissement */
.etablissement-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.etablissement-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
}

/* Tableaux */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

.tableau-projets,
.tableau-enseignants,
.tableau-factures {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.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;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}
.badge-attente { background: #e9ecef; color: #495057; }
.badge-propose { background: #fff3cd; color: #856404; }
.badge-accepte { background: #d4edda; color: #155724; }
.badge-cours { background: #cce5ff; color: #004085; }
.badge-termine { background: #d1ecf1; color: #0c5460; }
.badge-telecharge { background: #d4edda; color: #155724; }

/* Boutons */
.btn-primary, .btn-accept, .btn-refuse, .btn-download, .btn-assign, .btn-facture, .btn-submit {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary { background: #0073aa; color: white; }
.btn-accept { background: #28a745; color: white; }
.btn-refuse { background: #dc3545; color: white; }
.btn-download { background: #17a2b8; color: white; }
.btn-assign { background: #17a2b8; color: white; }
.btn-facture { background: #6c757d; color: white; }
.btn-submit { background: #0073aa; color: white; padding: 10px 20px; }

/* Formulaires */
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.form-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* Alertes */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* Grille de projets */
.projets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}
.projet-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.projet-card h3 {
    margin: 0 0 10px;
}
.projet-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}
.projet-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* États des transcriptions */
.etat-item {
    background: #f8f9fa;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 3px solid #0073aa;
}
.etat-item strong {
    display: block;
    margin-bottom: 8px;
    color: #0073aa;
}
.etat-item p {
    margin: 0;
    line-height: 1.5;
}
.btn-details-etats {
    background: #17a2b8;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}
.etats-details {
    margin-top: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
}

/* Détails par enseignant */
.details-row {
    display: none;
}
.details-row.show {
    display: table-row;
}
.details-content {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}
.btn-details {
    background: #e9ecef;
    color: #495057;
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

/* Paramètres */
.params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.param-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}
.param-item label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}
.param-item span {
    font-weight: 500;
}

/* Footer actions */
.actions-footer {
    margin-top: 30px;
    text-align: right;
}
.empty-state {
    text-align: center;
    padding: 50px;
    background: #f8f9fa;
    border-radius: 12px;
}
.empty-state p {
    margin-bottom: 20px;
    color: #6c757d;
}

/* Bannières d'information */
.info-banner {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
.info-banner-etablissement {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}
.info-banner-independant {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}
.info-banner-classic {
    background: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
}
.tableau-bilan {
    width: 100%;
    border-collapse: collapse;
}
.tableau-bilan th, .tableau-bilan td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}
.tableau-bilan th {
    background: #f8f9fa;
    font-weight: 600;
}
.badge-success {
    background: #d4edda;
    color: #155724;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
}
.badge-warning {
    background: #fff3cd;
    color: #856404;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
}
/* Responsive */
@media (max-width: 768px) {
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .projets-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
    }
    .params-grid {
        grid-template-columns: 1fr;
    }
    .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: 20px;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 15px;
    }
    .tableau-projets td,
    .tableau-enseignants td,
    .tableau-factures td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 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;
        margin-right: 15px;
    }
}