/*
Theme Name: CFPC Noël
Description: Habillage des fêtes du thème CFPC Campus du Haut Berry, aux couleurs de la charte (marine, magenta, jaune, bleus) : bandeau, guirlande lumineuse et brins de houx, neige qui tombe. Même mise en page, mêmes menus, mêmes pages Elementor. Page d'accueil : « CFPC accueil » tant que ce thème est actif. Retour automatique au thème CFPC Charte Campus à la date de fin (par défaut le 6 janvier), réglable dans Apparence → Personnaliser → Décor de Noël.
Template: cfpc-site
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: cfpc
*/

/* ==========================================================================
   Palette des fêtes = charte Campus du Haut Berry
   (les variables --ch-… sont définies dans inc/charte.css)
   ========================================================================== */
:root{
  --no-marine: #182649;
  --no-indigo: #29235C;
  --no-magenta: #E6007E;
  --no-magenta-fonce: #C8006D;
  --no-jaune: #FFFF00;
  --no-neige: #A9B5CF;           /* flocons visibles sur fond blanc */
  --no-blanc: #FFFFFF;
}

/* Tout le décor ne s'applique que pendant la période (classe ajoutée par functions.php). */

/* ---------- Bandeau des fêtes ---------- */
.no-bandeau{
  position: relative; z-index: 60;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 16px;
  padding: 10px 96px 10px 16px;
  background: linear-gradient(100deg, var(--no-marine) 0%, var(--no-indigo) 100%);
  color: var(--no-blanc);
  font: 500 15px/1.4 "Work Sans", system-ui, sans-serif;
  text-align: center;
  overflow: hidden;
}
.no-bandeau[hidden]{ display: none; }
.no-bandeau__givre{
  position: absolute; left: 14px; top: 50%; width: 46px; height: 46px; margin-top: -23px;
  color: rgba(255,255,255,.2); pointer-events: none;
}
.no-bandeau__etoile{ width: 20px; height: 20px; flex: none; color: var(--no-jaune); }
/* Brins de houx : un devant l'étoile, un dans le coin droit (avant le bouton de fermeture) */
.no-bandeau__houx{ width: 38px; height: 28px; flex: none; margin-right: -8px; }
.no-bandeau__houx--droite{ position: absolute; right: 48px; top: 50%; margin-top: -14px; transform: scaleX(-1); }
.no-bandeau__texte{ margin: 0; }
.no-bandeau__fermeture{ display: inline-block; margin-left: .4em; color: var(--no-jaune); font-weight: 600; }
.no-bandeau__lien{
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: var(--no-magenta-fonce); color: var(--no-blanc) !important;
  font-weight: 600; font-size: 14px; text-decoration: none !important;
}
.no-bandeau__lien:hover, .no-bandeau__lien:focus-visible{ background: var(--no-jaune); color: var(--no-marine) !important; }
.no-bandeau__fermer{
  all: unset; position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center;
  color: var(--no-blanc); cursor: pointer; font-size: 20px; line-height: 1;
}
.no-bandeau__fermer:hover{ background: rgba(255,255,255,.14); }
.no-bandeau__fermer:focus-visible, .no-bandeau__lien:focus-visible{ outline: 2px solid var(--no-jaune); outline-offset: 2px; }
.no-bandeau--bas{ position: fixed; left: 0; right: 0; bottom: 0; }

.cfpc-noel ::selection{ background: #FCE3F0; color: var(--no-marine); }

/* ---------- Guirlande lumineuse en haut de page (réglage par défaut) ---------- */
.no-guirlande{
  height: 52px; margin: 0;
  background: var(--no-marine) url("assets/guirlande-noel.svg") repeat-x left top / auto 52px;
  pointer-events: none;
}

/* ---------- Variante : guirlande posée sur le haut du pied de page ---------- */
.no-guirlande-bas .site-footer,
.no-guirlande-bas .elementor-location-footer{ position: relative; overflow: visible !important; }
/* Elementor Pro pose déjà un ::before « clearfix » (display: table, largeur nulle) sur le pied de page :
   on le remplace entièrement, d'où display, width et les !important. */
.no-guirlande-bas .site-footer::before,
.no-guirlande-bas .elementor-location-footer::before{
  content: "" !important; display: block !important; position: absolute !important;
  left: 0; right: 0; width: 100% !important; top: -52px; height: 52px; z-index: 5;
  background: var(--no-marine) url("assets/guirlande-noel.svg") repeat-x left top / auto 52px;
  pointer-events: none; clear: none;
}
.no-guirlande-bas .elementor-location-footer .site-footer::before{ display: none !important; }

/* ---------- Neige qui tombe ---------- */
.no-deco{ position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.no-chute{
  position: absolute; top: -50px; left: var(--x); width: var(--w); color: var(--no-neige); opacity: .85;
  animation: no-tombe var(--d) linear var(--delai) infinite; will-change: transform;
}
.no-chute--rose{ color: var(--no-magenta); opacity: .55; }
.no-chute span{ display: block; animation: no-balance 3.6s ease-in-out infinite alternate; }
.no-chute svg{ display: block; width: 100%; height: auto; animation: no-tourne 10s linear infinite; }
.no-chute:nth-child(2n) span{ animation-delay: -1.6s; }
.no-chute:nth-child(3n) svg{ animation-direction: reverse; }
@keyframes no-tombe{ from{ transform: translateY(0); } to{ transform: translateY(calc(100vh + 100px)); } }
@keyframes no-balance{ from{ transform: translateX(-20px); } to{ transform: translateX(20px); } }
@keyframes no-tourne{ from{ transform: rotate(0deg); } to{ transform: rotate(360deg); } }

/* Écrans étroits : décor allégé */
@media (max-width: 767px){
  .no-chute--sup, .no-bandeau__givre, .no-bandeau__etoile, .no-bandeau__houx--droite{ display: none; }
  .no-bandeau{ font-size: 14px; padding-right: 46px; }
  .no-guirlande{ height: 40px; background-size: auto 40px; }
  .no-guirlande-bas .site-footer::before,
  .no-guirlande-bas .elementor-location-footer::before{ top: -40px; height: 40px; background-size: auto 40px; }
}

/* Animations réduites : rien ne tombe */
@media (prefers-reduced-motion: reduce){
  .no-deco{ display: none; }
}

/* Impression : aucun décor */
@media print{
  .no-bandeau, .no-deco, .no-guirlande{ display: none !important; }
  .no-guirlande-bas .site-footer::before,
  .no-guirlande-bas .elementor-location-footer::before{ display: none !important; }
}
