/* ============================================
   Buvette du Défénant — Design System
   ============================================ */

:root {
    --c-bg: #FAF2E5;
    --c-primary: #49531F;
    --c-primary-soft: #6b7830;
    --c-primary-dark: #323a13;
    --c-text: #2b2f16;
    --c-muted: #7a7860;
    --c-border: rgba(73, 83, 31, 0.15);
    --c-card: #fffaf0;

    --font-body: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
    --font-title: 'Hanken Grotesk', system-ui, sans-serif;

    --radius: 14px;
    --radius-lg: 22px;
    --shadow: 0 4px 20px rgba(73, 83, 31, 0.08);
    --shadow-lg: 0 10px 40px rgba(73, 83, 31, 0.15);

    --container: 1200px;
    --container-narrow: 820px;
    --space: 1rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 800;
    line-height: 1.1;
    color: var(--c-primary);
    margin: 0 0 0.6em;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

a {
    color: var(--c-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s;
}
a:hover { color: var(--c-primary-dark); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); }
.container.narrow { max-width: var(--container-narrow); }

.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap;
}
.skip-link {
    position: absolute; top: -100px; left: 0; background: var(--c-primary); color: var(--c-bg);
    padding: 0.7em 1em; z-index: 100;
}
.skip-link:focus { top: 0; }

/* ============================================
   Illustration montagnes (background fixed)
   ============================================ */
.bdd-mountains {
    position: fixed; inset: auto 0 0 0; height: 50vh;
    pointer-events: none; z-index: 0; color: var(--c-primary);
}
.bdd-mountains__svg { width: 100%; height: 100%; display: block; }

/* ============================================
   Banner sticky
   ============================================ */
.bdd-banner {
    position: sticky; top: 0; z-index: 90;
    padding: 0.6em 1em; text-align: center; font-weight: 600;
}
.bdd-banner p { margin: 0; font-size: 0.95rem; }

/* ============================================
   Header : logo centré + nav en dessous
   ============================================ */
.site-header {
    position: relative; z-index: 10;
    padding: 1.5rem 1rem 0.5rem;
    text-align: center;
}
.site-header__inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.site-header__logo {
    position: relative; width: 100%;
    display: flex; justify-content: center; align-items: center;
}
.site-header__logo img,
.site-header__logo .custom-logo {
    max-height: 130px; width: auto; margin: 0 auto;
}
.site-header__logo .site-title {
    font-family: var(--font-title); font-weight: 800; font-size: 2rem;
    color: var(--c-primary); text-decoration: none;
}

.site-nav__menu {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: clamp(1rem, 3vw, 2.5rem); justify-content: center;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.9rem;
}
.site-nav__menu a {
    text-decoration: none; color: var(--c-primary); padding: 0.5em 0;
    border-bottom: 2px solid transparent;
}
.site-nav__menu a:hover,
.site-nav__menu .current-menu-item > a { border-bottom-color: var(--c-primary); }

.site-nav-toggle {
    display: none; background: none; border: 0; cursor: pointer;
    padding: 0.5rem; position: absolute; right: 1rem;
    top: 50%; transform: translateY(-50%);
}
.site-nav-toggle span {
    display: block; width: 28px; height: 2px; background: var(--c-primary); margin: 6px 0;
    transition: transform 0.25s, opacity 0.25s;
}
.site-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.site-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 768px) {
    .site-nav-toggle { display: block; }
    .site-nav {
        width: 100%; max-height: 0; overflow: hidden;
        transition: max-height 0.35s ease;
    }
    .site-nav.is-open { max-height: 600px; }
    .site-nav__menu { flex-direction: column; gap: 0.5rem; padding: 1rem 0; }
}

/* ============================================
   Main content
   ============================================ */
.site-main {
    position: relative; z-index: 5;
    padding: clamp(2rem, 5vw, 4rem) 0;
    min-height: 50vh;
}

.page-title { text-align: center; margin-bottom: 1.5rem; }
.page-intro { margin-bottom: 3rem; text-align: center; }
.page-content { text-align: left; }
.section-title { text-align: center; margin-bottom: 2rem; }

/* Hero générique (fallback) */
.hero {
    text-align: center;
    padding: clamp(2rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
}
.hero__eyebrow {
    text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.85rem;
    color: var(--c-primary-soft); font-weight: 600; margin-bottom: 1rem;
}
.hero__title { margin-bottom: 1rem; }
.hero__subtitle { font-size: 1.2rem; color: var(--c-muted); max-width: 620px; margin: 0 auto 2rem; }
.hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero__status { margin-top: 1rem; }

/* ============================================
   HOME — Hero immersif
   ============================================ */
.home-hero {
    position: relative; overflow: hidden;
    padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 8vw, 6rem);
    text-align: center;
    background: var(--c-bg);
}
.home-hero.has-image {
    background-size: cover; background-position: center;
    color: var(--c-bg);
    min-height: 75vh; display: flex; align-items: center; justify-content: center;
}
.home-hero.has-image .home-hero__title,
.home-hero.has-image .home-hero__tagline,
.home-hero.has-image .home-hero__eyebrow { color: var(--c-bg); }
.home-hero__eyebrow {
    text-transform: uppercase; letter-spacing: 0.25em; font-size: 0.8rem;
    font-weight: 700; margin-bottom: 1rem; opacity: 0.9;
}
.home-hero__title {
    font-size: clamp(2.6rem, 6vw, 4.5rem); margin-bottom: 1.2rem;
}
.home-hero.has-image .home-hero__title { text-shadow: 0 2px 20px rgba(0,0,0,0.3); }
.home-hero__tagline {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    max-width: 680px; margin: 0 auto 2rem; font-weight: 400;
}
.home-hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.home-hero__status { font-weight: 700; }
.btn--on-dark { border-color: var(--c-bg); color: var(--c-bg); }
.btn--on-dark:hover { background: var(--c-bg); color: var(--c-primary); }

/* Intro */
.home-intro {
    text-align: center;
    padding: clamp(2.5rem, 5vw, 4rem) 1.5rem clamp(1rem, 3vw, 2rem);
}
.home-intro__text {
    font-size: clamp(1.1rem, 1.5vw, 1.25rem); line-height: 1.7;
    color: var(--c-text); max-width: 720px; margin: 0 auto;
}
.home-intro__text p:first-of-type::first-letter {
    font-size: 3em; font-weight: 800; float: left; line-height: 0.85;
    margin: 0.1em 0.15em 0 0; color: var(--c-primary);
}
.home-content { padding: 1rem 1.5rem 2rem; }

/* Sections alternées image/texte */
.home-sections { padding: clamp(2rem, 5vw, 4rem) 0; }
.home-section { padding: clamp(2rem, 4vw, 4rem) 0; }
.home-section__inner {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.home-section--reverse .home-section__media { order: 2; }
.home-section__media {
    position: relative; aspect-ratio: 4/3;
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--c-card);
}
.home-section__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-section__placeholder {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: var(--c-primary); background: var(--c-card);
}
.home-section__placeholder svg { width: 60%; height: auto; }
.home-section__title {
    font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 1rem;
    position: relative; padding-bottom: 0.8rem;
}
.home-section__title::after {
    content: ""; display: block; width: 60px; height: 3px;
    background: var(--c-primary); margin-top: 0.8rem; border-radius: 2px;
}
.home-section__text { font-size: 1.05rem; line-height: 1.75; }

@media (max-width: 820px) {
    .home-section__inner { grid-template-columns: 1fr; gap: 1.5rem; }
    .home-section--reverse .home-section__media { order: 0; }
    .home-section__media { aspect-ratio: 16/10; }
}

/* Specs sur accueil */
.home-specs { padding: clamp(3rem, 6vw, 5rem) 1.5rem; }
.section-sub { text-align: center; color: var(--c-muted); max-width: 600px; margin: -1rem auto 2.5rem; font-size: 1.05rem; }
.home-specs__cta { text-align: center; margin-top: 2rem; }

/* Saison */
.home-season { padding: clamp(2rem, 5vw, 4rem) 0; }
.home-season__card {
    background: var(--c-primary); color: var(--c-bg);
    border-radius: var(--radius-lg); padding: clamp(2rem, 4vw, 3rem);
    display: flex; justify-content: space-between; align-items: center; gap: 2rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-lg);
}
.home-season__card h2 { color: var(--c-bg); margin: 0; }
.home-season__card p { margin: 0; opacity: 0.95; }
.home-season__eyebrow { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.8rem; font-weight: 700; opacity: 0.85; margin-bottom: 0.4rem; }
.home-season__card .btn { flex-shrink: 0; }
.home-season__card .btn--primary { background: var(--c-bg); color: var(--c-primary); border-color: var(--c-bg); }
.home-season__card .btn--primary:hover { background: transparent; color: var(--c-bg); }
.home-season__card .bdd-open-now { color: var(--c-bg); }

/* Galerie teaser */
.home-gallery { padding: clamp(3rem, 6vw, 5rem) 1.5rem; }
.home-gallery__grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem;
}
.home-gallery__grid figure {
    margin: 0; aspect-ratio: 1/1; overflow: hidden; border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.home-gallery__grid img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.home-gallery__grid figure:hover img { transform: scale(1.06); }
.home-gallery__cta { text-align: center; margin-top: 2rem; }
@media (max-width: 680px) { .home-gallery__grid { grid-template-columns: repeat(2, 1fr); } }

/* CTA final */
.home-cta {
    padding: clamp(3rem, 7vw, 5rem) 1.5rem;
    text-align: center; margin-top: 2rem;
}
.home-cta__inner { max-width: 680px; margin: 0 auto; }
.home-cta h2 { margin-bottom: 1rem; }
.home-cta p:last-of-type { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Boutons */
.btn {
    display: inline-block; padding: 0.85em 1.8em; border-radius: 999px;
    font-weight: 700; text-decoration: none; font-size: 0.95rem;
    transition: transform 0.15s, background 0.2s, color 0.2s;
    border: 2px solid var(--c-primary);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--c-primary); color: var(--c-bg); }
.btn--primary:hover { background: var(--c-primary-dark); color: var(--c-bg); }
.btn--ghost { background: transparent; color: var(--c-primary); }
.btn--ghost:hover { background: var(--c-primary); color: var(--c-bg); }

/* Apple plan : visible uniquement mobile/tablet */
.btn--apple-only { display: none; }
@media (max-width: 1024px) {
    .btn--apple-only { display: inline-block; }
}

/* Feature grid (accueil) */
.feature-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem; margin: 3rem 0;
}
.feature-card {
    background: var(--c-card); border: 1px solid var(--c-border);
    padding: 1.6rem; border-radius: var(--radius);
    text-decoration: none; color: var(--c-text);
    transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-card h3 { margin-bottom: 0.5rem; }
.feature-card p { color: var(--c-muted); margin: 0; font-size: 0.95rem; }

/* Specs (carte) */
.specs-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem; margin-bottom: 3rem;
}
.spec-card {
    background: var(--c-card); padding: 1.5rem; border-radius: var(--radius);
    border-left: 4px solid var(--c-primary);
}

/* PDF viewer */
.menu-pdf { margin-top: 3rem; }
.pdf-viewer {
    background: var(--c-card); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow);
}
.pdf-viewer object { display: block; }
.pdf-fallback { padding: 3rem 1rem; text-align: center; }
.pdf-actions { text-align: center; margin-top: 1.5rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Accès */
.acces-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 3rem;
}
@media (max-width: 820px) { .acces-grid { grid-template-columns: 1fr; } }
.acces-card {
    background: var(--c-card); padding: 2rem; border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.acces-address { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.acces-coords { list-style: none; padding: 0; margin: 0 0 1.5rem; font-size: 0.95rem; }
.acces-coords li { padding: 0.3rem 0; border-bottom: 1px dashed var(--c-border); }
.acces-buttons { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.acces-map { margin-top: 1.5rem; }

.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td { padding: 0.7rem 0; text-align: left; border-bottom: 1px dashed var(--c-border); }
.hours-table th { font-weight: 600; width: 40%; }
.hours-table tr.is-today { background: rgba(73, 83, 31, 0.06); font-weight: 700; }
.hours-table .muted { color: var(--c-muted); }
.bdd-open-now { font-weight: 700; }
.bdd-open-now.is-open { color: #2f7a2f; }
.bdd-open-now.is-closed { color: #a34141; }
.acces-status { margin-bottom: 1.2rem; font-size: 1.1rem; }

.routes-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
}
.route-card {
    background: var(--c-card); padding: 1.5rem; border-radius: var(--radius);
    border-top: 4px solid var(--c-primary);
}

/* Galerie */
.gallery-filters {
    display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center;
    margin-bottom: 2rem;
}
.gallery-filters .filter {
    background: transparent; border: 2px solid var(--c-primary);
    color: var(--c-primary); padding: 0.5em 1.2em; border-radius: 999px;
    font-family: inherit; font-weight: 600; font-size: 0.85rem; cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.gallery-filters .filter:hover,
.gallery-filters .filter.is-active {
    background: var(--c-primary); color: var(--c-bg);
}

.gallery-grid { margin-top: 1rem; }
.gallery-item {
    margin: 0 0 1rem; width: calc(33.333% - 0.67rem);
    break-inside: avoid;
    border-radius: var(--radius); overflow: hidden;
    background: var(--c-card); box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
}
.gallery-item:nth-child(3n+1) { margin-right: 1rem; }
.gallery-item:nth-child(3n+2) { margin-right: 1rem; }
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.gallery-item img { width: 100%; height: auto; display: block; }
.gallery-item__caption {
    padding: 0.7rem 1rem; font-size: 0.9rem; color: var(--c-muted);
}
@media (max-width: 820px) {
    .gallery-item { width: calc(50% - 0.5rem); }
    .gallery-item:nth-child(3n+1), .gallery-item:nth-child(3n+2) { margin-right: 0; }
    .gallery-item:nth-child(2n+1) { margin-right: 1rem; }
}
@media (max-width: 480px) {
    .gallery-item { width: 100%; margin-right: 0 !important; }
}

/* Activités */
.activites-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.activity-card {
    background: var(--c-card); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow);
    display: flex; flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.activity-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.activity-card__image img { width: 100%; height: 220px; object-fit: cover; }
.activity-card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.activity-card__tag {
    display: inline-block; background: var(--c-primary); color: var(--c-bg);
    padding: 0.2em 0.9em; border-radius: 999px; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
    margin-bottom: 0.7rem; align-self: flex-start;
}
.activity-card__title { margin-bottom: 0.5rem; }
.activity-card__meta {
    list-style: none; padding: 0; margin: 0 0 1rem;
    display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.9rem; color: var(--c-muted);
}
.activity-card__excerpt { flex: 1; }

/* Notices */
.notice {
    background: var(--c-card); padding: 1.5rem; border-radius: var(--radius);
    border-left: 4px solid var(--c-primary); color: var(--c-muted); text-align: center;
}

/* Footer */
.site-footer {
    position: relative; z-index: 5;
    background: var(--c-primary); color: var(--c-bg);
    margin-top: 4rem; padding: 3rem 1rem 1.5rem;
}
.site-footer h3 { color: var(--c-bg); font-size: 1.1rem; margin-bottom: 1rem; }
.site-footer a { color: var(--c-bg); opacity: 0.9; }
.site-footer a:hover { opacity: 1; }
.site-footer__inner {
    max-width: var(--container); margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(250, 242, 229, 0.15);
}
.site-footer__menu { list-style: none; padding: 0; margin: 0; }
.site-footer__menu li { padding: 0.3rem 0; }
.site-footer__bottom {
    max-width: var(--container); margin: 0 auto; padding-top: 1.5rem;
    text-align: center; font-size: 0.85rem; opacity: 0.8;
}
.site-footer__bottom p { margin: 0; }

/* 404 */
.page-404 { text-align: center; padding: 4rem 1rem; }
.page-404 h1 { font-size: 5rem; margin-bottom: 0; }

/* Single / search */
.post-card { background: var(--c-card); padding: 1.5rem; border-radius: var(--radius); margin-bottom: 1.2rem; }
.single-post__thumb { margin: 1.5rem 0; border-radius: var(--radius); overflow: hidden; }
.search-results { list-style: none; padding: 0; }
.search-results li { padding: 1rem 0; border-bottom: 1px solid var(--c-border); }
