/* ============================================================
   Galerie Hébert — galerie-hebert.fr
   Feuille de style unique
   ============================================================ */

:root {
  /* Palette dérivée du logo : son gris est le #37383a, il devient la couleur
     de fond des sections sombres pour que le logo s'y fonde exactement. */
  --graphite:       #37383a;   /* le gris du logo */
  --graphite-fonce: #2e2f31;   /* section contact */
  --papier:         #f5f5f4;   /* neutre froid, accordé au gris */
  --papier-2:       #ebebe9;
  --blanc:          #ffffff;
  --gris:           #6c6e71;
  --gris-clair:     #a7a9ac;
  --bronze:         #8f7549;   /* accent sur fond clair */
  --bronze-clair:   #c3a878;   /* accent sur fond graphite */
  --ligne:          rgba(55, 56, 58, .16);
  --ligne-nuit:     rgba(255, 255, 255, .18);

  --serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 1240px;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --header-h: 84px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--graphite);
  font-family: var(--sans);
  font-size: clamp(.95rem, .35vw + .88rem, 1.0625rem);
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-weight: 400; margin: 0; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--graphite); color: var(--papier); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.muted { color: var(--gris); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--graphite);
  color: var(--blanc);
  padding: .75rem 1.25rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 2px solid var(--bronze-clair);
  outline-offset: 3px;
}
.section-acces :focus-visible { outline-color: var(--bronze); }

/* ---------- Typographie de titres ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--bronze-clair);   /* sur fond graphite */
  margin: 0 0 1.5rem;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.9rem);
  line-height: 1.05;
  letter-spacing: -.01em;
}

.section-head { margin-bottom: clamp(2.75rem, 6vw, 4.5rem); }

/* ============================================================
   EN-TÊTE
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  color: var(--blanc);
  transition: background-color .45s var(--ease), color .45s var(--ease),
              box-shadow .45s var(--ease), height .45s var(--ease);
}

.site-header.is-scrolled {
  height: 68px;
  background: rgba(245, 245, 244, .94);
  backdrop-filter: saturate(140%) blur(12px);
  color: var(--graphite);
  box-shadow: 0 1px 0 var(--ligne);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.brand-mark {
  width: 50px;
  height: 50px;
  transition: width .45s var(--ease), height .45s var(--ease);
}
.site-header.is-scrolled .brand-mark { width: 42px; height: 42px; }

.brand-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: .06em;
  line-height: 1;
}

/* ---------- Navigation ---------- */
.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
}

.nav > a {
  position: relative;
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .35rem 0;
}

.nav > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.nav > a:hover::after,
.nav > a.is-active::after { transform: scaleX(1); }

.nav-fb {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.nav-fb svg { flex: none; }

/* ---------- Bouton hamburger ---------- */
.burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 10px 8px;
}
.burger span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform .35s var(--ease), opacity .25s var(--ease);
}
.burger span + span { margin-top: 7px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   1. AFFICHE / EXPOSITION EN COURS
   ============================================================ */
.hero {
  position: relative;
  background: var(--graphite);
  color: var(--papier);
  padding: calc(var(--header-h) + clamp(2.5rem, 6vw, 5rem)) 0 clamp(5rem, 9vw, 8rem);
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* halo très discret derrière l'affiche */
.hero::before {
  content: "";
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  right: -18vmax;
  top: -22vmax;
  background: radial-gradient(circle, rgba(195, 168, 120, .10), transparent 62%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.02fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
}

/* l'affiche d'abord dans le flux visuel */
.hero-poster {
  order: 1;
  margin: 0;
  display: flex;
  justify-content: center;
}
.hero-text { order: 2; }

/* Le cadre épouse l'affiche quelle que soit sa proportion : aucune bande
   ne peut apparaître sur les côtés, et l'image n'est jamais déformée. */
.hero-poster img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 76svh;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, .35),
    0 28px 64px -22px rgba(0, 0, 0, .55);
}

/* Le nom de l'artiste tient le rôle du titre de l'exposition */
.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5.8vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -.005em;
  margin-bottom: 1.1rem;
  max-width: 22ch;
}

.hero-dates {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--gris-clair);
  margin-bottom: 2rem;
}
.hero-dates sup { font-size: .6em; }

.hero-hours {
  font-size: .9rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--ligne-nuit);
  margin-bottom: 2.25rem;
}
.hero-hours .muted { color: var(--gris-clair); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 2rem;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease),
              border-color .35s var(--ease);
}

.btn-solid {
  background: var(--papier);
  color: var(--graphite);
  border-color: var(--papier);
}
.btn-solid:hover {
  background: var(--bronze-clair);
  border-color: var(--bronze-clair);
  color: var(--graphite);
}

.btn-ghost { background: transparent; color: inherit; }
.btn-ghost:hover { background: rgba(255, 255, 255, .09); }

/* ---------- Indicateur de défilement ---------- */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  width: 1px;
  height: 54px;
  background: var(--ligne-nuit);
  overflow: hidden;
}
.scroll-cue span {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 18px;
  background: var(--bronze-clair);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue {
  0%   { transform: translateY(-20px); }
  60%  { transform: translateY(54px); }
  100% { transform: translateY(54px); }
}

/* ============================================================
   SECTIONS COMMUNES
   ============================================================ */
.section { padding: clamp(5rem, 11vw, 9rem) 0; }

.section-acces {
  background: var(--papier);
  color: var(--graphite);
}
.eyebrow-papier { color: var(--bronze); }   /* sur fond clair */

/* ---------- Plan d'accès ---------- */
.acces-grid {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

.info-block + .info-block {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--ligne);
}

.info-block h3 {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: .9rem;
}

.address {
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.45;
}

.info-links { font-size: .9rem; line-height: 2; }
.info-links a {
  border-bottom: 1px solid var(--ligne);
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.info-links a:hover { color: var(--bronze); border-color: var(--bronze); }

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.plain-list li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: .6rem;
}
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .8em;
  width: 6px;
  height: 1px;
  background: var(--bronze);
}
.plain-list strong { font-weight: 500; }

.acces-map {
  position: relative;
  border: 1px solid var(--ligne);
  background: var(--papier-2);
}
.acces-map iframe {
  width: 100%;
  height: clamp(340px, 52vh, 560px);
  border: 0;
  filter: grayscale(100%) contrast(96%);
  transition: filter .6s var(--ease);
}
.acces-map:hover iframe,
.acces-map.is-active iframe { filter: grayscale(0%) contrast(100%); }

/* Voile de protection : la carte ne capte la molette qu'après un clic */
.map-shield {
  position: absolute;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.map-shield span {
  background: rgba(46, 47, 49, .88);
  color: var(--papier);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .7rem 1.35rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.acces-map:hover .map-shield span,
.map-shield:focus-visible span { opacity: 1; transform: none; }

/* activé par le JavaScript uniquement : sans JS la carte reste utilisable */
.acces-map.is-guarded .map-shield { display: flex; }
.acces-map.is-guarded iframe { pointer-events: none; }
.acces-map.is-active .map-shield { display: none; }
.acces-map.is-active iframe { pointer-events: auto; }

/* ============================================================
   3. CONTACT
   ============================================================ */
.section-contact {
  background: var(--graphite-fonce);
  color: var(--papier);
}

.contact-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.contact-aside .lead {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.5;
  font-style: italic;
  color: rgba(245, 245, 244, .9);
  margin-bottom: 2.5rem;
}

.contact-dl { margin: 0; }
.contact-dl dt {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gris-clair);
  margin-bottom: .3rem;
}
.contact-dl dd {
  margin: 0 0 1.5rem;
  font-size: 1rem;
}
.contact-dl dd:last-child { margin-bottom: 0; }
.contact-dl a {
  border-bottom: 1px solid var(--ligne-nuit);
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.contact-dl a:hover { color: var(--bronze-clair); border-color: var(--bronze-clair); }

/* ---------- Formulaire ---------- */
.contact-form { max-width: 640px; }

.field {
  position: relative;
  margin-bottom: 2.25rem;
}

.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ligne-nuit);
  color: var(--papier);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  padding: .65rem 0;
  border-radius: 0;
  transition: border-color .35s var(--ease);
}
.field textarea { resize: vertical; min-height: 7.5rem; line-height: 1.65; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--bronze-clair);
}

.field label {
  position: absolute;
  left: 0;
  top: .65rem;
  font-size: 1rem;
  color: var(--gris-clair);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .3s var(--ease), color .3s var(--ease);
}

.field input:focus + label,
.field textarea:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:not(:placeholder-shown) + label {
  transform: translateY(-1.55rem) scale(.72);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--bronze-clair);
}

.field.has-error input,
.field.has-error textarea { border-bottom-color: #c8654f; }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Question anti-spam ---------- */
.captcha {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem 1.25rem;
  margin-bottom: 2.25rem;
}

.captcha label {
  font-size: .82rem;
  color: var(--gris-clair);
  letter-spacing: .02em;
}
.captcha label strong {
  color: var(--papier);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: .06em;
  white-space: nowrap;
}

.captcha input[type="text"] {
  width: 5.5rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ligne-nuit);
  color: var(--papier);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  text-align: center;
  padding: .5rem 0;
  border-radius: 0;
  transition: border-color .35s var(--ease);
}
.captcha input[type="text"]:focus {
  outline: none;
  border-bottom-color: var(--bronze-clair);
}

.captcha-aide {
  font-size: .74rem;
  color: var(--gris-clair);
  flex-basis: 100%;
}

.captcha.has-error input[type="text"] { border-bottom-color: #c8654f; }

.consent {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  font-size: .82rem;
  color: var(--gris-clair);
  line-height: 1.6;
  margin-bottom: 2rem;
  cursor: pointer;
}
.consent input {
  flex: none;
  margin-top: .3rem;
  accent-color: var(--bronze-clair);
  width: 16px;
  height: 16px;
}

.btn-submit { border: 0; font-family: var(--sans); }
.btn-submit[disabled] { opacity: .55; cursor: progress; }

/* Le message se place au-dessus du bouton, et disparaît entièrement quand il
   est vide : aucun espace n'est réservé pour rien. */
.form-status {
  margin: 0 0 1.5rem;
  padding-left: .9rem;
  border-left: 2px solid currentColor;
  font-size: .9rem;
  line-height: 1.55;
}
.form-status:empty { display: none; }
.form-status.is-ok    { color: #8fbf8f; }
.form-status.is-error { color: #e0917d; }

/* ============================================================
   PIED DE PAGE
   ============================================================ */
.site-footer {
  background: var(--graphite);
  color: rgba(245, 245, 244, .82);
  padding: clamp(3rem, 6vw, 4.5rem) 0 1.75rem;
  font-size: .9rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto repeat(3, 1fr);
  gap: 2rem clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding-bottom: 2.75rem;
  border-bottom: 1px solid var(--ligne-nuit);
}

.footer-brand img { width: 68px; height: 68px; }
.footer-col strong { font-weight: 500; color: var(--papier); }

.footer-col a {
  border-bottom: 1px solid transparent;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.footer-col a:hover { color: var(--bronze-clair); border-bottom-color: var(--bronze-clair); }

.footer-fb {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  padding-top: 1.75rem;
  font-size: .78rem;
  color: var(--gris-clair);
}
.footer-bottom p { margin: 0; }
.footer-bottom a:hover { color: var(--bronze-clair); }

/* ============================================================
   APPARITIONS AU DÉFILEMENT
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .12s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .acces-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: auto 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --header-h: 70px; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.75rem;
    justify-items: center;
    text-align: center;
  }
  .hero-poster { max-width: 400px; }
  .hero-poster img { max-height: 62svh; }
  .hero-title { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero { min-height: 0; }

  .scroll-cue { display: none; }

  /* menu déroulant */
  .burger { display: block; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--graphite);
    color: var(--papier);
    padding: 1rem var(--pad) 2rem;
    border-top: 1px solid var(--ligne-nuit);
    transform: translateY(-115%);
    transition: transform .5s var(--ease);
    visibility: hidden;
  }
  .nav.is-open { transform: none; visibility: visible; }

  .nav > a {
    width: 100%;
    padding: 1.05rem 0;
    border-bottom: 1px solid var(--ligne-nuit);
    font-size: .85rem;
  }
  .nav > a::after { display: none; }
  .nav-fb { border-bottom: 0; }
}

@media (max-width: 560px) {
  .brand-name { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .address { font-size: 1.4rem; }
}

/* ---------- Impression ---------- */
@media print {
  .site-header, .scroll-cue, .contact-form, .acces-map { display: none; }
  body { background: #fff; color: #000; }
  .hero, .section-contact, .site-footer { background: #fff; color: #000; }
}

/* ---------- Préférences d'animation ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
