@font-face {
  font-family: 'Trajan';
  src: local('Trajan Pro'), local('Trajan'), serif;
}
#calendar { 
  max-width: 900px; 
  min-height: 600px !important;
  margin: auto; 
  overflow: visible !important;
}

.fc {
  height: auto !important;
}

.fc-root {
  height: auto !important;
}

.fc-daygrid {
  height: auto !important;
}

.fc-daygrid-body {
  height: auto !important;
}

.fc-daygrid-body-unscrolled {
  height: auto !important;
}

/* Cellules du calendrier flexibles */
.fc-daygrid-day {
  min-height: 80px !important;
  height: auto !important;
}

.fc-daygrid-day-frame {
  height: auto !important;
}

.fc-daygrid-day-events {
  max-height: none !important;
}

.fc-daygrid-day-number {
  padding: 2px 4px !important;
}

.day-cell-content {
  position: relative !important;
  display: block !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  padding: 2px 4px !important;
  width: 100% !important;
  min-height: 20px !important;
}

.greg-date {
  color: #063970 !important;
  position: absolute !important;
  left: 2px !important;
  top: 2px !important;
}

.julian-date {
  color: #d97706 !important;
  font-weight: 700 !important;
  position: absolute !important;
  right: 2px !important;
  top: 2px !important;
}

.fasting-type {
  display: block !important;
  color: #555 !important;
  font-size: 0.65rem !important;
  font-weight: 500 !important;
  margin-top: 6px !important;
  text-align: center !important;
  white-space: normal !important;
  line-height: 1.2 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  max-height: none !important;
}

body {
  margin: 0;
  background-color: #f4f6f8;
  color: #1f2a36;
  font-family: 'Trajan', serif;
}
.footer{margin-top:40px;padding-top:6px;border-top:1px solid rgba(0,0,0,0.04);display:flex;justify-content:space-between;align-items:center;color:#6b7280;font-size:0.9rem}
.page {
  max-width: 1200px;
  margin: auto;
  padding: 40px 60px;
  background-color: #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.page h1 {
  margin-bottom: 30px;
  color: #063970;
  font-size: 2.2rem;
  border-bottom: 2px solid #d4af37;
  padding-bottom: 10px;
}

.calendar-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 15px;
  background: transparent;
  border: none;
  font-size: 0.75rem;
  letter-spacing: 0.2px;
  align-items: flex-end;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #063970;
  font-weight: 500;
}

.legend-row strong {
  width: 100%;
  text-align: center;
  display: block;
  font-size: 0.8rem;
}

.legend-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.legend-dot.gregorian {
  background-color: #063970;
}

.legend-dot.julian {
  background-color: #d97706;
}

.legend-separator {
  color: #ccc;
  font-weight: 300;
}

.page h2 {
  color: #063970;
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.content {
  display: flex;
  gap: 30px;
  position: relative;
  overflow: visible !important;
}


.main {
  flex: 3;
  height: auto !important;
  overflow: visible !important;
}

#event-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9998;
}

#event-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

#event-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: calc(100vh - 60px);
  background-color: #ffffff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  transition: right 0.3s ease;
  padding: 30px 20px;
  overflow-y: auto;
  border-left: 4px solid #063970;
  z-index: 9999;
  visibility: hidden;
}

#event-drawer.open {
  right: 0;
  visibility: visible;
}

.drawer-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 32px;
  color: #999;
  cursor: pointer;
  transition: color 0.2s ease;
  font-weight: bold;
  line-height: 1;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-close:hover {
  color: #333;
}

#event-details {
  margin-top: 20px;
}

#event-details h3 {
  color: #063970;
  margin-bottom: 16px;
  font-size: 1.3rem;
}

.event-date-box {
  background: #e0f2fe;
  padding: 10px;
  border-radius: 6px;
  border-left: 4px solid #0369a1;
  margin-bottom: 12px;
}

.event-date-label {
  font-size: 0.75rem;
  color: #0369a1;
  font-weight: 600;
  margin-bottom: 4px;
}

.event-date-value {
  color: #0369a1;
  font-weight: 600;
}

/* Tablet responsiveness */
@media (max-width: 768px) {
  #calendar {
    max-width: 100%;
    margin: 0;
    height: auto !important;
    overflow: visible !important;
  }

  .fc {
    height: auto !important;
  }

  .fc-root {
    height: auto !important;
  }

  .fc-daygrid {
    height: auto !important;
  }

  .fc-daygrid-body {
    height: auto !important;
  }

  .fc-daygrid-body-unscrolled {
    height: auto !important;
  }

  .page {
    padding: 20px 15px;
    max-width: 100%;
    margin: 0;
    box-shadow: none;
    border-radius: 0;
  }

  .page h1 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    padding-bottom: 6px;
  }

  .page h2 {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }

  .content {
    flex-direction: column;
    gap: 20px;
  }

  .main {
    flex: none;
  }

  .fc-daygrid-day {
    min-height: 65px !important;
    height: auto !important;
  }

  .fc-daygrid-day-frame {
    height: auto !important;
  }

  .fc-daygrid-day-events {
    max-height: none !important;
  }

  .day-cell-content {
    font-size: 0.8rem !important;
    padding: 1px 2px !important;
  }

  .fasting-type {
    font-size: 0.55rem !important;
    margin-top: 10px !important;
    max-height: 30px !important;
  }

  .calendar-legend {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 10px 0;
    align-items: center;
  }

  .legend-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    width: 100%;
  }

  .legend-item {
    gap: 3px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  #event-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: calc(100vh - 60px);
    border-left: 4px solid #063970;
    border-top: none;
    border-radius: 0;
    padding: 20px 15px;
    transition: right 0.3s ease;
    max-height: none;
  }

  #event-drawer.open {
    right: 0;
  }

  /* Réduire la taille des boutons du calendrier */
  .fc-button {
    padding: 0.25em 0.4em !important;
    font-size: 0.75rem !important;
    height: auto !important;
  }

  .fc-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  #event-drawer-overlay {
    position: fixed;
  }

  .drawer-close {
    top: 10px;
    right: 10px;
  }

  #event-details {
    margin-top: 15px;
  }

  #event-details h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .event-date-box {
    padding: 8px;
    margin-bottom: 10px;
  }

  .footer {
    flex-direction: column;
    gap: 4px;
    font-size: 0.7rem;
    text-align: center;
    margin-top: 8px;
  }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  #calendar {
    margin: 0;
    height: auto !important;
    overflow: visible !important;
  }

  .fc {
    height: auto !important;
  }

  .fc-root {
    height: auto !important;
  }

  .fc-daygrid {
    height: auto !important;
  }

  .fc-daygrid-body {
    height: auto !important;
  }

  .fc-daygrid-body-unscrolled {
    height: auto !important;
  }

  .page {
    padding: 8px 8px;
    max-width: 100%;
    margin: 0;
    box-shadow: none;
    border-radius: 0;
  }

  .page h1 {
    font-size: 1.2rem;
    margin-bottom: 4px;
    padding-bottom: 2px;
  }

  .page h2 {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .fc-daygrid-day {
    min-height: 60px !important;
    height: auto !important;
  }

  .fc-daygrid-day-frame {
    height: auto !important;
  }

  .fc-daygrid-day-events {
    max-height: none !important;
  }

  .fc-daygrid-day-number {
    padding: 0px !important;
    font-size: 0.65rem !important;
  }

  .day-cell-content {
    font-size: 0.6rem !important;
    padding: 0px !important;
    min-height: 12px !important;
  }

  .greg-date {
    font-size: 0.55rem !important;
  }

  .julian-date {
    font-size: 0.55rem !important;
  }

  .fasting-type {
    font-size: 0.4rem !important;
    margin-top: 2px !important;
    max-height: none !important;
  }

  .calendar-legend {
    gap: 2px;
    padding: 2px 0;
  }

  .legend-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    width: 100%;
  }

  .legend-item {
    gap: 2px;
    font-size: 0.6rem;
    white-space: nowrap;
  }

  #event-drawer {
    max-height: none;
    padding: 15px 12px;
    right: -280px;
    width: 280px;
  }

  /* Réduire davantage la taille des boutons sur petit mobile */
  .fc-button {
    padding: 0.15em 0.25em !important;
    font-size: 0.6rem !important;
  }

  .fc-toolbar {
    gap: 4px;
  }

  #event-details h3 {
    font-size: 0.9rem;
  }

  .event-date-box {
    padding: 6px;
    margin-bottom: 8px;
  }

  .event-date-label {
    font-size: 0.7rem;
    margin-bottom: 2px;
  }

  form {
    gap: 12px;
  }

  label {
    font-size: 0.85rem;
  }

  .page input,
  textarea {
    font-size: 0.85rem;
    padding: 6px 8px;
  }

  .footer {
    font-size: 0.75rem;
    gap: 6px;
  }
}

label {
  font-size: 0.9rem;
  color: #444;
}

.page input,
textarea {
  padding: 10px 12px;
  font-family: 'Trajan', serif;
  font-size: 0.95rem;
  border: 1px solid #cfd6dd;
  border-radius: 4px;
  background-color: #ffffff;
}

.page input:focus,
textarea:focus {
  outline: none;
  border-color: #063970;
  box-shadow: 0 0 0 2px rgba(6,57,112,0.15);
}

.page button {
  margin-top: 10px;
  align-self: flex-start;
  padding: 10px 25px;
  font-family: 'Trajan', serif;
  font-size: 0.95rem;
  background-color: #063970;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #052c55;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  margin-bottom: 10px;
}

.page a {
  text-decoration: none;
  color: #063970;
  font-size: 0.95rem;
}

.page a:hover {
  text-decoration: underline;
}

  .socials a svg {
width: 18px;
height: 18px;
flex-shrink: 0;
transition: fill 0.2s ease;
  }

  /* Facebook */
  .socials a.facebook svg {
fill: #1877f2;
  }

  /* YouTube */
  .socials a.youtube svg {
fill: #ff0000;
  }

  /* Instagram */
  .socials a.instagram svg {
fill: #e1306c;
  }
  .socials a.maps svg {
fill: #a10707;
  }

/* Masquer l'en-tête des jours du calendrier */
.fc-col-header {
  display: none;
}

@media (max-width: 900px) {
  .content {
flex-direction: column;
  }

  .side {
border-left: none;
border-top: 4px solid #063970;
  }
}
