/* =====================================================
   ENLA 2.0 — MODULE DOS
   MODULE : GESTION DES CLASSES
   Fichier : assets/css/classes.css
===================================================== */


/* =====================================================
   1. PAGE PRINCIPALE
===================================================== */

.dos-classes {
    width: 100%;
    min-width: 0;
    color: #29243a;
}


/* =====================================================
   2. EN-TÊTE DE LA PAGE
===================================================== */

.dos-classes .dos-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.dos-classes .dos-page-titre h2 {
    margin: 0 0 6px;
    font-size: 23px;
    font-weight: 700;
    color: #29243a;
}

.dos-classes .dos-page-titre p {
    margin: 0;
    font-size: 14px;
    color: #858195;
}


/* =====================================================
   3. SECTION DES FILTRES
===================================================== */

.classes-filtres {
    background: #ffffff;
    padding: 22px;
    border-radius: 12px;
    border: 1px solid #eceaf2;
    margin-bottom: 22px;
}

.classes-filtres-header {
    margin-bottom: 18px;
}

.classes-filtres-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
    color: #29243a;
}

.classes-filtres-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.filtre-groupe {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.filtre-groupe label {
    font-size: 13px;
    font-weight: 600;
    color: #625d73;
}

.filtre-groupe select {
    width: 100%;
    height: 43px;
    padding: 0 12px;
    border: 1px solid #dedbe8;
    border-radius: 7px;
    background-color: #ffffff;
    color: #393449;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filtre-groupe select:focus {
    border-color: #165BFB;
    box-shadow: 0 0 0 3px rgba(22, 91, 251, 0.10);
}


/* =====================================================
   4. SECTION DE LA LISTE DES ÉLÈVES
===================================================== */

.classes-liste {
    background: #ffffff;
    border: 1px solid #eceaf2;
    border-radius: 12px;
    overflow: hidden;
}

.classes-liste-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 22px;
    border-bottom: 1px solid #efedf4;
}

.classes-liste-header h3 {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 650;
    color: #29243a;
}

.classes-liste-header p {
    margin: 0;
    font-size: 13px;
    color: #858195;
}

.classes-total {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border-radius: 7px;
    background: #f0f4ff;
    color: #165BFB;
    font-size: 13px;
    white-space: nowrap;
}

.classes-total span:first-child {
    font-weight: 700;
}


/* =====================================================
   5. TABLEAU DES ÉLÈVES
===================================================== */

.classes-table-container {
    width: 100%;
    overflow-x: auto;
}

.classes-table {
    width: 100%;
    min-width: 750px;
    border-collapse: collapse;
    text-align: left;
}

.classes-table thead {
    background: #f8f7fb;
}

.classes-table th {
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 650;
    color: #777286;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    border-bottom: 1px solid #eceaf2;
}

.classes-table td {
    padding: 15px 16px;
    font-size: 13px;
    color: #494457;
    border-bottom: 1px solid #f0eef4;
    white-space: nowrap;
}

.classes-table tbody tr {
    transition: background 0.2s;
}

.classes-table tbody tr:not(.ligne-vide) {
    cursor: pointer;
}

.classes-table tbody tr:not(.ligne-vide):hover {
    background: #f3f6ff;
}

.classes-table tbody tr:last-child td {
    border-bottom: none;
}


/* Code élève */

.classes-table td:first-child {
    font-weight: 650;
    color: #165BFB;
    font-variant-numeric: tabular-nums;
}


/* Distribution */

.classes-table td:nth-child(5) {
    font-weight: 650;
    color: #625d73;
}


/* État */

.classes-table .etat-actif {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    background: #e8f7ef;
    color: #218653;
    font-size: 11px;
    font-weight: 650;
}

.classes-table .etat-inactif {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    background: #fceeee;
    color: #c34b4b;
    font-size: 11px;
    font-weight: 650;
}


/* Message du tableau */

.classes-table .ligne-vide td {
    padding: 35px 15px;
    text-align: center;
    color: #858195;
    cursor: default;
}


/* =====================================================
   ENLA 2.0 — MODULE DOS
   CARTE D'IDENTIFICATION SCOLAIRE
   Fichier : assets/css/classes.css
===================================================== */


/* =====================================================
   1. MODAL — CONTENEUR PRINCIPAL
===================================================== */

.modal-carte-eleve {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 25px;
}

.modal-carte-eleve.actif {
    display: flex;
}


/* =====================================================
   2. ARRIÈRE-PLAN
===================================================== */

.modal-carte-eleve-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 31, 55, 0.68);
    backdrop-filter: blur(5px);
}


/* =====================================================
   3. CONTENEUR DE LA CARTE
===================================================== */

.modal-carte-eleve-conteneur {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 760px;
    padding: 20px;
    border-radius: 18px;
    background: #eaf0f8;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}


/* =====================================================
   4. BOUTON FERMER
===================================================== */

.carte-fermer {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 5;
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #183b68;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
}

.carte-fermer:hover {
    background: #183b68;
    color: #ffffff;
}


/* =====================================================
   5. CARTE D'IDENTIFICATION
===================================================== */

.student-id-card {
    position: relative;
    width: 100%;
    max-width: 680px;
    min-height: 340px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(17, 44, 80, 0.16);
    font-family: Arial, Helvetica, sans-serif;
}


/* =====================================================
   6. EN-TÊTE BLEU ENLA
===================================================== */

.student-id-header {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 92px;
    padding: 15px 24px;
    background: linear-gradient(
        115deg,
        #102f59,
        #165bfb
    );
    color: #ffffff;
}


/* LOGO */

.student-id-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 62px;
    height: 62px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
}


/* IDENTITÉ DE L'ÉTABLISSEMENT */

.student-id-institution {
    min-width: 0;
}

.student-id-institution h2 {
    margin: 0;
    color: #ffffff;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 2px;
}

.student-id-institution p {
    margin: 3px 0;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.student-id-institution span {
    display: block;
    margin-top: 5px;
    color: #d9e7ff;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.5px;
}


/* =====================================================
   7. CORPS DE LA CARTE
===================================================== */

.student-id-body {
    display: grid;
    grid-template-columns: 1fr 190px;
    gap: 25px;
    min-height: 215px;
    padding: 22px 26px 18px;
}


/* =====================================================
   8. INFORMATIONS DE L'ÉLÈVE
===================================================== */

.student-id-informations {
    display: flex;
    flex-direction: column;
    min-width: 0;
}


/* CODE */

.student-id-code {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.student-id-code span,
.student-id-detail span {
    color: #728198;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.student-id-code strong {
    color: #102f59;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}


/* AUTRES INFORMATIONS */

.student-id-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.student-id-detail strong {
    color: #17283f;
    font-size: 13px;
    font-weight: 700;
}


/* =====================================================
   9. SIGNATURE
===================================================== */

.student-id-signature {
    width: 180px;
    margin-top: auto;
    padding-top: 10px;
}

.signature-line {
    width: 100%;
    height: 1px;
    margin-bottom: 6px;
    background: #8492a6;
}

.student-id-signature span {
    color: #728198;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
}


/* =====================================================
   10. PHOTO ET IDENTITÉ
===================================================== */

.student-id-identite {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}


/* CADRE PHOTO */

.student-id-photo {
    width: 125px;
    height: 145px;
    overflow: hidden;
    border: 3px solid #e4ebf5;
    border-radius: 8px;
    background: #edf2f8;
    box-shadow: 0 4px 12px rgba(16, 47, 89, 0.12);
}

.student-id-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* =====================================================
   11. NOM COMPLET
===================================================== */

.student-id-nom {
    width: 100%;
    margin-top: 10px;
    text-align: center;
}

.student-id-nom h3 {
    margin: 0;
    color: #102f59;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.student-id-nom p {
    margin: 3px 0 0;
    color: #526984;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}


/* =====================================================
   12. PIED DE CARTE
===================================================== */

.student-id-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 30px;
    padding: 7px 25px;
    border-top: 1px solid #e7edf5;
    background: #f5f8fc;
    color: #728198;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
}


/* =====================================================
   13. BOUTON FERMER EN BAS
===================================================== */

.student-id-actions {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.btn-fermer-carte {
    min-width: 115px;
    padding: 10px 24px;
    border: none;
    border-radius: 7px;
    background: #183b68;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-fermer-carte:hover {
    background: #165bfb;
}


/* =====================================================
   14. RESPONSIVE — TABLETTES
===================================================== */

@media (max-width: 600px) {

    .modal-carte-eleve {
        padding: 12px;
        overflow-y: auto;
    }

    .modal-carte-eleve-conteneur {
        padding: 12px;
        margin: auto 0;
    }

    .student-id-card {
        min-height: auto;
    }

    .student-id-header {
        min-height: 75px;
        gap: 10px;
        padding: 12px 15px;
    }

    .student-id-logo {
        width: 48px;
        height: 48px;
        font-size: 13px;
    }

    .student-id-institution h2 {
        font-size: 20px;
    }

    .student-id-institution p {
        font-size: 10px;
    }

    .student-id-institution span {
        font-size: 7px;
    }

    .student-id-body {
        grid-template-columns: 1fr 125px;
        gap: 12px;
        padding: 17px 14px;
    }

    .student-id-photo {
        width: 105px;
        height: 125px;
    }

    .student-id-code strong {
        font-size: 17px;
    }

    .student-id-detail strong {
        font-size: 11px;
    }

    .student-id-signature {
        width: 100%;
        max-width: 155px;
    }

    .student-id-nom h3 {
        font-size: 12px;
    }

    .student-id-nom p {
        font-size: 10px;
    }

    .student-id-footer {
        padding: 7px 12px;
        font-size: 7px;
    }

}


/* =====================================================
   15. RESPONSIVE — PETITS TÉLÉPHONES
===================================================== */

@media (max-width: 380px) {

    .student-id-body {
        grid-template-columns: 1fr 105px;
        gap: 8px;
        padding: 14px 10px;
    }

    .student-id-photo {
        width: 95px;
        height: 115px;
    }

    .student-id-code strong {
        font-size: 15px;
    }

    .student-id-detail span {
        font-size: 8px;
    }

    .student-id-detail strong {
        font-size: 10px;
    }

}


/* =====================================================
   10. RESPONSIVE — TABLETTES
===================================================== */

@media (max-width: 900px) {

    .classes-filtres-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* =====================================================
   11. RESPONSIVE — MOBILES
===================================================== */

@media (max-width: 576px) {

    .dos-classes .dos-page-header {
        margin-bottom: 18px;
    }

    .dos-classes .dos-page-titre h2 {
        font-size: 20px;
    }

    .dos-classes .dos-page-titre p {
        font-size: 12px;
        line-height: 1.5;
    }

    .classes-filtres {
        padding: 16px;
        margin-bottom: 16px;
    }

    .classes-filtres-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .classes-liste-header {
        align-items: flex-start;
        padding: 16px;
    }

    .classes-liste-header p {
        max-width: 220px;
        line-height: 1.5;
    }

    .classes-total {
        padding: 7px 9px;
        font-size: 11px;
    }

    .modal-carte-eleve {
        padding: 12px;
    }

    .modal-carte-eleve-dialog {
        max-height: 94vh;
    }

    .modal-carte-eleve-header,
    .modal-carte-eleve-body {
        padding: 17px;
    }

    .carte-eleve-identite {
        grid-template-columns: 1fr 100px;
        gap: 12px;
    }

    .carte-eleve-photo {
        width: 100px;
        height: 125px;
    }

    .carte-eleve-details {
        padding: 15px;
        gap: 16px;
    }

    .modal-carte-eleve-footer {
        padding: 14px 17px;
    }

}