body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 20px; 
    color: #2c3e50; 
    background-color: #f5f7fa; 
}

/* --- Conteneur Général Hub --- */
.horaires-hub-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    text-align: center;
}

.class-profession {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 400;
    color: #64748b;
    text-align: center;
    line-height: 1.3;
}

.class-section {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* --- Barre de recherche Hub --- */
.search-container {
    margin: 1.5rem 0 2rem 0;
}

.search-input {
    width: 90%;
    max-width: 700px;
    padding: 12px 20px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.class-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-card, #ffffff);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #1e293b;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.class-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #3b82f6;
}

/* --- Interface Calendrier Responsive --- */
.calendar-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

@media (min-width: 600px) {
    .calendar-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.view-switcher {
    display: inline-flex;
    background: #e2e8f0;
    padding: 0.25rem;
    border-radius: 6px;
}

.btn-toggle {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #475569;
    font-size: 0.9rem;
    border-radius: 4px;
}

.btn-toggle.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* --- Cartes des Cours (Mobile-First) --- */
.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.event-card {
    display: flex;
    background: #ffffff;
    border-left: 5px solid #3b82f6; /* Marqueur visuel de cours */
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0 6px 6px 0;
    padding: 1rem;
}

.event-time {
    font-weight: bold;
    color: #2563eb;
    min-width: 90px;
    border-right: 1px solid #e2e8f0;
    margin-right: 1rem;
    display: flex;
    align-items: center;
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-title {
    margin: 0;
    font-size: 1.1rem;
    color: #0f172a;
}

.event-location, .event-date {
    font-size: 0.85rem;
    color: #64748b;
}

/* --- VUE SEMAINE RESPONSIVE --- */
/* --- Barre d'onglets des jours (Navigation Mobile) --- */
.day-tabs-bar {
    display: flex;
    gap: 4px;
    padding: 4px 0 10px 0;
    margin-top: 10px;
    margin-bottom: 5px;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}

.day-tab-btn {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 2px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    user-select: none;
    box-sizing: border-box;
}

.day-tab-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.day-tab-btn.active {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.day-tab-btn.is-today:not(.active) {
    border-color: #3b82f6;
    color: #2563eb;
    background: #eff6ff;
}

.day-tab-btn .event-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #3b82f6;
    flex-shrink: 0;
}

.day-tab-btn.active .event-dot {
    background-color: #ffffff;
}

.week-grid {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    margin-top: 10px;
    padding-bottom: 15px;
    /* Rendu "Magnétique" (Swipe) sur smartphone */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; 
}

.day-column {
    flex: 0 0 85vw; /* Sur mobile, chaque jour prend 85% de la largeur */
    scroll-snap-align: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    min-height: 300px;
    box-sizing: border-box;
}

/* Sur les écrans d'ordinateur ou grandes tablettes (paysage) */
@media (min-width: 900px) {
    .day-tabs-bar {
        display: none;
    }
    .week-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr); /* Les 7 jours côte à côte */
        overflow-x: visible;
        margin-top: 20px;
    }
    .day-column {
        flex: auto;
    }
}

/* --- Spinner d'animation de chargement --- */
.calendar-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.calendar-loading-overlay.active {
    display: flex;
}

.calendar-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #cbd5e1;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spinOverlay 0.75s linear infinite;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes spinOverlay {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

