/* Styles festifs pour le calendrier de l'Avent */
:root {
  --christmas-red: #D42426;
  --christmas-green: #165B33;
  --christmas-gold: #FFD700;
  --snow-color: #fff;
}

body {
  background-color: #0a3142;
  background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../images/background.jpg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
}

/* Animation neige */
@keyframes snowfall {
  0% {
    transform: translateY(-100vh) translateX(0);
  }
  100% {
    transform: translateY(100vh) translateX(20px);
  }
}

.snowflake {
  position: fixed;
  top: -10px;
  color: var(--snow-color);
  animation: snowfall linear infinite;
  pointer-events: none;
  z-index: 100;
}

/* Style du calendrier */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.calendar-day {
  aspect-ratio: 1;
  background-color: #a42a28;
  background: linear-gradient(45deg, var(--christmas-red), #ff4547);
  border: 2px solid #dfbd69;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Mountains of Christmas', cursive;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.day-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.day-number {
  font-family: 'Mountains of Christmas', cursive;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Effet au survol pour les jours ouvrables */
.calendar-day:not(.rest-day):not(.locked):not(.vacation-day):hover {
  transform: scale(1.08) rotate(2deg);
  border-color: #fff;
  box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.6);
}

/* Style pour les jours de repos (mercredi et weekend) */
.rest-day {
  background: linear-gradient(45deg, #4FB0C6, #4F86C6);
  cursor: not-allowed;
  border-color: #85D3E5;
  filter: grayscale(50%);
}

.rest-icon {
  font-size: 2rem;
  margin-top: 0.2rem;
  opacity: 0.85;
  animation: float 2s ease-in-out infinite;
}

/* Style pour les vacances */
.vacation-day {
  background: linear-gradient(45deg, #FFB347, #FFCC33);
  cursor: not-allowed;
  border-color: #FFE5B4;
}

/* Style pour les jours verrouillés */
.locked {
  background: linear-gradient(45deg, #808080, #909090);
  cursor: not-allowed;
  opacity: 0.9;
  border-color: #A0A0A0;
  filter: grayscale(50%);
}

.locked:not(.vacation-day):not(.rest-day)::after {
  content: '🔒';
  position: absolute;
  bottom: 10px;
  font-size: 1.5rem;
}

/* Animation flottante pour les icônes et décorations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Style du tooltip */
.calendar-day[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 15px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: Arial, sans-serif;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Style de la navbar */
.navbar-christmas {
  background: var(--christmas-red) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
  font-family: 'Mountains of Christmas', cursive;
  font-size: 1.8rem;
  color: var(--christmas-gold) !important;
}

/* Style des alertes */
.alert {
  border-radius: 10px;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.alert-success {
  background-color: var(--christmas-green);
  color: white;
}

.alert-warning {
  background-color: var(--christmas-gold);
  color: #333;
}

/* Style des formulaires */
.form-control:focus {
  border-color: var(--christmas-green);
  box-shadow: 0 0 0 0.2rem rgba(22, 91, 51, 0.25);
}

.form-check-input:checked {
  background-color: var(--christmas-green);
  border-color: var(--christmas-green);
}

.christmas-decoration {
  position: fixed;
  font-size: 2rem;
  z-index: 1;
  animation: float 3s ease-in-out infinite;
}

/* Styles pour le dashboard admin */
.btn-group {
  gap: 5px;
  flex-wrap: wrap;
}

.btn-group .btn {
  margin-bottom: 5px;
}

.photo-section {
  padding: 15px;
}

.form-check {
  margin-bottom: 8px;
}

.card {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-header {
  background-color: var(--christmas-red) !important;
}

@media (max-width: 768px) {
  .border-end {
    border: none !important;
    margin-bottom: 30px;
  }
}

/* Effet de révélation papier cadeau */
.reveal-container {
  position: relative;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  overflow: hidden;
  background-color: #f0f0f0;
}

.reveal-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out;
}

.reveal-container .reveal-overlay {
  opacity: 1;
  z-index: 2;
  transform: scale(1);
}

.reveal-container .reveal-photo {
  z-index: 1;
  transform: scale(0.95);
}

.reveal-container.revealed .reveal-overlay {
  opacity: 0;
  transform: scale(1.1);
  pointer-events: none;
}

.reveal-container.revealed .reveal-photo {
  transform: scale(1);
}
