/* Pages publiques « Histoire » — s'appuie sur les variables de style.css */
.histoire-body .container { max-width: 1160px; }

.h-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.25rem; font-family: system-ui, sans-serif; }
.h-tabs a { text-decoration: none; padding: .4rem .95rem; border-radius: 999px; border: 1px solid var(--line); color: var(--cacao); font-size: .92rem; }
.h-tabs a[aria-current="page"] { background: var(--cacao); border-color: var(--cacao); color: var(--cream); }

.h-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2rem; align-items: center;
  background: linear-gradient(160deg, var(--cacao) 0%, #24140b 100%); color: var(--cream); border-radius: 18px; padding: 2.5rem; }
.h-hero-plain { grid-template-columns: 1fr; }
.h-hero .eyebrow { text-transform: uppercase; letter-spacing: .2em; font: .78rem system-ui, sans-serif; color: var(--gold); margin: 0; }
.h-hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin: .4rem 0 .8rem; text-wrap: balance; }
.h-lead { font-size: 1.12rem; opacity: .9; max-width: 55ch; margin: 0; }
.h-hero .h-fig figcaption { color: #e3cfa6; }
.h-hero .h-credit { color: #bfa88a; }

.h-fig { margin: 0; display: grid; gap: .4rem; }
.h-fig img { width: 100%; max-width: 100%; border-radius: 10px; display: block; object-fit: cover; background: var(--line); }
.h-fig figcaption { font: .85rem/1.4 system-ui, sans-serif; color: var(--muted); }
.h-credit { display: block; font-size: .72rem; opacity: .8; margin-top: .15rem; }
.h-zoom { display: block; cursor: zoom-in; }
.h-hero-fig img { max-height: 420px; }

.h-timeline { margin: 2.5rem 0; }
.h-timeline ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--gold); }
.h-timeline li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding: .55rem 0 .55rem 1.2rem; position: relative; }
.h-timeline li::before { content: ""; position: absolute; left: -7px; top: 1.05rem; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--gold); }
.h-year { font: 600 1.05rem ui-monospace, Menlo, monospace; color: var(--praline); font-variant-numeric: tabular-nums; padding-top: .1rem; }
.h-timeline p { margin: 0; max-width: 70ch; }

.h-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; margin: 2.5rem 0; align-items: start; }
.h-section:nth-of-type(even) .h-prose { order: 2; }
.h-solo { grid-template-columns: minmax(0, 1fr); max-width: 72ch; }
.h-prose h2 { font-size: 1.6rem; margin: 0 0 .6rem; text-wrap: balance; }
.h-prose p { margin: 0 0 1rem; max-width: 65ch; font-size: 1.05rem; }
.h-figs { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.h-figs .h-fig img { aspect-ratio: 4 / 3; }

.h-filters { display: flex; gap: .4rem; flex-wrap: wrap; margin: 1.5rem 0 1rem; }
.h-filter { font: .88rem system-ui, sans-serif; padding: .35rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--cacao); cursor: pointer; }
.h-filter[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); }
.h-filter:focus-visible, .h-tabs a:focus-visible, .h-zoom:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.h-gallery { columns: 3 260px; column-gap: 1rem; }
.h-gallery-item { break-inside: avoid; margin-bottom: 1rem; }
.h-gallery-item[hidden] { display: none; }

.h-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.h-more h2 { font-size: 1.2rem; margin: 0 0 .6rem; }
.h-more ul { padding-left: 1.1rem; margin: 0; font: .92rem/1.5 system-ui, sans-serif; }
.h-more li { margin-bottom: .35rem; }
.h-cta { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: .8rem; align-content: center; justify-items: start; }
.h-cta p { margin: 0; font-size: 1.15rem; }

.h-lightbox { border: 0; border-radius: 12px; padding: 1rem; max-width: min(92vw, 1100px); background: var(--paper); color: var(--ink); }
.h-lightbox::backdrop { background: rgba(20, 10, 4, .85); }
.h-lightbox img { max-width: 100%; max-height: 78vh; display: block; margin: 0 auto; border-radius: 8px; }
.h-lightbox p { margin: .6rem 0 0; font: .9rem system-ui, sans-serif; color: var(--muted); }
.h-close { position: absolute; top: .3rem; right: .5rem; background: none; border: 0; font-size: 1.8rem; cursor: pointer; color: var(--ink); }

/* Bandeau « Notre histoire » de l'accueil */
.home-history { margin-top: 2rem; display: grid; gap: 1rem; }
.home-history-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.home-history-head h2 { margin: 0; font-size: 1.6rem; }
.home-history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.home-history-grid a { text-decoration: none; color: var(--ink); display: grid; gap: .4rem; }
.home-history-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.home-history-grid span { font: .88rem system-ui, sans-serif; }

/* Vitrine des objets de l'accueil */
.object-photo a { display: block; }
.photo-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.photo-admin { display: grid; gap: .6rem; align-content: start; border: 1px solid var(--line); border-radius: 10px; padding: .8rem; }
.photo-admin img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--line); }
.photo-admin p { margin: 0; font-size: .8rem; }
.home-objects { margin-top: 2rem; display: grid; gap: 1rem; }
.objects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.object-photo { margin: 0; display: grid; gap: .4rem; font: .85rem system-ui, sans-serif; color: var(--muted); }
.object-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.object-card { display: grid; gap: .35rem; align-content: start; padding: 1rem; border-radius: 10px; text-decoration: none; color: var(--cream);
  background: linear-gradient(150deg, var(--cacao) 0%, var(--cacao-2) 100%); border: 1px solid var(--cacao); }
.object-card:hover { border-color: var(--gold); }
.object-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.object-card strong { font-size: 1.1rem; font-weight: normal; line-height: 1.25; }
.object-card span { font: .82rem system-ui, sans-serif; opacity: .85; }
.object-where { text-transform: uppercase; letter-spacing: .12em; font-size: .7rem !important; color: var(--gold); opacity: 1 !important; }
.object-link { margin-top: auto; color: var(--gold); opacity: 1 !important; }

@media (max-width: 760px) {
  .h-hero, .h-section { grid-template-columns: 1fr; padding: 1.5rem; }
  .h-section { padding: 0; }
  .h-section:nth-of-type(even) .h-prose { order: 0; }
  .h-timeline li { grid-template-columns: 1fr; gap: .2rem; }
}
