/* ============================================================
   VARIABLES & RESET
============================================================ */
:root {
    /* — Design V2 tokens — */
    --hx-paper:    #FAF5EB;
    --hx-paper-2:  #F2E8D2;
    --hx-paper-3:  #E8DBBE;
    --hx-ink:      #2A1F14;
    --hx-ink-2:    rgba(42, 31, 20, 0.62);
    --hx-ink-3:    rgba(42, 31, 20, 0.38);
    --hx-line:     rgba(42, 31, 20, 0.14);
    --hx-line-2:   rgba(42, 31, 20, 0.08);
    --hx-ochre:    #C8862A;
    --hx-ochre-2:  #E0A14A;
    --hx-red:      #B83A2A;
    --hx-red-2:    #8E2818;
    --hx-terra:    #C46B3D;
    --hx-jade:     #6B7F4A;
    --hx-river:    #4F6E7E;
    --hx-card:     #FFFCF5;
    --hx-card-line: rgba(42, 31, 20, 0.10);
    --hx-font-display: "Cormorant Garamond", Georgia, serif;
    --hx-font-body:    "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, sans-serif;
    --hx-font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

    /* — Legacy aliases (keeps all JS untouched) — */
    --primary:   #B83A2A;
    --primary-d: #8E2818;
    --secondary: #C8862A;
    --dark:      #2A1F14;
    --dark2:     #3A2B1C;
    --text:      rgba(42, 31, 20, 0.80);
    --light:     #FAF5EB;
    --white:     #FFFCF5;
    --shadow:    0 4px 24px rgba(42,31,20,.08);
    --shadow-lg: 0 12px 40px rgba(42,31,20,.14);
    --radius:       18px;
    --header-h:     64px;
    --nav-h:        60px;
    --nav-desktop:  50px;
    --safe-top:    env(safe-area-inset-top,    0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Paper grain overlay — warm noise + radial glow */
.paper-grain {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image:
        radial-gradient(circle at 18% 12%, rgba(200,134,42,.04) 0%, transparent 40%),
        radial-gradient(circle at 84% 88%, rgba(184,58,42,.03) 0%, transparent 45%);
    mix-blend-mode: multiply;
}

/* ============================================================
   HX DESIGN SYSTEM — Components & Layout
============================================================ */

/* Seal stamp — red rotated square with character */
.hx-seal {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    background: var(--hx-red);
    color: #FFF8EA;
    font-family: var(--hx-font-display); font-weight: 600; font-size: 14px; line-height: 1;
    transform: rotate(-6deg); border-radius: 3px;
    box-shadow: inset 0 0 0 1.5px rgba(255,248,234,.18), inset 0 0 12px rgba(0,0,0,.18);
    letter-spacing: .02em; position: relative; flex-shrink: 0;
}
.hx-seal::after {
    content: ""; position: absolute; inset: 0; border-radius: 3px; pointer-events: none;
    background:
        radial-gradient(circle at 20% 30%, transparent 0 1px, rgba(255,248,234,.06) 1.5px, transparent 2.5px),
        radial-gradient(circle at 70% 70%, transparent 0 1px, rgba(255,248,234,.05) 1.5px, transparent 2.5px);
}
.header-seal {
    width: 44px; height: 44px; font-size: 16px; transform: rotate(-4deg);
    flex-shrink: 0;
}

/* Typography helpers */
.hx-eyebrow {
    font-family: var(--hx-font-body); font-size: 10px; font-weight: 600;
    letter-spacing: .18em; text-transform: uppercase; color: var(--hx-ink-2);
}
.hx-no     { font-family: var(--hx-font-display); font-style: italic; font-weight: 400; color: var(--hx-red); }
svg.hx-no, svg.snt-no { vertical-align: middle; margin-right: 5px; }
.hx-italic { font-family: var(--hx-font-display); font-style: italic; font-weight: 400; }
.hx-mono   { font-family: "JetBrains Mono", ui-monospace, "SF Mono", monospace; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hx-numeral { font-family: var(--hx-font-display); font-style: italic; font-weight: 400; color: var(--hx-red); line-height: 1; }
.hx-h1 { font-family: var(--hx-font-display); font-size: 34px; font-weight: 500; line-height: 1.02; letter-spacing: -.015em; }
.hx-h1 em { font-style: italic; font-weight: 400; color: var(--hx-red); }
.hx-h2 { font-family: var(--hx-font-display); font-size: 22px; font-weight: 500; line-height: 1.1; letter-spacing: -.01em; }
.hx-h3 { font-family: var(--hx-font-display); font-size: 17px; font-weight: 500; line-height: 1.15; }

/* Chips */
.hx-chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 26px; padding: 0 10px; border-radius: 999px;
    font-size: 11px; font-weight: 500;
    border: 1px solid var(--hx-line);
    background: var(--hx-card); color: var(--hx-ink); white-space: nowrap;
}
.hx-chip[data-tone="ochre"] { background: var(--hx-ochre); color: #fff; border-color: transparent; }
.hx-chip[data-tone="red"]   { background: var(--hx-red);   color: #FFF8EA; border-color: transparent; }
.hx-chip[data-tone="ink"]   { background: var(--hx-ink);   color: var(--hx-paper); border-color: transparent; }

/* Buttons (hx-btn) */
.hx-btn {
    appearance: none; border: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--hx-font-body); font-weight: 600; font-size: 14px;
    height: 48px; padding: 0 22px; border-radius: 999px;
    background: var(--hx-ink); color: var(--hx-paper);
    transition: box-shadow .2s, transform .15s;
}
.hx-btn[data-tone="ochre"]  { background: var(--hx-ochre); color: #29200E; }
.hx-btn[data-tone="red"]    { background: var(--hx-red);   color: #FFF8EA; }
.hx-btn[data-tone="ghost"]  { background: transparent; color: var(--hx-ink); border: 1px solid var(--hx-line); }
@media (hover: hover) {
    .hx-btn:hover  { box-shadow: 0 4px 16px rgba(42,31,20,.18); transform: translateY(-1px); }
    .hx-btn:active { transform: scale(.97); }
}

/* Dashed separator */
.hx-dotted {
    background-image: linear-gradient(90deg, var(--hx-line) 50%, transparent 50%);
    background-size: 6px 1px; background-repeat: repeat-x; background-position: 0 50%; height: 1px;
}

/* Itinerary timeline */
.hx-time-rail { position: relative; padding-left: 28px; }
.hx-time-rail::before {
    content: ""; position: absolute; left: 9px; top: 4px; bottom: 4px; width: 2px;
    background-image: linear-gradient(180deg, var(--hx-line) 50%, transparent 50%);
    background-size: 2px 6px;
}
.hx-time-dot {
    position: absolute; left: 1px; top: 3px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--hx-paper); border: 2px solid var(--hx-ochre);
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 700; color: var(--hx-ochre);
}

/* ── AI companion strip (home page banner) ── */
.home-ai-strip {
    margin: 0 16px 16px; padding: 14px 18px;
    background: linear-gradient(95deg, var(--hx-red) 0%, var(--hx-red-2) 100%);
    color: #FFF8EA; border-radius: 16px;
    display: flex; align-items: center; gap: 12px;
    position: relative; overflow: hidden;
    box-shadow: 0 6px 18px rgba(184,58,42,.22);
    max-width: 1200px;
}
.home-ai-strip::before {
    content: ""; position: absolute; right: -20px; top: -30px;
    width: 90px; height: 90px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,220,140,.42), transparent 65%);
    pointer-events: none;
}
.home-ai-avatar {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
    background: #FFF8EA; color: var(--hx-red);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--hx-font-display); font-style: italic; font-weight: 500; font-size: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.home-ai-body  { flex: 1; min-width: 0; }
.home-ai-label { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; opacity: .8; font-weight: 600; font-family: var(--hx-font-body); }
.home-ai-msg   { font-family: var(--hx-font-display); font-size: 16px; line-height: 1.25; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-ai-cta-btn {
    flex-shrink: 0; height: 38px; padding: 0 16px; font-size: 12px;
    background: var(--hx-ochre); color: #29200E; border: none;
    border-radius: 999px; font-family: var(--hx-font-body); font-weight: 700;
    cursor: pointer; white-space: nowrap;
}
.home-ai-arrow {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,248,234,.18); color: #FFF8EA; cursor: pointer;
}
/* Compact weather strip */
.weather-compact {
    max-width: 1200px; margin: 0 16px 12px; padding: 8px 18px;
    display: flex; align-items: center; gap: 10px;
    background: var(--hx-card); border: 1px solid var(--hx-card-line);
    border-radius: 12px; font-size: .82em;
}
.weather-compact .wc-temp { font-family: var(--hx-font-display); font-size: 1.3em; color: var(--hx-red); font-weight: 500; }
.weather-compact .wc-desc { color: var(--hx-ink); font-weight: 500; }
.weather-compact .wc-hum  { color: var(--hx-ink-3); font-size: .78em; margin-left: auto; }

/* ── Home hero editorial ── */
.home-hero {
    padding: 32px 16px 20px;
    max-width: 1200px; margin: 0 auto;
}
.home-hero-editorial { max-width: 600px; }
.home-hero-kicker    { margin-bottom: 10px; color: var(--hx-red) !important; display: flex; align-items: center; gap: 6px; }
.home-hero-title     { font-size: 2.8em !important; margin-bottom: 14px; }
.home-hero-title em  { font-style: italic; font-weight: 400; color: var(--hx-red); }
.home-hero-sub       { font-family: var(--hx-font-display); font-style: italic; font-size: 1.1em; color: var(--hx-ink-2); line-height: 1.5; margin-bottom: 16px; }

/* ── Hero weather pill ── */
.hero-weather-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; margin-bottom: 20px;
    background: var(--hx-card); border: 1px solid var(--hx-card-line);
    border-radius: 999px;
    font-family: var(--hx-font-body); font-size: .82em;
    box-shadow: 0 2px 8px rgba(42,31,20,.06);
    max-width: 100%;
}
.hwp-icon { font-size: 1.2em; line-height: 1; flex-shrink: 0; }
.hwp-temp { font-family: var(--hx-font-display); font-size: 1.25em; font-weight: 600; color: var(--hx-red); line-height: 1; }
.hwp-sep  { color: var(--hx-ink-3); font-size: .9em; }
.hwp-desc { color: var(--hx-ink); font-weight: 500; }
.hwp-hum  { color: var(--hx-ink-3); font-size: .9em; }

@media (prefers-reduced-motion: reduce) {
    .hero-weather-pill { transition: none; }
}

@media (max-width: 480px) {
    .hero-weather-pill { font-size: .78em; padding: 5px 12px; gap: 5px; }
    .hwp-temp { font-size: 1.1em; }
}

.home-hero-stats     { display: flex; gap: 28px; padding-top: 20px; border-top: 1px solid var(--hx-line); margin-top: 24px; }
.home-stat           { display: flex; flex-direction: column; gap: 2px; }
.home-stat-value     { font-family: var(--hx-font-display); font-style: italic; font-size: 1.8em; color: var(--hx-red); line-height: 1; }
.home-stat-label     { font-family: var(--hx-font-body); font-size: 9px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--hx-ink-3); }

/* Right media column (desktop only) */
.home-hero-media { display: none; }
.home-hero-card  {
    position: relative; border-radius: 22px; overflow: hidden;
    background: var(--hx-paper-3); border: 1px solid var(--hx-card-line);
    height: 420px;
    transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s ease;
    will-change: transform;
}
.home-hero-card[role="button"] { cursor: pointer; }
@media (hover: hover) {
    .home-hero-card[role="button"]:hover {
        transform: translateY(-4px) scale(1.015);
        box-shadow: 0 18px 44px rgba(42,31,20,.18);
    }
    .home-hero-card[role="button"]:hover .home-hero-overlay-btn {
        transform: translateX(2px);
        background: var(--hx-ochre-2);
    }
}
.home-hero-card[role="button"]:active { transform: translateY(-2px) scale(.995); }
.home-hero-card[role="button"]:focus-visible {
    outline: 3px solid var(--hx-ochre);
    outline-offset: 3px;
}
.home-hero-overlay-btn { transition: transform .25s ease, background .25s ease; }
@media (prefers-reduced-motion: reduce) {
    .home-hero-card,
    .home-hero-card[role="button"]:hover,
    .home-hero-card[role="button"]:active,
    .home-hero-overlay-btn { transition: none; transform: none; }
}

/* ── Home : strip "Événement vedette" (discret, sous AI strip) ─────────── */
.home-event-feature { margin: 22px 0; }
.home-event-feature[hidden] { display: none; }
.home-event-feature-card {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border-radius: 18px;
    background: linear-gradient(135deg, rgba(242,199,90,.12), rgba(200,134,42,.05));
    border: 1px solid rgba(200,134,42,.30);
    color: var(--hx-ink); text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    cursor: pointer;
}
@media (hover: hover) {
    .home-event-feature-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 26px rgba(200,134,42,.18);
        border-color: rgba(200,134,42,.55);
    }
    .home-event-feature-card:hover .home-event-feature-arrow { transform: translateX(3px); }
}
.home-event-feature-card:focus-visible {
    outline: 2px solid var(--hx-ochre); outline-offset: 3px;
}
.home-event-feature-thumb {
    width: 64px; height: 64px; border-radius: 14px;
    background: linear-gradient(135deg, #7B3F8C, #4E1B6A);
    color: #FFF8EA; font-size: 1.6em;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; overflow: hidden;
}
.home-event-feature-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-event-feature-body { flex: 1; min-width: 0; }
.home-event-feature-kicker {
    font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--hx-ochre); margin-bottom: 4px;
    display: flex; align-items: center; gap: 4px;
}
.home-event-feature-title {
    font-family: var(--hx-font-display); font-size: 18px; font-weight: 600;
    color: var(--hx-ink); line-height: 1.25;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.home-event-feature-meta {
    font-size: .82em; color: var(--hx-ink-3); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.home-event-feature-arrow {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--hx-ochre); color: #29200E;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: transform .25s ease;
}
@media (prefers-reduced-motion: reduce) {
    .home-event-feature-card,
    .home-event-feature-arrow { transition: none; }
    .home-event-feature-card:hover { transform: none; }
}
@media (max-width: 480px) {
    .home-event-feature-title { font-size: 16px; }
    .home-event-feature-thumb { width: 56px; height: 56px; }
}
.home-hero-img-ph {
    width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    color: var(--hx-ink-3); font-size: .8em;
}
.home-hero-img-ph svg { opacity: .4; }
.home-hero-card-seal {
    position: absolute; top: 22px; right: 22px;
    width: 64px; height: 64px; font-size: 22px; transform: rotate(-12deg);
}
.home-hero-overlay {
    position: absolute; bottom: 22px; left: 22px; right: 22px;
    padding: 14px 16px;
    background: rgba(20,16,10,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-radius: 16px; color: #FFF8EA;
    display: flex; justify-content: space-between; align-items: center;
}
.home-hero-overlay-kicker { font-size: 9px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--hx-ochre-2); margin-bottom: 4px; }
.home-hero-overlay-title  { font-family: var(--hx-font-display); font-size: 18px; font-weight: 500; color: #FFF8EA; }
.home-hero-overlay-btn    {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
    background: var(--hx-ochre); color: #29200E;
    display: flex; align-items: center; justify-content: center;
}

/* ── Desktop header nav (integrated) ── */
.header-nav-desktop { display: none; }

/* ── N° section title ── */
.section-no-title {
    max-width: 1200px; margin: 28px auto 12px; padding: 0 16px;
}
.section-no-title .snt-eyebrow { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.section-no-title .snt-no   { font-family: var(--hx-font-display); font-style: italic; color: var(--hx-red); font-size: 14px; }
.section-no-title .snt-kicker { font-family: var(--hx-font-body); font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--hx-ink-2); }
.section-no-title h2         { font-family: var(--hx-font-display); font-size: 1.6em; font-weight: 500; color: var(--hx-ink); margin-top: 2px; }
.section-no-title h2 em      { font-style: italic; color: var(--hx-red); font-weight: 400; }

/* ── Desktop layout overrides ── */
@media (min-width: 769px) {
    /* Header: integrated nav */
    .header-nav-desktop {
        display: flex; align-items: center; gap: 6px;
    }
    .header-nav-desktop .app-tab {
        height: 36px; padding: 0 14px; border-radius: 999px;
        font-size: .88em; font-weight: 500;
        background: none; border: none;
        color: var(--hx-ink-2); cursor: pointer;
        transition: color .2s, background .2s;
        border-bottom: none;
        white-space: nowrap;
    }
    .header-nav-desktop .app-tab:hover { color: var(--hx-ink); background: var(--hx-paper-2); }
    .header-nav-desktop .app-tab.active { color: var(--hx-ink); font-weight: 600; background: none; }
    .header-nav-desktop .app-tab.active { border-bottom: 2px solid var(--hx-red); border-radius: 0; padding-bottom: 2px; }
    .header-search-inline { display: none; }
    /* Home hero: 2-column */
    .home-hero {
        display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px;
        align-items: center; padding: 40px 40px 24px;
    }
    .home-hero-editorial { max-width: none; }
    .home-hero-title { font-size: 3.8em !important; }
    .home-hero-media { display: block; }
    /* AI strip: aligné sur le hero (même max-width et padding) */
    .home-ai-strip { margin: 0 auto 20px; padding: 14px 40px; width: calc(100% - 80px); }
    .weather-compact { margin: 0 40px 16px; }
    /* Section titles + filtres : padding aligné sur le hero (0 40px) */
    .section-no-title { padding: 0 40px; }
    .section-header   { padding: 0 40px; }
    .map-filters      { padding: 0 40px; }
    .event-filters    { padding: 0 40px; }
    /* Search stays visible in hero on desktop (header pill just focuses it) */
    /* App nav hidden on desktop (replaced by header-nav-desktop) */
    .app-nav { display: none !important; }
    body { padding-top: calc(var(--header-h) + var(--safe-top)); }
}

@media (max-width: 768px) {
    .home-hero { padding: 20px 16px 16px; }
    .home-hero-title { font-size: 2.2em !important; }
    .home-hero-stats { gap: 18px; }
    .home-ai-strip .home-ai-cta-btn { display: none; }
    .home-ai-strip .home-ai-msg { font-size: 14px; }
    .header-search-inline { display: none; }
}

*, *::before, *::after {
    margin: 0; padding: 0; box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
:focus-visible {
    outline: 2px solid var(--hx-red);
    outline-offset: 2px;
    border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }
body {
    font-family: var(--hx-font-body);
    background: var(--hx-paper);
    color: var(--hx-ink);
    /* desktop: header + desktop-nav */
    padding-top: calc(var(--header-h) + var(--safe-top) + var(--nav-desktop));
    overscroll-behavior-y: none;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Vues principales — flex:1 pousse le footer en bas */
#view-home, #view-map, #view-events, #view-favorites { flex: 1; min-height: 0; }

/* ============================================================
   HEADER
============================================================ */
.app-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: calc(var(--header-h) + var(--safe-top));
    padding-top: var(--safe-top);
    background: var(--hx-paper);
    border-bottom: 1px solid var(--hx-line);
    box-shadow: 0 2px 16px rgba(42,31,20,.06);
}
.header-inner {
    max-width: 1200px; margin: 0 auto;
    height: var(--header-h); padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.header-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.header-logo-icon { font-size: 1.6em; line-height: 1; }
.header-logo h1 {
    color: var(--hx-ink);
    font-family: var(--hx-font-display);
    font-size: 1.2em; font-weight: 600;
    letter-spacing: -.3px; font-style: italic;
}
.header-logo .logo-sub {
    color: var(--hx-ink-2); font-size: .72em; font-weight: 500;
    display: block; line-height: 1.1; letter-spacing: .2px;
}
.header-auth { display: flex; align-items: center; gap: 8px; }

/* ── Sélecteur de langue ── */
.lang-switcher {
    display: flex; align-items: center; gap: 2px;
    background: var(--hx-paper-2); border-radius: 10px; padding: 3px;
    border: 1px solid var(--hx-line);
}
.lang-btn {
    background: transparent; border: none;
    color: var(--hx-ink-2);
    border-radius: 8px; padding: 5px 10px;
    font-size: .82rem; font-weight: 700; letter-spacing: .3px;
    cursor: pointer; transition: all .18s; line-height: 1;
    display: flex; align-items: center; gap: 4px;
}
.lang-text { font-size: .68rem; font-weight: 700; letter-spacing: .5px; }
.lang-btn.active {
    background: var(--hx-ink); color: var(--hx-paper);
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.lang-btn:hover:not(.active) { color: var(--hx-ink); background: var(--hx-paper-2); }
.btn-login {
    background: var(--hx-paper-2); color: var(--hx-ink);
    padding: 8px 16px; border-radius: 24px;
    border: 1px solid var(--hx-line);
    font-weight: 600; font-size: .85em; text-decoration: none;
    display: inline-flex; align-items: center; gap: 5px;
    transition: background .2s; cursor: pointer; white-space: nowrap;
}
.btn-login:hover, .btn-login:active { background: var(--hx-paper-3); }
#user-name { display: flex; align-items: center; }
.user-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--hx-red); color: #fff;
    font-size: .85em; font-weight: 600; letter-spacing: 0;
    flex-shrink: 0; cursor: default;
}

/* ============================================================
   APP NAV — UNIFIED (desktop top / mobile bottom)
============================================================ */
.app-nav {
    position: fixed; left: 0; right: 0; z-index: 950;
    top: calc(var(--header-h) + var(--safe-top));
    height: var(--nav-desktop);
    background: var(--hx-paper);
    border-bottom: 1px solid var(--hx-line);
    box-shadow: 0 2px 8px rgba(42,31,20,.04);
}
.app-nav-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; height: 100%;
}
.app-tab {
    flex: 1; background: none; border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    color: var(--hx-ink-3);
    font-family: var(--hx-font-body);
    font-size: .88em; font-weight: 600;
    transition: color .2s, border-color .2s, background .2s;
    padding: 0 4px; position: relative; white-space: nowrap;
}
.app-tab:hover { color: var(--hx-red); background: rgba(184,58,42,.04); }
.app-tab.active { color: var(--hx-red); border-bottom-color: var(--hx-red); }
.app-tab-icon { line-height: 1; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.app-tab-label { font-size: .88em; }

/* AI tab — gradient bubble icon on desktop */
.app-tab.ai-tab .app-tab-icon {
    background: linear-gradient(135deg, var(--hx-red), var(--hx-ochre));
    border-radius: 50%;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
}
.app-tab.ai-tab .app-tab-icon svg { stroke: white; }
.app-tab.ai-tab.active .app-tab-icon,
.app-tab.ai-tab:hover .app-tab-icon {
    box-shadow: 0 3px 12px rgba(184,58,42,.45);
}

/* Fav badge */
.tab-badge {
    display: none; position: absolute;
    top: 6px; right: calc(50% - 18px);
    background: var(--hx-red); color: var(--hx-paper);
    font-size: .52em; font-weight: 800;
    min-width: 16px; height: 16px; border-radius: 8px;
    align-items: center; justify-content: center; padding: 0 3px; line-height: 1;
}

/* Active dot (mobile pill nav) */
.hx-tab-dot { display: none; }

/* ============================================================
   VUES
============================================================ */
#view-home, #view-map, #view-events, #view-favorites { display: block; }
#view-map, #view-events, #view-favorites { display: none; }

/* ============================================================
   HERO GREETING (ancien hero supprimé — .hero, .hero-content, .hero-badge,
   .hero-title, .hero-title em, .hero-subtitle remplacés par .home-hero-editorial)
============================================================ */
.hero-greeting {
    color: var(--hx-red);
    font-size: 13px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
    font-family: var(--hx-font-body); font-style: normal;
}
.search-wrapper { max-width: 560px; margin: 0 auto; position: relative; }
.search-input {
    width: 100%; font-size: 16px; padding: 15px 52px 15px 20px;
    border: 1px solid var(--hx-line); border-radius: 50px; outline: none;
    box-shadow: 0 4px 16px rgba(42,31,20,.08); color: var(--hx-ink);
    background: var(--hx-card); transition: box-shadow .2s, border-color .2s;
    appearance: none; -webkit-appearance: none;
    font-family: var(--hx-font-body);
}
.search-input:focus { box-shadow: 0 6px 22px rgba(42,31,20,.12); border-color: var(--hx-ochre); }
.search-input::placeholder { color: var(--hx-ink-3); }
.search-clear {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    background: none; border: none; font-size: 1.1em; cursor: pointer;
    color: var(--hx-ink-3); padding: 4px; display: none;
}
.search-icon { position: absolute; right: 17px; top: 50%; transform: translateY(-50%); font-size: 1.15em; pointer-events: none; }

/* ============================================================
   MÉTÉO + SUGGESTION IA
   (ancien widget .weather-card, .weather-inner, .weather-left, .weather-icon,
   .weather-temp, .weather-details, .weather-description, .weather-humidity
   supprimés — remplacés par .hero-weather-pill / .hwp-*)
   (ancien .ai-suggestion-block, .ai-suggestion-label, .ai-refresh-btn
   supprimés — remplacés par .home-ai-strip / .home-ai-label / .home-ai-arrow)
============================================================ */
.ai-suggestion-text { line-height: 1.35; color: #FFF8EA; font-family: var(--hx-font-display); font-style: italic; font-size: 1em; }
.ai-suggestion-text.loading {
    animation: pulse 1.5s ease-in-out infinite; color: rgba(255,248,234,.6);
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* Bouton itinéraire */
.itin-trigger {
    background: none; border: none; cursor: pointer;
    flex-shrink: 0; padding: 0;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.itin-trigger-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--hx-ochre), var(--hx-red));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.3em; box-shadow: 0 4px 16px rgba(184,58,42,.35);
    transition: transform .2s, box-shadow .2s;
}
.itin-trigger:hover .itin-trigger-icon  { transform: scale(1.07); box-shadow: 0 6px 22px rgba(184,58,42,.5); }
.itin-trigger:active .itin-trigger-icon { transform: scale(.92); }
.itin-trigger-label { font-size: .62em; font-weight: 700; color: var(--hx-ink-2); text-align: center; }

/* ============================================================
   CATÉGORIES
   (.section-label supprimé — remplacé par .section-no-title)
============================================================ */
.categories {
    max-width: 1200px; margin: 0 auto; padding: 4px 16px 8px;
    display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.categories::-webkit-scrollbar { display: none; }
.category-btn {
    background: var(--hx-card); border: 1px solid var(--hx-line); min-height: 42px; padding: 0 18px;
    border-radius: 50px; cursor: pointer;
    transition: border-color .2s, background .2s, box-shadow .2s, transform .15s;
    box-shadow: 0 2px 8px rgba(42,31,20,.06);
    display: flex; align-items: center; gap: 7px;
    white-space: nowrap; flex-shrink: 0; user-select: none;
}
.category-btn:active { transform: scale(.95); }
.category-btn .icon  { font-size: 1.1em; }
.category-btn .label { font-size: .88em; font-weight: 600; color: var(--hx-ink); font-family: var(--hx-font-body); }
.category-btn.active-cat {
    background: var(--hx-ink); border-color: var(--hx-ink);
    box-shadow: 0 4px 18px rgba(42,31,20,.2);
}
.category-btn.active-cat .label { color: var(--hx-paper); }
@media (hover: hover) { .category-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(42,31,20,.1); } }

/* ============================================================
   SECTION HEADER
============================================================ */
.section-header {
    max-width: 1200px; margin: 24px auto 12px; padding: 0 16px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
/* Premier section-header des vues secondaires (carte, events, favoris) :
   margin-top aligné sur l'espace visuel des autres vues pour éviter le layout shift */
#view-map    > .section-header:first-child,
#view-events > .section-header:first-child,
#view-favorites > .section-header:first-child {
    margin-top: 32px;
}
.section-header h2 {
    font-size: 1.35em; font-weight: 500; color: var(--hx-ink);
    font-family: var(--hx-font-display);
}
.results-count {
    display: inline-flex; align-items: center;
    font-size: .78em; font-weight: 600; color: var(--hx-ink-3);
    background: var(--hx-paper-2); padding: 4px 12px; border-radius: 20px;
    border: 1px solid var(--hx-line);
}

/* ============================================================
   SKELETON
============================================================ */
@keyframes shimmer {
    0%   { background-position: -800px 0; }
    100% { background-position:  800px 0; }
}
.skeleton-bg {
    background: linear-gradient(90deg, var(--hx-paper-2) 25%, var(--hx-paper-3) 50%, var(--hx-paper-2) 75%);
    background-size: 800px 100%; animation: shimmer 1.4s infinite linear; border-radius: 8px;
}
.skeleton-card { background: var(--hx-card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--hx-card-line); }
.skeleton-img  { height: 180px; border-radius: 0; }
.skeleton-body { padding: 16px; }
.skeleton-line { height: 12px; margin-bottom: 10px; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w50 { width: 50%; }
.skeleton-line.w65 { width: 65%; height: 9px; }

/* ============================================================
   GRILLE LIEUX
============================================================ */
.places-grid {
    max-width: 1200px; margin: 0 auto 40px; padding: 0 16px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 20px;
}
.place-card {
    background: var(--hx-card); border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--hx-card-line);
    box-shadow: 0 4px 16px rgba(42,31,20,.07);
    transition: transform .25s, box-shadow .25s;
    cursor: pointer; position: relative;
    display: flex; flex-direction: column;
}
.place-card:active { transform: scale(.98); }
@media (hover: hover) { .place-card:hover { transform: translateY(-6px); box-shadow: 0 12px 36px rgba(42,31,20,.14); } }
.place-image {
    width: 100%; height: 220px;
    background: linear-gradient(135deg, var(--hx-paper-2), var(--hx-paper-3));
    display: flex; align-items: center; justify-content: center; font-size: 3.5em;
    overflow: hidden; position: relative;
}
.place-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-badge {
    position: absolute; top: 10px; left: 10px;
    background: rgba(42,31,20,.60); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    color: #FFF8EA; font-size: .64em; font-weight: 700; padding: 4px 10px;
    border-radius: 20px; text-transform: uppercase; letter-spacing: .5px;
    font-family: var(--hx-font-body);
}
.open-badge {
    position: absolute; bottom: 5px; left: 6px;
    font-size: .36em; font-weight: 700; padding: 1px 4px;
    border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; gap: 2px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    letter-spacing: .2px; text-transform: uppercase; line-height: 1.4;
}
.open-badge::before { content: none; }
.open-badge.open   { background: rgba(0,0,0,.55); color: #4ade80; border: 1px solid rgba(74,222,128,.35); }
.open-badge.closed { background: rgba(0,0,0,.55); color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.15); }
.fav-btn {
    position: absolute; top: 10px; right: 10px;
    background: rgba(42,31,20,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    border: none; border-radius: 50%;
    width: 44px; height: 44px; cursor: pointer; font-size: 1em;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s, transform .15s; z-index: 2;
}
.fav-btn:active  { transform: scale(.85); }
.fav-btn.active  { background: rgba(184,58,42,.85); }
.place-content  { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.place-title-row {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 8px; margin-bottom: 10px;
}
.place-name {
    font-size: 1.1em; font-weight: 500; color: var(--hx-ink);
    font-family: var(--hx-font-display); line-height: 1.3;
}
.place-price {
    flex-shrink: 0; margin-top: 2px;
    font-size: .76em; font-weight: 600; color: var(--hx-red);
    font-family: var(--hx-font-body);
    background: rgba(184,58,42,.08); padding: 4px 10px; border-radius: 20px;
}
.place-description {
    flex: 1; color: var(--hx-ink-2); font-size: .85em; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.entry-badge {
    display: inline-flex; align-items: center;
    font-size: .72em; font-weight: 600;
    padding: 3px 9px; border-radius: 20px;
    white-space: nowrap; flex-shrink: 0;
}
.entry-free { background: rgba(107,127,74,.12); color: #4a6130; }
.entry-paid { background: rgba(196,107,61,.12); color: #8B4513; }

/* ============================================================
   ÉTAT VIDE
============================================================ */
.empty-state {
    grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--hx-ink-3);
}
.empty-state .empty-icon { font-size: 3em; margin-bottom: 14px; }
.empty-state h3 { font-size: 1.05em; font-weight: 600; color: var(--hx-ink); margin-bottom: 6px; font-family: var(--hx-font-display); }
.empty-state p  { font-size: .86em; line-height: 1.55; }
.empty-state .cta-btn {
    display: inline-flex; margin-top: 18px; background: var(--hx-red); color: #FFF8EA;
    padding: 12px 24px; border-radius: 24px; font-weight: 700;
    text-decoration: none; border: none; cursor: pointer; font-size: .9em;
}

/* ============================================================
   VUE CARTE LEAFLET
============================================================ */
.map-filters {
    max-width: 1200px; margin: 0 auto 10px; padding: 0 16px;
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.map-filters::-webkit-scrollbar { display: none; }
.map-filter-btn {
    background: var(--hx-card); border: 1px solid var(--hx-line); min-height: 36px; padding: 0 14px;
    border-radius: 50px; cursor: pointer; font-size: .8em; font-weight: 600;
    color: var(--hx-ink); white-space: nowrap; flex-shrink: 0; transition: all .18s;
    font-family: var(--hx-font-body);
}
.map-filter-btn.active { background: var(--hx-ink); border-color: var(--hx-ink); color: var(--hx-paper); }
@media (hover: hover) { .map-filter-btn:hover:not(.active) { border-color: var(--hx-red); color: var(--hx-red); } }
.map-locate-btn {
    background: var(--hx-card); border: 1px solid var(--hx-river); border-radius: 50px;
    color: var(--hx-river); font-size: .8em; font-weight: 600;
    padding: 0 14px; min-height: 36px; white-space: nowrap;
    cursor: pointer; flex-shrink: 0; transition: all .18s;
}
.map-locate-btn.active { background: var(--hx-river); color: white; }

/* ── Point bleu pulsant (position utilisateur) ── */
.user-location-dot {
    width: 18px; height: 18px;
    background: #2196F3; border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(33,150,243,.55);
    position: relative;
}
.user-location-pulse {
    position: absolute; inset: -8px;
    border-radius: 50%;
    background: rgba(33,150,243,.25);
    animation: user-pulse 2s ease-out infinite;
}
@keyframes user-pulse {
    0%   { transform: scale(1); opacity: .8; }
    100% { transform: scale(2.5); opacity: 0; }
}
.user-location-tip {
    background: #1565C0 !important; color: white !important;
    border: none !important; border-radius: 8px !important;
    font-size: .78em !important; font-weight: 700 !important;
    padding: 4px 10px !important; box-shadow: 0 2px 8px rgba(0,0,0,.2) !important;
}
.user-location-tip::before { border-top-color: #1565C0 !important; }

#map {
    height: calc(100vh - var(--header-h) - var(--safe-top) - var(--nav-desktop) - 120px);
    min-height: 320px; max-height: 620px;
    margin: 0 16px 24px; border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
}

/* ============================================================
   VUE ÉVÉNEMENTS
============================================================ */
.event-filters {
    max-width: 1200px; margin: 0 auto 10px; padding: 0 16px;
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.event-filters::-webkit-scrollbar { display: none; }
.event-filter-btn {
    background: var(--hx-card); border: 1px solid var(--hx-line); min-height: 36px; padding: 0 14px;
    border-radius: 50px; cursor: pointer; font-size: .8em; font-weight: 600;
    color: var(--hx-ink); white-space: nowrap; flex-shrink: 0; transition: all .18s;
    font-family: var(--hx-font-body);
}
.event-filter-btn.active { background: var(--hx-ink); border-color: var(--hx-ink); color: var(--hx-paper); }

.events-grid {
    max-width: 1200px; margin: 0 auto 40px; padding: 0 16px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 16px;
}
.event-card {
    background: var(--hx-card); border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--hx-card-line);
    box-shadow: 0 4px 16px rgba(42,31,20,.07);
    transition: transform .25s, box-shadow .25s; cursor: pointer;
}
@media (hover: hover) { .event-card:hover { transform: translateY(-5px); box-shadow: 0 12px 36px rgba(42,31,20,.14); } }
.event-card:active { transform: scale(.98); }
.event-card.is-featured {
    border-color: rgba(200,134,42,.55);
    box-shadow: 0 6px 22px rgba(200,134,42,.18);
}
.event-card.is-featured:hover { box-shadow: 0 14px 38px rgba(200,134,42,.26); }
.event-featured-badge {
    position: absolute; top: 10px; right: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(242,199,90,.95);
    color: #29200E; font-size: 1.05em; line-height: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    z-index: 2;
    /* defeat parent's huge font-size: 4em */
}
.event-header-img {
    height: 150px; display: flex; align-items: center; justify-content: center;
    font-size: 4em; position: relative;
}
.event-cat-festival    { background: linear-gradient(135deg, #7B3F8C, #4E1B6A); }
.event-cat-marche      { background: linear-gradient(135deg, var(--hx-terra), #9B4020); }
.event-cat-culturel    { background: linear-gradient(135deg, var(--hx-river), #2C4A5C); }
.event-cat-gastronomie { background: linear-gradient(135deg, var(--hx-red), var(--hx-ochre)); }
.event-cat-sport       { background: linear-gradient(135deg, var(--hx-jade), #3D5C2A); }
.event-cat-default     { background: linear-gradient(135deg, var(--hx-ink), var(--hx-ink)); }

.event-body { padding: 18px 20px 20px; }
.event-cat-label {
    display: inline-block; font-size: .62em; font-weight: 700;
    padding: 3px 9px; border-radius: 20px; text-transform: uppercase;
    letter-spacing: .5px; margin-bottom: 8px; color: #FFF8EA;
    font-family: var(--hx-font-body);
}
.event-cat-label.festival    { background: #7B3F8C; }
.event-cat-label.marche      { background: var(--hx-terra); }
.event-cat-label.culturel    { background: var(--hx-river); }
.event-cat-label.gastronomie { background: var(--hx-red); }
.event-cat-label.sport       { background: var(--hx-jade); }
.event-cat-label.default     { background: var(--hx-ink); }
.event-title { font-size: 1.05em; font-weight: 500; color: var(--hx-ink); margin-bottom: 6px; line-height: 1.3; font-family: var(--hx-font-display); }
.event-desc  {
    color: var(--hx-ink-2); font-size: .83em; line-height: 1.55; margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.event-footer {
    display: flex; flex-direction: column; gap: 6px;
    padding-top: 10px; border-top: 1px solid var(--hx-line);
}
.ef-chips-row { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.ef-chips-info { margin-top: 1px; }
.ef-chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--hx-paper-2); border-radius: 12px;
    padding: 4px 9px; font-size: .72em; color: var(--hx-ink-2); font-weight: 500;
}
.ef-chip-price { background: rgba(200,134,42,.12); color: var(--hx-ochre); font-weight: 700; }
.ef-chips-row .hw-day { font-size: .72em; }
.ef-chips-row .recurring-badge { font-size: .74em; padding: 3px 10px; }

/* ============================================================
   MODAL DÉTAIL LIEU  — Redesign v2
============================================================ */
.detail-modal {
    display: none; position: fixed; inset: 0; z-index: 2000;
    background: rgba(42,31,20,.68);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    align-items: flex-end; justify-content: center;
}
.detail-modal.show { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.detail-sheet {
    background: var(--hx-paper); width: 100%; max-width: 600px;
    max-height: 93vh; border-radius: 26px 26px 0 0;
    overflow: hidden; display: flex; flex-direction: column;
    position: relative;
    animation: slideUp .32s cubic-bezier(.25,.8,.25,1);
    box-shadow: 0 -12px 60px rgba(42,31,20,.28);
}
@keyframes slideUp { from{transform:translateY(40px);opacity:0} to{transform:none;opacity:1} }
.detail-handle {
    width: 44px; height: 5px; background: rgba(255,255,255,.72);
    border-radius: 3px; margin: 14px auto 0; flex-shrink: 0;
    box-shadow: 0 1px 6px rgba(0,0,0,.3);
}
.detail-close {
    position: absolute; top: 12px; right: 12px; z-index: 20;
    background: rgba(42,31,20,.4);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,248,234,.18); border-radius: 50%;
    width: 44px; height: 44px; color: #FFF8EA; font-size: .78em;
    font-weight: 800; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, transform .15s;
}
.detail-close:hover  { background: rgba(42,31,20,.62); }
.detail-close:active { transform: scale(.88); }

/* ── Hero image / carrousel ── */
.detail-hero {
    position: relative; flex-shrink: 0; height: 260px;
    background: linear-gradient(135deg, var(--hx-red), var(--hx-ochre));
    overflow: hidden; cursor: grab;
}
.detail-hero:active { cursor: grabbing; }

.detail-carousel {
    position: absolute; inset: 0; display: flex;
    transition: transform .35s cubic-bezier(.25,.8,.25,1);
    will-change: transform; user-select: none; -webkit-user-select: none;
}
.detail-slide {
    flex: 0 0 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--hx-red), var(--hx-ochre)); overflow: hidden;
}
.detail-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Flèches carrousel */
.carousel-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
    background: rgba(0,0,0,.44); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.15); border-radius: 50%;
    width: 44px; height: 44px; color: white; font-size: 1.1em; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s, opacity .2s; pointer-events: auto;
}
.carousel-arrow:hover { background: rgba(0,0,0,.72); }
.carousel-arrow.hidden { opacity: 0; pointer-events: none; }
.carousel-arrow-prev { left: 12px; }
.carousel-arrow-next { right: 12px; }

/* Dots de navigation */
.detail-dots {
    position: absolute; bottom: 82px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 3; pointer-events: auto;
}
.detail-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,.5); transition: all .25s; cursor: pointer;
}
.detail-dot.active { background: white; width: 20px; border-radius: 3px; }

/* Overlay dégradé sur le hero */
.detail-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom,
        rgba(0,0,0,.30) 0%,
        rgba(0,0,0,.02) 28%,
        rgba(0,0,0,.28) 52%,
        rgba(0,0,0,.72) 75%,
        rgba(0,0,0,.92) 100%);
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 0 22px 28px;
}
.detail-hero-content { display: flex; flex-direction: column; gap: 9px; }
.detail-hero-badges  { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }

/* Badge catégorie dans l'overlay hero (position statique, taille réduite) */
.cat-badge--hero {
    position: static;
    font-size: .76em;
    padding: 3px 10px;
}

/* Override badges inline dans le hero */
.detail-hero-badges .cat-badge {
    background: rgba(255,255,255,.2) !important;
    color: white !important;
    border: 1px solid rgba(255,255,255,.35) !important;
    backdrop-filter: blur(8px);
    font-weight: 800;
}

.detail-hero-name {
    font-size: 1.5em; font-weight: 900; color: white; line-height: 1.2;
    text-shadow: 0 2px 14px rgba(0,0,0,.5); margin: 0; letter-spacing: -.3px;
}
.detail-hero-meta { display: flex; gap: 10px; align-items: center; }

.detail-price {
    font-size: .8em; font-weight: 700; color: rgba(255,255,255,.95);
    background: rgba(255,255,255,.2); padding: 3px 11px; border-radius: 20px;
    border: 1px solid rgba(255,255,255,.3);
}

/* Badge ouvert / fermé */
.detail-open-inline {
    font-size: .7em; font-weight: 700;
    padding: 4px 10px 4px 8px; border-radius: 20px;
    display: inline-flex; align-items: center; gap: 5px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    letter-spacing: .1px;
}
.detail-open-inline::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.detail-open-inline.is-open {
    background: rgba(74,222,128,.2); color: #bbf7d0;
    border: 1px solid rgba(74,222,128,.45);
}
.detail-open-inline.is-open::before   { background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.detail-open-inline.is-closed {
    background: rgba(248,113,113,.18); color: #fecaca;
    border: 1px solid rgba(248,113,113,.35);
}
.detail-open-inline.is-closed::before { background: #f87171; box-shadow: 0 0 5px #f87171; }

/* ── Corps scrollable ── */
.detail-body {
    flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 26px 24px calc(24px + env(safe-area-inset-bottom, 0px));
    scrollbar-width: thin; display: flex; flex-direction: column;
    background: var(--hx-paper);
}
.detail-desc {
    color: var(--hx-ink-2); font-family: var(--hx-font-display); font-style: italic;
    font-size: 1em; line-height: 1.65;
    margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--hx-line);
}
.detail-section-label {
    font-size: .67em; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--hx-ink-3); margin: 0 0 10px; min-height: 0;
}
.detail-info { display: flex; flex-direction: column; gap: 4px; margin-bottom: 28px; }
.dii {
    display: flex; align-items: center; gap: 14px;
    font-size: .9em; color: var(--hx-ink);
    padding: 11px 12px; border-radius: 12px; min-height: 52px;
    transition: background .15s;
}
.dii:active { background: var(--hx-paper-2); }
.dii-icon {
    flex-shrink: 0; width: 36px; height: 36px;
    background: var(--hx-paper-2); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1em; text-align: center;
}
.dii span { line-height: 1.45; }
.dii a { color: var(--hx-red); text-decoration: none; font-weight: 600; }

/* ── Widget horaires ── */
.dii-hours { align-items: flex-start; }
.hours-widget { display: flex; flex-direction: column; gap: 6px; }
.hw-days { display: flex; gap: 4px; flex-wrap: wrap; }
.hw-day {
    font-size: .7em; font-weight: 700; letter-spacing: .03em;
    padding: 4px 7px; border-radius: 7px; line-height: 1;
}
.hw-day.open   { background: rgba(107,127,74,.12); color: #4a6130; }
.hw-day.closed { background: var(--hx-paper-2); color: var(--hx-ink-3); }
.hw-day.today.open {
    background: var(--hx-red); color: #FFF8EA;
    box-shadow: 0 2px 8px rgba(184,58,42,.35);
}
.hw-day.today.closed { background: var(--hx-paper-2); color: var(--hx-ink-3); outline: 1.5px solid var(--hx-line); }
.hw-time { font-size: .83em; color: var(--hx-ink-3); padding-left: 2px; font-weight: 500; }
.recurring-badge {
    display: inline-block;
    background: rgba(107,127,74,.12); color: #4a6130;
    border-radius: 20px; padding: 4px 12px;
    font-size: .82em; font-weight: 600;
}
.hw-compact { flex-direction: column; gap: 4px; }
.hw-compact .hw-time { font-size: .78em; }
.hw-day.hw-day-sm { font-size: .6em; padding: 3px 5px; border-radius: 5px; }
.event-footer-recur { align-items: flex-start !important; gap: 4px; }
.event-footer .hw-day { font-size: .78em; }

/* ── Boutons d'action ── */
.detail-actions {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    margin-top: auto; padding-top: 20px;
}
.detail-fav-btn, .detail-map-btn, .detail-ai-btn {
    height: 54px; padding: 0 14px; border-radius: 14px;
    font-size: .9em; font-weight: 700; cursor: pointer; border: none;
    text-align: center; text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    gap: 7px; transition: transform .12s, box-shadow .2s, opacity .15s;
    white-space: nowrap; letter-spacing: .1px;
    font-family: var(--hx-font-body);
}
.detail-fav-btn {
    background: rgba(184,58,42,.08); color: var(--hx-red);
    border: 1px solid rgba(184,58,42,.22);
}
.detail-fav-btn.is-fav {
    background: var(--hx-red); color: #FFF8EA;
    border-color: var(--hx-red);
    box-shadow: 0 4px 18px rgba(184,58,42,.38);
}
.detail-map-btn {
    background: var(--hx-ink); color: var(--hx-paper);
    box-shadow: 0 3px 14px rgba(42,31,20,.22);
}
.detail-ai-btn {
    background: linear-gradient(135deg, var(--hx-red), var(--hx-ochre));
    color: #FFF8EA; grid-column: 1 / -1;
    box-shadow: 0 4px 20px rgba(184,58,42,.28);
}
.detail-ticket-btn {
    height: 54px; padding: 0 14px; border-radius: 14px;
    font-size: .9em; font-weight: 700; cursor: pointer; border: none;
    text-align: center; text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    gap: 7px; transition: transform .12s, box-shadow .2s, opacity .15s;
    white-space: nowrap; letter-spacing: .1px;
    background: rgba(107,127,74,.1); color: var(--hx-jade);
    border: 1px solid rgba(107,127,74,.22);
}
.detail-ticket-btn.detail-ticket-free {
    background: rgba(107,127,74,.08); color: var(--hx-jade);
    cursor: default; pointer-events: none; opacity: .85;
}
.detail-fav-btn:active, .detail-map-btn:active, .detail-ai-btn:active { transform: scale(.95); opacity: .88; }
@media (hover: hover) {
    .detail-ticket-btn:not(.detail-ticket-free):hover {
        background: rgba(107,127,74,.18);
        box-shadow: 0 4px 16px rgba(107,127,74,.22);
    }
}
.detail-ticket-btn:active { transform: scale(.95); opacity: .88; }
@media (hover: hover) {
    .detail-fav-btn:hover:not(.is-fav) { background: rgba(184,58,42,.14); }
    .detail-map-btn:hover { background: var(--hx-ink); }
    .detail-ai-btn:hover  { box-shadow: 0 6px 28px rgba(184,58,42,.46); }
    .dii:hover { background: var(--hx-paper-2); }
    .dii a:hover { text-decoration: underline; }
}

/* ============================================================
   MODAL DÉTAIL ÉVÉNEMENT
============================================================ */
/* Hero : grande icône centrée (quand pas d'image) */
.event-detail-icon {
    position: absolute; inset: 0; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    font-size: 5.5em;
}
#event-detail-media {
    position: absolute; inset: 0; z-index: 1;
}
#event-detail-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Badge date dans l'overlay */
.event-date-inline {
    font-size: .7em; font-weight: 600; padding: 2px 9px; border-radius: 20px;
    background: rgba(0,0,0,.35); color: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(4px);
}

/* ============================================================
   MODAL ITINÉRAIRE
============================================================ */
.itinerary-modal {
    display: none; position: fixed; inset: 0; z-index: 2000;
    background: rgba(42,31,20,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    align-items: flex-end; justify-content: center;
}
.itinerary-modal.show { display: flex; animation: fadeIn .2s ease; }
.itin-sheet {
    background: var(--hx-paper); width: 100%; max-width: 600px;
    max-height: 88vh; border-radius: 22px 22px 0 0;
    display: flex; flex-direction: column;
    animation: slideUp .3s cubic-bezier(.34,1.56,.64,1);
}
.itin-header {
    background: linear-gradient(135deg, var(--hx-red), var(--hx-red-2));
    color: #FFF8EA; padding: 18px 20px 16px; border-radius: 22px 22px 0 0;
    display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}
.itin-header h3 { font-size: 1.1em; font-weight: 600; font-family: var(--hx-font-display); font-style: italic; }
.itin-header p  { font-size: .76em; opacity: .85; margin-top: 3px; }
.itin-close-btn {
    background: rgba(255,248,234,.22); border: none; color: #FFF8EA;
    width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
    font-size: .9em; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
#itinerary-content {
    flex: 1; overflow-y: auto; padding: 20px; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.itin-option-h {
    font-size: 1em; font-weight: 600; color: var(--hx-red);
    font-family: var(--hx-font-display);
    margin: 24px 0 10px; padding: 9px 12px;
    background: rgba(184,58,42,.06); border-radius: 10px;
    border-left: 2px solid var(--hx-red);
}
.itin-option-h:first-child { margin-top: 0; }
.itin-h {
    font-size: .95em; font-weight: 600; color: var(--hx-ink);
    font-family: var(--hx-font-display);
    margin: 14px 0 6px; padding-bottom: 5px;
    border-bottom: 1px solid var(--hx-line);
}
.itin-h:first-child { margin-top: 0; }
#itinerary-content p { font-size: .9em; line-height: 1.65; color: var(--hx-ink-2); margin-bottom: 5px; }
.itin-loading {
    text-align: center; padding: 40px 20px; font-size: .95em; color: var(--hx-ink-3);
}
.itin-dots { display: inline-flex; gap: 5px; vertical-align: middle; }
.itin-dots span {
    width: 8px; height: 8px; border-radius: 50%; background: var(--hx-ochre);
    animation: bounceDot .9s ease-in-out infinite;
}
.itin-dots span:nth-child(2) { animation-delay: .15s; }
.itin-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bounceDot { 0%,80%,100%{transform:scale(.6)} 40%{transform:scale(1)} }

/* ============================================================
   CHAT FAB (desktop)
============================================================ */
.chat-fab {
    position: fixed; bottom: 28px; right: 28px;
    background: linear-gradient(135deg, var(--hx-red), var(--hx-ochre));
    border: none; border-radius: 50px; padding: 14px 22px;
    box-shadow: 0 6px 28px rgba(184,58,42,.45);
    cursor: pointer; color: #FFF8EA; font-size: .95em; font-weight: 700;
    display: flex; align-items: center; gap: 10px;
    transition: transform .25s, box-shadow .25s; z-index: 900;
    font-family: var(--hx-font-body);
}
@media (hover: hover) { .chat-fab:hover { transform: translateY(-3px); box-shadow: 0 10px 36px rgba(184,58,42,.6); } }

/* ============================================================
   CHAT MODAL
============================================================ */
.chat-modal {
    display: none; position: fixed;
    bottom: calc(90px); right: 28px;
    width: 375px; height: 540px;
    background: var(--hx-paper); border-radius: 22px;
    border: 1px solid var(--hx-line);
    box-shadow: 0 20px 70px rgba(42,31,20,.18);
    flex-direction: column; z-index: 999; overflow: hidden;
}
.chat-modal.open { display: flex; animation: popUp .28s cubic-bezier(.34,1.56,.64,1); }
@keyframes popUp { from{opacity:0;transform:translateY(14px) scale(.97)} to{opacity:1;transform:none} }
.chat-header {
    background: linear-gradient(135deg, var(--hx-red), var(--hx-red-2));
    color: #FFF8EA; padding: 14px 16px;
    display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.chat-header-left { display: flex; align-items: center; gap: 11px; }
.chat-avatar {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--hx-red), var(--hx-ochre));
    border: 2px solid rgba(255,248,234,.35);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-family: var(--hx-font-display); font-style: italic; font-size: 1.3em;
    color: #FFF8EA; flex-shrink: 0;
}
.chat-title    { font-size: .92em; font-weight: 600; font-family: var(--hx-font-display); font-style: italic; }
.chat-subtitle { font-size: .7em; opacity: .8; margin-top: 2px; font-family: var(--hx-font-body); }
.chat-close-btn {
    background: rgba(255,248,234,.2); border: none; color: #FFF8EA;
    min-width: 44px; min-height: 44px; border-radius: 50%; cursor: pointer;
    font-size: 1em; display: flex; align-items: center; justify-content: center;
}
.chat-messages {
    flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 14px 13px 8px; display: flex; flex-direction: column; gap: 8px;
    scrollbar-width: thin; scrollbar-color: var(--hx-line) transparent;
    background: var(--hx-paper);
}
.chat-message {
    padding: 10px 14px; border-radius: 18px; max-width: 85%;
    font-size: 15px; line-height: 1.55; word-wrap: break-word;
}
.chat-message.bot  { background: var(--hx-card); border: 1px solid var(--hx-card-line); color: var(--hx-ink); align-self: flex-start; border-bottom-left-radius: 5px; }
.chat-message.user { background: var(--hx-ink); color: var(--hx-paper); align-self: flex-end; border-bottom-right-radius: 5px; }
.chat-quick {
    padding: 8px 12px 9px; display: flex; gap: 6px; flex-wrap: wrap;
    flex-shrink: 0; border-top: 1px solid var(--hx-line); background: var(--hx-paper);
}
.quick-chip {
    background: rgba(184,58,42,.08); border: 1px solid rgba(184,58,42,.2);
    color: var(--hx-red); border-radius: 20px; min-height: 34px; padding: 0 12px;
    font-size: .76em; font-weight: 600; cursor: pointer; transition: background .18s, color .18s;
    white-space: nowrap; display: inline-flex; align-items: center;
}
@media (hover: hover) { .quick-chip:hover { background: var(--hx-red); color: #FFF8EA; border-color: var(--hx-red); } }
.chat-input-row {
    padding: 10px 11px calc(12px + var(--safe-bottom));
    border-top: 1px solid var(--hx-line);
    background: var(--hx-paper);
    display: flex; gap: 8px; align-items: center; flex-shrink: 0;
}
.chat-input {
    flex: 1; padding: 11px 16px; border: 1px solid var(--hx-line);
    border-radius: 24px; outline: none; font-size: 16px; color: var(--hx-ink);
    background: var(--hx-card); transition: border-color .2s;
    appearance: none; -webkit-appearance: none;
    font-family: var(--hx-font-body);
}
.chat-input:focus { border-color: var(--hx-ochre); background: var(--hx-paper); }
.chat-input::placeholder { color: var(--hx-ink-3); }
.chat-send-btn {
    background: var(--hx-red); color: #FFF8EA; border: none;
    width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
    font-size: 1.1em; display: flex; align-items: center; justify-content: center;
    transition: background .2s, transform .15s; flex-shrink: 0;
}
.chat-send-btn:active { background: var(--hx-red-2); transform: scale(.93); }

/* ============================================================
   TOAST
============================================================ */
.toast {
    position: fixed; bottom: 28px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(42,31,20,.92); color: var(--hx-paper); padding: 12px 22px;
    border-radius: 28px; font-size: .88em; font-weight: 600; white-space: nowrap;
    opacity: 0; transition: opacity .25s, transform .25s; z-index: 3000;
    pointer-events: none; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show     { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.clickable{ pointer-events: auto; }

/* ============================================================
   FOOTER
============================================================ */
footer {
    background: var(--hx-ink);
    padding: 32px 24px 28px;
    text-align: center;
}
.footer-inner { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-lantern { font-size: 1.8em; line-height: 1; }
.footer-name { font-size: .95em; font-weight: 500; color: rgba(242,232,210,.75); letter-spacing: .03em; text-align: left; font-family: var(--hx-font-display); font-style: italic; }
.footer-tagline { font-size: .75em; color: rgba(242,232,210,.35); text-align: left; margin-top: 2px; }
.footer-divider { width: 40px; height: 1px; background: rgba(242,232,210,.1); }
.footer-credits { font-size: .72em; color: rgba(242,232,210,.3); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.footer-legal { font-size: .68em; color: rgba(242,232,210,.22); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.footer-legal a { color: rgba(242,232,210,.35); text-decoration: none; border-bottom: 1px solid rgba(242,232,210,.15); transition: color .2s; }
.footer-legal a:hover { color: rgba(242,232,210,.6); }
.footer-dot { opacity: .4; }

/* ============================================================
   RESPONSIVE — TABLETTE & MOBILE (≤768px)
============================================================ */
@media (max-width: 768px) {
    body {
        padding-top: calc(var(--header-h) + var(--safe-top));
        padding-bottom: calc(var(--nav-h) + var(--safe-bottom));
    }

    /* Header padding réduit sur tablette */
    .header-inner { padding: 0 16px; }

    /* Nav → bottom pill */
    .app-nav {
        top: auto;
        bottom: 8px;
        left: 12px; right: 12px;
        height: var(--nav-h);
        padding-bottom: 0;
        border-radius: 22px;
        background: var(--hx-ink);
        border-top: none;
        border-bottom: none;
        box-shadow: 0 8px 24px rgba(42,31,20,.22), 0 1px 0 rgba(255,255,255,.06) inset;
    }
    body {
        padding-bottom: calc(var(--nav-h) + 20px + var(--safe-bottom));
    }
    .app-nav-inner { height: var(--nav-h); }
    .app-tab {
        flex-direction: column; gap: 3px;
        border-bottom: none; border-top: none;
        color: rgba(242,232,210,.55);
    }
    .app-tab.active { color: var(--hx-paper); border-top-color: transparent; border-bottom-color: transparent; }
    .app-tab-icon svg { width: 24px; height: 24px; }
    .app-tab-label { font-size: .62em; letter-spacing: .2px; }
    .app-tab.ai-tab .app-tab-icon {
        width: 42px; height: 42px;
        margin-top: -8px; box-shadow: 0 3px 14px rgba(184,58,42,.45);
    }
    .app-tab.ai-tab .app-tab-icon svg { width: 18px; height: 18px; }
    .app-tab.active .hx-tab-dot {
        display: block; width: 4px; height: 4px; border-radius: 50%;
        background: var(--hx-ochre); margin: 1px auto 0;
    }

    /* Chat → full-screen sheet */
    .chat-fab   { display: none; }
    .chat-modal {
        left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-bottom));
        width: 100%;
        height: calc(100vh - var(--header-h) - var(--safe-top) - var(--nav-h) - var(--safe-bottom));
        border-radius: 0; border-top-left-radius: 22px; border-top-right-radius: 22px;
    }
    .toast { bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px); }

    /* Map height */
    #map {
        height: calc(100vh - var(--header-h) - var(--safe-top) - var(--nav-h) - var(--safe-bottom) - 80px);
    }

    .itin-trigger {
        grid-column: 1 / -1;
        flex-direction: row; gap: 10px; width: 100%;
        align-items: center; justify-content: center;
        background: rgba(184,58,42,.06); border-radius: 12px; padding: 10px 14px;
    }
    .itin-trigger-icon { width: 42px; height: 42px; font-size: 1.1em; flex-shrink: 0; }
    .itin-trigger-label { font-size: .82em; text-align: left; }

    .places-grid  { grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 12px; }
    .events-grid  { grid-template-columns: 1fr; }

    /* ── Detail modal mobile ── */
    .detail-sheet    { max-height: 94vh; border-radius: 24px 24px 0 0; }
    .detail-hero     { height: 240px; }
    .detail-body     { padding: 22px 20px calc(20px + env(safe-area-inset-bottom, 0px)); }
    .detail-hero-overlay { padding: 0 20px 24px; }
    .detail-hero-name { font-size: 1.3em; }
    .detail-desc     { font-size: .9em; margin-bottom: 20px; padding-bottom: 18px; }
    .detail-close    { top: 10px; right: 10px; width: 44px; height: 44px; }
    .detail-dots     { bottom: 76px; }
    .dii             { padding: 10px 10px; }
    .dii-icon        { width: 32px; height: 32px; border-radius: 9px; }
    .detail-actions  { gap: 10px; padding-top: 16px; }
    .detail-fav-btn, .detail-map-btn, .detail-ai-btn { height: 56px; font-size: .87em; border-radius: 14px; }
}

/* MOBILE (≤480px) */
@media (max-width: 480px) {
    /* Header compact : icône logo seule, lang-text masqué */
    .header-inner      { padding: 0 14px; gap: 0; }
    .header-logo > div { display: none; }
    .header-auth       { gap: 7px; }
    #user-name         { display: none; }
    #admin-link        { display: none !important; } /* Admin = desktop */
    .btn-login         { padding: 7px 12px; font-size: .8em; gap: 4px; }
    .lang-text         { display: none; }
    .lang-btn          { padding: 5px 8px; font-size: 1rem; }

    .places-grid    { grid-template-columns: 1fr; }
}

/* TRÈS PETIT MOBILE (≤360px) */
@media (max-width: 360px) {
    .header-inner   { padding: 0 10px; }
    .btn-login      { padding: 6px 9px; font-size: .75em; }
    .lang-btn       { padding: 4px 7px; font-size: .9rem; }
    .search-input   { padding: 13px 46px 13px 16px; }
    .place-content  { padding: 12px 13px 14px; }
    .place-name     { font-size: .97em; }
}

/* DESKTOP — modal centré + 2 colonnes (≥769px) */
@media (min-width: 769px) {
    .detail-modal  { align-items: center; padding: 20px; }
    .detail-sheet  {
        flex-direction: row; max-width: 900px; width: 92%;
        max-height: 84vh; border-radius: 22px;
    }
    .detail-handle { display: none; }
    .detail-hero   {
        width: 360px; flex-shrink: 0;
        height: auto; border-radius: 22px 0 0 22px;
        min-height: 420px;
    }
    .detail-hero-overlay { border-radius: 22px 0 0 22px; padding: 22px 26px 30px; }
    .detail-hero-name { font-size: 1.65em; }
    .detail-dots  { bottom: 96px; }
    .detail-body  {
        padding: 32px 30px;
        overflow-y: auto; display: flex; flex-direction: column;
    }
    .detail-actions {
        grid-template-columns: 1fr 1fr 1fr;
        margin-top: auto; padding-top: 24px;
        border-top: 1px solid rgba(42,31,20,.08);
    }
    .detail-ai-btn { grid-column: auto; }
    .itinerary-modal { align-items: center; }
    .itin-sheet      { border-radius: var(--radius); max-height: 85vh; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .detail-sheet, .itin-sheet, .chat-modal {
        animation: none !important;
    }
}

/* Desktop: nav integrated in header — remove nav-desktop body offset */
@media (min-width: 769px) {
    body { padding-top: calc(var(--header-h) + var(--safe-top)); }
}

/* Header compact — 769px–899px : trop étroit pour 5 onglets + logo + auth en pleine taille */
@media (min-width: 769px) and (max-width: 899px) {
    .header-nav-desktop { gap: 2px; }
    .header-nav-desktop .app-tab { padding: 0 8px; font-size: .81em; }
    .lang-text { display: none; }
    .lang-btn  { padding: 5px 7px; font-size: .9rem; }
    .btn-login { padding: 7px 11px; font-size: .79em; }
    .header-logo h1 { font-size: 1.08em; }
    .header-logo .logo-sub { display: none; }
}

/* ── Lang switcher : drapeaux seuls sur mobile ≤480px ───────── */
@media (max-width: 480px) {
    .lang-text { display: none; }
}
