﻿/* =========================================
   🎄 Base festive accessible
   ========================================= */
:root{
  /* ==== PALETTE DE COULEURS ====
     - Tu peux changer ces variables pour modifier l'ambiance générale
     - Exemple : remplacer --fond-doux par un bleu pâle pour un thème hivernal
  */
  --rouge: #b22222;       /* Rouge profond → titres et bordures */
  --doré: #ffd700;        /* Doré lumineux → accents et boutons */
  --noir: #000000;        /* Noir → contraste fort */
  --fond-doux: #fff8f0;   /* Fond crème → douceur festive */
  --texte: #333333;       /* Gris foncé → texte lisible */

  /* ==== NEIGE ====
     Ajuste la taille et la vitesse des flocons
     - --flocon-min / max → taille des ❄️
     - --neige-duree-min / max → vitesse de chute
  */
  --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: #f7f9f7; /* Fond crème doux, adapté au cadre */
  color: var(--texte);
  text-align: center;
  margin: 0;
  padding: 20px;

  /* ==== AIDE ====
     - Remplace #fff8f0 par une autre couleur selon l’ambiance :
       #fdfdfd → blanc neige
       #ffd700 → doré lumineux
       #e6f0ff → bleu hivernal
     - Choisis UNE seule couleur pour éviter les trames multiples.
  */
}

/* =========================================
   🖼️ Cadre principal (éphéméride)
   ========================================= */
.cadre{
  max-width: 780px;              /* Largeur max du cadre */
  margin: 0 auto;                /* Centré horizontalement */
  padding: 16px 20px;             /* Espacement interne */
  border-radius: 16px;            /* Coins arrondis */
  background: #ffffffcc;          /* Fond blanc semi-transparent */
  box-shadow: 0 8px 24px rgba(0,0,0,0.08); /* Ombre douce */
  border: 4px solid rgba(178,34,34,0.2);   /* Bordure rouge translucide */

  /* Nécessaire pour contenir les flocons ❄️ */
  position: relative;
  overflow: hidden;
}

/* ==== AIDE: Désactiver la neige facilement ====
   - Option 1: ajouter .neige-off au cadre → pas de flocons
   - Option 2: mettre data-neige="off" sur le cadre
*/
.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);                       /* Rouge profond */
  text-shadow: 1px 1px 3px var(--doré);      /* Ombre dorée scintillante */
  margin: 16px 0 12px;
}

/* =========================================
   🎬 Boutons rétro-cinéma (contraste assuré)
   ========================================= */
a.btn-fete, .btn-toggle{
  display: inline-block;
  margin: 6px;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--noir);       /* Fond noir */
  color: var(--doré);            /* Texte 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é);       /* Fond doré au survol */
  color: var(--noir);            /* Texte noir au survol */
}

/* =========================================
   📜 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 — style des flocons (UNIQUEMENT dans le cadre)
   ========================================= */
.snowflake{
  position: absolute;
  top: -20px;              /* démarre juste au-dessus du cadre */
  will-change: transform;
  pointer-events: none;    /* flocons non cliquables */
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));

  animation-name: fall-cadre;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

/* Trajectoire douce dans le cadre */
@keyframes fall-cadre {
  0% {
    top: -20px;   /* départ au-dessus du cadre */
    opacity: 0.9;
  }
  100% {
    top: 100%;    /* descend jusqu’en bas du cadre */
    opacity: 1;
  }

.event {
    position: relative;
    background-image: url('../Pere_Noel.jpg'); /* ton image */
    background-size: cover;       /* l’image couvre tout le bloc */
    background-position: center;  /* centrée */
    background-repeat: no-repeat; /* évite les répétitions */
    color: white;
    padding: 20px;
    border-radius: 12px;
    overflow: hidden;
    min-height: 300px;            /* hauteur minimale pour bien voir l’image */
}

/* Voile semi-transparent pour lisibilité */
.event .overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4); /* voile noir transparent */
    z-index: 1;
}

/* Texte au-dessus du voile */
.event h2,
.event p {
    position: relative;
    z-index: 2;
}


.ephemeride {
  position: relative;   /* référence pour les éléments internes */
  width: 100%;
  height: 100%;
}

.copyright {
  position: absolute;       /* se place dans la fenêtre */
  bottom: 5px;              /* marge du bas */
  right: 10px;              /* marge à droite */
  font-size: 11px;          /* écriture légère */
  font-weight: 300;         /* texte fin */
  color: rgba(0,0,0,0.4);   /* gris doux et discret */
  font-family: "Segoe UI", Arial, sans-serif;
  pointer-events: none;     /* ne gêne pas les clics */
  text-align: right;        /* assure l’alignement du texte */
}