/* aleadespossibles.fr — « Rideau & projecteur ».
   Drench sombre théâtral. Hooks de classes stables ; aucun style inline en PHP. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
/* Lumière de scène : projecteurs tamisés au-dessus de toute la page */
body::before {
    content: "";
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(75% 45% at 50% -8%, oklch(0.82 0.15 72 / .11), transparent 62%),
        radial-gradient(55% 40% at 88% 2%, oklch(0.62 0.20 295 / .10), transparent 60%),
        radial-gradient(50% 40% at 8% 4%, oklch(0.635 0.213 14 / .07), transparent 60%);
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.02em; text-wrap: balance; color: var(--ink); }
p { text-wrap: pretty; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; height: auto; }
strong { color: var(--ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 3px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--space); }
.section--center { text-align: center; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: var(--z-skip); background: var(--amber); color: var(--on-accent); padding: .55rem .8rem; border-radius: 8px; font-weight: 700; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: var(--z-sticky);
    background: oklch(0.163 0.028 335 / .72);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line-soft);
}
.site-header__row { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand__mark {
    width: 20px; height: 20px; border-radius: 6px;
    background: radial-gradient(circle at 30% 25%, var(--amber), var(--brand) 55%, var(--violet));
    box-shadow: 0 0 16px oklch(0.635 0.213 14 / .55);
}
.site-nav { display: flex; gap: .2rem; flex-wrap: wrap; }
.site-nav__link { padding: .45rem .75rem; border-radius: var(--radius-pill); color: var(--ink-soft); font-weight: 600; font-size: .95rem; transition: background .18s var(--ease), color .18s; }
.site-nav__link:hover { background: oklch(1 0 0 / .06); text-decoration: none; color: var(--ink); }
.site-nav__link.is-active { color: var(--ink); background: oklch(0.635 0.213 14 / .18); box-shadow: inset 0 0 0 1px oklch(0.635 0.213 14 / .45); }

/* ---------- Recherche (header) ---------- */
.site-search { position: relative; display: flex; align-items: center; }
.site-search__icon { position: absolute; left: .7rem; color: var(--ink-mute); pointer-events: none; }
.site-search__input {
    width: clamp(150px, 20vw, 250px); padding: .5rem .8rem .5rem 2.1rem; border-radius: var(--radius-pill);
    border: 1px solid var(--line); background: oklch(1 0 0 / .04); color: var(--ink); font: inherit; font-size: .92rem;
    transition: border-color .18s, box-shadow .18s;
}
.site-search__input::placeholder { color: var(--ink-mute); }
.site-search__input:focus { outline: none; border-color: var(--amber); box-shadow: var(--glow-amber); }
.site-search__results {
    position: absolute; top: calc(100% + .5rem); right: 0; width: min(360px, 88vw); max-height: 62vh; overflow: auto;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md);
    padding: .35rem; z-index: var(--z-sticky);
}
.site-search__result { display: grid; grid-template-columns: auto 1fr; grid-auto-rows: auto; gap: 0 .6rem; align-items: center; padding: .5rem .6rem; border-radius: var(--radius-sm); color: var(--ink); }
.site-search__result:hover, .site-search__result.is-active { background: var(--surface-2); text-decoration: none; }
.site-search__type { grid-row: 1 / span 2; align-self: center; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--on-accent); background: var(--g-lieu); padding: .2rem .45rem; border-radius: var(--radius-pill); }
.site-search__rn { font-weight: 600; }
.site-search__rs { grid-column: 2; color: var(--ink-mute); font-size: .82rem; }

/* Page /recherche */
.search-page { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.25rem 0 1.75rem; }
.search-page__input { flex: 1 1 320px; padding: .8rem 1.1rem; border-radius: var(--radius-pill); border: 1px solid var(--line); background: oklch(1 0 0 / .04); color: var(--ink); font: inherit; font-size: 1.05rem; }
.search-page__input:focus { outline: none; border-color: var(--amber); box-shadow: var(--glow-amber); }
.search-results { list-style: none; padding: 0; margin: 0 0 1.75rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.search-results__item { border-bottom: 1px solid var(--line-soft); }
.search-results__item:last-child { border-bottom: 0; }
.search-results__item a { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .75rem 1.1rem; color: var(--ink); }
.search-results__item a:hover { background: var(--surface-2); text-decoration: none; }
.search-results__name { font-weight: 600; }
.search-results__sub { color: var(--ink-mute); font-size: .88rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.hero::before {
    content: ""; position: absolute; inset: -30% -10% auto -10%; height: 130%; pointer-events: none;
    background: radial-gradient(58% 78% at 50% -12%, oklch(0.82 0.15 72 / .20), oklch(0.62 0.20 295 / .10) 45%, transparent 68%);
    animation: spot-breathe 9s var(--ease) infinite;
}
.hero .wrap { position: relative; padding-block: clamp(3rem, 9vw, 6.5rem); }
.hero__title {
    font-size: clamp(2.4rem, 6.4vw, 5rem); font-weight: 800; max-width: 15ch; letter-spacing: -.035em;
    animation: rise var(--dur) var(--ease) both;
}
.hero__lead { font-size: clamp(1.08rem, 2vw, 1.3rem); color: var(--ink-soft); max-width: 58ch; line-height: 1.6; animation: rise var(--dur) var(--ease) .08s both; }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.75rem; animation: rise var(--dur) var(--ease) .16s both; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes spot-breathe { 0%, 100% { opacity: .82; } 50% { opacity: 1; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .78rem 1.35rem; border-radius: var(--radius-pill); font-weight: 700; font-family: var(--font-display); letter-spacing: -.01em; border: 1.5px solid transparent; cursor: pointer; transition: transform .16s var(--ease), box-shadow .2s var(--ease), background .2s; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--glow-brand); }
.btn--primary:hover { background: var(--brand-lit); box-shadow: 0 12px 40px oklch(0.635 0.213 14 / .55); }
.btn--ghost { background: oklch(1 0 0 / .03); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--amber); color: var(--ink); box-shadow: var(--glow-amber); }

/* ---------- Section head ---------- */
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.section__title { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 1.1rem; position: relative; }
.section__title::after { content: ""; display: block; width: 2.4rem; height: 3px; margin-top: .55rem; border-radius: 3px; background: linear-gradient(90deg, var(--brand), var(--amber)); }
.section__head .section__title { margin-bottom: 0; }
.section__more { font-weight: 700; white-space: nowrap; color: var(--amber); }

/* ---------- Genre grid ---------- */
.genre-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: var(--gap); }
.genre-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 1.4rem; padding: 1.2rem; min-height: 124px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.genre-tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--g-lieu); box-shadow: 0 0 18px 1px currentColor; opacity: .0; color: var(--g-lieu); }
.genre-tile { --gc: var(--g-lieu); }
.genre-tile::before { background: var(--gc); color: var(--gc); opacity: .9; }
.genre-tile:hover { transform: translateY(-3px); text-decoration: none; border-color: oklch(1 0 0 / .16); box-shadow: var(--shadow-md); }
.genre-tile__label { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; }
.genre-tile__count { color: var(--ink-mute); font-size: .9rem; font-weight: 600; }
.genre-tile--humour { --gc: var(--g-humour); }
.genre-tile--theatre { --gc: var(--g-theatre); }
.genre-tile--cirque { --gc: var(--g-cirque); }
.genre-tile--concerts { --gc: var(--g-concerts); }
.genre-tile--danse { --gc: var(--g-danse); }
.genre-tile--spectacle-vivant { --gc: var(--g-spectacle-vivant); }
.genre-tile--expo { --gc: var(--g-expo); }

/* ---------- Dept grid ---------- */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: .7rem; margin-bottom: 2rem; }
.dept-tile { display: flex; flex-direction: column; gap: .3rem; padding: .85rem 1.05rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); transition: border-color .18s, background .18s, transform .18s var(--ease); }
.dept-tile:hover { text-decoration: none; border-color: oklch(0.635 0.213 14 / .55); background: var(--surface-2); transform: translateY(-2px); }
.dept-tile__name { font-family: var(--font-display); font-weight: 700; }
.dept-tile__counts { display: flex; flex-wrap: wrap; gap: .25rem .6rem; color: var(--ink-mute); font-size: .82rem; }

/* ---------- Hub tiles : enseignes lumineuses ---------- */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: var(--gap); }
.hub-tile {
    position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 1rem;
    min-height: 124px; padding: 1.2rem 1.3rem; border-radius: var(--radius); color: var(--ink);
    background:
        radial-gradient(120% 100% at 0% 0%, oklch(0.635 0.213 14 / .28), transparent 55%),
        radial-gradient(120% 120% at 100% 100%, oklch(0.62 0.20 295 / .24), transparent 55%),
        var(--surface);
    border: 1px solid oklch(0.635 0.213 14 / .35);
    overflow: hidden; transition: transform .2s var(--ease), box-shadow .25s var(--ease), border-color .2s;
}
.hub-tile:hover { transform: translateY(-3px); text-decoration: none; border-color: oklch(0.82 0.15 72 / .6); box-shadow: var(--shadow-md), 0 0 34px oklch(0.635 0.213 14 / .3); }
.hub-tile__title { font-family: var(--font-display); font-weight: 800; font-size: 1.16rem; line-height: 1.18; letter-spacing: -.02em; }
.hub-tile__cta { font-weight: 700; font-size: .85rem; color: var(--amber); }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: var(--gap); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.card:hover { transform: translateY(-3px); border-color: oklch(0.635 0.213 14 / .5); box-shadow: var(--shadow-md), var(--glow-brand); }
.card__link { display: block; padding: 1.05rem 1.15rem 1.2rem; color: var(--ink); height: 100%; }
.card__link:hover { text-decoration: none; }
.card__title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; margin: .55rem 0 .4rem; color: var(--ink); }
.card__meta { display: flex; flex-wrap: wrap; gap: .35rem .7rem; color: var(--ink-soft); font-size: .9rem; margin: 0; }
.card__dept { color: var(--ink-mute); }
.card__period { color: var(--ink-mute); font-size: .85rem; margin: .5rem 0 0; }
.card__date { color: var(--amber); font-weight: 700; font-size: .82rem; letter-spacing: .02em; text-transform: uppercase; margin: .5rem 0 0; }
.card__ticket { margin: .55rem 0 0; font-weight: 700; font-size: .85rem; color: var(--g-spectacle-vivant); }
.card--event .card__title { margin-top: .3rem; }

/* ---------- Chips (genres) : couleur vive, texte sombre ---------- */
.chip { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: .24rem .6rem; border-radius: var(--radius-pill); color: var(--on-accent); background: var(--g-lieu); }
.chip--humour { background: var(--g-humour); }
.chip--theatre { background: var(--g-theatre); color: #fff; }
.chip--cirque { background: var(--g-cirque); color: #fff; }
.chip--concerts { background: var(--g-concerts); color: #fff; }
.chip--danse { background: var(--g-danse); color: #fff; }
.chip--spectacle-vivant { background: var(--g-spectacle-vivant); }
.chip--expo { background: var(--g-expo); }
.chip--lieu { background: var(--g-lieu); }

/* ---------- Titles / leads / breadcrumb / filters ---------- */
.page-title { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 800; letter-spacing: -.03em; margin-top: .5rem; }
.page-lead { color: var(--ink-soft); font-size: 1.12rem; max-width: 66ch; line-height: 1.6; margin-top: 0; }
.dept-stats { color: var(--ink-mute); font-weight: 600; }
.breadcrumb { color: var(--ink-mute); font-size: .88rem; margin-bottom: .6rem; }
.breadcrumb a { color: var(--ink-soft); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0 1.9rem; }
.filters__chip { padding: .42rem .85rem; border-radius: var(--radius-pill); border: 1px solid var(--line); background: oklch(1 0 0 / .02); color: var(--ink-soft); font-weight: 600; font-size: .9rem; transition: border-color .18s, color .18s, background .18s; }
.filters__chip:hover { border-color: var(--amber); text-decoration: none; color: var(--ink); }
.filters__chip.is-active { background: var(--amber); color: var(--on-accent); border-color: var(--amber); }
.filters__n { opacity: .65; font-weight: 700; }
.empty { color: var(--ink-mute); padding: 2rem 0; }

/* ---------- Detail (event / artist / venue / festival) ---------- */
.detail { padding-block: var(--space); max-width: 840px; }
.detail__head { margin-bottom: 1.5rem; }
.detail__title { font-size: clamp(1.9rem, 4.8vw, 3rem); font-weight: 800; letter-spacing: -.03em; margin: .6rem 0 .35rem; }
.detail__sub { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }
.detail__when { font-family: var(--font-display); font-weight: 700; color: var(--amber); font-size: 1.15rem; margin: .5rem 0 .3rem; }
/* Affiche fournie en basse qualité → vignette poster, jamais en grand */
.detail__image { display: block; width: min(190px, 48%); aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); box-shadow: var(--shadow-md); margin: 0 0 1.5rem; }
.detail__cta { margin: 1.35rem 0; display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.detail__partner { font-size: .8rem; color: var(--ink-mute); }
.detail__desc { font-size: 1.12rem; color: var(--ink); max-width: 66ch; margin: 1rem 0; }
.detail__long { color: var(--ink-soft); max-width: 70ch; margin: 1rem 0; }
.detail__map, .detail__cross { margin: 1.1rem 0; font-weight: 600; }
.detail__dates { margin: 1.75rem 0; }
.detail__dates h2 { font-size: 1.2rem; }
.date-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.date-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .38rem .7rem; font-size: .9rem; color: var(--ink-soft); }

.facts { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.6rem 0; background: var(--surface); }
.facts__row { display: grid; grid-template-columns: minmax(140px, 30%) 1fr; gap: 1rem; padding: .9rem 1.15rem; border-bottom: 1px solid var(--line-soft); }
.facts__row:last-child { border-bottom: 0; }
.facts dt { font-weight: 700; color: var(--ink-mute); margin: 0; }
.facts dd { margin: 0; color: var(--ink); }
.attribution { color: var(--ink-mute); font-size: .82rem; margin-top: 2rem; border-top: 1px solid var(--line-soft); padding-top: 1rem; max-width: 70ch; }

/* ---------- Event list (fiche lieu / artiste / landing dept) ---------- */
.event-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.event-list__item { border-bottom: 1px solid var(--line-soft); }
.event-list__item:last-child { border-bottom: 0; }
.event-list__item a { display: flex; align-items: center; gap: .9rem; padding: .78rem 1.1rem; color: var(--ink); transition: background .16s; }
.event-list__item a:hover { background: var(--surface-2); text-decoration: none; }
.event-list__date { flex: 0 0 auto; min-width: 128px; color: var(--amber); font-weight: 700; font-size: .82rem; letter-spacing: .02em; text-transform: uppercase; }
.event-list__title { flex: 1 1 auto; font-weight: 600; }
@media (max-width: 560px) {
    .event-list__item a { flex-wrap: wrap; gap: .3rem .85rem; }
    .event-list__date { min-width: 0; flex-basis: 100%; }
}

/* ---------- Pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: 2.25rem; }
.pagination__link { padding: .48rem .8rem; border-radius: 9px; border: 1px solid var(--line); color: var(--ink-soft); font-weight: 600; transition: border-color .16s, color .16s; }
.pagination__link:hover { border-color: var(--amber); color: var(--ink); text-decoration: none; }
.pagination__link.is-current { background: var(--amber); color: var(--on-accent); border-color: var(--amber); }
.pagination__gap { padding: 0 .25rem; color: var(--ink-mute); }

/* ---------- Carte ---------- */
.map { height: clamp(280px, 42vh, 440px); margin: 1.6rem 0; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--surface-2); position: relative; z-index: 0; }
.map .leaflet-container { background: var(--bg-2); font-family: var(--font-body); }
.map .leaflet-control-attribution { background: oklch(0.128 0.024 335 / .8); color: var(--ink-mute); }
.map .leaflet-control-attribution a { color: var(--ink-soft); }
.map .leaflet-bar a { background: var(--surface); color: var(--ink); border-bottom-color: var(--line); }
.map .leaflet-bar a:hover { background: var(--surface-2); }
.map .leaflet-popup-content-wrapper, .map .leaflet-popup-tip { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-md); }
.map .leaflet-popup-content a { color: var(--amber); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq { margin: 2.25rem 0; max-width: 72ch; }
.faq__item { border-top: 1px solid var(--line-soft); padding: 1.1rem 0; }
.faq__q { font-size: 1.08rem; margin: 0 0 .4rem; color: var(--ink); }
.faq__a { color: var(--ink-soft); margin: 0; }

/* ---------- Prose (pages légales) ---------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.3rem; margin-top: 1.9rem; }
.prose p { color: var(--ink-soft); }
.prose a { color: var(--amber); }

/* ---------- Footer ---------- */
.site-footer { position: relative; border-top: 1px solid var(--line-soft); background: var(--bg-2); margin-top: var(--space); }
.site-footer::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, oklch(0.82 0.15 72 / .5), transparent); }
.site-footer__grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-block: 2.75rem 1.5rem; }
.site-footer__brand .brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.site-footer__tagline { color: var(--ink-mute); margin: .4rem 0 0; max-width: 34ch; }
.site-footer__nav { display: flex; flex-direction: column; gap: .45rem; }
.site-footer__nav a { color: var(--ink-soft); font-weight: 600; }
.site-footer__nav a:hover { color: var(--ink); }
.site-footer__legal { border-top: 1px solid var(--line-soft); padding-block: 1.1rem 1.6rem; color: var(--ink-mute); font-size: .85rem; }
.site-footer__legal p { margin: 0; }
.site-footer__legal a { color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .site-header__row { flex-direction: column; align-items: flex-start; gap: .4rem; padding-block: .6rem; }
    .facts__row { grid-template-columns: 1fr; gap: .2rem; }
    .detail__image { width: 150px; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .hero__title, .hero__lead, .hero__cta { animation: none; }
}
