:root {
    /* Mise à jour de la police principale */
    --main-font: 'UnifrakturCook', cursive; 
    --border-color: #b30000;
    --card-bg: rgba(0, 0, 0, 0.4);
}

/* On applique la police spécifiquement aux titres pour le style */
.week-title, .day-name {
    font-family: var(--main-font);
    letter-spacing: 2px; /* Un peu d'espace car cette police est dense */
}
/* Optionnel : Garder une police plus simple pour les textes d'infos 
   si tu trouves le gothique difficile à lire pour les petites lettres */
.time-tag, .category-text, .title-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--main-font);
    background-color: #0e0e10; /* Fond neutre pour le site */
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden; /* Empêche le scroll horizontal */
}

.controls { padding: 10px; color: white; z-index: 10; }

.canvas {
    width: 1920px;
    height: 1080px;
    background-image: url('../img/fond.png');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* On s'assure qu'il n'y a pas de scroll interne */
}

/* Conteneur du titre et des boutons */
.header-container {
    width: 95%;
    display: flex;
    justify-content: space-between; /* Titre à gauche, boutons à droite */
    align-items: center;
    margin: 20px 0;
}

#planning-container {
    width: 95%;
    height: 90%;
    display: flex;
    flex-direction: column;
}

.week-title {
    font-family: var(--main-font);
    font-size: 3.8rem;
    color: #ffffff;
    text-shadow: 3px 3px 12px rgba(0,0,0,1);
    margin: 0;
}

/* Style des boutons flèches épurés */
.nav-buttons {
    display: flex;
    gap: 10px;
}

.days-row {
    display: flex;
    flex: 1; /* Prend tout l'espace restant */
    gap: 15px;
    padding-bottom: 20px;
}

.day-column {
    flex: 1;
    background: var(--card-bg);
    border-top: 5px solid var(--border-color);
    border-radius: 4px;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column; /* Permet l'alignement vertical interne */
    padding: 10px;
}

.day-name {
    font-family: var(--main-font); /* Utilise UnifrakturCook */
    color: var(--border-color);    /* Ton rouge #b30000 */
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
    
    /* Ajustements de taille */
    font-size: 2.2rem;             /* Augmenté (était à 1.4rem/1.6rem) */
    margin-bottom: 20px;
    padding-bottom: 10px;
    
    font-weight: bold;
    text-align: center;
    text-transform: capitalize;
    border-bottom: 2px solid rgba(179, 0, 0, 0.3); /* Ligne subtile sous le jour */
    letter-spacing: 1px;
}

.events-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-card {
    flex: 1; /* ICI : l'événement s'étire pour remplir la colonne */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centre le contenu au milieu de l'espace alloué */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    overflow: hidden;
}

.box-art {
    max-height: 60%; /* Empêche l'image de manger tout l'espace si bcp d'événements */
    width: auto;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.time-tag {
    background: var(--border-color);
    padding: 3px 12px;
    border-radius: 15px;
    font-weight: bold;
    margin-bottom: 5px;
}

.event-details-text { text-align: center; margin-top: 5px; }
.category-text { color: white; font-weight: bold; font-size: 1.1rem; display: block; }
.title-text { color: #ccc; font-size: 0.9rem; font-style: italic; }

.nav-buttons button {
    background: var(--border-color);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.nav-buttons button:hover {
    opacity: 1;
}

/* On masque les boutons lors d'un screenshot (si tu utilises une fonction d'impression/capture spécifique) */
@media print {
    .nav-buttons { display: none; }
}

/* Conteneur Titre + Photo + Boutons */
.header-container {
    width: 95%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 25px;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--border-color); /* Ton rouge #b30000 */
    box-shadow: 0 0 20px rgba(179, 0, 0, 0.6);
    object-fit: cover;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.twitch-url {
    font-family: 'Segoe UI', sans-serif; /* Plus lisible que la police gothique */
    font-size: 1.8rem;
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
    margin-top: -10px;
}

/* On s'assure que le titre ne prend pas de marges inutiles */
.week-title {
    margin: 0 !important;
}

/* Style des boutons flèches */
.nav-buttons button {
    background: var(--border-color);
    color: white;
    border: none;
    padding: 15px 25px;
    font-size: 1.8rem;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.2s;
}

.nav-buttons button:hover {
    transform: scale(1.1);
}

.twitch-link {
    text-decoration: none; /* Supprime le soulignement par défaut */
    color: inherit;       /* Garde la couleur blanche définie plus haut */
    width: fit-content;
}

.twitch-url {
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.8rem;
    color: white; /* Couleur de base */
    font-weight: bold;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
    transition: color 0.3s, text-shadow 0.3s; /* Transition fluide pour le survol */
}

/* Effet au survol : on utilise la couleur du thème (ton rouge) */
.twitch-link:hover .twitch-url {
    color: var(--border-color); 
    text-shadow: 0 0 15px var(--border-color); /* Petit effet néon rouge au survol */
}

/* ==========================================================================
   MENU DE NAVIGATION GLOBAL
   ========================================================================== */

.nav-item {
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.15rem;
    font-weight: bold;
    color: #aaaaaa;
    text-decoration: none;
    padding: 14px 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
    border-left: 0px solid transparent;
    box-shadow: inset 0 0 0 rgba(179, 0, 0, 0);
    
    /* Transition ultra fluide sur toutes les propriétés modifiées */
    transition: 
        color 0.25s ease, 
        background-color 0.25s ease, 
        border-left 0.2s ease, 
        padding-left 0.2s ease, 
        box-shadow 0.3s ease, 
        transform 0.2s ease;
}

.nav-icon {
    margin-right: 12px;
    font-size: 1.2rem;
    transition: transform 0.25s ease;
}

/* 1. EFFET AU SURVOL (HOVER) */
.nav-item:hover {
    color: #ffffff;
    background-color: rgba(179, 0, 0, 0.08); /* Légère lueur rouge en fond */
    border-left: 4px solid rgba(179, 0, 0, 0.5); /* Bordure rouge timide */
    padding-left: 22px; /* Se décale légèrement vers la droite */
    transform: translateX(4px); /* Petit effet de glissement dynamique */
}

/* Dynamisation de l'icône au survol */
.nav-item:hover .nav-icon {
    transform: scale(1.2); /* Grossit légèrement */
}

/* 2. EFFET SÉLECTIONNÉ (ACTIVE) */
.nav-item.active {
    color: #ffffff;
    background-color: rgba(179, 0, 0, 0.18); /* Fond rouge plus prononcé */
    border-left: 5px solid var(--border-color); /* Vraie bordure rouge charte */
    padding-left: 24px;
    transform: translateX(6px);
    /* Effet néon interne rouge sombre */
    box-shadow: inset 0 0 15px rgba(179, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.3);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.nav-item.active .nav-icon {
    transform: scale(1.25);
    filter: drop-shadow(0 0 5px var(--border-color));
}

/* Force le curseur en forme de main sur tous les éléments cliquables du menu */
.nav-item, .submenu-item {
    cursor: pointer !important;
}