/* assets/noel/noel.css — Thème de Noël Tradu-France — v2026-10
 * Activé automatiquement du 1er décembre au 6 janvier (include/layout/noel.php).
 * Purement décoratif : aucun élément ne capte les clics, rien ne gêne la lecture.
 */
:root { --noel-red: #e3263b; --noel-green: #1f8a4c; --noel-gold: #ffd25a; --noel-snow: #f4fbff; }

/* ── Neige (canvas plein écran) ─────────────────────────── */
#noel-snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 900; }

/* ── Bannière : sapins + traîneau ───────────────────────── */
#header { position: relative; overflow: hidden; }
.noel-trees {
    position: absolute; left: 0; right: 0; bottom: 0; height: 50%;
    display: flex; align-items: flex-end; justify-content: space-between;
    padding: 0 1%; pointer-events: none; z-index: 2;
}
.noel-trees svg { display: block; height: 100%; width: auto; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.noel-trees .t-s { height: 55%; }
.noel-trees .t-m { height: 75%; }
.noel-trees .t-l { height: 100%; }
.noel-trees .t-hide-sm { display: block; }
.noel-ground {
    position: absolute; left: 0; right: 0; bottom: -2px; height: 8%; z-index: 1; pointer-events: none;
    background: radial-gradient(ellipse at 50% 100%, var(--noel-snow) 60%, transparent 61%) repeat-x;
    background-size: 70px 100%;
    opacity: .95;
}
.noel-bulb { animation: noel-twinkle 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.noel-bulb.d1 { animation-delay: .3s } .noel-bulb.d2 { animation-delay: .7s } .noel-bulb.d3 { animation-delay: 1.1s }
.noel-star { animation: noel-star 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes noel-twinkle { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
@keyframes noel-star { 0%,100% { transform: scale(1); opacity: 1 } 50% { transform: scale(1.18); opacity: .8 } }

.noel-santa {
    position: absolute; top: 8%; left: 0; width: 22%; min-width: 150px; max-width: 260px;
    pointer-events: none; z-index: 3; transform: translateX(-120%);
    animation: noel-fly 26s linear infinite; animation-delay: 3s;
}
.noel-santa svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.noel-santa .bob { animation: noel-bob 1.2s ease-in-out infinite; }
@keyframes noel-fly {
    0%   { transform: translate(-120%, 30%) rotate(-4deg); }
    45%  { transform: translate(260%, -10%) rotate(3deg); }
    55%  { transform: translate(330%, 0%) rotate(-2deg); }
    100% { transform: translate(560%, -20%) rotate(2deg); }
}
@keyframes noel-bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-4px) } }

/* ── Guirlande lumineuse sous la bannière ───────────────── */
/* Accrochée sous le menu : support de hauteur nulle, la guirlande « pend » par-dessus
   la marge, sans décaler la bannière, le menu ni le contenu. */
.noel-garland-hook { position: relative; height: 0; z-index: 6; pointer-events: none; }
.noel-garland { position: absolute; left: 0; right: 0; top: -3px; height: 20px; margin: 0; pointer-events: none; overflow: hidden; }
#header .noel-garland { top: auto; bottom: 0; }   /* secours si le menu est absent */
.noel-garland svg { display: block; width: 100%; height: 100%; }

/* ── Neige déposée sur le cadre principal ───────────────── */
#container { position: relative; }
.noel-snowcap {
    position: absolute; top: -9px; left: 10px; right: 10px; height: 18px; pointer-events: none; z-index: 5;
    background:
        radial-gradient(circle at 10px 14px, var(--noel-snow) 9px, transparent 10px) 0 0 / 34px 18px repeat-x,
        linear-gradient(var(--noel-snow), var(--noel-snow)) 0 9px / 100% 9px no-repeat;
    border-radius: 9px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); opacity: .96;
}

/* ── Bouton neige on/off ────────────────────────────────── */
.noel-toggle {
    position: fixed; right: 14px; bottom: 14px; z-index: 950;
    width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
    background: rgba(4, 18, 31, .85); color: #fff; font-size: 22px; line-height: 1;
    border: 1px solid rgba(255, 255, 255, .5); box-shadow: 0 0 12px rgba(0, 242, 255, .35);
}
.noel-toggle:hover, .noel-toggle:focus-visible { background: var(--noel-red); outline: 2px solid #fff; outline-offset: 2px; }
.noel-toggle[aria-pressed="false"] { opacity: .65; }

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 700px) {
    .noel-trees { height: 58%; }
    .noel-trees .t-hide-sm { display: none; }
    .noel-santa { width: 34%; animation-duration: 18s; }
    .noel-garland { height: 14px; }
}

/* ── Mouvements réduits : décor fixe, pas d'animation ───── */
@media (prefers-reduced-motion: reduce) {
    .noel-santa { animation: none; transform: none; left: auto; right: 4%; top: 6%; width: 16%; }
    .noel-santa .bob, .noel-bulb, .noel-star { animation: none; }
}
@media print { #noel-snow, .noel-trees, .noel-santa, .noel-garland, .noel-snowcap, .noel-toggle, .noel-ground { display: none !important; } }

#hamburger-btn { z-index: 6; }


/* ════════════════════════════════════════════════════════════
   DÉCORATIONS DES MENUS ET DES NEWS — v2026-10
   (chargé seulement pendant la période de Noël, comme le reste du thème)
   ════════════════════════════════════════════════════════════ */
:root { --noel-holly: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48'%3E%3Cpath d='M30 30 C22 18 10 20 4 10 C10 12 12 8 14 4 C18 12 26 10 28 18 C30 14 34 16 34 20 Z' fill='%231f8a4c' stroke='%230f5a30' stroke-width='1.2'/%3E%3Cpath d='M34 30 C42 18 54 20 60 10 C54 12 52 8 50 4 C46 12 38 10 36 18 C34 14 30 16 30 20 Z' fill='%2326a35a' stroke='%230f5a30' stroke-width='1.2'/%3E%3Cpath d='M16 12 L29 26 M48 12 L35 26' stroke='%230f5a30' stroke-width='1' fill='none'/%3E%3Ccircle cx='27' cy='31' r='5.5' fill='%23e3263b'/%3E%3Ccircle cx='37' cy='31' r='5.5' fill='%23c81d31'/%3E%3Ccircle cx='32' cy='38' r='5.5' fill='%23e3263b'/%3E%3Ccircle cx='25.5' cy='29.5' r='1.6' fill='%23ffd0d6'/%3E%3Ccircle cx='35.5' cy='29.5' r='1.6' fill='%23ffd0d6'/%3E%3Ccircle cx='30.5' cy='36.5' r='1.6' fill='%23ffd0d6'/%3E%3C/svg%3E"); }

/* ── Menu latéral : neige sur les titres + houx ─────────────── */
#menu > ul > li.rubrique { position: relative; }
#menu > ul > li.rubrique::before {          /* neige posée sur la barre du titre */
    content: ''; position: absolute; left: 4px; width: 172px; top: 5px; height: 9px; z-index: 2; pointer-events: none;
    background:
        radial-gradient(circle at 7px 7px, var(--noel-snow) 6px, transparent 7px) 0 0 / 22px 9px repeat-x;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
}
#menu > ul > li.rubrique::after {           /* brin de houx au bout de la barre */
    content: ''; position: absolute; top: 2px; left: 146px; width: 40px; height: 30px; z-index: 3; pointer-events: none;
    background: var(--noel-holly) no-repeat center / contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}
#mobile-menu .rubrique-header {
    background: var(--noel-holly) no-repeat right 16px center / 34px 26px;
}

/* Puces : flocons pour les constructeurs, boules rouges / vertes pour les liens */
.machine-list summary::before { content: '❄'; color: #dff6ff; font-size: .85em; }
#menu li li::marker, #mobile-menu li li::marker { color: var(--noel-red); }
#menu li li:nth-child(even)::marker, #mobile-menu li li:nth-child(even)::marker { color: #2fd27a; }
.machine-list summary:hover { background: rgba(227, 38, 59, .14); }

/* ── Filtres de catégories : « Toutes » / filtre actif en rouge Noël ── */
.cat-chip.is-active {
    background: linear-gradient(135deg, #e3263b, #a3121f) !important;
    color: #fff !important; border-color: var(--noel-gold) !important;
    box-shadow: 0 0 10px rgba(227, 38, 59, .5);
}
.cat-chip:hover { border-color: var(--noel-gold); }

/* ── Cartes de news : neige sur le cadre, houx, ruban sucre d'orge ── */
.news-card { position: relative; }
.news-card::before {                         /* neige accumulée sur le haut de la carte */
    content: ''; position: absolute; top: -10px; left: 18px; right: 18px; height: 14px; z-index: 4; pointer-events: none;
    background:
        radial-gradient(circle at 9px 11px, var(--noel-snow) 8px, transparent 9px) 0 0 / 30px 14px repeat-x,
        linear-gradient(var(--noel-snow), var(--noel-snow)) 0 9px / 100% 5px no-repeat;
    border-radius: 7px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35));
}
.news-card::after {                          /* houx accroché au coin */
    content: ''; position: absolute; top: -16px; right: -12px; width: 60px; height: 46px; z-index: 5; pointer-events: none;
    background: var(--noel-holly) no-repeat center / contain;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.55));
    transform: rotate(12deg);
}
.news-card:nth-child(even)::after { right: auto; left: -12px; transform: rotate(-12deg) scaleX(-1); }
.news-card:hover { box-shadow: 0 0 26px rgba(0, 242, 255, .75), 0 0 14px rgba(227, 38, 59, .45); }

/* Ruban sucre d'orge sous le titre */
.news-card .title-category { position: relative; }
.news-card .title-category::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; pointer-events: none;
    background: repeating-linear-gradient(-45deg, #e3263b 0 8px, #ffffff 8px 16px);
    opacity: .9;
}

/* Bouton « Lire la suite » façon cadeau */
.read-more { position: relative; }
.read-more:hover, .read-more:focus {
    background: linear-gradient(135deg, #e3263b, #a3121f) !important; color: #fff !important; border-color: var(--noel-gold) !important;
    box-shadow: 0 0 12px rgba(227, 38, 59, .55);
}
.read-more::before { content: '🎁 '; }

/* ── Page article : houx sur l'en-tête, ruban sur les blocs ──── */
.rn-article { position: relative; }
.rn-article::before {
    content: ''; position: absolute; top: -14px; right: -8px; width: 64px; height: 48px; z-index: 5; pointer-events: none;
    background: var(--noel-holly) no-repeat center / contain;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.55)); transform: rotate(10deg);
}
.rn-section-title { border-bottom-color: rgba(227, 38, 59, .45) !important; }
.rn-section-title::after { background: linear-gradient(90deg, rgba(227,38,59,.5), rgba(255,210,90,.35), transparent) !important; }

/* Mobile : décor plus discret */
@media (max-width: 700px) {
    .news-card::after { width: 44px; height: 34px; top: -12px; right: -6px; }
    .news-card:nth-child(even)::after { left: -6px; }
    .rn-article::before { width: 46px; height: 34px; right: -4px; }
}
@media print { #menu > ul > li.rubrique::before, #menu > ul > li.rubrique::after, .news-card::before, .news-card::after, .rn-article::before { display: none !important; } }
