/* ==========================================================================
   THÈME DE NOËL - ATHÉNÉE ROYAL DE FRAGNÉE (ENSEIGNEMENT OFFICIEL - LAÏQUE)
   Éléments : Neige, Bonnet de Noël, Sapin décoré, Guirlandes, Casse-Noisettes,
              Rubans de Noël, Cadeaux de Noël, Boules de Noël.
   ========================================================================== */

:root {
    --noel-red: #c81e1e;
    --noel-red-dark: #8b1111;
    --noel-red-light: #ef4444;
    --noel-gold: #f59e0b;
    --noel-gold-bright: #fbbf24;
    --noel-gold-light: #fef3c7;
    --noel-green: #0f5132;
    --noel-green-dark: #072e1c;
    --noel-snow: #ffffff;
}

/* --------------------------------------------------------------------------
   1. CANVAS CHUTE DE NEIGE
   -------------------------------------------------------------------------- */
#noel-snow-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
}

/* --------------------------------------------------------------------------
   2. BANDEAU SUPÉRIEUR (TOP BAR) RUBAN ROUGE & OR DE NOËL
   -------------------------------------------------------------------------- */
body.theme-noel .top-bar {
    background: repeating-linear-gradient(
        135deg,
        #991b1b,
        #991b1b 20px,
        #b91c1c 20px,
        #b91c1c 40px
    ) !important;
    border-bottom: 2px solid var(--noel-gold-bright) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

body.theme-noel .top-bar-text strong {
    color: var(--noel-gold-bright);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* --------------------------------------------------------------------------
   3. GUIRLANDE DE SAPIN, LUMIÈRES & BOULES DE NOËL SOUS LA NAVBAR
   -------------------------------------------------------------------------- */
body.theme-noel .navbar {
    border-bottom: 3px solid var(--noel-gold);
    position: relative;
}

.noel-header-garland {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 95px;
    pointer-events: none;
    z-index: 999;
    overflow: visible;
}

/* Frise de sapin en haut de la guirlande */
.noel-fir-strip {
    width: 100%;
    height: 16px;
    background: radial-gradient(circle at 15px 4px, #14532d 8px, transparent 9px),
                radial-gradient(circle at 30px 6px, #166534 10px, transparent 11px),
                radial-gradient(circle at 45px 3px, #0f5132 9px, transparent 10px),
                linear-gradient(to bottom, #0b3627 0%, #14532d 65%, transparent 100%);
    background-size: 50px 18px, 50px 18px, 50px 18px, 100% 14px;
    background-repeat: repeat-x;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
    position: relative;
}

/* Lumières de Noël scintillantes */
.noel-lights-row {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    width: 100%;
    padding: 0 10px;
    margin-top: -6px;
}

.noel-bulb {
    width: 10px;
    height: 14px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    position: relative;
    animation: noelTwinkle 1.8s infinite alternate ease-in-out;
}

.noel-bulb::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 2px;
    width: 6px;
    height: 4px;
    background: #374151;
    border-radius: 2px;
}

.noel-bulb.red {
    background: #ff2a2a;
    box-shadow: 0 0 10px 3px rgba(255, 42, 42, 0.85);
}
.noel-bulb.gold {
    background: #fbbf24;
    box-shadow: 0 0 10px 3px rgba(251, 191, 36, 0.85);
    animation-delay: 0.45s;
}
.noel-bulb.green {
    background: #22c55e;
    box-shadow: 0 0 10px 3px rgba(34, 197, 94, 0.85);
    animation-delay: 0.9s;
}
.noel-bulb.ice {
    background: #e0f2fe;
    box-shadow: 0 0 12px 3px rgba(224, 242, 254, 0.9);
    animation-delay: 1.35s;
}

@keyframes noelTwinkle {
    0% { opacity: 0.55; transform: scale(0.92); }
    100% { opacity: 1; transform: scale(1.12); }
}

/* Boules de Noël suspendues sous la navbar */
.noel-baubles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.noel-hanging-bauble {
    position: absolute;
    top: 0;
    transform-origin: top center;
    animation: noelSwing 4.5s ease-in-out infinite alternate;
    pointer-events: auto;
    cursor: pointer;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.noel-hanging-bauble:hover {
    animation: noelSwingFast 0.8s ease-in-out infinite alternate;
}

.noel-hanging-bauble:nth-child(even) {
    animation-delay: -2.2s;
    animation-duration: 5.2s;
}

@keyframes noelSwing {
    0% { transform: rotate(-4deg); }
    100% { transform: rotate(4deg); }
}

@keyframes noelSwingFast {
    0% { transform: rotate(-12deg) scale(1.08); }
    100% { transform: rotate(12deg) scale(1.08); }
}

/* --------------------------------------------------------------------------
   4. BONNET DE NOËL SUR LE LOGO ET SUR LE CHATBOT ALFIE
   -------------------------------------------------------------------------- */
body.theme-noel .logo {
    position: relative;
}

.noel-santa-hat-logo {
    position: absolute;
    top: -15px;
    left: -14px;
    width: 44px;
    height: 44px;
    z-index: 10;
    pointer-events: none;
    transform: rotate(-18deg);
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
    animation: hatBob 3s ease-in-out infinite alternate;
}

@keyframes hatBob {
    0% { transform: rotate(-18deg) translateY(0); }
    100% { transform: rotate(-14deg) translateY(-2px); }
}

.noel-santa-hat-chatbot {
    position: absolute;
    top: -24px;
    right: -8px;
    width: 52px;
    height: 52px;
    z-index: 1002;
    pointer-events: none;
    transform: rotate(15deg) scaleX(-1);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35));
}

body.theme-noel .chatbot-toggler {
    border: 3px solid var(--noel-gold-bright) !important;
    box-shadow: 0 0 20px rgba(200, 30, 30, 0.5), 0 5px 15px rgba(0, 0, 0, 0.25) !important;
}

/* --------------------------------------------------------------------------
   5. HERO BANNER : CASSE-NOISETTES, SAPIN DÉCORÉ, CADEAUX & TAPIS DE NEIGE
   -------------------------------------------------------------------------- */
body.theme-noel .hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(9, 45, 32, 0.88) 0%,
        rgba(85, 16, 16, 0.78) 55%,
        rgba(45, 22, 10, 0.85) 100%
    ) !important;
}

/* Ruban de Noël pour le badge Hero (.hero-tag) */
body.theme-noel .hero-tag {
    position: relative;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    border: 2px solid var(--noel-gold-bright) !important;
    color: #ffffff !important;
    padding: 8px 26px !important;
    border-radius: 6px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 0 8px rgba(251, 191, 36, 0.35);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

body.theme-noel .hero-tag::before,
body.theme-noel .hero-tag::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-style: solid;
    z-index: -1;
}

/* Scène de Noël dans le Hero (Sapin + Casse-Noisettes + Cadeaux) */
.noel-hero-stage {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

/* Casse-Noisette Garde Gauche (Taille réduite et élégante) */
.noel-nutcracker-left {
    position: absolute;
    bottom: 24px;
    left: 2%;
    width: 82px;
    height: auto;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
    z-index: 4;
    animation: nutcrackerGuard 4s ease-in-out infinite alternate;
}

/* Scène Droite : Sapin décoré + Casse-Noisette Droit + Cadeaux (Taille réduite) */
.noel-hero-right-scene {
    position: absolute;
    bottom: 18px;
    right: 3%;
    width: 270px;
    height: 295px;
    z-index: 4;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

@keyframes nutcrackerGuard {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
}

/* Animation de l'étoile au sommet du sapin */
.noel-tree-star {
    transform-origin: center;
    animation: starPulse 2s ease-in-out infinite alternate;
}

@keyframes starPulse {
    0% { filter: drop-shadow(0 0 6px #fbbf24); transform: scale(0.96); }
    100% { filter: drop-shadow(0 0 16px #fef08a); transform: scale(1.06); }
}

/* Tapis de neige ondulé au bas du Hero */
.noel-hero-snowbank {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 55px;
    z-index: 3;
    pointer-events: none;
}

.noel-hero-snowbank svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Adaptation du Hero pour laisser la place au Sapin et aux Casse-Noisettes sur grand écran */
@media (min-width: 1280px) {
    body.theme-noel .hero .container {
        padding-left: 95px;
    }
    body.theme-noel .hero-content {
        max-width: 720px;
    }
}

@media (max-width: 1279px) {
    .noel-nutcracker-left {
        display: none;
    }
    .noel-hero-right-scene {
        width: 215px;
        height: 235px;
        right: 1.5%;
        opacity: 0.92;
    }
}

@media (max-width: 900px) {
    .noel-hero-right-scene {
        width: 155px;
        height: 175px;
        bottom: 12px;
        right: 0;
        opacity: 0.85;
    }
    .noel-hanging-bauble.hide-mobile {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   6. RUBANS DE NOËL, NŒUDS DE CADEAUX & DÉCORS DE CARTES
   -------------------------------------------------------------------------- */
/* Tags de section façon Ruban de Noël */
body.theme-noel .section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    color: #ffffff !important;
    padding: 6px 18px;
    border-radius: 6px;
    border: 1.5px solid var(--noel-gold-bright);
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.25);
    position: relative;
}

body.theme-noel .section-tag::before {
    content: '🎄';
    font-size: 0.95em;
}

body.theme-noel .section-tag::after {
    content: '🎁';
    font-size: 0.95em;
}

/* Masquer le bouton Menu PDF (Télécharger) dans la section restaurant */
.restaurant-cta a[download],
.restaurant-cta a.btn-outline {
    display: none !important;
}

/* Cadre photo de la Direction décoré */
body.theme-noel .direction-img-card {
    border: 3px solid var(--noel-gold-bright);
    box-shadow: 0 12px 30px rgba(185, 28, 28, 0.18);
}

.noel-direction-corner {
    position: absolute;
    bottom: -18px;
    right: -18px;
    width: 95px;
    height: 95px;
    z-index: 6;
    pointer-events: none;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.25));
}

/* --------------------------------------------------------------------------
   7. SÉPARATEURS FESTIFS ENTRE LES SECTIONS (RUBAN, BOULES, CADEAUX, SAPIN)
   -------------------------------------------------------------------------- */
.noel-section-divider {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: -18px 0 22px 0;
    pointer-events: none;
    position: relative;
    z-index: 4;
}

.noel-section-divider svg {
    max-width: 460px;
    width: 90%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

/* --------------------------------------------------------------------------
   8. PIED DE PAGE (FOOTER) DÉCORÉ DE NOËL
   -------------------------------------------------------------------------- */
body.theme-noel .footer {
    position: relative;
    border-top: 4px solid var(--noel-gold-bright);
}

.noel-footer-decor {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 24px;
    padding: 18px 15px 5px 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    flex-wrap: wrap;
}

.noel-footer-greeting {
    color: var(--noel-gold-bright);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    text-align: center;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --------------------------------------------------------------------------
   9. BOUTON FLOTTANT "AMBIANCE DE NOËL" (ACTIVER/COUPER LA NEIGE)
   -------------------------------------------------------------------------- */
.noel-toggle-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
    color: #ffffff;
    border: 2px solid var(--noel-gold-bright);
    border-radius: 50px;
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.noel-toggle-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(185, 28, 28, 0.5);
}

@media (max-width: 768px) {
    .noel-toggle-btn {
        bottom: 14px;
        left: 14px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

/* --------------------------------------------------------------------------
   10. ALIGNEMENT PRÉCIS DU DÉFILEMENT VERS LES TITRES DE SECTIONS
   -------------------------------------------------------------------------- */
section[id],
.section-title-wrapper,
.direction-content,
.section-tag,
.section-title {
    scroll-margin-top: 135px;
}

