@charset "UTF-8";
/*
 * Thème de Noël d'astrobreizh.fr (édition d'hiver 2026).
 *
 * Toutes les règles sont rangées sous html.theme-noel : sans cette classe,
 * la feuille n'a aucun effet. La classe est posée (ou non) par js/saison.js,
 * qui est le seul interrupteur du thème. Les décors animés (neige, lisière
 * du pied de page, compte à rebours, surprises) viennent de js/noel.js.
 *
 * L'étoile de l'emblème devient l'étoile de Noël : elle passe en or dans le
 * logo et devant le surtitre de l'accueil. Pour le reste, la feuille change
 * des jetons de site.css et ajoute les décors (guirlande, lisière, neige).
 */

/* ── Jetons ────────────────────────────────────────────────────────────── */

html.theme-noel {
    --noel-sapin: #1e4637;
    --noel-sapin-survol: #29594a;
    --noel-or: #c99a3e;
    --noel-or-vif: #e3b04f;
    --noel-or-texte: #8a6217;
    --noel-houx: #d23f34;
    --noel-pied-fond: #12291f;
    --noel-pied-texte: #b9cbc1;
    --noel-pied-fort: #f3f0e8;
    --noel-pied-filet: rgba(243, 240, 232, .13);
    --noel-neige: #ffffff;
    --noel-etoile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='26 37 12 12'%3E%3Cpath fill='%23c99a3e' d='m32 37 1.5 4.5L38 43l-4.5 1.5L32 49l-1.5-4.5L26 43l4.5-1.5z'/%3E%3C/svg%3E");

    /* Le noir encre des boutons principaux devient vert sapin ; le rouge de
       la marque reste l'accent. */
    --primaire: var(--noel-sapin);
    --primaire-survol: var(--noel-sapin-survol);
    --primaire-texte: #ffffff;
    --anneau: rgba(30, 70, 55, .22);
}

@media (prefers-color-scheme: dark) {
    html.theme-noel {
        --noel-sapin: #d6e7dc;
        --noel-sapin-survol: #eef6f0;
        --noel-or-texte: #e2bd72;
        --noel-pied-fond: #11261c;
        --noel-pied-texte: #aebfb5;
        --primaire-texte: #10241a;
        --anneau: rgba(214, 231, 220, .25);
    }
}

/* ── En-tête : étoile dorée, guirlande sous la barre ───────────────────── */

/* Fixe : la barre de navigation reste toujours sous les yeux, une étoile
   qui clignote y deviendrait vite pénible. */
html.theme-noel .logo .logo-embleme .etoile { color: var(--noel-or-vif); }
/* La petite planète de l'emblème prend la couleur d'une boule de houx. */
html.theme-noel .logo .logo-embleme circle { color: var(--noel-houx); }

/* Une guirlande fine, tendue sous la barre de navigation en haut de page.
   Elle est accrochée au document et non à la barre collante : elle part
   avec le défilement et ne passe jamais sur le texte. La lueur est un
   calque à part dont seule l'opacité varie (animation composée par le
   navigateur, sans repeindre la page). */
html.theme-noel body::before,
html.theme-noel body::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(var(--entete-hauteur) + 1px);
    height: 20px;
    background-repeat: repeat-x;
    background-size: 240px 20px;
    pointer-events: none;
}
html.theme-noel body::before {
    background-image: url('../images/noel/guirlande-lueur.svg');
    opacity: .35;
    animation: noel-lueur 3.2s ease-in-out infinite alternate;
}
html.theme-noel body::after { background-image: url('../images/noel/guirlande.svg'); }
/* Pages sans barre de navigation (redirection d'adhésion). */
html.theme-noel body:not(:has(> .navbar))::before,
html.theme-noel body:not(:has(> .navbar))::after { display: none; }

@keyframes noel-lueur { to { opacity: .9; } }

/* ── Accueil ───────────────────────────────────────────────────────────── */

/* Le filet rouge au-dessus du titre devient le surtitre de l'édition.
   Le texte est décoratif (« / "" ») : il n'est pas lu avec le titre. */
html.theme-noel .hero h1::before {
    content: "Édition de Noël 2026";
    content: "Édition de Noël 2026" / "";
    width: auto;
    height: auto;
    padding-left: 1.4rem;
    background: var(--noel-etoile) left 45% / .85rem no-repeat;
    font-family: var(--police-titre);
    font-size: 1.05rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0;
    color: var(--accent);
}
html.theme-noel:lang(en) .hero h1::before { content: "Christmas edition 2026"; content: "Christmas edition 2026" / ""; }
html.theme-noel:lang(pl) .hero h1::before { content: "Wydanie świąteczne 2026"; content: "Wydanie świąteczne 2026" / ""; }

/* Un peu de neige sur le haut de l'emblème, et une lueur plus chaude. */
html.theme-noel .hero-content::after {
    background-image: url('../images/noel/neige-toit.svg'), url('../images/logo-astrobreizh.png');
    background-position: top center, center;
    background-size: 100% auto, cover;
    background-repeat: no-repeat;
    box-shadow: 0 0 0 1px rgba(240, 86, 78, .18), 0 24px 60px rgba(27, 28, 31, .24), 0 0 90px rgba(227, 176, 79, .16);
}

/* Le flou derrière la barre de navigation devrait être recalculé à chaque
   image, puisque la neige bouge dessous. La barre est presque opaque : on
   le retire pendant le thème et on rend la barre un peu plus pleine. */
html.theme-noel .navbar {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: color-mix(in srgb, var(--fond-carte) 97%, transparent);
}

/* ── Cartes et boutons ─────────────────────────────────────────────────── */

html.theme-noel :is(.team-member, .rocket-card, .flight-card, .news-card, .portfolio-card, .rl-card, .dx-link-card, .news-voisine):hover {
    border-color: color-mix(in srgb, var(--noel-or) 55%, var(--bordure));
}
html.theme-noel :is(.btn-secondary, .btn-ghost, .nav-menu a.nav-join):hover {
    border-color: color-mix(in srgb, var(--noel-or) 70%, var(--bordure-forte));
}

/* ── Pied de page : la lisière enneigée ────────────────────────────────── */

html.theme-noel .footer {
    position: relative;
    background: var(--noel-pied-fond);
    border-top-color: transparent;
    color: var(--noel-pied-texte);
}
html.theme-noel main + .footer { margin-top: calc(3rem + 76px); }
html.theme-noel .footer .container::before { color: var(--noel-pied-fort); }
html.theme-noel .footer p:first-child { border-top-color: var(--noel-pied-filet); }
html.theme-noel .footer a,
html.theme-noel .footer .footer-link { color: var(--noel-pied-fort); }
html.theme-noel .footer a:hover,
html.theme-noel .footer .footer-link:hover { color: #fff; }
html.theme-noel .footer :focus-visible { outline-color: var(--noel-or-vif) !important; }

/* La lisière : deux masques de même dessin (sapins, neige) colorés ici, ce
   qui sert aux deux thèmes clair et sombre. */
.noel-horizon {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 76px;
    pointer-events: none;
}
.noel-horizon::before,
.noel-horizon::after {
    content: "";
    position: absolute;
    inset: 0;
    -webkit-mask: var(--noel-masque) left bottom / auto 100% repeat-x;
    mask: var(--noel-masque) left bottom / auto 100% repeat-x;
}
.noel-horizon::before { --noel-masque: url('../images/noel/foret.svg'); background: var(--noel-pied-fond); }
.noel-horizon::after { --noel-masque: url('../images/noel/foret-neige.svg'); z-index: 2; background: var(--noel-neige); opacity: .92; }

/* Le phare, à droite, et la fusée cachée dans la clairière, à gauche. */
.noel-phare {
    position: absolute;
    z-index: 1;
    right: max(4%, 1rem);
    bottom: 0;
    width: 30px;
    height: 74px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--noel-pied-fond);
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}
.noel-phare svg { position: relative; display: block; width: 100%; height: 100%; overflow: visible; }
.noel-phare .noel-phare__feu { fill: var(--noel-or-vif); }
.noel-phare .noel-phare__blanc { fill: var(--noel-neige); }
.noel-phare:focus-visible { outline: 2px solid var(--noel-or-vif) !important; outline-offset: 3px !important; }
/* Le feu : un halo dont seule l'opacité change. Deux éclats, puis une
   longue nuit. */
.noel-phare__lueur {
    position: absolute;
    left: 50%;
    top: 21%;
    width: 110%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 214, 120, .95), rgba(227, 176, 79, .35) 45%, rgba(227, 176, 79, 0));
    opacity: 0;
    translate: -50% -50%;
    animation: noel-eclats 7s linear infinite;
}
@keyframes noel-eclats {
    0%, 4%, 9%, 13%, 100% { opacity: 0; }
    2%, 11% { opacity: .8; }
}
/* Surprise : un clic sur le phare lui fait clignoter NOËL en morse,
   N -.  O ---  E .  L .-..  (point = 1 temps de 230 ms, trait = 3, blanc
   entre signes = 1, entre lettres = 3 ; 2 temps de nuit avant et après,
   39 temps en tout). */
.noel-phare.est-en-morse .noel-phare__lueur { animation: noel-morse 8.97s step-end 1; }
@keyframes noel-morse {
    0% { opacity: 0; }
    5.128% { opacity: 1; } 12.821% { opacity: 0; }
    15.385% { opacity: 1; } 17.949% { opacity: 0; }
    25.641% { opacity: 1; } 33.333% { opacity: 0; }
    35.897% { opacity: 1; } 43.590% { opacity: 0; }
    46.154% { opacity: 1; } 53.846% { opacity: 0; }
    61.538% { opacity: 1; } 64.103% { opacity: 0; }
    71.795% { opacity: 1; } 74.359% { opacity: 0; }
    76.923% { opacity: 1; } 84.615% { opacity: 0; }
    87.179% { opacity: 1; } 89.744% { opacity: 0; }
    92.308% { opacity: 1; } 94.872% { opacity: 0; }
    100% { opacity: 0; }
}

.noel-fusee {
    position: absolute;
    z-index: 1;
    left: max(11%, 4.5rem);
    bottom: 1px;
    width: 26px;
    height: 54px;
    padding: 0 4px;
    border: 0;
    background: none;
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}
.noel-fusee svg { display: block; width: 100%; height: 100%; overflow: visible; }
.noel-fusee .noel-fusee__corps { fill: #f4f1ea; stroke: var(--noel-pied-fond); stroke-width: .8; }
.noel-fusee .noel-fusee__ogive { fill: var(--noel-houx); }
.noel-fusee .noel-fusee__ailerons { fill: var(--noel-pied-fond); }
.noel-fusee .noel-fusee__ruban { fill: var(--noel-or-vif); }
.noel-fusee .noel-fusee__flamme { fill: var(--noel-or-vif); opacity: 0; transform-box: fill-box; transform-origin: top center; }
.noel-fusee:hover svg, .noel-fusee:focus-visible svg { transform: translateY(-2px); transition: transform .2s ease; }
.noel-fusee:focus-visible { outline: 2px solid var(--noel-or-vif) !important; outline-offset: 3px !important; }

.noel-fusee.est-partie { pointer-events: none; }
.noel-fusee.est-partie svg { animation: noel-decollage 2.4s cubic-bezier(.55, 0, .85, .35) forwards; }
.noel-fusee.est-partie .noel-fusee__flamme { animation: noel-flamme .12s ease-in-out infinite alternate; opacity: 1; }
.noel-fusee.est-revenue svg { animation: noel-retour .8s ease-out; }
@keyframes noel-decollage {
    0% { transform: translateY(0); }
    12% { transform: translateY(1px) translateX(-.5px); }
    18% { transform: translateY(0) translateX(.5px); }
    100% { transform: translateY(-110vh); }
}
@keyframes noel-flamme { from { transform: scaleY(.8); } to { transform: scaleY(1.25); } }
@keyframes noel-retour { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Ligne du compte à rebours et bouton de la neige. */
.noel-pied {
    order: 9;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem 1.1rem;
    margin-top: .9rem !important;
}
.noel-compte {
    font-family: var(--police-mono);
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
    color: var(--noel-or-vif);
}
.noel-bascule {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 30px;
    padding: .2rem .65rem;
    border: 1px solid var(--noel-pied-filet);
    border-radius: 999px;
    background: transparent;
    color: var(--noel-pied-texte);
    font: inherit;
    font-size: .78rem;
    cursor: pointer;
    transition: border-color var(--duree), color var(--duree);
}
.noel-bascule:hover { border-color: rgba(243, 240, 232, .4); color: var(--noel-pied-fort); }
.noel-bascule svg { width: 13px; height: 13px; flex: none; }
.noel-bascule.est-coupee svg { opacity: .5; }

/* ── Neige (calques posés par js/noel.js) ──────────────────────────────── */

/* Derrière tout le contenu (z-index négatif dans le contexte de la racine) :
   elle ne passe jamais sur un texte de carte ni sur un bouton.
   Chaque calque est une tuile peinte une fois que le navigateur fait
   descendre d'une hauteur de tuile, en boucle : une animation de transform
   seule, exécutée par la carte graphique, sans travail du processeur. */
.noel-neige {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
}
.noel-neige__calque {
    position: absolute;
    inset: 0 -40px;
    animation: noel-roulis var(--roulis, 8s) ease-in-out infinite alternate;
    transition: opacity .8s;
}
.noel-neige__tuile {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(-1 * var(--h));
    bottom: 0;
    background-size: var(--l) var(--h);
    will-change: transform;
    animation: noel-chute var(--duree, 30s) linear infinite;
}
@keyframes noel-chute { to { transform: translate3d(0, var(--h), 0); } }
@keyframes noel-roulis { from { transform: translate3d(-14px, 0, 0); } to { transform: translate3d(14px, 0, 0); } }

.noel-neige__calque--loin { --roulis: 9s; }
.noel-neige__calque--loin .noel-neige__tuile { --duree: 46s; }
.noel-neige__calque--pres { --roulis: 6.5s; }
.noel-neige__calque--pres .noel-neige__tuile { --duree: 24s; }

/* Les calques des surprises n'existent à l'écran que pendant l'effet. */
.noel-neige__calque--tempete,
.noel-neige__calque--hermines { display: none; opacity: 0; }
.noel-neige__calque--tempete { inset: -30%; rotate: -24deg; animation: none; }
.noel-neige__calque--tempete .noel-neige__tuile { --duree: 2.6s; }
.noel-neige__calque--hermines { --roulis: 5s; }
.noel-neige__calque--hermines .noel-neige__tuile { --duree: 20s; }
.noel-neige.est-en-tempete .noel-neige__calque--tempete { display: block; animation: noel-apparition .6s forwards; }
.noel-neige.est-en-hermines .noel-neige__calque--hermines {
    display: block;
    animation: noel-roulis 5s ease-in-out infinite alternate, noel-apparition .8s forwards;
}
.noel-neige.est-en-hermines .noel-neige__calque--loin,
.noel-neige.est-en-hermines .noel-neige__calque--pres { opacity: 0; }
@keyframes noel-apparition { to { opacity: 1; } }

/* Machine modeste (mesurée par js/noel.js) : un seul calque. */
.noel-neige.est-legere .noel-neige__calque--loin { display: none; }

/* ── Le traîneau (surprise « traineau » et soir du 24 décembre) ────────── */

.noel-traineau {
    position: fixed;
    z-index: 1040;
    left: 0;
    top: calc(var(--entete-hauteur) + 9vh);
    width: 150px;
    pointer-events: none;
    animation: noel-traversee 9s linear forwards;
}
.noel-traineau__roulis { animation: noel-tangage 1.4s ease-in-out infinite alternate; }
.noel-traineau svg { display: block; width: 100%; height: auto; overflow: visible; }
@keyframes noel-traversee {
    from { transform: translate3d(100vw, 0, 0); }
    to { transform: translate3d(-170px, 4vh, 0); }
}
@keyframes noel-tangage { from { transform: translate3d(0, -4px, 0) rotate(-1.5deg); } to { transform: translate3d(0, 4px, 0) rotate(1deg); } }
.noel-traineau__corps { fill: #f4f1ea; stroke: #2b2d32; stroke-width: .8; }
.noel-traineau__ogive { fill: var(--noel-houx); }
.noel-traineau__ailerons { fill: var(--noel-houx); }
.noel-traineau__caisse { fill: #8f201c; }
.noel-traineau__ruban { fill: var(--noel-or-vif); }
.noel-traineau__cadeau { fill: #2f6b52; }
.noel-traineau__flamme { fill: var(--noel-or-vif); }
.noel-traineau__trainee { fill: var(--noel-or-vif); opacity: .45; }
.noel-traineau__corde, .noel-traineau__patin { fill: none; stroke: var(--noel-or-texte); stroke-width: 1.4; stroke-linecap: round; }

/* ── Petits messages des surprises ─────────────────────────────────────── */

.noel-message {
    position: fixed;
    z-index: 1060;
    right: 1rem;
    bottom: 1rem;
    max-width: min(24rem, calc(100vw - 2rem));
    padding: .75rem 1rem .8rem 2.4rem;
    border: 1px solid rgba(227, 176, 79, .35);
    border-radius: var(--rayon);
    background: var(--noel-etoile) .95rem 1.05rem / .8rem no-repeat, var(--noel-pied-fond);
    color: var(--noel-pied-fort);
    font-size: .88rem;
    line-height: 1.45;
    box-shadow: var(--ombre-forte);
    opacity: 0;
    translate: 0 8px;
    transition: opacity .25s ease, translate .25s ease;
    pointer-events: none;
}
.noel-message.est-visible { opacity: 1; translate: 0 0; }
.noel-message strong {
    display: block;
    margin-bottom: .1rem;
    font-weight: 650;
    color: var(--noel-or-vif);
}

.noel-404 { margin-top: .6rem; font-style: italic; color: var(--texte-doux); }

/* ── Petits écrans ─────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .noel-horizon { height: 54px; }
    html.theme-noel main + .footer { margin-top: calc(2rem + 54px); }
    .noel-phare { width: 22px; height: 54px; }
    .noel-fusee { width: 22px; height: 42px; }
    .noel-message { right: .5rem; left: .5rem; bottom: auto; top: calc(var(--entete-hauteur) + 1.2rem); max-width: none; }
}

/* ── Mouvement réduit, impression ──────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    html.theme-noel body::before,
    .noel-phare__lueur { animation: none; }
    html.theme-noel body::before { opacity: .55; }
    .noel-phare__lueur { opacity: .5; }
    .noel-neige, .noel-traineau { display: none; }
}

@media print {
    .noel-neige, .noel-horizon, .noel-pied, .noel-message, .noel-traineau { display: none !important; }
    html.theme-noel body::before, html.theme-noel body::after { display: none; }
}
