* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}



html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #ddd2ff;
  color: #333;
  line-height: 1.4;
  overflow-x: hidden;
  text-align: center;
  font-size: 0.9em;
  margin: 8px;
  padding-top: 10px;
}

#main-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 3em;
  font-style: italic;
  color: #b23ad0;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

#main-title:hover {
  transform: scale(1.03);
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.25);
}

#header-logos {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 1000;
  pointer-events: auto;
}

.logo {
  height: 50px;
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-left {
  height: 100px;
}

.logo-right {
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.15));
}

#calendar-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  align-items: flex-start;
  margin-top: 10px;
  width: 100%;
  padding-bottom: 6px;
}

#calendar {
  flex: 1 1 100%;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  font-size: 1em;
  height: auto;
  max-height: 95vh;
  overflow-y: auto;
  min-height: 350px;
}

.fc .fc-col-header-cell,
.fc .fc-daygrid-day-top {
  font-size: 0.72em;
  font-weight: 600;
  color: #555;
  padding: 2px;
}

.fc .fc-daygrid-day-frame {
  min-height: auto;
}

.fc .fc-daygrid-event {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.75em;
  line-height: 1.3;
  padding: 3px 5px;
  white-space: normal;
  border-radius: 6px;
  background: #9ac3de;
  color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
  cursor: pointer;
}

.fc .fc-daygrid-event:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

.fc .fc-daygrid-event img {
  width: 100%;
  max-width: 150px;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

.fc-day-today {
  background: #ede7f6 !important;
  border-radius: 6px;
}

.fc-today-button {
  background: #ede7f6 !important;
  color: #333 !important;
  border: 1px solid #d1c4e9 !important;
  font-weight: bold;
}

.fc-today-button:hover {
  background: #d1c4e9 !important;
}

.fc-toolbar-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.4em;
  background: linear-gradient(135deg, #a17bcf, #e1bee7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
  padding: 2px 5px;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-transform: capitalize;
}

.fc-toolbar-title:hover {
  transform: scale(1.05);
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.fc-tooltip {
  position: absolute;
  background: #6a1b9a;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 2000;
}

#event-sidebar {
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 300px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  padding: 16px;
  display: none;
  flex-direction: column;
  z-index: 1200;
  transition: all 0.25s ease;
}

#event-sidebar h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.4em;
  color: #6a1b9a;
  margin-bottom: 10px;
  text-align: center;
}

#event-sidebar p {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.2px;
  font-size: 1em;
  color: #333;
  margin-bottom: 6px;
  text-align: center;
}

#event-image-sidebar {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 12px;
  display: block;
}

#event-sidebar button {
  width: 100%;
  padding: 8px 0;
  font-size: 13px;
  margin-bottom: 8px;
  cursor: pointer;
  border: none;
  border-radius: 7px;
  transition: all 0.2s ease;
}

#deleteBtn {
  background: #e53935;
  color: #fff;
}

#deleteBtn:hover {
  background: #d32f2f;
  transform: scale(1.03);
}

#googleBtn,
#outlookBtn {
  background: #1e88e5;
  color: #fff;
}

#googleBtn:hover,
#outlookBtn:hover {
  background: #1565c0;
  transform: scale(1.03);
}

#closeSidebar {
  background: #ccc;
  color: #333;
}

#closeSidebar:hover {
  background: #bbb;
  transform: scale(1.03);
}

#admin-panel {
  position: relative;
  margin: 20px auto 0 auto;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 1em;
  display: none;
  background: #f3f3f3;
  border: 1px solid #ccc;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 2000;
  transition: max-height 0.45s ease, opacity 0.35s ease, padding 0.35s ease;
}

#admin-panel.show {
  opacity: 1;
  padding: 1em;
}

#admin-panel h2 {
  margin-bottom: 15px;
  color: #6a1b9a;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  text-align: center;
}

#admin-panel input,
#admin-panel button {
  width: 100%;
  margin-bottom: 8px;
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: all 0.25s ease;
}

#admin-panel button {
  background: linear-gradient(135deg, #9c27b0, #e1bee7);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

#admin-panel button:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.popup {
  display: none;
  position: fixed;
  z-index: 999;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
}

.popup-content {
  background: #fff;
  padding: 24px 30px;
  border-radius: 12px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  font-size: 16px;
}

.popup-content input {
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.popup-content button {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  font-size: 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #9c27b0, #e1bee7);
  color: #fff;
  font-weight: bold;
  transition: all 0.25s ease;
}

.popup-content button:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

button,
input {
  border-radius: 7px;
  transition: all 0.2s ease;
}

button {
  margin: 5px 4px;
  padding: 6px 12px;
  font-weight: bold;
  font-size: 13px;
}

button:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.admin-style-btn {
  position: fixed;
  left: 12px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  background: #7b1fa2;
  color: #fff;
  padding: 4px 8px;
  font-size: 10px;
  cursor: pointer;
  z-index: 1800;
}

#registerAllPopup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#registerAllPopup .popup-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}

.admin-btn {
  position: fixed;
  right: 12px;
  background: #7b1fa2;
  color: #fff;
  padding: 4px 8px;
  font-size: 10px;
  cursor: pointer;
  z-index: 1600;
  bottom: calc(8px + env(safe-area-inset-bottom));
}

.admin-btn:hover {
  background: #9c27b0;
  transform: scale(1.05);
}

.site-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  color: #fff;
  background: linear-gradient(135deg, #8e24aa, #d05ce3);
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 1100;
  cursor: pointer;
  transition: all 0.25s ease;
}

.site-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  background: linear-gradient(135deg, #a044ff, #e1bee7);
}

#view-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 15px 0;
  font-size: 0.9rem;
  position: relative;
  z-index: 1600;
}

.toggle-label {
  font-size: 0.95em;
  color: #6a1b9a;
  font-weight: 500;
}

.switch {
  position: relative;
  display: inline-block;
  width: 70px;
  height: 36px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #8e24aa;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 28px;
  width: 28px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked+.slider:before {
  transform: translateX(34px);
}

input:checked+.slider {
  background-color: #8e24aa;
}

#event-list {
  position: relative;
  width: 100%;
  padding: 1rem;
  background: #ddd2ff;
  display: none;
  overflow-y: auto;
  z-index: 1500;
  margin-top: 160px;
}

.month-title {
  font-size: 2rem;
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-weight: 700;
  color: #6a1b9a;
  background: linear-gradient(135deg, #a17bcf, #e1bee7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  margin: 2rem 0 1rem;
  text-transform: capitalize;
  text-align: left;
}

.month-events {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
}

.event-card .event-img {
  width: 100%;
  max-width: 800px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0.3rem auto;
  border-radius: 8px;
  background-color: #f9f9f9;
}

.event-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 100%;
  max-width: 600px;
  margin: 0.5rem auto;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}



.event-info {
  padding: 0.3rem 0.2rem 0.5rem;
}

.event-info h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 0.2rem;
}

.event-date,
.event-time {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 0.3rem;
}

.event-btn {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  background-color: #6a1b9a;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  margin-top: 0.5rem;
}

.event-btn:hover {
  background-color: #8e24aa;
}

.event-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
  align-items: stretch;
}

.event-actions button,
.event-actions a.event-payment {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5em 1em;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  background-color: #6c5ce7;
  color: #fff;
  cursor: pointer;
  min-width: 0;
  box-sizing: border-box;
  transition: all 0.2s ease;

  line-height: 1;
  vertical-align: middle;
}

.event-actions a.event-payment:hover,
.event-actions button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.event-actions button.google {
  background: #1e88e5;
  color: #fff;
}

.event-actions button.outlook {
  background: #0d47a1;
  color: #fff;
}

.event-actions button.reserve {
  flex: 1;
  max-width: 150px;
  padding: 0.5rem;
  background: linear-gradient(135deg, #d1c4e9, #b39ddb);
  color: #fff;
  font-weight: 700;
  border-radius: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.event-actions button:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

.event-actions button.reserve:hover {
  background: linear-gradient(135deg, #b39ddb, #9575cd);
}

#login-popup {
  z-index: 2500;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#login-popup.show {
  display: flex;
  opacity: 1;
}

.event-payment.pulse {
  animation: pulse 2s infinite;
}

.event-payment {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  margin-top: 6px;
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #8e24aa, #b388ff);
  box-shadow: 0 6px 14px rgba(142, 36, 170, 0.25);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.event-payment:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.event-btn {
  background: linear-gradient(135deg, #8e24aa, #b388ff);
  color: #fff;
  box-shadow: 0 6px 14px rgba(142, 36, 170, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  opacity: 1;
  filter: none;
  pointer-events: auto;
}

.event-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 20px rgba(106, 27, 154, 0.35);
  background: linear-gradient(135deg, #8e24aa, #d1b3ff);
}

#event-sidebar {
  display: none;
  flex-direction: column;
  opacity: 0;
  transform: translateY(-45%);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#event-sidebar.show {
  display: flex;
  opacity: 1;
  transform: translateY(-50%);
}

.past-event-msg {
  font-size: 14px;
  color: #888;
  text-align: center;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 8px;
  margin-top: 8px;
}

.event-list .event-img {
  width: 100%;
  max-width: none;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0.3rem auto;
  border-radius: 8px;
  background-color: #f9f9f9;
}

.event-payment,
.event-btn {
  display: inline-block;
  width: 100%;
  padding: 12px 0;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #8e24aa, #b388ff);
  box-shadow: 0 6px 14px rgba(142, 36, 170, 0.25);
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.past-event {
  opacity: 0.5;
  filter: grayscale(100%);
  pointer-events: none;
}

.event-payment:hover,
.event-btn:hover {
  transform: translateY(-2px) scale(1.03);
  background: linear-gradient(135deg, #b388ff, #ce93d8);
  box-shadow: 0 8px 20px rgba(106, 27, 154, 0.35);
}

.event-payment:active,
.event-btn:active {
  transform: scale(0.97);
  box-shadow: 0 3px 8px rgba(106, 27, 154, 0.25);
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(142, 36, 170, 0.5);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(142, 36, 170, 0);
  }
}

@media (max-width: 480px) and (orientation: landscape) {
  #event-sidebar {
    width: 90%;
    right: 5%;
    top: 5%;
    transform: none;
    max-height: 90vh;
    padding: 12px;
  }
}

@media (min-width: 1025px) {
  #event-list {
    margin-top: 40px;
    padding-bottom: 1.5rem;
  }
}

@media (max-width: 1024px) {
  #calendar {
    max-height: 80vh;
  }

  .event-card {
    max-width: 600px; 
    width: 100%;
    margin: 0.5rem auto;
  }

  .event-card .event-img,
  .event-list .event-img {
    width: 100%;     
    max-width: 100%;   
    height: auto;
  }
}

@media (max-width: 768px) {
  #calendar {
    max-height: 75vh;
  }

  .event-card {
    width: 100%;       
    max-width: 100%;
    margin: 0.5rem auto;
  }

  .event-card .event-img,
  .event-list .event-img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  #calendar {
    max-height: 95vh;
    height: 95vh;
    margin: 0 auto;
  }

  #event-sidebar {
    width: 90%;
    right: 5%;
    top: 50%;
  }

  #event-list {
    margin-top: 180px;
    padding-bottom: 3rem;
  }

  .event-card {
    width: 100%;      
    max-width: 100%;
    margin: 0.5rem auto;
  }

  .event-card .event-img,
  .event-list .event-img {
    width: 100%;      
    max-width: 100%;
    height: auto;
    border-radius: 12px;
  }

  #view-toggle {
    gap: 12px;
  }

  #view-toggle .toggle-label {
    font-size: 1.2rem;
    padding: 6px 10px;
  }

  #view-toggle .switch {
    width: 60px;
    height: 30px;
  }

  #view-toggle .switch .slider:before {
    width: 24px;
    height: 24px;
  }
}

.event-btn.disabled {
  background: #bdbdbd !important;
  color: #555 !important;
  cursor: not-allowed;
  pointer-events: none;
}

.event-complet-label {
  margin-top: 6px;
  font-weight: 700;
  color: #d32f2f;
  text-transform: uppercase;
}

.event-complet-label {
  display: none;
}

.event-actions {
  display: flex;
  gap: 10px;       /* espace entre boutons */
  margin-top: 10px;
}

.event-actions button,
.event-actions a.event-payment {
  flex: 1;               /* chaque bouton prend le même espace */
  min-width: 0;          /* pour éviter overflow */
  padding: 10px 5px;
  text-align: center;
  font-size: 1em;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  background-color: #6a1b9a;
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
}

.event-actions button.disabled {
  background-color: #aaa;
  cursor: not-allowed;
}

.event-actions button:hover:not(.disabled),
.event-actions a.event-payment:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}

.event-google {
  background-color: #1976d2; /* bleu */
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 5px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.event-outlook {
  background-color: #1976d2; /* bleu */
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 5px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Hover pour effet */
.event-google:hover,
.event-outlook:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}

.event-actions button.event-google {
  background-color: #1976d2 !important; /* bleu */
  color: white;
}

.event-actions button.event-outlook {
  background-color: #0d47a1 !important; /* bleu foncé */
  color: white;
}