/* ===========================
   CALENDRIER DE L'AVENT
   =========================== */

.calendar-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.calendar-header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.back-btn {
  position: static;
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(255,182,193,0.2), rgba(255,215,0,0.2));
  color: #FFD700;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 182, 193, 0.3);
  box-shadow: 0 4px 15px rgba(255, 182, 193, 0.2);
}

.back-btn:hover {
  background: linear-gradient(135deg, rgba(255,182,193,0.3), rgba(255,215,0,0.3));
  transform: translateX(-5px);
  box-shadow: 0 6px 20px rgba(255, 182, 193, 0.4);
}

.calendar-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  background: linear-gradient(90deg, #FF4C4C, #FFD700, #FFB6C1, #FF69B4);
  background-size: 300% 300%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGradient 5s ease infinite;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 10px rgba(255, 182, 193, 0.5));
}

.calendar-subtitle {
  color: var(--muted);
  font-size: 1.2rem;
  margin-top: 10px;
}

/* Grille du calendrier */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin: 0 auto;
  max-width: 1000px;
}

/* Case du calendrier */
.calendar-case {
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(255,182,193,0.15), rgba(255,215,0,0.1));
  border-radius: 16px;
  border: 2px solid rgba(255, 182, 193, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.calendar-case::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 182, 193, 0.1), transparent);
  animation: caseShine 4s linear infinite;
  pointer-events: none;
}

@keyframes caseShine {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.calendar-case-number {
  font-size: 3rem;
  font-weight: 700;
  color: #FFB6C1;
  text-shadow: 0 0 20px rgba(255, 182, 193, 0.6);
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}

.calendar-case-icon {
  font-size: 2rem;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

/* Case débloquée */
.calendar-case.unlocked:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 12px 40px rgba(255, 182, 193, 0.5);
  border-color: rgba(255, 182, 193, 0.6);
}

.calendar-case.unlocked {
  animation: pulseCase 2s ease-in-out infinite;
}

@keyframes pulseCase {
  0%, 100% { 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 182, 193, 0.3);
  }
  50% { 
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 50px rgba(255, 182, 193, 0.6);
  }
}

/* Case verrouillée */
.calendar-case.locked {
  background: linear-gradient(135deg, rgba(50,50,50,0.3), rgba(30,30,30,0.3));
  border-color: rgba(100, 100, 100, 0.3);
  cursor: not-allowed;
  filter: grayscale(0.7);
}

.calendar-case.locked .calendar-case-number {
  color: #666;
  text-shadow: none;
}

.calendar-case.locked .calendar-case-icon {
  opacity: 0.3;
  filter: grayscale(1);
}

.calendar-case.locked:hover {
  transform: none;
}

/* Case ouverte */
.calendar-case.opened {
  background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,182,193,0.2));
  border-color: rgba(255, 215, 0, 0.5);
  position: relative;
}

.calendar-case.opened::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5rem;
  color: #FFD700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  z-index: 3;
}

/* Badge "Aujourd'hui" */
.calendar-case.today .calendar-case-number::after {
  content: 'Aujourd\'hui';
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #FFB6C1, #FFD700);
  color: #000;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(255, 182, 193, 0.6);
  z-index: 4;
  animation: todayBadge 1.5s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes todayBadge {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.1); }
}

.calendar-case-number {
  position: relative;
}

/* Bouton Reset */
.reset-btn {
  display: inline-block !important;
  margin-top: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(255, 100, 100, 0.3), rgba(255, 50, 50, 0.3));
  color: #ff6b6b;
  border: 2px solid rgba(255, 100, 100, 0.5);
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(255, 100, 100, 0.3);
}

.reset-btn:hover {
  background: linear-gradient(135deg, rgba(255, 100, 100, 0.5), rgba(255, 50, 50, 0.5));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 100, 100, 0.5);
}

.reset-btn:active {
  transform: translateY(0);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 20px;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: linear-gradient(135deg, rgba(20, 22, 24, 0.98) 0%, rgba(25, 28, 31, 0.98) 100%);
  border-radius: 20px;
  padding: 40px;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  position: relative;
  border: 2px solid rgba(255, 182, 193, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9),
              0 0 100px rgba(255, 182, 193, 0.3);
  animation: modalSlideIn 0.4s ease;
}

/* Scrollbar personnalisée pour le modal */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #FFB6C1, #FFD700);
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #FF69B4, #FFA500);
}

@keyframes modalSlideIn {
  from { 
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 182, 193, 0.2);
  border: 2px solid rgba(255, 182, 193, 0.4);
  color: #FFB6C1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.modal-close:hover {
  background: rgba(255, 182, 193, 0.4);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 20px rgba(255, 182, 193, 0.6);
}

.modal-day {
  font-size: 1.5rem;
  color: #FFD700;
  font-weight: 700;
  margin-bottom: 25px;
  text-align: center;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.modal-body {
  color: #e8eef2;
  line-height: 1.8;
  font-size: 1.1rem;
}

.modal-body h3 {
  color: #FFB6C1;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.modal-body p {
  margin-bottom: 15px;
}

.modal-body .emoji-big {
  font-size: 3rem;
  text-align: center;
  margin: 20px 0;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.modal-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 12px;
  margin: 20px auto;
  display: block;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 182, 193, 0.3);
  transition: transform 0.3s ease;
}

.modal-image:hover {
  transform: scale(1.05);
}

.modal-video {
  width: auto;
  max-width: 100%;
  max-height: 60vh;
  height: auto;
  border-radius: 12px;
  margin: 20px auto;
  display: block;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 182, 193, 0.3);
}

.modal-video::-webkit-media-controls-panel {
  background: linear-gradient(135deg, rgba(255,182,193,0.3), rgba(255,215,0,0.3));
}

/* Responsive */
@media(max-width: 768px) {
  .calendar-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
  }
  
  .calendar-case-number {
    font-size: 2rem;
  }
  
  .calendar-case-icon {
    font-size: 1.5rem;
  }
  
  .modal-content {
    padding: 30px 20px;
  }
  
  .calendar-title {
    font-size: 2rem;
  }
}

@media(max-width: 500px) {
  .calendar-grid {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
  }
  
  .calendar-case-number {
    font-size: 1.8rem;
  }
  
  .calendar-case-icon {
    font-size: 1.2rem;
  }
}

/* Notification personnalisée */
.custom-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: linear-gradient(135deg, rgba(20, 22, 24, 0.98) 0%, rgba(25, 28, 31, 0.98) 100%);
  border: 2px solid rgba(255, 182, 193, 0.5);
  border-radius: 20px;
  padding: 30px 40px;
  text-align: center;
  z-index: 100001;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9),
              0 0 100px rgba(255, 182, 193, 0.5);
  animation: notificationAppear 0.4s ease forwards;
  max-width: 400px;
  width: 90%;
}

@keyframes notificationAppear {
  0% {
    transform: translate(-50%, -50%) scale(0) rotate(-10deg);
    opacity: 0;
  }
  60% {
    transform: translate(-50%, -50%) scale(1.1) rotate(5deg);
  }
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
  }
}

.custom-notification.hide {
  animation: notificationDisappear 0.3s ease forwards;
}

@keyframes notificationDisappear {
  0% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(0) rotate(10deg);
    opacity: 0;
  }
}

.notification-icon {
  font-size: 4rem;
  margin-bottom: 15px;
  animation: notificationIconBounce 0.6s ease infinite;
}

@keyframes notificationIconBounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.1);
  }
}

.notification-title {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(90deg, #FFB6C1, #FFD700);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.notification-message {
  color: #e8eef2;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.notification-btn {
  background: linear-gradient(135deg, #FFB6C1 0%, #FFD700 100%);
  border: none;
  padding: 12px 30px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  color: #000;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 182, 193, 0.4);
}

.notification-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 25px rgba(255, 182, 193, 0.6);
}

.notification-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 100000;
  animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.notification-overlay.hide {
  animation: overlayFadeOut 0.3s ease forwards;
}

@keyframes overlayFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}