

/* === FORCER LA GRILLE TIME À PRENDRE TOUTE LA HAUTEUR DISPONIBLE === */
.fc .fc-timegrid-body {
    height: 100% !important;           /* ← très important */
    min-height: 100% !important;
}

/* La colonne entière (contenant tous les slots) doit prendre 100% */
.fc .fc-timegrid-col {
    height: 100% !important;
}

/* Le conteneur principal de la grille horaire */
.fc .fc-timegrid {
    height: 100% !important;
}

/* Les slots eux-mêmes : hauteur fixe + égalité visuelle */
.fc .fc-timegrid-slot {
    height: 30px !important;           /* ← 55 à 70px selon tes préférences */
    min-height: 30x !important;
    max-height: 30px !important;       /* ← on force vraiment l'égalité */
}






body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f0f8ff;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Boutons en-tête (à droite du logo) */
#header-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-btn {
    appearance: none;
    border: none;
    padding: 12px 22px;
    font-size: 1em;
    font-weight: 600;
    color: white;
    background: #5a9bd4;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.35);
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn:hover {
    background: #6ab0e8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.header-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Variantes spécifiques */
.galexia-btn {
    background: #2c7be5;
}

.galexia-btn:hover {
    background: #3d8af0;
}

.sheet-btn {
    background: #34a853;   /* vert Google-ish */
}

.sheet-btn:hover {
    background: #40b567;
}


.absences-block {
    visibility: hidden;
}

.fc-daygrid-event {
   font-size: 0.7em !important;
}



.notes-block {
    background: #fffef0;                /* fond jaune très clair */
    border: 2px solid #f0d36e;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 
        0 6px 12px rgba(0,0,0,0.18),
        inset 0 2px 6px rgba(255,245,180,0.6);
    position: relative;
    overflow: hidden;
}

/* Effet papier légèrement plié / collé */
.notes-block::before {
    content: "";
    position: absolute;
    top: -8px; right: -8px;
    width: 60px; height: 60px;
    background: linear-gradient(135deg, #ffd700 0%, #ffeb3b 50%, #f0d36e 100%);
    transform: rotate(12deg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    z-index: -1;
}

.notes-block h2 {
    margin: 0;
    padding: 10px 16px;
    background: #f4c430;
    color: #3c2f00;
    font-size: 1.55em;
    text-align: center;
    border-radius: 8px 8px 0 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

#notes-content {
    padding: 16px 20px;
    font-size: 1.05em;
    line-height: 1.45;
    color: #3c2f00;
    white-space: pre-wrap;           /* respecte les sauts de ligne */
    min-height: 80px;
    max-height: 180px;               /* limite à ~5-6 lignes */
    overflow: hidden;
    font-family: "Comic Sans MS", "Chalkboard SE", cursive;  /* ambiance post-it */
}

/* Si vide */
#notes-content:empty::before {
    content: "(pas de note pour le moment)";
    color: #aaa;
    font-style: italic;
    display: block;
    text-align: center;
    padding: 30px 10px;
}









.absences-block {
    display: none;
}

/* Masquer systématiquement les horaires sur tous les créneaux normaux */
.fc-timegrid-event .event-horaire {
    display: none !important;
}


/* Force la bande allDay en bas visible et belle */
.fc .fc-daygrid-body {
    display: block !important;
    background: #ffffff !important;
    border-top: 5px solid #4682b4 !important;
    padding: 20px 10px !important;
    min-height: 35px !important;  /* hauteur suffisante pour voir les blocs */
}


/* Masque les lignes horizontales après 19h pour renforcer l'impression "en bas de page" */
.fc-timegrid-slot-label[data-time="20:00:00"],
.fc-timegrid-slot-label[data-time="21:00:00"],
.fc-timegrid-slot-label[data-time="22:00:00"],
.fc-timegrid-slot-label[data-time="23:00:00"] {
    visibility: hidden;
}

.fc-timegrid-axis-frame {
    background: transparent !important;  /* fond transparent en bas */
}

.fc .fc-timegrid-body {
    background: #f0f8ff;  /* fond grille */
}

.fc .fc-daygrid-body {
    background: #ffffff !important;  /* bande en bas blanche */
    border-top: 4px solid #4682b4;     /* ligne bleue comme header */
    padding: 10px 0;
}


#header-container {
    flex-shrink: 0;
}

/* Centre tout le contenu à la largeur du header (important pour TV) */
#main {
    display: flex;
    flex: 1;
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
}

#calendar {
    flex: 0 0 80%;
    height: 100%;
    padding: 10px 10px 10px 20px;
    box-sizing: border-box;
}

#sidebar {
    flex: 0 0 20%;
    padding: 20px 25px 20px 15px;
    background: #e6f3ff;
    overflow-y: auto;
    box-sizing: border-box;
}

/* === LES 3 BLOCS (Météo / Absences / Parcelles) === */
.weather-block,
.absences-block,
.parcelles-block {
    background: white;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 18px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    font-size: 0.94em;               /* réduit globalement tout le texte à l’intérieur */
}

.weather-block h2,
.absences-block h2,
.parcelles-block h2 {
    margin: -12px -12px 14px -12px;
    padding: 10px 16px;
    background: #4682b4;
    color: white;
    border-radius: 14px 14px 0 0;
    font-size: 1.7em;
    text-align: center;
    font-weight: bold;
}

/* MÉTÉO */
#weather > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.45em;
    margin: 10px 0;
    padding: 0 8px;
}

#weather strong { font-weight: 600; }
#weather small { opacity: 0.7; font-size: 0.9em; }

/* ABSENCES */
#absences {
    list-style: none;
    padding: 0;
    margin: 0;
}

#absences li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin: 8px 0;
    border-radius: 12px;
    font-size: 1.4em;
    font-weight: 600;
    color: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

/* couleurs absences */
#absences li[style*="e74c3c"],
#absences li[style*="ff6b6b"] { background: #e74c3c; }   /* malade */
#absences li[style*="e67e22"],
#absences li[style*="ffb366"] { background: #e67e22; }   /* congés */

/* PARCELLES INTERDITES */
#parcelles-interdites:empty::after {
    content: "Aucune parcelle interdite cette semaine";
    display: block;
    text-align: center;
    font-size: 1.6em;
    color: #888;
    padding: 30px 10px;
}

.parcelle-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.3em;
    font-weight: bold;
    color: #c0392b;
    background: #fdf2f2;
    padding: 12px 20px;
    margin: 10px 0;
    border-radius: 12px;
    border: 3px solid #e74c3c;
    text-align: center;
}

/* FullCalendar petits ajustements TV */
.fc-event {
    font-size: 0.9em;
    padding: 4px !important;
    border-radius: 8px !important;
}

/* === BANDE ALL-DAY ULTRA-COMPACTE (astreinte, congés, formation...) === */
.fc .fc-daygrid {
    padding: 6px 8px !important;     /* réduit l'espace autour de la bande */
    min-height: auto !important;
    line-height: 1.2 !important;
}


/* Supprime les marges par défaut entre les événements all-day */
.fc .fc-daygrid-event-harness {
    margin: 0 !important;
}

/* Optionnel : réduit encore plus l'espacement vertical */
.fc .fc-daygrid-day-frame {
    padding: 2px 0 !important;
}

.fc-daygrid-body.fc-daygrid-body-unbalanced.fc-daygrid-body-natural {
    padding: 0px !important;
}

.fc .fc-daygrid-body-natural .fc-daygrid-day-events {
    margin-bottom: 0px !important;
}

span.fc-timegrid-axis-cushion.fc-scrollgrid-shrink-cushion.fc-scrollgrid-sync-inner {
    visibility: hidden !important;
}

.fc .fc-toolbar.fc-header-toolbar {
    margin-bottom: 0.2em;
}

/* Boutons navigation FullCalendar - version très petite (20x20 px) */
.fc-prev-button,
.fc-next-button {
    background: #4682b4 !important;
    border: none !important;
    color: white !important;
    font-size: 0.9em !important;     /* flèche petite mais lisible */
    width: 24px !important;         /* un peu plus que 20px pour que ce soit cliquable facilement */
    height: 24px !important;        /* hauteur réduite au minimum confortable */
    line-height: 24px !important;   /* centre parfait la flèche */
    border-radius: 6px !important;  /* coins légèrement arrondis */
    box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
    padding: 0 !important;
    min-width: unset !important;
}

.fc-prev-button:hover,
.fc-next-button:hover {
    background: #5a9bd4 !important;
    transform: scale(1.1);
}

/* Optionnel : espace entre les deux boutons */
.fc-prev-button {
    margin-right: 8px !important;
}


/* On cache complètement le titre de la toolbar FullCalendar */
.fc-toolbar-title {
    display: none !important;
}







/* Force hauteur 100% sur les événements timegrid pour que flex fonctionne parfaitement */
.fc-timegrid-event-harness-inset .fc-timegrid-event,
.fc-timegrid-event-harness > .fc-timegrid-event,
.fc-timegrid-event {
    height: 100% !important;
    position: absolute !important;
    width: 100% !important;
    inset: 0 !important;  /* remplit tout le harness */
    overflow: hidden;
}

/* Tailles optimisées TV */
.event-employe {
    font-weight: bold;
    font-size: 1.05em;
    margin-bottom: 1px;
}

.event-horaire {
    font-size: 0.95em;
    font-weight: 600;
    margin: 6px 0;
}

.event-atelier {
    font-size: 1.4em;
    font-weight: 400;
    margin: 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;    /* ← Ligne magique pour centrer horizontalement */
    gap: 10px;                  /* espace entre icône et texte (augmente un peu pour plus d'air) */
    width: 100%;                /* prend toute la largeur disponible */
    text-align: center;         /* sécurité supplémentaire */
}

/* Pour que ça reste beau même sur les créneaux courts */
.fc-timegrid-event.size-small .event-atelier {
    font-size: 1.0em !important;
    gap: 8px;
}

.fc-timegrid-event.size-medium .event-atelier {
    font-size: 1.15em !important;
    gap: 9px;
}
.event-title {
    font-size: 1.15em;
    margin-top: 6px;
    font-weight: 700;
}

/* Superposition propre et lisible */
.fc-timegrid-event {
    box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
}

/* Si tu veux un petit décalage automatique pour mieux voir les noms */
.fc-timegrid-event-harness {
    transform: translateY(calc(var(--overlap-index, 0) * 4px));  /* léger décalage vertical par ordre
}



/* Ajustement dynamique de la taille du texte selon la durée */
.fc-timegrid-event.size-small .event-employe,
.fc-timegrid-event.size-small .event-horaire,
.fc-timegrid-event.size-small .event-atelier,
.fc-timegrid-event.size-small .event-title {
    font-size: 0.75em !important;
}

.fc-timegrid-event.size-small .event-atelier {
    font-size: 1.0em !important; /* l'atelier reste bien lisible */
}

.fc-timegrid-event.size-medium .event-employe,
.fc-timegrid-event.size-medium .event-horaire,
.fc-timegrid-event.size-medium .event-atelier,
.fc-timegrid-event.size-medium .event-title {
    font-size: 0.85em !important;
}

.fc-timegrid-event.size-medium .event-atelier {
    font-size: 1.15em !important;
}



.event-atelier:empty {
    display: none;
}

/* Pour les petits créneaux, on ajuste aussi l'icône */
.fc-timegrid-event.size-small .event-atelier {
    font-size: 1.0em !important;
    gap: 6px;
}

.fc-timegrid-event.size-medium .event-atelier {
    font-size: 1.15em !important;
}

/* Créneaux très courts ≤1h : on cache l'horaire pour laisser la place à la description */
.fc-timegrid-event.size-verysmall .event-horaire {
    display: none !important;
}

/* Texte encore plus compact pour que tout rentre bien */
.fc-timegrid-event.size-verysmall .event-employe,
.fc-timegrid-event.size-verysmall .event-atelier,
.fc-timegrid-event.size-verysmall .event-title {
    font-size: 0.70em !important;
}

.fc-timegrid-event.size-verysmall .event-atelier {
    font-size: 0.95em !important;  /* atelier reste bien visible et centré */
    gap: 6px;
}

