/* =====================================================================
   PACK NOËL
   Chargé sur tout le site quand la page Pack Noël est publiée,
   et toujours sur la page Pack Noël elle-même.
   ===================================================================== */

:root {
    --noel-red: #C8161D;
    --noel-green: #1F6B35;
    --noel-yellow: #FFD239;
    --noel-ink: #1C1C28;
    --noel-muted: #55586A;
    --noel-line: #E4DDD0;
}

/* ---------------------------------------------------------------------
   Bandeau en haut de toutes les pages
   --------------------------------------------------------------------- */

.noel-banner,
.noel-banner:visited {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60; /* au-dessus du header (50) */
    display: block;
    background: var(--noel-red);
    color: #fff;
    text-decoration: none;
}

.noel-banner:hover {
    color: #fff;
    text-decoration: none;
    transform: none;
}

.noel-banner__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
}

.noel-banner__badge {
    background: #fff;
    color: var(--noel-green);
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 5px;
}

.noel-banner__link {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Variante claire : sur la page Pack Noël, dont l'en-tête est déjà rouge */
.noel-banner--light,
.noel-banner--light:visited,
.noel-banner--light:hover {
    background: #fff;
    color: var(--noel-ink);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.noel-banner--light .noel-banner__badge {
    background: var(--noel-green);
    color: #fff;
}

.noel-banner--light .noel-banner__link {
    color: var(--noel-red);
}

/* Le header (fixe) et la page descendent de la hauteur du bandeau.
   La hauteur exacte est mesurée en JS (le bandeau passe sur plusieurs lignes en mobile). */
body:has(> #noel-banner) {
    padding-top: var(--noel-banner-h, 42px);
}

body:has(> #noel-banner) header {
    top: var(--noel-banner-h, 42px);
}

/* ---------------------------------------------------------------------
   Bouton "Pack Noël" du menu
   --------------------------------------------------------------------- */

/* Mêmes dimensions que le bouton « S'abonner » (.btn-primary) : seule la couleur change */
.noel-nav-btn,
.noel-nav-btn:visited {
    display: inline-block;
    background: var(--noel-green);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    line-height: 24px;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
}

/* Les deux boutons d'action sont rapprochés (12 px au lieu de 32 px) */
header .cart-button .noel-nav-btn + .btn-primary {
    margin-left: -20px;
}

.noel-nav-btn:hover {
    color: #fff;
    background: #164F27;
    text-decoration: none;
}

/* Le header transparent ne doit pas recolorer le bouton */
.header--transparent .cart-button .noel-nav-btn {
    color: #fff;
}

.noel-nav-btn--mobile {
    font-size: 20px;
}

/* Avec le bouton Pack Noël, le menu complet ne tient sur une ligne qu'au-delà
   de 1280 px : entre 1101 et 1280 px, on bascule en menu burger. */
@media (min-width: 1101px) and (max-width: 1280px) {
    header.has-noel .col-6 {
        display: none;
    }

    header.has-noel .cart-button {
        margin-left: auto;
    }

    header.has-noel .menu-mobile {
        display: block;
        margin-left: 24px;
    }

    header.has-noel .fa-solid.fa-bars {
        font-size: 28px;
    }

    header.has-noel .overlay-menu.active {
        display: flex;
        opacity: 1;
    }

    header.has-noel .containter-menu {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 80%;
        height: 100%;
        background-color: #fff;
        position: relative;
        padding: 48px;
        box-sizing: border-box;
    }

    header.has-noel .overlay-menu ul {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 36px;
        font-size: 20px;
        font-weight: 600;
    }

    header.has-noel .overlay-menu .menu-menu-header-container {
        display: flex;
    }

    header.has-noel .close-overlay {
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 20px;
        cursor: pointer;
    }
}

/* ---------------------------------------------------------------------
   Pop-up
   --------------------------------------------------------------------- */

.noel-popup {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.noel-popup[hidden] {
    display: none;
}

.noel-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(28, 28, 40, 0.6);
}

.noel-popup__box {
    position: relative;
    background: #F7F3EC;
    border-radius: 18px;
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 40px);
    overflow: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.noel-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--noel-ink);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.noel-popup__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px 18px 0 0;
}

.noel-popup__body {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.noel-popup__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--noel-ink);
}

/* Bouton jaune (styles de base dans abonnement.css, repris ici pour les autres pages) */
.noel-popup .abo-btn,
.noel-popup .abo-btn:visited {
    display: inline-block;
    background: var(--noel-yellow);
    color: var(--noel-ink);
    font-weight: 700;
    font-size: 1.05rem;
    padding: 16px 28px;
    border-radius: 8px;
    box-shadow: 0 4px 0 #C9A21E;
    text-decoration: none;
}

.noel-popup .abo-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--noel-ink);
}

.noel-popup__no {
    border: 0;
    background: none;
    color: var(--noel-muted);
    font: inherit;
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 6px;
}

/* ---------------------------------------------------------------------
   Page Pack Noël
   --------------------------------------------------------------------- */

.abo-page .noel-hero {
    background-color: var(--noel-red);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
    background-size: 44px 44px;
    color: #fff;
    padding: 150px 0 96px; /* le header du site est en position fixe */
}

.noel-hero__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    gap: 56px;
    align-items: center;
}

.noel-hero__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
}

.noel-hero__badge {
    display: inline-block;
    background: #fff;
    color: var(--noel-green);
    font-weight: 800;
    font-size: clamp(2.4rem, 5.4vw, 4rem);
    line-height: 1;
    padding: 18px 28px;
    border-radius: 18px;
}

.abo-page .noel-hero__title {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    text-wrap: balance;
}

.noel-hero__img {
    display: block;
    width: 100%;
    max-width: 460px;
    height: auto;
    justify-self: center;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
    transform: rotate(2deg);
}

.abo-page .noel-price {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.noel-price__amount {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: var(--noel-red);
}

.noel-price__unit {
    font-size: 1.25rem;
    font-weight: 700;
}

.noel-price--hero .noel-price__amount {
    font-size: 4rem;
    color: var(--noel-yellow);
}

.noel-price--hero .noel-price__unit {
    font-size: 1.5rem;
    color: #fff;
}

/* Composition du pack */
.noel-pack-section {
    padding: 88px 0 60px;
    scroll-margin-top: 140px;
}

.noel-pack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    text-align: center;
}

.abo-tag.noel-tag--green {
    background: var(--noel-green);
}

.noel-pack__cards {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    text-align: left;
}

.noel-card {
    flex: 1 1 0;
    min-width: 0;
    background: #fff;
    border: 2px solid var(--noel-ink);
    border-radius: 14px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.noel-card--red { box-shadow: 6px 6px 0 var(--noel-red); }
.noel-card--green { box-shadow: 6px 6px 0 var(--noel-green); }

.noel-card__badge {
    align-self: flex-start;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 6px;
    transform: rotate(-2deg);
}

.noel-card--red .noel-card__badge { background: var(--noel-red); }
.noel-card--green .noel-card__badge { background: var(--noel-green); }

.noel-card__list {
    font-size: 1.1rem;
}

.noel-card__list li::before {
    color: var(--noel-red);
}

.abo-page .noel-card__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
}

.abo-page .noel-card__text {
    margin: 0;
    font-size: 1.1rem;
}

.abo-page .noel-card__note {
    margin: auto 0 0;
    font-size: 0.95rem;
    color: var(--noel-muted);
    border-top: 1px solid var(--noel-line);
    padding-top: 16px;
}

.noel-pack__plus {
    align-self: center;
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--noel-ink);
    color: var(--noel-red);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.noel-pack__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Sur la page Noël, la section contenu suit directement le pack */
.noel-page .abo-inside {
    padding-top: 60px;
}

@media (max-width: 860px) {
    .noel-pack__cards {
        flex-direction: column;
        align-items: stretch;
    }

    .abo-page .noel-hero {
        padding: 120px 0 80px;
    }

    .noel-hero__grid {
        gap: 40px;
    }

    .noel-hero__img {
        max-width: 360px;
    }
}

@media (max-width: 600px) {
    .noel-hero__text .abo-btn,
    .noel-pack__cta .abo-btn {
        width: 100%;
    }

    .noel-card {
        padding: 24px 20px;
    }

    .noel-banner__inner {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .noel-hero__img {
        transform: none;
    }
}
