﻿/* ==========================================
   Attendance — Shimmer (2 colonnes x 15 total)
   Onglets visuels (non cliquables)
   Nom+Prénom à gauche, Notif à droite
   ========================================== */

.attendance-shimmer-scope {
    --attn-skel-base: #e9ebf3;
    --attn-skel-spot: #f4f6fb;
    --attn-skel-shadow: rgba(0,0,0,.06);
    width: 100%;
    max-width: 100%;
}

/* En contexte "home", éviter que le skeleton prenne une largeur démesurée pendant le chargement. */
.module .attendance-shimmer-scope,
.module .classroom-attendance-shimmer {
    width: 100%;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.attendance-shimmer-separator {
    height: 1px;
    background: rgba(0,0,0,0.10);
    margin: 8px 2px;
    border-radius: 999px;
}

/* Onglets: le shimmer réutilise maintenant les classes réelles (att-tabs-header + att-tab-button). */

/* --- Contenu : 2 colonnes fixes (15 + 15 = 30) --- */
.attendance-shimmer-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 0 6px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.attendance-shimmer-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding:5px 0px;
    min-width: 0;
}

/* --- Entrée élève : [NameBlock] [Notif] --- */
.attendance-shimmer-entry {
    display: grid;
    grid-template-columns: 1fr 48px; /* gauche: nom/prénom | droite: notif */
    align-items: center;
    gap: 8px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    padding: 0px;
    min-height: 30px;
    box-shadow: 0 2px 6px var(--attn-skel-shadow);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.attendance-shimmer-entry.att-entry-morning {
    border-left: 6px solid rgba(0,128,128,0.35);
}

.attendance-shimmer-entry.att-entry-afternoon {
    border-left: 6px solid rgba(237,189,1,0.40);
}

.attendance-shimmer-entry::after {
        content: "";
        position: absolute;
        inset: 0;
        transform: translateX(-100%);
        background: linear-gradient( 90deg, transparent 0%, rgba(255,255,255,0.55) 45%, rgba(255,255,255,0.75) 55%, transparent 100% );
        animation: attn-shimmer-move 1.2s ease-in-out infinite;
    }

@keyframes attn-shimmer-move {
    100% {
        transform: translateX(100%);
    }
}

/* ==========================================
   Classroom attendance — Shimmer (liste compacte)
   ========================================== */
.classroom-attendance-shimmer {
    --attn-skel-base: #e9ebf3;
    --attn-skel-spot: #f4f6fb;
    --attn-skel-shadow: rgba(0,0,0,.06);
}

.classroom-attendance-shimmer-items {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.classroom-attendance-shimmer-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    padding: 4px 8px;
    min-height: 28px;
    box-shadow: 0 2px 6px var(--attn-skel-shadow);
    position: relative;
    overflow: hidden;
}

.classroom-attendance-shimmer-item::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.55) 45%, rgba(255,255,255,0.75) 55%, transparent 100%);
    animation: attn-shimmer-move 1.2s ease-in-out infinite;
}

.classroom-attendance-shimmer-label {
    height: 16px;
    width: 55%;
    border-radius: 6px;
    background: linear-gradient(0deg, var(--attn-skel-base), var(--attn-skel-spot));
}

.classroom-attendance-shimmer-indicators {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.classroom-attendance-shimmer-pill {
    width: 72px;
    height: 22px;
    border-radius: 10px;
    background: linear-gradient(0deg, var(--attn-skel-base), var(--attn-skel-spot));
}

/* REMPLACE l'ancien bloc "Bloc Nom + Prénom (2 lignes)" */
.attendance-shimmer-name {
    height: 18px; /* une seule ligne */
    border-radius: 6px;
    background: linear-gradient(0deg, var(--attn-skel-base), var(--attn-skel-spot));
    width: 72%;
}

/* Shimmer du bouton de confirmation (placeholder du btn btn-confirm-icon) */
.attendance-shimmer-confirm {
    width: 36px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(0deg, var(--attn-skel-base), var(--attn-skel-spot));
}

/* Padding du contenant + gap entre élèves */
.attendance-shimmer-columns {
    padding: .25rem;
}

.attendance-shimmer-col {
    gap: 4px;
}

/* Chaque élève = 30px de haut, 2 blocs : [nom][notif] */
.attendance-shimmer-entry {
    grid-template-columns: 1fr 48px; /* nom prend toute la place dispo */
    height: 28px;
    min-height: 28px;
    padding: 0 6px;
}

/* Si le module est trop étroit, éviter le scroll horizontal: on passe en 1 colonne */
@media (max-width: 560px) {
    .attendance-shimmer-columns {
        grid-template-columns: 1fr;
    }
}

/* Nom sur une seule ligne, largeur complète */
.attendance-shimmer-name {
    width: 140px;
}

.attendance-shimmer-notif {
    justify-self: center;
    width: 66px;
    height: 25px;
    border-radius: 6px;
    background: linear-gradient(0deg, var(--attn-skel-base), var(--attn-skel-spot));
}



/* Pas de position absolute: le markup du shimmer colle au layout réel. */
