﻿/* ---- CONTAINER PRINCIPAL ---- */
.home-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.daily-icon {
    font-size: 2.5rem;
    color: black;
    width: 60px;
}

/* ---- HEADER ---- */
.home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* ---- MODULES ---- */
.home-modules {
    flex-grow: 1;
    gap: 15px;
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(420px, 2fr) minmax(360px, 1.2fr);
    align-items: start;
}

@media (max-width: 1200px) {
    .home-modules {
        grid-template-columns: minmax(360px, 1fr) minmax(420px, 2fr);
    }

    .module-schedule {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .home-modules {
        grid-template-columns: 1fr;
    }

    .module-schedule {
        grid-column: auto;
    }
}

/* Module principal (flex auto pour prendre l'espace restant) */
.module {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    height: fit-content;
    overflow-y:auto;
    overflow-x:hidden;
}

/* Colonne de gauche : Appel + Suivi des appels */
.module-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: fit-content;
}

/* Appel à gauche */
.module-attendance {
    flex: 3;
    max-height:fit-content;
    overflow:auto;
}

/* Appel à gauche */
.module-apc-participation {
    flex: 1;
    max-height: fit-content;
    overflow: auto;
}

/* Suivi des appels en dessous */
.module-classroom-attendance {
    flex: 1;
    overflow: auto;
}

/* Agenda à droite */
.module-schedule {
    flex: 1;
}

/* Section centrale qui prend l'espace restant */
.module-center {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: fit-content;
}

/* Suivi des appels */
.module-classroom-attendance {
    flex: 1;
}

/* Outils */
.module-tools {
    flex: 1;
}


.module-wrapper {
    padding: 0 !important;
    margin: 0 !important;
}

.module-content-header {
    display: flex;
    flex-direction: column;
}

    .module-content-header .header-details {
        border: none;
        border-radius: 10px 10px 0 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--primary-color);
        padding: 0px;
        color: white;
        max-height: 70px;
        min-height: 70px;
        overflow: hidden;
    }

.module-content {
    width: 100%;
    overflow: auto;
    border-radius: 0 0 10px 10px;
}

.daily-event-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.daily-event-item {
    padding: 5px;
}

.empty-state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    background: rgba(87, 108, 188, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    margin: 20px;
}

.empty-state-icon {
    font-size: 3rem;
    color: #576CBC;
    margin-bottom: 10px;
    opacity: 0.8;
}

.empty-state-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #0B2447;
}

.daily-event-time-display {
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin:0;
}

.daily-event-time-column {
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: #333;
}

.daily-event-separator {
    width: 2px;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    margin: 0 10px;
}

.daily-event-content-column {
    flex-grow: 1;
    padding-left: 10px;
}

/* Titre principal */
.daily-event-title {
    font-size: 1.2rem;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

/* Détails légèrement décalés */
.daily-event-details {
    margin-left: 10px; /* 🔹 Décalage léger du contenu sous le titre */
}

.school-floating-icon {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 1rem;
}

.replacement-icon-button i {
    font-size: 1rem;
    font-weight: bold;
    padding: 6px 10px;
}

.replacement-icon-button:disabled i {
    opacity: 0.4;
    cursor: default;
}

.daily-event-icon-column {
    text-align: center;
}

.list-group-item {
    min-height: 70px;
}

/*  --------------------------------------- */
/* Conteneur parent positionné pour l’overlay */
.daily-events-refresh-container {
    position: relative;
}

/* Le contenu reste visible mais "grisé" pendant refresh */
.daily-events-content.is-refreshing {
    filter: saturate(0.6) opacity(0.7);
    transition: filter 120ms ease, opacity 120ms ease;
}

/* Overlay qui bloque les interactions */
.daily-events-refresh-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.05); /* voile léger, discret */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3; /* au-dessus du contenu du module */
    pointer-events: all; /* capte les clics */
}

/* Petit badge central */
.daily-events-refresh-badge {
    backdrop-filter: blur(2px);
    padding: .5rem .75rem;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
}

/* Rotation pour l’icône */
.spin {
    animation: spin 800ms linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
