/* ═══════════════════════════════════════════════════════════════════
   Balades d'Orchies — CSS page hub
   Reprend intégralement le design system de style.css (Miclèwes)
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --green:        #2d5a40;
    --green-light:  #4a8c61;
    --green-pale:   #e8f4ed;
    --green-dark:   #1a3a2a;
    --gold:         #c8963c;
    --gold-light:   #f0d080;
    --gold-pale:    #fdf3df;
    --brown:        #6b4c2a;
    --gray-100:     #f7f8f6;
    --gray-200:     #e9ecef;
    --gray-400:     #ced4da;
    --gray-600:     #6c757d;
    --gray-800:     #343a40;
    --white:        #ffffff;
    --shadow:       0 2px 12px rgba(0,0,0,0.07);
    --shadow-md:    0 4px 20px rgba(0,0,0,0.12);
    --radius:       12px;
    --radius-sm:    8px;
    --sidebar-w:    240px;
    --header-h:     56px;
    --nav-h:        62px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    overflow: hidden;
}

/* ── Layout mobile ──────────────────────────────────────────────── */
.sidebar { display: none; }

.main {
    position: fixed; inset: 0;
    bottom: var(--nav-h); overflow: hidden;
}

.section {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    background: var(--gray-100);
    opacity: 0; pointer-events: none;
    transform: translateX(30px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.section.active { opacity: 1; pointer-events: all; transform: translateX(0); }

/* ── Mobile header ──────────────────────────────────────────────── */
.mobile-header {
    height: var(--header-h);
    background: var(--green-dark);
    color: white;
    display: flex; align-items: center;
    padding: 0 16px; gap: 12px; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(26,58,42,0.35);
}
.mobile-header--back { padding: 0 16px; }
.mh-back {
    background: none; border: none; color: white;
    font-size: 22px; cursor: pointer; padding: 8px; min-width: 40px;
}
.mh-title-center {
    flex: 1; text-align: center;
    font-size: 16px; font-weight: 600;
    padding-right: 40px;
}
.mh-brand-link { display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.mh-brand-orchies {
    font-family: 'Cinzel', serif; font-size: 16px; font-weight: 900;
    color: white; letter-spacing: 0.4px;
}
.mh-brand-sub { font-size: 10px; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 1px; }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
    position: relative;
    background: var(--green-dark);
    min-height: 240px;
    display: flex; flex-direction: column; justify-content: flex-end;
    overflow: hidden; flex-shrink: 0;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,255,255,0.02) 20px, rgba(255,255,255,0.02) 40px);
    pointer-events: none;
}
/* Motif décoratif de feuilles SVG en fond */
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.hero::after {
    content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
    height: 20px; background: var(--gray-100);
    clip-path: ellipse(55% 100% at 50% 100%); z-index: 1;
}
.hero-content { position: relative; z-index: 2; padding: 24px 18px 28px; }
.hero-top-badge { margin-bottom: 10px; }
.hero-badge-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(4px);
    color: rgba(255,255,255,0.9);
    padding: 5px 12px; border-radius: 20px;
    font-size: 11px; font-weight: 500;
    border: 1px solid rgba(255,255,255,0.2);
}
.hero-eyebrow { font-size: 11px; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 1.2px; display: block; margin-bottom: 6px; }
.hero-title { font-size: 28px; font-weight: 800; color: white; line-height: 1.1; margin-bottom: 8px; text-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.hero-title span { color: var(--gold-light); }
.hero-subtitle { font-size: 13px; color: rgba(255,255,255,0.7); font-style: italic; line-height: 1.5; margin-bottom: 16px; }
.hero-stats {
    display: flex; align-items: center;
    background: rgba(0,0,0,0.25); backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm); padding: 10px 0;
}
.hero-stat { flex: 1; text-align: center; }
.stat-val { display: block; font-size: 17px; font-weight: 700; color: var(--gold-light); }
.stat-lbl { display: block; font-size: 10px; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.4px; }
.hero-stat-sep { width: 1px; background: rgba(255,255,255,0.18); align-self: stretch; }

/* ── Page content ───────────────────────────────────────────────── */
.page-content { padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }

/* ── Section label ──────────────────────────────────────────────── */
.section-label {
    font-size: 11px; font-weight: 700; color: var(--gray-600);
    text-transform: uppercase; letter-spacing: 0.7px;
    margin: 16px 0 10px;
}

/* ── Cards balades ──────────────────────────────────────────────── */
.balades-grid {
    display: flex; flex-direction: column; gap: 16px;
    margin-bottom: 16px;
}
.balade-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    text-decoration: none; color: inherit;
    display: flex; flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.balade-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.balade-card:active { transform: scale(0.98); }

.balade-card-img {
    height: 180px;
    background-size: cover;
    background-position: center 65%;
    position: relative;
    flex-shrink: 0;
}
.balade-card-img--rando { background-position: center 55%; }

.balade-card-img-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.4) 100%);
}
.balade-card-badges {
    position: absolute; bottom: 10px; left: 10px;
    display: flex; gap: 6px; flex-wrap: wrap;
}
.balade-badge {
    display: inline-block; padding: 3px 9px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
    backdrop-filter: blur(4px);
}
.balade-badge--patrimoine { background: rgba(200,150,60,0.88); color: white; }
.balade-badge--nature     { background: rgba(42,110,42,0.88); color: white; }
.balade-badge--chic       { background: rgba(122,74,30,0.88); color: white; }
.balade-badge--facile     { background: rgba(255,255,255,0.88); color: var(--gray-800); }

.balade-card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.balade-card-title { font-size: 16px; font-weight: 700; color: var(--gray-800); line-height: 1.3; }
.balade-card-desc  { font-size: 13px; color: var(--gray-600); line-height: 1.5; flex: 1; }
.balade-card-meta  { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bcm-item { font-size: 12px; color: var(--gray-600); }
.bcm-sep  { font-size: 12px; color: var(--gray-400); }
.balade-card-cta {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 600; color: var(--green);
    margin-top: 4px;
}
.cta-arrow { transition: transform 0.2s; }
.balade-card:hover .cta-arrow { transform: translateX(4px); }

/* ── Card info ──────────────────────────────────────────────────── */
.card {
    background: var(--white); border-radius: var(--radius);
    padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px;
}
.card-info {
    display: flex; align-items: flex-start; gap: 14px;
    background: var(--green-pale); border-left: 4px solid var(--green);
}
.info-icon-lg { font-size: 32px; flex-shrink: 0; }
.info-title { font-size: 15px; font-weight: 600; color: var(--green-dark); margin-bottom: 6px; }
.info-text  { font-size: 13px; color: var(--gray-600); line-height: 1.6; }

/* ── Bottom nav ─────────────────────────────────────────────────── */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: var(--white); border-top: 1px solid var(--gray-200);
    display: grid; grid-template-columns: repeat(2, 1fr);
    z-index: 100; padding-bottom: env(safe-area-inset-bottom);
}
.bnav-item {
    background: none; border: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; cursor: pointer; color: var(--gray-600); transition: color 0.2s; padding: 6px 4px;
}
.bnav-item.active { color: var(--green); }
.bnav-icon  { font-size: 22px; }
.bnav-label { font-size: 10px; font-weight: 500; }

/* ════════════════════════════════ DESKTOP (≥ 900px) ══ */
@media (min-width: 900px) {

    body { overflow: hidden; display: flex; }

    .sidebar {
        display: flex; flex-direction: column;
        width: var(--sidebar-w); flex-shrink: 0;
        background: var(--green-dark); height: 100vh; position: sticky; top: 0;
    }
    .sidebar-brand {
        padding: 28px 20px 24px;
        display: flex; align-items: center; gap: 12px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        flex-direction: column; align-items: flex-start; gap: 3px;
    }
    .sidebar-brand-link { display: flex; flex-direction: column; gap: 3px; text-decoration: none; transition: opacity 0.2s; }
    .sidebar-brand-link:hover { opacity: 0.8; }
    .brand-orchies { font-family: 'Cinzel', serif; font-size: 17px; font-weight: 900; color: white; white-space: nowrap; }
    .brand-sub { font-size: 10px; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 1px; }

    .sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
    .nav-item {
        width: 100%; background: none; border: none;
        display: flex; align-items: center; gap: 12px;
        padding: 10px 12px; border-radius: var(--radius-sm);
        color: rgba(255,255,255,0.65); font-size: 14px; font-weight: 500;
        cursor: pointer; text-align: left; transition: background 0.15s, color 0.15s;
    }
    .nav-item:hover  { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.9); }
    .nav-item.active { background: rgba(255,255,255,0.15); color: white; }
    .nav-icon  { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
    .nav-label { flex: 1; }

    .sidebar-footer { padding: 20px 16px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-around; }
    .sidebar-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; }
    .s-val { font-size: 16px; font-weight: 700; color: var(--gold-light); }
    .s-lbl { font-size: 10px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.5px; }

    .main { position: static; flex: 1; overflow-y: auto; height: 100vh; }

    .section { position: static; display: none; opacity: 1; transform: none; pointer-events: auto; overflow: visible; }
    .section.active { display: block; }

    .mobile-header { display: none; }
    .bottom-nav    { display: none; }

    .hero { min-height: 380px; padding: 0; }
    .hero-content { padding: 52px 52px 48px; max-width: 620px; gap: 14px; }
    .hero-title    { font-size: 46px; }
    .hero-subtitle { font-size: 15px; }

    .page-content { padding: 32px 48px 48px; max-width: 1100px; }

    .balades-grid {
        flex-direction: row;
        align-items: stretch;
        flex-wrap: wrap;
    }
    .balade-card { flex: 1; min-width: 280px; }
    .balade-card-img { height: 220px; }
}
