/* ------------------------------------ Global Styles ------------------------------------ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: rgb(236, 239, 182);
  color: black;
  /*padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);*/
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
#datetime {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  color: #444;
  background-color: #f9f9f9;
  padding: 8px 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000; /* reste au-dessus des autres éléments */
}

#clock {
  color: #0078D4;
  font-weight: 600;
  font-size: 0.9rem;
}

#date {
  font-weight: 500;
  font-size: 0.85rem;
}
#monthLabel {
  background: linear-gradient(135deg, #8dbd8e, #4c7a4f);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  margin: 0 auto;        /* centrage horizontal */
  display: table;        /* astuce pour que margin auto fonctionne */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}


.banner-date {
  background: rgba(255,255,255,0.2);
  padding: 6px 12px;
  border-radius: 6px;
  margin: 0 5px;
}
.banner-arrow {
  margin: 0 8px;
  font-weight: bold;
}
/* ========================================================
   CONTENEURS DES MINI-CALENDRIERS (GF, CHU, Adaléa)
======================================================== */
#gfInlineCalendar,
#chuInlineCalendar,
#adaleaInlineCalendar {
  margin-top: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
  background: #fff;
}

/* ========================================================
   GRILLES COMMUNES
======================================================== */
.gf-grid,
.chu-grid,
.adalea-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

/* ========================================================
   BASE COMMUNE POUR TOUS LES JOURS
======================================================== */
.mini-day {
  padding: 6px;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.15s ease;
  user-select: none;
  border: 1px solid transparent;
}

.mini-day.empty {
  background: transparent;
  border: none;
  cursor: default;
}

.mini-day.disabled {
  background: #f0f0f0;
  color: #999;
  border: 1px solid #ddd;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ========================================================
   GRAND FROID (bleu froid)
======================================================== */
.gf-day:not(.disabled) {
  background: #f5faff;
  border-color: #c8e1ff;
}

.gf-day:not(.disabled):hover {
  background: #e3f1ff;
  border-color: #7bbdff;
}

.gf-day.selected {
  background: #ffdddd !important;
  border-color: #ff8a8a !important;
  color: #b30000;
  font-weight: bold;
}

/* ========================================================
   CHU (orange / ambre)
======================================================== */
/* -------------------------------------------------------
   Base CHU mini-calendar
------------------------------------------------------- */

.chu-day {
  background: #fff;
  border: 1px solid #ddd;
  padding: 4px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

/* -------------------------------------------------------
   Jours actifs (non désactivés)
------------------------------------------------------- */

.chu-day:not(.disabled):not(.blocked) {
  background: #fff8f0;
  border-color: #ffd9b3;
}

.chu-day:not(.disabled):not(.blocked):hover {
  background: #ffe9d6;
  border-color: #ffb066;
}

/* -------------------------------------------------------
   Jours bloqués (sélectionnés)
------------------------------------------------------- */

.chu-day.blocked,
.chu-day.selected { /* même couleur pour les deux */
  background-color: #ffb3b3 !important;
  border-color: #cc0000 !important;
  color: #660000 !important;
  font-weight: bold;
}

/* -------------------------------------------------------
   Jours désactivés (hors période)
------------------------------------------------------- */

.chu-day.disabled {
  background: #f2f2f2;
  border-color: #ddd;
  color: #aaa;
  cursor: default;
}

/* ========================================================
   ADALEA (vert doux)
======================================================== */
.adalea-day:not(.disabled) {
  background: #f8fff8;
  border-color: #cfeccc;
}

.adalea-day:not(.disabled):hover {
  background: #e6ffe6;
  border-color: #7cd67c;
}

.adalea-day.selected {
  background: #d9ffd9 !important;
  border-color: #5cb85c !important;
  color: #2d7a2d;
  font-weight: bold;
}

/* ========================================================
   PANELS (GF / CHU / Adaléa)
======================================================== */
#grandFroidDates {
  background: #e8f4ff;
  border: 1px solid #8ac6ff;
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
}

#chuPanel {
  background: #fff3e8;
  border: 1px solid #ffb27a;
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
}

#adaleaPanel {
  background: #e9f8ec;
  border: 1px solid #8ed9a5;
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
}

/* Titres */
#grandFroidDates h3 { color: #0077cc; }
#chuPanel h3 { color: #cc6600; }
#adaleaPanel h3 { color: #2e8b57; }

#grandFroidDates h4,
#chuPanel h4,
#adaleaPanel h4 {
  margin-top: 15px;
  font-size: 15px;
  font-weight: bold;
}

/* ========================================================
   CHECKBOXES
======================================================== */
#gf-filter label,
#chu-filter label,
#adaleaPanel label {
  background: white;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

/* ========================================================
   CHAMPS DE DATE
======================================================== */
#inscriptionStart,
#inscriptionEnd {
  background-color: white;
  border: 1px solid #87CEFA;
  border-radius: 4px;
  padding: 5px;
  font-size: 14px;
  color: #333;
}

#consultationStart,
#consultationEnd,
#grandFroidStart,
#grandFroidEnd {
  background-color: white;
  border: 1px solid #d3d3d3;
  border-radius: 4px;
  padding: 5px;
  font-size: 14px;
  color: #333;
}

#inscriptionStart,
#inscriptionEnd,
#consultationStart,
#consultationEnd,
#grandFroidStart,
#grandFroidEnd {
  margin-right: 8px;
}

/* Conteneur des filtres */
/* Conteneur des filtres */
.filters-wrapper {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;              /* espace minimal entre blocs */
  padding: 2px;          /* padding plus compact */
}

/* Bloc des filtres  pour les dates*/
.filters {
  display: inline-flex;
  align-items: center;
  gap: 3px;              /* réduit l’espace entre les éléments */
  padding: 2px 4px;      /* padding plus petit */
  border-radius: 6px;
  background: rgb(153, 227, 149);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  
}

/* Labels plus discrets */
.filters label {
  font-size: 0.75em;
  font-weight: 400;
  color: #666;
  margin: 0;             /* supprime toute marge */
  }

/* Inputs de date modernisés */
.filters input[type="date"] {
  border: none;
  border-bottom: 1px solid #ccc; /* ligne plus fine */
  border-radius: 0;
  background: rgb(195, 234, 184);
  padding: 2px 2px;      /* réduit le padding interne */
  font-size: 0.75em;     /* police plus petite */
  transition: border-color 0.2s ease;
}

.filters input[type="date"]:focus {
  border-bottom-color: #4CAF50;
  box-shadow: none;
  outline: none;
}

/* Bouton modernisé */
.filters button {
  background: linear-gradient(135deg, #4CAF50, #43a047);
  border-radius: 16px;          /* bouton plus compact */
  padding: 4px 10px;            /* réduit le padding */
  font-size: 0.75em;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.filters button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}
.small-text {
  font-size: 10px !important;
  font-family: Arial, sans-serif;
  font-weight: 300; /* police plus fine */
}

.small-text label,
.small-text input,
.small-text button {
  font-size: 10px !important;
}


.event-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.event-actions button {
  background-color: #f0f0f0;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.event-actions button:hover {
  background-color: #e0e0e0;
}

.event-actions button[data-action="edit"] {
  color: #2c7be5;
}

.event-actions button[data-action="delete"] {
  
  color: #d9534f;
}
.btn-primaryMDP{
  background-color: #4CAF50;
  color: white;
  order: 1;

  /* Ajouts pour agrandir */
  font-size: 1em;        /* Taille du texte */
  padding: 8px 12px;      /* Espace intérieur (haut/bas, gauche/droite) */
  border-radius: 6px;      /* Coins arrondis (optionnel) */
  min-width: 100px;        /* Largeur minimale */
  text-align: center;
}
.btn-secondaryMDP{
  background-color: #f44336; /* Annuler */
  color: white;
   order: 2;
   /* Ajouts pour agrandir */
  font-size: 1em;        /* Taille du texte */
  padding: 8px 12px;      /* Espace intérieur (haut/bas, gauche/droite) */
  border-radius: 6px;      /* Coins arrondis (optionnel) */
  min-width: 100px;        /* Largeur minimale */
  text-align: center;
}
td[contenteditable] {
  background-color: #fffbe6;
  border: 1px solid #ccc;
  cursor: text;
}
#excelEditor table {
  width: 100%;
  border-collapse: collapse;
}
#excelEditor th, #excelEditor td {
  padding: 8px;
  text-align: left;
}


#excelPanel {
  display: none;
  margin-top: 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 15px;
  background: #fafafa;
}
#excelPanel table {
  width: 100%;
  border-collapse: collapse;
}
#excelPanel th, #excelPanel td {
  padding: 8px;
  text-align: left;
}
#excelPanel td[contenteditable] {
  background-color: #fffbe6;
  border: 1px solid #ccc;
  cursor: text;
}
#excelTable tr.selected {
  background-color: #ffe0e0;
}

.warning-message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #f8d7da;
  color: #721c24;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
}
/* ================================
   STYLE GRAND FROID (bleu foncé)
   ================================ */
/* ================================
   GRAND FROID — STYLE BLEU GLACÉ (compact)
   ================================ */

.day-header.grand-froid {
  background: linear-gradient(135deg, #5ec8ff, #2b8ac7);
  color: #ffffff !important;
  padding: 4px 6px;              /* 🔥 Hauteur réduite */
  border-radius: 6px 6px 0 0;
  font-weight: 600;
  font-size: 13px;               /* 🔥 Plus compact */
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;           /* 🔥 Aligne flocon + texte sur la même ligne */
  gap: 4px;                      /* 🔥 Espace réduit */
  line-height: 1.2;              /* 🔥 Réduit la hauteur totale */
  min-height: 28px;              /* 🔥 Empêche les variations de hauteur */
}

/* Flocon avant la date */
.day-header.grand-froid::before {
  content: "❄️";
  font-size: 16px;               /* 🔥 Plus petit pour s’aligner */
  line-height: 1;                /* 🔥 Empêche le flocon de pousser la hauteur */
  display: inline-flex;          /* 🔥 Alignement parfait */
  align-items: center;
  justify-content: center;
  margin-top: 0;                 /* 🔥 Supprime tout décalage vertical */
  filter: drop-shadow(0 0 3px rgba(255,255,255,1))
          drop-shadow(0 0 5px rgba(200,220,255,0.9));
}

/* Compteur */
.day-header.grand-froid .inscrits-count {
  font-size: 11px;               /* 🔥 Plus compact */
  color: #e8f6ff;
  font-weight: 500;
}

/* Conteneur du jour */
.day.grand-froid {
  border: 2px solid #1b6fa8;
  border-radius: 6px;
  background: #e9f5ff;
  overflow: hidden;
}
.header-adalea {
  color: #e8f6ff;
  font-weight: bold;
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 600px) {
  .day-header.grand-froid {
    padding: 4px 6px;
    font-size: 12px;
    gap: 3px;
  }

  .day-header.grand-froid::before {
    font-size: 14px;
  }

  .day-header.grand-froid .inscrits-count {
    font-size: 10px;
  }
}

@media (max-width: 400px) {
  .day-header.grand-froid {
    font-size: 11px;
  }
}


/* ------------------------------------ PDF Styles ------------------------------------ */

@page {
  size: A4 landscape;
  margin: 0;
}

#pdfContent {
  margin: 0 !important;
  padding: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  width: 100%;
  height: auto;
}

#pdfContent * {
  page-break-inside: avoid;
  break-inside: avoid;
}

h1, #datetime, .filters-wrapper, #calendarContainer {
  page-break-before: auto !important;
  page-break-after: auto !important;
}
 .admin-title {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #333;
  font-family: "Segoe UI", sans-serif;
}

.admin-icon {
  font-size: 14px;
  margin-right: 6px;
}

.admin-select {
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff, #f3f3f3);
  color: #333;
  font-family: "Segoe UI", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-select:hover {
  border-color: #0078d4;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.admin-select:focus {
  border-color: #0078d4;
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,120,212,0.2);
}
#closeAdminBtn {
  display: none; /* caché par défaut */
  background: linear-gradient(180deg, #ff4d4d, #d93636); /* rouge dégradé */
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Segoe UI", sans-serif;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

#closeAdminBtn:hover {
  background: linear-gradient(180deg, #ff6666, #e64545);
  box-shadow: 0 3px 6px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}

#closeAdminBtn:active {
  background: linear-gradient(180deg, #d93636, #b32d2d);
  transform: translateY(1px);
}

/* ------------------------------------ Calendar & Events ------------------------------------ */
   
.select-margin {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 60%; /* ✅ ajuste selon ton besoin */
  max-width: 300px; /* ✅ limite la largeur */
  padding: 8px;
}


/* Overlay réduit et centré */

.modal-overlay {
  position: fixed;
  top: 40px; /* distance depuis le haut */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.4); /* zone grise autour */
  color:white;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  width: auto;
  height: auto;
}

/* Contenu de la modale */
.modal-content {
  background-color: #444;
    padding: 20px;
  border-radius: 10px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  text-align: left;
}
.modal-content {
  overflow-y: auto;
  max-height: 90vh;
}

.event-item {
  overflow: hidden;
  height: 0;
  transition: height 0.3s ease;
  padding: 0;
  margin: 0;
}

.event-item.expanded {
  height: auto;
  padding: 10px;
  margin: 10px 0;
}

.log-line {
  display: block;
  cursor: pointer;
  margin: 0;
  padding: 0;
  line-height: 1.2;
  transition: background 0.2s;
}
.log-line:hover {
  background: #333;
}


.event-badges {
  display: flex;
    flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.badge {
  display: inline-block;
  margin: 2px 4px;
  padding: 2px 6px;
  background-color: #f0f0f0;
  border-radius: 4px;
  font-size: 0.85em;
}
.badge-right {
  margin-left: auto;
  display: flex;
}

.badge.ce { margin: 2px; background-color: #2c3e50; padding: 4px 8px; border-radius: 4px; font-size: 0.85em; font-weight: bold; color: white; }
.badge.chauffeur { margin: 2px; background-color: #27ae60; padding: 4px 8px; border-radius: 4px; font-size: 0.85em; font-weight: bold; color: white; }
.badge.equipier { margin: 2px; background-color: #f39c12; padding: 4px 8px; border-radius: 4px; font-size: 0.85em; font-weight: bold; color: white; }
.badge.reserve { margin: 2px; background-color: #747778; padding: 4px 8px; border-radius: 4px; font-size: 0.85em; font-weight: bold; color: white; }
.badge.autre { margin: 2px; background-color: #9b59b6; padding: 4px 8px; border-radius: 4px; font-size: 0.85em; font-weight: bold; color: white;}
/* Style de base commun */
.badge.adalea-matin,
.badge.adalea-am {
  margin: 2px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: bold;
  color: white;
  box-shadow: 0 0 4px rgba(52, 152, 219, 0.6); /* lueur glacée */
}

/* ❄️ Adaléa Matin : bleu clair */
.badge.adalea-matin {
  background-color: #5dade2; /* bleu matin, plus doux */
}

/* ❄️ Adaléa A.M. : bleu plus profond */
.badge.adalea-am {
  background-color: #2e86c1; /* bleu plus intense */
}

/* ✅ Media query pour les petits écrans (iPhone, etc.) */

.install-section {
  margin-top: 30px;
  text-align: center;
}
/* Correction de l'espacement des checkbox */
.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px; /* ou 4px pour un espacement plus serré */
}

.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px; /* ✅ rapproché la case et le texte */
  font-size: 0.95em;
  line-height: 1.2;
  cursor: pointer;
}

/* Optionnel : agrandit un peu la case pour iPhone (plus facile à cliquer) */
.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0078d4; /* couleur bleue stylisée */
}

.btn-group {
  margin-top: 8px; /* réduit l’espace avec les éléments du dessus */
  display: flex;
  justify-content: flex-end; /* ou space-between, selon le besoin */
  gap: 6px; /* espace entre les boutons */
}
.btn-primary {
  display: flex;
  justify-content: space-between; /* ou center / flex-end selon ton besoin */
  gap: 10px;
  margin-top: 4px;
}
.btn-primary button {
  flex: 1;
   font-size: 1em;
  border-radius: 6px;
  border: none;
  cursor: pointer;
   width: 100%;
  max-width: 360px;
  padding: 12px 16px;
  transition: background-color 0.3s;
}
.btn-ajouter {
  background-color: #4CAF50;
  color: white;
  order: 1;

  /* Ajouts pour agrandir */
  font-size: 1em;        /* Taille du texte */
  padding: 8px 12px;      /* Espace intérieur (haut/bas, gauche/droite) */
  border-radius: 6px;      /* Coins arrondis (optionnel) */
  min-width: 100px;        /* Largeur minimale */
  text-align: center;
}

.btn-annuler {
  background-color: #f44336; /* Annuler */
  color: white;
   order: 2;
   /* Ajouts pour agrandir */
  font-size: 1em;        /* Taille du texte */
  padding: 8px 12px;      /* Espace intérieur (haut/bas, gauche/droite) */
  border-radius: 6px;      /* Coins arrondis (optionnel) */
  min-width: 100px;        /* Largeur minimale */
  text-align: center;
}
.btn-modifier {
  background-color: #4CAF50;
  color: white;
   order: 3;
   /* Ajouts pour agrandir */
  font-size: 1em;        /* Taille du texte */
  padding: 8px 12px;      /* Espace intérieur (haut/bas, gauche/droite) */
  border-radius: 6px;      /* Coins arrondis (optionnel) */
  min-width: 100px;        /* Largeur minimale */
  text-align: center;
}
.btn-charger {
  background-color: #3490dc;
  color: white;
   order: 3;
   /* Ajouts pour agrandir */
  font-size: 1em;        /* Taille du texte */
  padding: 8px 12px;      /* Espace intérieur (haut/bas, gauche/droite) */
  border-radius: 6px;      /* Coins arrondis (optionnel) */
  min-width: 100px;        /* Largeur minimale */
  text-align: center;
}
.btn-exporter {
  background-color: #3490dc;
  color: white;
  font-size: 1em;
  padding: 8px 12px;
  border-radius: 6px;
  min-width: 100px;
  text-align: center;

  /* Ajout pour centrer le texte dans le bouton */
 /*  display: flex;
  justify-content: center;
  align-items: center; */
}

.btn-primary:hover { background-color: grey; }

.inscrits-count {
  font-size: 0.7em;
  color: #555;
  margin-left: 6px;
}

/* ------------------------------------ Header & Filters ------------------------------------ */


.day.registration-allowed {
  background-color: #e0ffe0; /* vert clair = inscription possible */
  cursor: pointer;
}

.day:not(.registration-allowed) {
  background-color: #f0f0f0; /* gris clair = consultation seule */
  cursor: default;
}

#eventtitle {
  font-size: 1.3em;
  padding: 14px 20px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: #333;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  /* Supprimer appearance */
  /* appearance: none; */
  /* -webkit-appearance: none; */
 /* background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='14' width='14' viewBox='0 0 20 20'><path d='M5.516 7.548l4.484 4.955 4.484-4.955z'/></svg>");*/
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
}
@media (prefers-color-scheme: dark) {
  #eventtitle { background-color: #f9f9f9; color: #111; border-color: #aaa; }
}

.filters { display: flex; justify-content: space-between; margin: 20px; }
.filters label {font-size:1em; font-weight: bold; }
.filters input, .filters select { padding: 5px; font-size: 1em; }



/* ------------------------------------ Calendar Navigation ------------------------------------ */

h1 {
  text-align: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 2.5em;
  color: #2c3e50;
  margin-top: 50px;
  text-shadow: 1px 1px 2px #aaa;
}

#navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 30px 0;
  padding: 12px 0;
  background-color: #f0f4f8;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}



/* ------------------------------------ Calendar Grid ------------------------------------ */
/* Conteneur principal du calendrier */
#calendarContainer {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
 }

/* En-tête du calendrier */
#calendarHeader {
  margin-bottom: 1rem;
}

#calendar {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: stretch;     /* <-- obligatoire */
  height: 100%;             /* <-- pour que ça s'étire */
  min-height: 100%;
}

#calendar {
  flex-wrap: nowrap;
  gap: 20px;
  margin-top: 30px;
  padding: 20px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
#calendar {
  
  flex-direction: row; /* Par défaut, côte à côte */
}

#calendar.stacked {
  flex-direction: column; /* Empilé verticalement */
}
.calendar-input {
  width: 100%;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.btn-save:hover {
  background-color: #0056b3;
}
.day.blocked {
  background-color: #f8d7da;   /* rouge clair */
  color: #721c24;              /* texte rouge foncé */
  border: 1px solid #f5c6cb;   /* bordure assortie */
  cursor: not-allowed;         /* curseur interdit */
  opacity: 0.7;                /* effet visuel */
}

#calendar-filter {
  display: flex;
  justify-content: center; /* Centre les boutons horizontalement */
  gap: 10px;               /* Espace entre les boutons */
  margin-top: 20px;        /* Optionnel : espace au-dessus */
}
/* Conteneur empilé */
.stacked-column {
  display: flex;
  flex-direction: column; /* empile verticalement */
  gap: 10px; /* espace entre chaque jour */
  padding: 10px;
  background-color: #f9f9f9; /* fond léger */
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Chaque jour dans la colonne empilée */
.stacked-column .day {

  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px;
  transition: transform 0.2s;
}
#calendar.stacked-mode .stacked-column {
  width: 100%;
  flex: 1 1 100%;
}

#calendar {
  display: flex;
  gap: 1rem;
}
.day-column,
.stacked-column {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Petit effet hover */
.stacked-column .day:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* En-tête de la colonne empilée */
.stacked-column .day-header {
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 8px;
  text-align: center;
}

/* Compteur d’inscrits */
.stacked-column .inscrits-count {
  font-size: 0.9em;
  color: #555;
  margin-left: 5px;
}
.btn-choixlundi {
  background: linear-gradient(135deg, #4CAF50, #2E7D32); /* dégradé vert */
  color: #fff;
  font-size: 0.7rem;       /* texte plus petit */
  padding: 4px 8px;        /* bouton compact */
  border-radius: 5px;      /* arrondi discret */
  min-width: 70px;         /* largeur minimale réduite */
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* ombre légère */
  transition: all 0.3s ease;
}

.btn-choixlundi:hover {
  background: linear-gradient(135deg, #43A047, #1B5E20); /* vert plus foncé au survol */
}

.btn-choixGM {
  background: linear-gradient(135deg, #574caf, #312e7d); /* dégradé vert */
  color: #fff;
  font-size: 0.7rem;       /* texte plus petit */
  padding: 4px 8px;        /* bouton compact */
  border-radius: 5px;      /* arrondi discret */
  min-width: 70px;         /* largeur minimale réduite */
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* ombre légère */
  transition: all 0.3s ease;
}

.btn-choixGM:hover {
  background: linear-gradient(135deg, #4348a0, #1b235e); /* vert plus foncé au survol */
}


/* Colonnes par défaut : 50% chacune */
.day-column {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Si une seule colonne est affichée, elle prend toute la largeur */
#calendarContainer.full-width #calendar #monday-column,
#calendarContainer.full-width #calendar #thursday-column {
  flex: 1 1 100%;
}



.day-column:not(:first-child) { page-break-before: always; }

.day-header {
  font-weight: 600;
  text-align: center;
  background-color: #e3eaf2;
  padding: 12px;
  border-radius: 8px;
  font-size: 1.1em;
  color: #2c3e50;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.day {
  background-color: #ffffff;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, background-color 0.3s;
  cursor: pointer;
}
.day.monday {
  background-color: #d0f0c0;   /* vert clair */
  color: #2e7d32;              /* texte vert foncé */
  border: 1px solid #a5d6a7;
}

.day.thursday {
  background-color: #cce5ff;   /* bleu clair */
  color: #004085;              /* texte bleu foncé */
  border: 1px solid #99ccff;
}

.day.blocked {
  background-color: lightgrey;   /* gris */
  color: #721c24;              /* texte rouge foncé */
  border: 1px solid #f5c6cb;   /* bordure assortie */
  cursor: not-allowed;         /* curseur interdit */
  opacity: 0.7;                /* effet visuel */
}

.day:hover { background-color: #eef3f7; transform: translateY(-2px); }

.day-number {
  font-size: 1.4em;
  font-weight: 700;
  color: #34495e;
}





.events {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event {
  background-color: #f0f4f8;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.95em;
  color: #2c3e50;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.event {
  transition: opacity 0.3s ease, min-height 0.3s ease;
}
.no-transition * {
  transition: none !important;
}
.event-title-container {
  display: flex;
  align-items: center;
  white-space: nowrap; /* Empêche le texte de passer à la ligne suivante */
}

.event-title {
  white-space: nowrap; /* Empêche le titre de passer à la ligne */
  overflow: visible; /* Autorise le texte à déborder */
}


.event-title { font-weight: 600; font-size: 18px; }
.event-count { font-size: 0.75em; color: #888; margin-left: 4px; }

.toggle-btn {
  background: none;
  border: none;
  color: #3498db;
  font-weight: bold;
  cursor: pointer;
  margin-top: 6px;
}

/* ------------------------------------ Modal ------------------------------------ */

/* Overlay sombre */
/* Overlay sombre couvrant tout l'écran */
.modalajout-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5); /* fond sombre transparent */
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1000;
}

.modalajout-overlay.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.modalajout-content {
  background-color: #555; /* fond noir */
  color: #fff; /* texte blanc */
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1); /* ombre claire */
}

/* Champs de formulaire */
.modalajout-content input,
.modalajout-content select,
.modalajout-content textarea {
  background-color: rgb(44, 43, 43); /* noir légèrement plus clair */
  color: #fff;
  border: 1px solid #444;
  padding: 8px;
  border-radius: 4px;
  width: 100%;
}
.modalajout-content input[type="date"] {
  color: #000; /* texte noir */
}

/* Labels */
.modalajout-content label {
  color: #fff;
  font-weight: 500;
}
.modal-actions {
  margin-top: 5px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
/* Overlay sombre couvrant tout l'écran */
.modalrecherche-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5); /* fond sombre transparent */
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1000;
}

.modalrecherche-overlay.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.modalrecherche-content {
  background-color: #555; /* fond noir */
  color: #fff; /* texte blanc */
  padding: 20px;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1); /* ombre claire */
}

/* Champs de formulaire */
.modalrecherche-content input,
.modalrecherche-content select,
.modalrecherche-content textarea {
  background-color: rgb(44, 43, 43); /* noir légèrement plus clair */
  color: #fff;
  border: 1px solid #444;
  padding: 8px;
  border-radius: 4px;
  width: 100%;
}
.modalrecherche-content input[type="date"] {
  color: #000; /* texte noir */
}

/* Labels */
.modalrecherche-content label {
  color: #fff;
  font-weight: 500;
}
/* --- TITRE --- */
.modalrecherche-content h2,
.modalrecherche-content h3 {
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  color: #fff; /* ✅ titre blanc lisible */
}
/* --- LISTE DES ÉVÉNEMENTS --- */
.event-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid #444; /* ✅ séparateur discret */
  font-family: "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  color: #ddd; /* ✅ texte gris clair */
}

.event-date {
  font-weight: 600;
  color: #f1f1f1; /* ✅ date en gris très clair */
}

.event-role {
  font-style: italic;
  color: #4da3ff; /* ✅ bleu clair qui ressort sur fond sombre */
}

#liste-resultatsR {
  margin-top: 15px;
}


#eventForm { display: flex; flex-direction: column; gap: 15px; }
#eventdate { padding: 8px; font-size: 14px; border: 1px solid #ccc; border-radius: 4px; width: 100%; background-color: #f9f9f9; cursor: pointer; }
#eventdate:focus { border-color: #0056b3; outline: none; background-color: #e9f6ff; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; border: none; padding: 0; }



.modal-actionsR {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 10px;
}


/* ------------------------------------
   📱 Responsive Design (iPhone & iPad)
------------------------------------ */

 /* 📱 Petits appareils en portrait : 2 colonnes côte à côte */
@media screen and (max-width: 480px) and (orientation: portrait) {
  #calendar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 10px;
  }

  .day-column {
    flex: 1 1 50%;
    width: 50%;
    min-width: 140px; /* optionnel pour éviter que ça devienne trop étroit */
  }

  #calendarContainer.full-width #calendar #monday-column,
  #calendarContainer.full-width #calendar #thursday-column {
    flex: 1 1 50%;
    width: 50%;
  }
}


@media (max-width: 480px) {
  .modalajout-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5); /* fond sombre transparent */
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1000;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.modalajout-overlay.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.modalajout-content {
  background-color: #555; /* fond noir */
  color: #fff; /* texte blanc */
  
  border-radius: 8px;
  width: 95%;
    padding: 15px;
    font-size: 14px;
 
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1); /* ombre claire */
}

/* Champs de formulaire */
.modalajout-content input,
.modalajout-content select,
.modalajout-content textarea {
  background-color: rgb(44, 43, 43); /* noir légèrement plus clair */
  color: #fff;
  border: 1px solid #444;
  padding: 8px;
  border-radius: 4px;
  width: 100%;
}
.modalajout-content input[type="date"] {
  color: #000; /* texte noir */
}

/* Labels */
.modalajout-content label {
  color: #fff;
  font-weight: 500;
}
 .modal-actions {
    flex-direction: column;
    gap: 8px;
  }

}
.modalrecherche-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5); /* fond sombre transparent */
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1000;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.modalrecherche-overlay.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.modalrecherche-content {
  background-color: #555; /* fond noir */
  color: #fff; /* texte blanc */
  
  border-radius: 8px;
  width: 100%;
    padding: 15px;
    font-size: 12px;
 
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1); /* ombre claire */
}

/* Champs de formulaire */
.modalrecherche-content input,
.modalrecherche-content select,
.modalrecherche-content textarea {
  background-color: rgb(44, 43, 43); /* noir légèrement plus clair */
  color: #fff;
  border: 1px solid #444;
  padding: 8px;
  border-radius: 4px;
  width: 100%;
}
.modalrecherche-content input[type="date"] {
  color: #000; /* texte noir */
}

/* Labels */
.modalrecherche-content label {
  color: #fff;
  font-weight: 500;
}

  .modal-actionsR {
    flex-direction: column;
    gap: 8px;
  }

/* --- TITRE --- */
.modalrecherche-content h2,
.modalrecherche-content h3 {
  margin-bottom: 15px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: #fff; /* ✅ titre blanc lisible */
}
/* --- LISTE DES ÉVÉNEMENTS --- */
.event-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid #444; /* ✅ séparateur discret */
  font-family: "Segoe UI", Roboto, sans-serif;
  font-size: 12px;
  color: #ddd; /* ✅ texte gris clair */
}

.event-date {
  font-weight: 600;
  color: #f1f1f1; /* ✅ date en gris très clair */
}

.event-role {
  font-style: italic;
  color: #4da3ff; /* ✅ bleu clair qui ressort sur fond sombre */
}

#liste-resultatsR {
  margin-top: 15px;
}

 /* 📱 Portrait : petits appareils entre 481px et 767px */
@media screen and (min-width: 481px) and (max-width: 767px) and (orientation: portrait) {
  
  #calendar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 10px;
  }

  .day-column {
    flex: 1 1 50%;
    width: 50%;
    min-width: 140px; /* optionnel pour éviter que ça devienne trop étroit */
  }

  #calendarContainer.full-width #calendar #monday-column,
  #calendarContainer.full-width #calendar #thursday-column {
    flex: 1 1 50%;
    width: 50%;
  }
}


@media (min-width: 481px) and (max-width: 767px) {
  .modalajout-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }

  .modalajout-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .modalajout-content {
    background-color: #555;
    color: #fff;
    border-radius: 8px;
    width: 100%;
    padding: 18px;
    font-size: 15px;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 10px rgba(255, 255, 255, 0.1);
  }

  .modalajout-content input,
  .modalajout-content select,
  .modalajout-content textarea {
    background-color: rgb(44, 43, 43);
    color: #fff;
    border: 1px solid #444;
    padding: 9px;
    border-radius: 4px;
    width: 100%;
  }

  .modalajout-content input[type="date"] {
    color: #000;
  }

  .modalajout-content label {
    color: #fff;
    font-weight: 500;
  }
   .modal-actions {
    flex-direction: column;
    gap: 10px;
  }
}
 .modalrecherche-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }

  .modalrecherche-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .modalrecherche-content {
    background-color: #555;
    color: #fff;
    border-radius: 8px;
    width: 100%;
    padding: 18px;
    font-size: 14px;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 10px rgba(255, 255, 255, 0.1);
  }

  .modalrecherche-content input,
  .modalrecherche-content select,
  .modalrecherche-content textarea {
    background-color: rgb(44, 43, 43);
    color: #fff;
    border: 1px solid #444;
    padding: 9px;
    border-radius: 4px;
    width: 100%;
  }

  .modalrecherche-content input[type="date"] {
    color: #000;
  }

  .modalrecherche-content label {
    color: #fff;
    font-weight: 500;
  }

  .modal-actionsR {
    flex-direction: column;
    gap: 10px;
  }
/* --- TITRE --- */
.modalrecherche-content h2,
.modalrecherche-content h3 {
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  color: #fff; /* ✅ titre blanc lisible */
}
/* --- LISTE DES ÉVÉNEMENTS --- */
.event-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid #444; /* ✅ séparateur discret */
  font-family: "Segoe UI", Roboto, sans-serif;
  font-size: 12px;
  color: #ddd; /* ✅ texte gris clair */
}

.event-date {
  font-weight: 600;
  color: #f1f1f1; /* ✅ date en gris très clair */
}

.event-role {
  font-style: italic;
  color: #4da3ff; /* ✅ bleu clair qui ressort sur fond sombre */
}

#liste-resultatsR {
  margin-top: 15px;
}

 /* 📱 Portrait : iPad ou tablette en mode vertical */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  #calendar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 10px;
  }

  .day-column {
    flex: 1 1 50%;
    width: 50%;
    min-width: 140px; /* optionnel pour éviter que ça devienne trop étroit */
  }

  #calendarContainer.full-width #calendar #monday-column,
  #calendarContainer.full-width #calendar #thursday-column {
    flex: 1 1 50%;
    width: 50%;
  }
}


@media (min-width: 768px) and (max-width: 1024px) {
  .modalajout-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }

  .modalajout-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .modalajout-content {
    background-color: #555;
    color: #fff;
    border-radius: 10px;
    width: 80%;
    padding: 20px;
    font-size: 16px;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 6px 12px rgba(255, 255, 255, 0.1);
  }

  .modalajout-content input,
  .modalajout-content select,
  .modalajout-content textarea {
    background-color: rgb(44, 43, 43);
    color: #fff;
    border: 1px solid #444;
    padding: 10px;
    border-radius: 4px;
    width: 100%;
  }

  .modalajout-content input[type="date"] {
    color: #000;
  }

  .modalajout-content label {
    color: #fff;
    font-weight: 500;
  }
  .modal-actions {
    flex-direction: row;
    gap: 12px;
    justify-content: flex-end;
  }
}
 .modalrecherche-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }

  .modalrecherche-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .modalrecherche-content {
    background-color: #555;
    color: #fff;
    border-radius: 10px;
    width: 100%;
    padding: 20px;
    font-size: 14px;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 6px 12px rgba(255, 255, 255, 0.1);
  }

  .modalrecherche-content input,
  .modalrecherche-content select,
  .modalrecherche-content textarea {
    background-color: rgb(44, 43, 43);
    color: #fff;
    border: 1px solid #444;
    padding: 10px;
    border-radius: 4px;
    width: 100%;
  }

  .modalrecherche-content input[type="date"] {
    color: #000;
  }

  .modalrecherche-content label {
    color: #fff;
    font-weight: 500;
  }

  .modal-actionsR {
    flex-direction: row;
    gap: 12px;
    justify-content: flex-end;
  }
/* --- TITRE --- */
.modalrecherche-content h2,
.modalrecherche-content h3 {
  margin-bottom: 15px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: #fff; /* ✅ titre blanc lisible */
}
/* --- LISTE DES ÉVÉNEMENTS --- */
.event-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid #444; /* ✅ séparateur discret */
  font-family: "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: #ddd; /* ✅ texte gris clair */
}

.event-date {
  font-weight: 600;
  color: #f1f1f1; /* ✅ date en gris très clair */
}

.event-role {
  font-style: italic;
  color: #4da3ff; /* ✅ bleu clair qui ressort sur fond sombre */
}

#liste-resultatsR {
  margin-top: 15px;
}

/* CSS global */
 @media print {
  /* Masquer les éléments inutiles */
  .badge-consultation,
  .badge-consultation *,
  .badge-consultation img,
  .editBtn,
  .deleteBtn,
  .toggle-btn,
  #blockLimit,
  .print-hide {
    display: none !important;
    visibility: hidden !important;
  }

  /* En-tête de jour (la date) */
  .day-header {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin-top: 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid #333;
    padding-bottom: 4px;
  }
.day.monday {
  background-color: #d0f0c0;   /* vert clair */
  color: #2e7d32;              /* texte vert foncé */
  border: 1px solid #a5d6a7;
}

.day.thursday {
  background-color: #cce5ff;   /* bleu clair */
  color: #004085;              /* texte bleu foncé */
  border: 1px solid #99ccff;
}
  /* Conteneur d'événements : aligne nom + badges sur une ligne */
  .event {
    display: inline-flex !important;   /* inline-flex au lieu de flex */
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    margin-left: 20px;
    font-size: 13px;
    color: #444;
    white-space: nowrap !important;    /* empêche le retour à la ligne */
  }

  /* Nom */
  .event-title {
    margin-right: 12px !important;
    font-weight: 500;
    white-space: nowrap !important;
    display: inline !important;        /* force inline */
  }

  /* Rôles (badges transformés en texte) */
  .event-badges {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
  }

  /* Badges transformés en texte */
  .badge {
    font-size: 0 !important;
    margin: 0 4px 0 0 !important;
    display: inline !important;
  }
  .badge::after {
    content: attr(data-text);
    font-size: 11px;
    color: black;
    font-weight: normal;
    white-space: nowrap !important;
  }
}


/* 📱 Ajustements spécifiques aux petits écrans */
@media (max-width: 480px) {
  .modal-content {
    width: auto;            /* laisse la largeur s’adapter */
    margin: 0 10px;         /* garde une marge de chaque côté */
    padding: 15px;          /* réduit le padding */
    font-size: 16px;
  }



  .day-header {
    font-size: 12px;
    margin-top: 8px;
    margin-bottom: 4px;
  }
.day.monday {
  background-color: #d0f0c0;   /* vert clair */
  color: #2e7d32;              /* texte vert foncé */
  border: 1px solid #a5d6a7;
}

.day.thursday {
  background-color: #cce5ff;   /* bleu clair */
  color: #004085;              /* texte bleu foncé */
  border: 1px solid #99ccff;
}
  .event {
    flex-direction: column !important; /* empile nom + badges */
    align-items: flex-start !important;
    gap: 4px !important;
    margin-left: 10px;
    font-size: 12px;
    white-space: normal !important; /* autorise retour à la ligne */
  }

  .event-title {
    font-size: 12px;
  }

  .badge::after {
    font-size: 11px;
    padding: 2px 4px;
  }
}

/* iPad (écrans moyens ≤ 768px) */
@media screen and (max-width: 768px) {
  .day-header {
    font-size: 13px;
    margin-top: 10px;
    margin-bottom: 5px;
  }
.day.monday {
  background-color: #d0f0c0;   /* vert clair */
  color: #2e7d32;              /* texte vert foncé */
  border: 1px solid #a5d6a7;
}

.day.thursday {
  background-color: #cce5ff;   /* bleu clair */
  color: #004085;              /* texte bleu foncé */
  border: 1px solid #99ccff;
}
  .event {
    flex-direction: row !important; /* conserve l’alignement horizontal */
    gap: 6px !important;
    margin-left: 15px;
    font-size: 13px;
    white-space: normal !important;
  }

  .event-title {
    font-size: 13px;
  }

  .badge::after {
    font-size: 12px;
    padding: 2px 5px;
  }
}
