/* ==========================================================================
   Garden Fitness — Pop-up promo de Noël 2026 (saisonnier)
   Exception volontaire à la feuille unique : ce fichier et js/promo-noel.js
   s'ajoutent ou se retirent ensemble après Noël (voir les 2 balises dans index.html).
   Variables de style.css réutilisées ; le rouge et l'or sont propres à cette promo.
   ========================================================================== */

.promo-noel {
  --promo-noel-rouge: #b3261e;        /* blanc dessus : contraste ≈ 6,5:1 */
  --promo-noel-rouge-fonce: #8f1d17;
  --promo-noel-or: #f2c14e;           /* décor uniquement, jamais du texte */
  --promo-noel-vert-fonce: #1d5a26;   /* survol du bouton principal (blanc dessus ≈ 8:1) */
  position: fixed;
  inset: 0;
  z-index: 8000;                      /* sous le bandeau cookies (9000) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  font-family: var(--font-body);
  animation: promo-noel-fondu 0.3s ease-out;
}

.promo-noel-fond {
  position: absolute;
  inset: 0;
  background: rgba(14, 38, 20, 0.68);
}

/* ---------- Flocons (décor : aucun clic capté) ---------- */
.promo-noel-flocons {
  --promo-noel-chute: 110vh;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.promo-noel-bandeau .promo-noel-flocons {
  --promo-noel-chute: 150px;
  z-index: 2;
}
.promo-noel-flocon {
  position: absolute;
  top: 0;
  left: var(--x);
  width: var(--t);
  height: var(--t);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  animation: promo-noel-chute var(--d) linear var(--r) infinite;
}
.promo-noel-flocon svg {
  display: block;
  width: 100%;
  height: 100%;
}
@keyframes promo-noel-chute {
  0%   { transform: translate3d(0, -20px, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.9; }
  90%  { opacity: 0.8; }
  100% { transform: translate3d(var(--dx), var(--promo-noel-chute), 0) rotate(180deg); opacity: 0; }
}

/* ---------- Fenêtre ---------- */
.promo-noel-fenetre {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 100%;                   /* de la zone libre au-dessus du bandeau cookies */
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  text-align: center;
  animation: promo-noel-entree 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.promo-noel-fenetre:focus { outline: none; }

.promo-noel-bandeau {
  position: relative;
  height: 150px;
  overflow: hidden;
  background: var(--color-primary-text);
}
.promo-noel-deco {
  display: block;
  width: 100%;
  height: 100%;
}

.promo-noel-fermer {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-dark);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), transform var(--transition);
}
.promo-noel-fermer:hover { background: var(--color-border); transform: rotate(90deg); }
.promo-noel-fermer:focus-visible,
.promo-noel-bouton:focus-visible {
  outline: 3px solid var(--color-dark);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--color-white);
}

.promo-noel-corps { padding: 1.25rem 1.5rem 1.5rem; }

.promo-noel-titre {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-dark);
}

.promo-noel-offre {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-primary-text);
}
.promo-noel-ancien {
  margin: 0.35rem 0 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-dark-muted);        /* ≈ 9:1 sur blanc */
  text-decoration: line-through;
  text-decoration-color: var(--promo-noel-rouge);
  text-decoration-thickness: 2px;
}
.promo-noel-detail {
  margin: 0.75rem 0 0;
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--color-dark);
}
.promo-noel-echeance {
  display: inline-block;
  margin: 1rem 0 0;
  padding: 0.4rem 1.1rem;
  border-radius: 100px;
  background: var(--promo-noel-rouge);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.promo-noel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.promo-noel-bouton {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.promo-noel-bouton-principal {
  background: var(--color-primary-text);
  color: var(--color-white);
}
/* a:hover et a:focus de style.css (rouge) ont une spécificité supérieure : on les neutralise */
.promo-noel-bouton-principal:visited,
.promo-noel-bouton-principal:focus { color: var(--color-white); }
.promo-noel-bouton-principal:hover { background: var(--promo-noel-vert-fonce); color: var(--color-white); }
.promo-noel-bouton-secondaire {
  background: transparent;
  color: var(--color-dark-muted);
  border-color: var(--color-border);
}
.promo-noel-bouton-secondaire:hover { border-color: var(--color-dark-muted); color: var(--color-dark); }

/* Blocage du défilement de la page tant que la fenêtre est ouverte */
html.promo-noel-verrou { overflow: hidden; }

/* ---------- Petits écrans ---------- */
@media (max-width: 360px) {
  .promo-noel-corps { padding: 1rem 1rem 1.25rem; }
  .promo-noel-titre { font-size: 1.35rem; }
  .promo-noel-offre { font-size: 1.75rem; }
}
@media (max-height: 600px) {
  .promo-noel-bandeau { height: 84px; }
  .promo-noel-bandeau .promo-noel-flocons { --promo-noel-chute: 90px; }
  .promo-noel-corps { padding-top: 0.9rem; }
  .promo-noel-titre { font-size: 1.3rem; margin-bottom: 0.5rem; }
  .promo-noel-offre { font-size: 1.7rem; }
  .promo-noel-echeance { margin-top: 0.7rem; }
  .promo-noel-actions { margin-top: 0.9rem; }
}

/* Petits téléphones, bandeau cookies affiché : « Plus tard » doit rester visible */
@media (max-width: 480px) and (max-height: 700px) {
  .promo-noel-bandeau { height: 84px; }
  .promo-noel-bandeau .promo-noel-flocons { --promo-noel-chute: 90px; }
}

@keyframes promo-noel-fondu {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes promo-noel-entree {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Mouvement réduit : flocons immobiles, aucune animation ---------- */
@media (prefers-reduced-motion: reduce) {
  .promo-noel,
  .promo-noel-fenetre { animation: none; }
  .promo-noel-flocon {
    animation: none;
    opacity: 0.85;
    transform: translateY(calc(var(--y) * var(--promo-noel-chute) / 100));
  }
  .promo-noel-fermer { transition: none; }
  .promo-noel-fermer:hover { transform: none; }
}
