/* Fond léger et festif */
body {
  background: linear-gradient(to bottom, #003300 0%, #006600 80%);
  color: #fff;
  font-family: 'Mountains of Christmas', cursive, Arial, sans-serif;
  margin: 0;
  padding: 20px 0 30px 0;
  min-height: 100vh;
  text-align: center;
}

/* Conteneur pour la neige (à coller dans body ou un wrapper) */
.snow-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999; /* au-dessus du fond, en dessous des popups si besoin */
  overflow: hidden;
}

/* Flocons */
.snowflake {
  position: absolute;
  top: -10%;
  color: #fff;
  font-size: 1rem;
  opacity: 0.8;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

/* Animation de chute */
@keyframes fall {
  0% {
    transform: translateY(-10vh);
  }
  100% {
    transform: translateY(110vh);
  }
}

/* Variantes de taille et durée pour donner un effet naturel */
.snowflake:nth-child(odd) {
  font-size: 1.2rem;
  animation-duration: 8s;
}
.snowflake:nth-child(even) {
  font-size: 0.8rem;
  animation-duration: 12s;
}


/* Titre avec effet */
h1 {
  font-family: 'Mountains of Christmas', cursive;
  font-size: 3rem;
  margin-bottom: 32px;
  color: #FFD700;
  text-shadow: 2px 2px 8px #004400, 0 0 14px #ffe18a;
  letter-spacing: 2px;
}

/* Calendrier en grille flexible */
.calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 22px;
  max-width: 1160px;
  margin: 0 auto 30px auto;
  width: 93vw;
}

/* Cases de jour, effet cadeau */
.day {
  background: #006400;
  border: 3px solid #cc9900;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 5px 24px #145c11, 0 1px 7px #147f06;
  position: relative;
  color: #fff;
  user-select: none;
  font-family: 'Mountains of Christmas', cursive, Arial, sans-serif;
  font-size: 2.7rem;
  text-align: center;
  transition: transform 0.18s, box-shadow 0.22s;
  padding: 38px 10px 10px 10px; /* place la déco cadeau au-dessus */
}

/* Hover effet doré sur les cases ouvertes */
.day.open:hover {
  transform: scale(1.07);
  box-shadow: 0 0 32px 7px #FFD700;
  border-color: #FFD700;
}

/* Petite étiquette cadeau au-dessus de chaque case */
.day::before {
  content: "🎁";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  z-index: 2;
}

/* Numéro du jour visible */
.day .number {
  margin-top: 16px;
  font-size: 2rem;
  font-weight: bold;
  text-shadow: 1px 2px 5px #333;
}

/* Cases verrouillées foncées, non-interactives */
.day.locked {
  background: #224422;
  border-color: #666633;
  cursor: default;
  box-shadow: none;
  opacity: 0.72;
  transition: none;
}

.day.locked::before {
  filter: grayscale(0.5) brightness(0.8);
  opacity: 0.4;
}

/* Responsive */
@media (max-width: 900px) {
  .calendar {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 16px;
    width: 99vw;
  }
  h1 {
    font-size: 2.1rem;
    margin-bottom: 19px;
  }
  .day {
    font-size: 1.7rem;
    padding: 32px 4px 10px 4px;
  }
}

@media (max-width: 600px) {
  .calendar {
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    width: 99vw;
  }
  .day {
    font-size: 1.1rem;
    padding: 22px 2px 8px 2px;
  }
  h1 {
    font-size: 1.4rem;
    margin-bottom: 13px;
  }
}

@media (max-width: 420px) {
  .calendar {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    width: 99vw;
  }
  .day {
    font-size: 0.93rem;
    padding: 18px 1px 7px 1px;
  }
}
/* --- Styles globales --- */
* {
  box-sizing: border-box;
}
body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: #1e1e1e;
  color: #fff;
  text-align: center;
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
h1 {
  font-size: 2rem;
  margin-bottom: 25px;
}
input[type="file"] {
  margin: 15px 0;
  border: 2px solid #39e839;
  border-radius: 10px;
  padding: 10px;
  max-width: 90%;
  color: #bbb;
}
button {
  background: #28a428;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}
button:hover {
  background: #2ecc40;
}
#status {
  margin-top: 25px;
  color: #0f0;
  word-wrap: break-word;
  max-width: 95%;
}

/* --- Modale --- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 10px;
}
.modal-content {
  background: #333;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 480px;
  color: #fff;
  box-shadow: 0 0 20px rgba(0,255,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.modal-content h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}
#modalThumbnail img, #modalThumbnail video {
  max-width: 100%;
  max-height: 200px;
  border-radius: 10px;
  margin: 10px 0;
}
.modal p {
  font-size: 1rem;
  color: #ccc;
}
.modal-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}
.modal-buttons button {
  flex: 1 1 100px;
  padding: 10px;
  font-weight: bold;
}
.confirm {
  background: #28a428;
}
.cancel {
  background: #f44336;
}

/* --- Responsive adaptatif --- */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }
  h1 {
    font-size: 1.6rem;
  }
  .modal-content {
    width: 95%;
    font-size: 0.95rem;
  }
}
@media (max-width: 480px) {
  button, input[type="file"] {
    width: 100%;
    font-size: 0.9rem;
  }
  .modal-content {
    width: 100%;
    margin: 0 10px;
  }
  #modalThumbnail img, #modalThumbnail video {
    max-height: 160px;
  }
}

/* --- Compte à rebours --- */

.countdown-box {
  background: rgba(20,40,20,0.60);
  border-radius: 20px;
  padding: 45px 30px;
  margin: 0 auto;
  margin-top: 35px;
  max-width: 440px;
  text-align: center;
}
.countdown-label {
  font-family: 'Mountains of Christmas', cursive;
  font-size: 2.5rem;
  color: #FFD700;
  letter-spacing: 2px;
  text-shadow: 2px 2px 6px #134d13;
  margin-bottom: 40px;
  margin-top: 15px;
}
#countdown {
  display: flex;
  justify-content: center;
  gap: 22px;
  font-family: 'Mountains of Christmas', cursive;
  color: #fff;
}
.cdown-sect {
  min-width: 60px;
  border-radius: 10px;
  background:rgba(0,0,0,0.25);
  padding: 18px 10px 9px 10px;
  font-size:2.4rem;
  box-shadow: 0 0 10px #ffd70044;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cdown-label {
  color:#ffd700; font-size:1rem;
  text-shadow:1px 2px 5px #333;
  margin-top: 4px;
}
@media(max-width:640px){
  .countdown-box {padding: 22px 7px;}
  #countdown {gap: 7px;}
  .cdown-sect{min-width:42px;font-size:1.2rem;padding:7px 2px;}
  .countdown-label{font-size:1.15rem;}
}

/* --- Navigation par onglets --- */

.tab-nav {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 35px;
  background: rgba(0, 51, 0, 0.7);
  padding: 12px 0;
  border-radius: 25px;
  box-shadow: 0 0 25px #117711aa;
}
.tab-link {
  font-family: 'Pacifico', cursive;
  font-weight: 700;
  font-size: 1.4rem;
  color: #8fbb82;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 25px;
  border: 2px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  user-select: none;
}
.tab-link:hover,
.tab-link[aria-current="page"] {
  background-color: #39e839cc;
  color: #052a05;
  border-color: #39e839;
  box-shadow: 0 0 15px #39e839aa;
  cursor: pointer;
}

/* --- Formulaire admin --- */

body.login-page {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at top, #004900 25%, #002700 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', 'Arial', sans-serif;
}

/* Image de fond dans la box */
.login-box {
  position: relative;
  max-width: 350px;
  width: 92vw;
  margin: 36px auto;
  padding: 40px 32px 30px 32px;
  text-align: center;
  border-radius: 32px;
  box-shadow: 0 0 32px #17ff5650, 0 0 0 5px #144f1a inset;

  background-image: url('uploads/user_bg/one.jpg'); /* ton image */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* voile pour lisibilité du texte */
.login-box::before {
  content: "";
  position: absolute;
  inset: 0;
 /* background: rgba(0, 30, 0, 0.75); /* opacité à ajuster */
  z-index: 0;
}

/* contenu au-dessus de l’image + voile */
.login-box > * {
  position: relative;
  z-index: 1;
}

.login-box h1 {
  font-family: 'Pacifico', 'Mountains of Christmas', cursive;
  color: #d6ff9e;
  font-size: 2.3rem;
  letter-spacing: 2px;
  margin-bottom: 22px;
  text-shadow: 0 4px 20px #0b7200, 0 1px 0 #2bff92;
}

.login-box input[type="text"],
.login-box input[type="password"],
.login-box input[type="email"] {
  width: 90%;
  margin-bottom: 17px;
  background: #fff;
  color: #195c24;
  font-size: 1.09rem;
  border-radius: 14px;
  border: none;
  padding: 13px 14px;
  box-shadow: 0 2px 8px #32e1a344;
  outline: none;
  transition: box-shadow 0.2s;
}

.login-box input:focus {
  box-shadow: 0 0 10px #35f38a, 0 2px 8px #32e1a344;
}

.login-box button {
  width: 80%;
  margin: 15px 0 7px 0;
  background: linear-gradient(90deg, #39e839 70%, #31d266 100%);
  color: #033100;
  border: none;
  border-radius: 16px;
  padding: 13px 0;
  font-weight: bold;
  font-size: 1.13rem;
  box-shadow: 0 6px 18px #118e2840;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.25s;
}

.login-box button:hover {
  background: linear-gradient(90deg, #a2ff5b 50%, #26cc70 100%);
  color: #012600;
  box-shadow: 0 2px 16px #4afb8640;
}

.error-box {
  color: #fff9e7;
  background: #c14949;
  font-weight: bold;
  box-shadow: 0 2px 6px #bc203880;
  border-radius: 12px;
  padding: 9px 12px;
  margin-bottom: 17px;
  letter-spacing: 1px;
  font-size: 1.02em;
}

@media (max-width: 500px) {
  .login-box {
    padding: 17px 3vw 19px 3vw;
    max-width: 96vw;
  }
  .login-box h1 {
    font-size: 1.4rem;
  }
}


/* --- Styles commentaires --- */

/* Container général */
#comments {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 12px;
  border-radius: 8px;
  background: #fafafa;
}

/* Commentaire principal */
#comments > div {
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  box-shadow: 0px 1px 3px rgba(0,0,0,0.1);
  position: relative;
}

/* Nom utilisateur */
#comments b {
  color: #317365;
  font-size: 1.05em;
}

/* Date */
#comments small {
  color: #999;
  font-style: italic;
  font-size: 0.85em;
}

/* Lien réponse */
#comments a.reply-button {
  cursor: pointer;
  color: #1a73e8;
  text-decoration: none;
  font-size: 0.9em;
  margin-top: 6px;
  display: inline-block;
}

#comments a.reply-button:hover {
  text-decoration: underline;
}

/* Réponses */
#comments div[style*="margin-left"] {
  background: #f3fdf9;
  border-left: 3px solid #4caf50;
  margin-top: 6px;
  padding: 8px;
  font-size: 0.95em;
}

/* Formulaire commentaire */
#comment-form textarea {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1em;
  border-radius: 8px;
  border: 1px solid #ccc;
  padding: 8px;
  resize: vertical;
  box-sizing: border-box;
  transition: box-shadow 0.3s ease;
}

#comment-form textarea:focus {
  border-color: #4caf50;
  box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
  outline: none;
}

#comment-form button {
  background-color: #4caf50;
  border: none;
  padding: 10px 18px;
  margin-top: 8px;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

#comment-form button:hover {
  background-color: #45a049;
}

/* Bouton emoji */
#emoji-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  vertical-align: middle;
  margin-right: 6px;
}

/* Bouton annuler réponse */
#cancel-reply {
  background-color: #e57373;
  border: none;
  color: white;
  padding: 6px 12px;
  margin-left: 10px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-block;
}

#cancel-reply:hover {
  background-color: #d32f2f;
}

#modalOverlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 10000;
  overflow-y: auto;
}

#modalBox {
  background: white;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
  max-width: 90vw;
  max-height: 80vh;
  padding: 25px;
  overflow-y: auto;
  position: relative;
}



