﻿/* =========================================
   🎄 Base festive accessible
   ========================================= */
:root{
  /* ==== PALETTE DE COULEURS ==== */
  --rouge: #b22222;       /* Rouge profond → titres et bordures */
  --doré: #ffd700;        /* Doré lumineux → accents et boutons */
  --noir: #000000;        /* Noir → contraste fort */
  --fond-doux: #c1c4c6;   /* Fond crème → douceur festive */
  --texte: #333333;       /* Gris foncé → texte lisible */

  /* ==== NEIGE ==== */
  --flocon-min: 5px;     
  --flocon-max: 12px;    
  --neige-duree-min: 6s; 
  --neige-duree-max: 12s;
}

* { box-sizing: border-box; }

/* =========================================
   🎨 Fond général de la page
   ========================================= */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--fond-doux); /* cohérence avec la variable */
  color: var(--texte);
  text-align: center;
  margin: 0;
  padding: 20px;
}

/* =========================================
   🖼️ Cadre principal (éphéméride)
   ========================================= */
.cadre{
  max-width: 780px;
  margin: 0 auto;
  padding: 16px 20px;
  border-radius: 16px;
  background: #ffffffcc;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border: 4px solid rgba(178,34,34,0.2);
  position: relative;
  overflow: hidden;
}

/* Désactiver la neige facilement */
.cadre.neige-off .snowflake, 
.cadre[data-neige=off] .snowflake{
  display: none !important;
}

/* =========================================
   ✨ Guirlande décorative
   ========================================= */
.guirlande{
  font-size: 1.2rem;
  margin-bottom: 8px;
}

/* =========================================
   🎅 Titres festifs
   ========================================= */
h1, h2, h3 {
  color: var(--rouge);
  text-shadow: 1px 1px 3px var(--doré);
  margin: 16px 0 12px;
}

/* =========================================
   🌟 Phrase poétique
   ========================================= */
.formule-poetique {
  color: var(--rouge);
  text-shadow: 1px 1px 4px var(--doré);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 12px 0;
  background: linear-gradient(
    to right,
    rgba(255,215,0,0.15),
    rgba(178,34,34,0.15)
  );
  padding: 8px 12px;
  border-radius: 10px;
  display: inline-block;
}

/* =========================================
   🎬 Boutons rétro-cinéma
   ========================================= */
a.btn-fete, .btn-toggle{
  display: inline-block;
  margin: 6px;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--noir);
  color: var(--doré);
  text-decoration: none;
  border: 2px solid var(--doré);
  border-radius: 10px;
  transition: 0.25s ease;
  cursor: pointer;
}
a.btn-fete:hover, .btn-toggle:hover{
  background: var(--doré);
  color: var(--noir);
}
a.btn-fete:focus, .btn-toggle:focus{
  outline: 3px solid var(--doré);
  outline-offset: 2px;
}

/* =========================================
   📜 Popup
   ========================================= */
.popup {
  background: var(--fond-doux);
}
.popup-container {
  width: min(620px, 90vw);
  margin: 20px auto;
  padding: 20px;
  border: 3px solid var(--rouge);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 24px rgba(178,34,34,0.35);
  text-align: left;
}
.close-btn {
  float: right;
  background: var(--doré);
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 8px;
  font-weight: 700;
}
.close-btn:hover {
  background: var(--rouge);
  color: #fff;
}

/* =========================================
   📦 Optionnels avec transition douce
   ========================================= */
.optionnel{
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  background: #fff8e1;
  padding: 0 12px;
  margin: 10px 0 16px;
  border-radius: 8px;
  box-shadow: inset 0 0 8px rgba(178,34,34,0.2);
}
.optionnel p{
  margin: 10px 0;
}

/* =========================================
   ❄️ Neige
   ========================================= */
.snowflake{
  position: absolute;
  top: -20px;
  will-change: transform;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
  animation-name: fall-cadre;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes fall-cadre {
  0% {
    top: -20px;
    opacity: 0.9;
  }
  100% {
    top: 100%;
    opacity: 1;
  }
}

/* =========================================
   🎁 Événement avec image
   ========================================= */
.event {
  position: relative;
  background-image: url('../Pere_Noel.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  padding: 20px;
  border-radius: 12px;
  overflow: hidden;
  min-height: 300px;
}
.event .overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}
.event h2,
.event p {
  position: relative;
  z-index: 2;
}

/* =========================================
   📅 Éphéméride
   ========================================= */
.ephemeride {
  position: relative;
  width: 100%;
  height: 100%;
}

/* =========================================
   © Copyright
   ========================================= */
.copyright {
  position: absolute;
  bottom: 5px;
  right: 10px;
  font-size: 11px;
  color: rgba(0,0,0,0.6);
  background: rgba(255,255,255,0.6);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: "Segoe UI", Arial, sans-serif;
}
