#custom-calendar-container {
  font-family: Arial, sans-serif;
  font-size: 14px;
  border: 2px solid #ccc;
  padding: 10px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#calendar-widget {
  border: 2px solid #ccc;
  padding: 5px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

#calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

#calendar-header button {
  background-color: #0073aa;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}
#calendar-header button:hover {
  background-color: #005f8d;
}
#calendar-month-label {
  font-weight: bold;
}

#calendar-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: center;
}

#calendar-table th,
#calendar-table td {
  width: 14.28%;
  padding: 6px;
  box-sizing: border-box;
  font-size: 14px;
  border: 1px solid #eee;
}

#calendar-table th {
  background-color: #f0f0f0;
}

#calendar-table td {
  cursor: pointer;
  transition: background 0.2s ease;
}
#calendar-table td:hover {
  background-color: #e8f0ff;
}

td.has-note {
  background-color: #fff1f1;
  color: red;
  font-weight: bold;
}

td.today {
  background-color: #e5f3ff;
  color: #0073aa;
  font-weight: bold;
  border: 2px solid #0073aa;
}

td.today.has-note {
  background-color: #f3e5ff;
  color: purple;
  border: 2px solid purple;
  font-weight: bold;
}

#calendar-note-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.4s ease;
}

#calendar-note-box {
  background-color: white;
  padding: 20px;
  width: 300px;
  border-radius: 8px;
  border: 2px solid black;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.4s ease;
  position: relative;
}

#calendar-note-box textarea {
  width: 100%;
  resize: none;
  margin-bottom: 10px;
  font-size: 14px;
}

#calendar-note-box input[type="time"] {
  width: 100%;
  font-size: 14px;
  margin-bottom: 10px;
}

#calendar-note-box button {
  padding: 6px 10px;
  margin-right: 6px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#save-note {
  background-color: #28a745;
  color: white;
}

#close-note {
  background-color: #ccc;
}

#delete-note {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

#delete-note:hover {
  background-color: #b52b3a;
}

#calendar-reset {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}
#calendar-reset:hover {
  background-color: #b52b3a;
}

#calendar-modal-close-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  color: #333;
}
#calendar-modal-close-btn:hover {
  color: red;
}

#calendar-clock {
  margin-top: 10px;
  font-size: 14px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes blinkRed {
  0%   { border-color: red; box-shadow: 0 0 10px red; }
  50%  { border-color: white; box-shadow: 0 0 2px white; }
  100% { border-color: red; box-shadow: 0 0 10px red; }
}
.alarm-blink #calendar-note-box {
  animation: blinkRed 0.6s ease-in-out infinite;
}


td.today.has-note {
  background-color: #f3e5ff !important;
  color: purple !important;
  border: 2px solid purple !important;
  font-weight: bold !important;
}

/* 📱 Version compacte automatique */
@media screen and (max-width: 420px) {
  #custom-calendar-container {
    font-size: 12px;
    padding: 6px;
  }

  #calendar-header button,
  #calendar-reset,
  #toggle-settings {
    font-size: 11px;
    padding: 4px 6px;
  }

  #calendar-note-box {
    width: 260px;
    padding: 14px;
  }

  #calendar-clock {
    font-size: 12px;
  }

  #calendar-table th,
  #calendar-table td {
    font-size: 11px;
    padding: 3px;
  }
}