/* =====================================================
   Page dédiée d'une caisse — /{slug}
   ===================================================== */

/* ---------- Hero ---------- */
.caisse-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: clamp(520px, 82vh, 820px);
    margin: 0;
    overflow: hidden;
}

.caisse-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    flex-wrap: nowrap;
    transition: transform 600ms ease;
}
.caisse-hero__image,
.caisse-hero__default {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (prefers-reduced-motion: reduce) {
    .caisse-hero__media { transition: none; }
}

.caisse-hero__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.caisse-hero__nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    background: rgba(0, 0, 0, 0.5);
    color: var(--paper);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: background 140ms ease;
}
.caisse-hero__nav:hover { background: var(--red); }
.caisse-hero__nav--prev { left: 12px; }
.caisse-hero__nav--next { right: 12px; }

.caisse-hero__overlay {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin: auto;
    padding: clamp(40px, 6vw, 72px) clamp(20px, 4vw, 56px);
    width: 100%;
    text-align: center;
    color: var(--paper);
}

.caisse-hero__eyebrow {
    margin: 0;
    font-family: var(--mono);
    font-size: clamp(18px, 4vw, 38px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.caisse-hero__title {
    width: 100%;
    margin: 0;
    font-family: var(--display);
    font-size: clamp(40px, 8vw, 104px);
    line-height: 1.3;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.caisse-hero__amount {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: clamp(16px, 3vw, 32px) 0 0;
    padding: 36px 36px 30px;
    background: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
    border-radius: 6px;
    color: var(--ink);
}
.caisse-hero__amount-value {
    font-family: var(--display);
    font-size: clamp(40px, 7vw, 72px);
    line-height: 0.95;
}
.caisse-hero__amount-label {
    font-family: var(--mono);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}

/* Forme "étiquette collée" partagée par le CTA (.btn.btn-cta) et le bandeau de
   fin de collecte ; le CTA délègue couleur/bordure/transition au socle. */
.caisse-hero__cta,
.caisse-hero__ended {
    position: relative;
    z-index: 2;
    margin: -30px 0 0;
    display: inline-block;
    font-family: var(--display);
    font-size: clamp(22px, 3.5vw, 32px);
    letter-spacing: 0.03em;
    padding: 14px 40px;
    border-radius: 4px;
    transform: rotate(3deg);
    box-shadow: 3px 5px 12px rgba(0, 0, 0, 0.3);
}
.caisse-hero__ended {
    background: var(--red);
    color: var(--paper);
    border: 2px solid var(--red);
}
.caisse-hero__cta:hover,
.caisse-hero__cta:focus-visible {
    box-shadow: 3px 5px 12px rgba(0, 0, 0, 0.3);
    transform: rotate(3deg) translate(-2px, -2px);
}

/* ---------- Réseaux de la caisse et mention légale (sous l'image) ---------- */
.caisse-page__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
    margin: clamp(16px, 3vw, 28px) 0 0;
    padding: 0;
    list-style: none;
}
.caisse-page__links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--ink);
    text-decoration: none;
    transition: color 140ms ease, transform 140ms ease;
}
.caisse-page__links a:hover,
.caisse-page__links a:focus-visible {
    color: var(--red);
    transform: translateY(-2px);
}
.caisse-page__links .fa-brand,
.caisse-page__links .fa-solid {
    font-size: 22px;
}

.caisse-page__legal {
    margin: 8px 0 0;
    text-align: center;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-soft);
}
.caisse-page__legal a {
    color: var(--ink);
}

/* ---------- Badges (sous le hero, sur fond clair) ---------- */
.caisse-page__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 780px;
    margin: clamp(24px, 4vw, 40px) auto 0;
}
.caisse__affiliation {
    display: inline-block;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border: 1.5px solid var(--ink);
    color: var(--ink);
}
.caisse__affiliation--affiliated { border-color: var(--red); }
.caisse__affiliation--partner { background: var(--paper); color: var(--ink); }
.caisse__perimeter {
    max-width: 100%;
    background: var(--yellow);
    color: var(--ink);
    border-color: var(--yellow);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Description (réutilise .news-show__content) ---------- */
.caisse-page__description {
    max-width: 780px;
    margin: 0 auto;
    padding-block: clamp(40px, 7vw, 88px) clamp(48px, 8vw, 65px);
}
.caisse-page__about-title {
    margin: 0 0 clamp(16px, 3vw, 28px);
    text-align: center;
}
