/**
 * Single Event Page — Le Margo
 * Design editorial inspiré du template email Bec Fin.
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

/* ─── Variables locales ──────────────────────────────────────── */
.event-single {
    --ev-ink:        #1a1a1a;
    --ev-soft:       #f9f6f1;
    --ev-border:     #e8e3d9;
    --ev-muted:      #8b8680;
    --ev-accent:     #c4a27a;
    --ev-radius:     8px;
    --ev-max:        760px;
}

/* ─── Suppression du padding top du main habituel ─────────────── */
.event-single {
    padding-top: 0;
}

/* ═══════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════ */
.event-hero {
    position: relative;
    height: 80vh;
    min-height: 460px;
    max-height: 780px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--color-beige);
}

.event-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    transition: transform 8s ease;
}
.event-hero:hover .event-hero__bg {
    transform: scale(1.0);
}

.event-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 30%,
        rgba(0, 0, 0, 0.65) 100%
    );
}

.event-hero__fallback {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #f4f1eb 0%, #e8e0d0 100%);
}

.event-hero__content {
    position: relative;
    z-index: 2;
    padding-bottom: 64px;
    padding-top: 100px;
}

.event-hero__date {
    display: inline-block;
    font-family: var(--font-primary);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 12px 0;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 14px;
    border-radius: 999px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.event-hero__label {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 10px 0;
    letter-spacing: 0.5px;
}

.event-hero__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 500;
    color: #fff;
    line-height: 1.1;
    margin: 0 0 18px 0;
    max-width: 680px;
    letter-spacing: -0.01em;
}

/* Hero sans image */
.event-hero.no-image .event-hero__date {
    background: var(--ev-soft);
    border-color: var(--ev-border);
    color: var(--ev-muted);
    text-shadow: none;
}
.event-hero.no-image .event-hero__label,
.event-hero.no-image .event-hero__title {
    color: var(--ev-ink);
}
.event-hero.no-image .event-hero__label {
    color: var(--ev-muted);
}
.event-hero.no-image {
    min-height: 320px;
    background: var(--color-cream);
}

/* Status pills */
.event-status-pill {
    display: inline-block;
    padding: 5px 16px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 999px;
}
.pill-full {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
}
.pill-past {
    background: rgba(0, 0, 0, 0.15);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.event-hero.no-image .pill-full  { background: #fef0e6; color: #a05a2c; border-color: #f5c89a; }
.event-hero.no-image .pill-past  { background: var(--ev-soft); color: var(--ev-muted); border-color: var(--ev-border); }

/* Badge date coin haut droit */
.event-date-badge-hero {
    position: absolute;
    top: 100px;
    right: max(24px, calc((100vw - 1140px) / 2));
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--ev-radius);
    padding: 16px 22px;
    z-index: 3;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}
.badge-day {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.6rem;
    font-weight: 400;
    color: #fff;
    line-height: 1;
    text-shadow: 0 1px 6px rgba(0,0,0,0.25);
}
.badge-month {
    font-family: var(--font-primary);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   CORPS PRINCIPAL
══════════════════════════════════════════════════════════════ */
.event-body {
    max-width: calc(var(--ev-max) + 80px);
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* Chaque section a la même structure de base */
.event-section {
    max-width: var(--ev-max);
    margin: 0 auto 56px;
}
.event-section:last-child {
    margin-bottom: 0;
}

.event-section__label {
    font-family: var(--font-primary);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--ev-muted);
    margin: 0 0 28px 0;
    text-align: center;
}

/* ─── Séparateur entre sections ─────────────────────────────── */
.event-section + .event-section::before {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--ev-border);
    margin: 0 auto 56px;
}

/* ─── Infos pratiques ───────────────────────────────────────── */
.event-infos {
    background: var(--ev-soft);
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius);
    padding: 32px 36px;
    margin-top: -28px;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 24px rgba(26, 26, 26, 0.06);
}

.event-infos__grid {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.info-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.info-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--ev-muted);
}

.info-value {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--ev-ink);
    line-height: 1.2;
}

/* ─── Accroche ──────────────────────────────────────────────── */
.event-accroche {
    text-align: center;
    padding-top: 20px;
}

.event-accroche__text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
    font-weight: 400;
    line-height: 1.65;
    color: #2d2824;
    max-width: 580px;
    margin: 0 auto;
    font-style: italic;
}

/* ─── Galerie ───────────────────────────────────────────────── */
.event-gallery__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.event-gallery__item {
    margin: 0;
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 4 / 5;
}

.event-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.event-gallery__item:hover img {
    transform: scale(1.03);
}

/* ─── Menu items ─────────────────────────────────────────────── */
.event-menu__image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--ev-radius);
    box-shadow: 0 2px 20px rgba(26, 26, 26, 0.08);
}

.event-menu__items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.menu-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px 0;
}

.menu-item.has-separator {
    border-top: 1px solid var(--ev-border);
}

.menu-item__num {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--ev-border);
    line-height: 1;
    min-width: 36px;
    padding-top: 2px;
}

.menu-item__content {
    flex: 1;
}

.menu-item__name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--ev-ink);
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.menu-item__desc {
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--ev-muted);
    margin: 0;
    line-height: 1.5;
}

/* ─── Citation ───────────────────────────────────────────────── */
.event-citation {
    text-align: center;
    background: var(--ev-soft);
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius);
    padding: 40px 44px;
}

.event-citation__block {
    margin: 0;
    padding: 0;
    border: none;
}

.event-citation__text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    font-style: italic;
    font-weight: 400;
    color: #2d2824;
    line-height: 1.7;
    margin: 0 0 20px 0;
}

.event-citation__text::before {
    content: '\201C';
    font-size: 2.5em;
    line-height: 0;
    vertical-align: -0.5em;
    margin-right: 4px;
    color: var(--ev-accent);
    font-style: normal;
}
.event-citation__text::after {
    content: '\201D';
    font-size: 2.5em;
    line-height: 0;
    vertical-align: -0.5em;
    margin-left: 4px;
    color: var(--ev-accent);
    font-style: normal;
}

.event-citation__author {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ev-muted);
    font-style: normal;
}

/* ─── Vins ───────────────────────────────────────────────────── */
.event-vins {
    text-align: center;
}

.event-vins__text {
    font-size: 0.88rem;
    font-weight: 300;
    color: #2d2824;
    line-height: 1.65;
    margin: 0;
}

.event-vins__price {
    display: inline-block;
    margin-left: 8px;
    font-weight: 500;
    color: var(--ev-ink);
    background: var(--ev-soft);
    border: 1px solid var(--ev-border);
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
}

/* ─── Contenu principal ──────────────────────────────────────── */
.event-content__text {
    font-size: 0.9rem;
    line-height: 1.75;
    color: #2d2824;
}
.event-content__text p { margin-bottom: 1em; }
.event-content__text p:last-child { margin-bottom: 0; }

/* ─── CTA Réserver ───────────────────────────────────────────── */
.event-cta {
    text-align: center;
    padding: 20px 0;
}

.event-cta__button {
    display: inline-block;
    background: var(--ev-ink);
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 18px 52px;
    border-radius: 2px;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 12px rgba(26, 26, 26, 0.15);
}
.event-cta__button:hover {
    background: #2d2824;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(26, 26, 26, 0.2);
    color: #fff;
    text-decoration: none;
}

.event-cta__phone {
    margin: 18px 0 0 0;
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--ev-muted);
}
.event-cta__phone a {
    color: var(--ev-ink);
    font-weight: 400;
    text-decoration: none;
    border-bottom: 1px solid var(--ev-border);
    transition: border-color 0.15s ease;
}
.event-cta__phone a:hover {
    border-color: var(--ev-ink);
}

.event-cta__full {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.15rem;
    color: var(--ev-muted);
    font-style: italic;
    margin: 0 0 12px 0;
}

.event-cta__link {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--ev-ink);
    text-decoration: none;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--ev-border);
    transition: border-color 0.15s ease;
    padding-bottom: 2px;
}
.event-cta__link:hover { border-color: var(--ev-ink); }

/* ─── Bons cadeaux ───────────────────────────────────────────── */
.event-gift__card {
    background: var(--color-white, #fff);
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius);
    padding: 30px 36px;
    text-align: left;
}

.event-gift__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--ev-ink);
    margin: 0 0 8px 0;
}

.event-gift__desc {
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--ev-muted);
    line-height: 1.55;
    margin: 0 0 14px 0;
}

.event-gift__link {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--ev-ink);
    text-decoration: none;
    border-bottom: 1px solid var(--ev-ink);
    padding-bottom: 1px;
    letter-spacing: 0.3px;
    transition: opacity 0.15s ease;
}
.event-gift__link:hover { opacity: 0.6; }

/* ─── Navigation ─────────────────────────────────────────────── */
.event-nav {
    max-width: var(--ev-max);
    margin: 60px auto 0;
    padding-top: 32px;
    border-top: 1px solid var(--ev-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.event-nav__back,
.event-nav__next {
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--ev-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}
.event-nav__back:hover,
.event-nav__next:hover {
    color: var(--ev-ink);
}
.event-nav__next {
    text-align: right;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: no-preference) {
    .event-infos,
    .event-accroche,
    .event-gallery,
    .event-menu,
    .event-citation,
    .event-vins,
    .event-content,
    .event-cta,
    .event-gift,
    .event-nav {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.65s ease, transform 0.65s ease;
    }

    .event-infos.is-visible,
    .event-accroche.is-visible,
    .event-gallery.is-visible,
    .event-menu.is-visible,
    .event-citation.is-visible,
    .event-vins.is-visible,
    .event-content.is-visible,
    .event-cta.is-visible,
    .event-gift.is-visible,
    .event-nav.is-visible {
        opacity: 1;
        transform: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .event-hero {
        height: 65vh;
        min-height: 380px;
    }

    .event-hero__title {
        font-size: 2rem;
    }

    .event-date-badge-hero {
        top: 80px;
        right: 20px;
    }

    .event-hero__content {
        padding-bottom: 48px;
    }

    .event-body {
        padding: 0 18px 60px;
    }

    .event-infos {
        padding: 24px 22px;
        margin-top: -20px;
    }

    .event-infos__grid {
        gap: 24px;
    }

    .event-gallery__grid {
        grid-template-columns: 1fr;
    }
    .event-gallery__item {
        aspect-ratio: 3 / 2;
    }

    .event-citation {
        padding: 28px 24px;
    }

    .event-cta__button {
        display: block;
        text-align: center;
        padding: 18px 32px;
    }

    .event-gift__card {
        padding: 24px 20px;
    }

    .event-nav {
        flex-direction: column;
        align-items: flex-start;
    }
    .event-nav__next {
        text-align: left;
        max-width: none;
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .event-infos__grid {
        flex-direction: column;
        gap: 18px;
    }
    .event-section + .event-section::before {
        margin-bottom: 40px;
    }
    .event-section {
        margin-bottom: 40px;
    }
}
