/* ─── Gérard Guillot — feuille de style du site public ───
   Palette « papier et terre de Provence » ; polices système (aucun appel à Google Fonts : RGPD). */

:root {
  --papier: #f6f1e7;
  --papier-2: #ece4d4;
  --encre: #2a2622;
  --encre-douce: #6b635a;
  --terre: #9a4f2c;
  --terre-fonce: #7a3b1f;
  --olive: #5f6338;
  --trait: #d9cfbd;
  --blanc: #fffdf8;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --largeur: 1180px;
  --gouttiere: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font: 1.0625rem/1.65 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terre); text-underline-offset: 0.18em; }
a:hover { color: var(--terre-fonce); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.15rem; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--blanc); padding: .5rem 1rem; z-index: 10; }

.wrap { max-width: var(--largeur); margin: 0 auto; padding: 0 var(--gouttiere); }
.etroit { max-width: 760px; }
.bloc { margin: clamp(2.5rem, 6vw, 4.5rem) auto; }
.entete { margin: clamp(2rem, 5vw, 3.5rem) 0 2rem; }
.surtitre { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--olive); margin: 0 0 .4rem; }
.meta { color: var(--encre-douce); font-size: .9rem; margin: 0; }

/* ─── En-tête ─── */
.site-header { border-bottom: 1px solid var(--trait); background: var(--papier); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { text-decoration: none; color: var(--encre); display: flex; align-items: center; gap: .75rem; line-height: 1.1; }
.brand-texte { display: flex; flex-direction: column; }
.brand-logo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #111; flex: none; box-shadow: 0 0 0 2px var(--papier), 0 0 0 3px var(--trait); }
.brand-name { font-family: var(--serif); font-size: 1.45rem; }
.brand-sub { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--encre-douce); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(.8rem, 2vw, 1.8rem); }
.nav a { color: var(--encre); text-decoration: none; font-size: .95rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-color: var(--terre); color: var(--encre); }
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-toggle {
    display: block; background: none; border: 1px solid var(--trait); border-radius: 999px;
    padding: .45rem 1rem; font: inherit; font-size: .9rem; color: var(--encre); cursor: pointer;
  }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--papier); border-bottom: 1px solid var(--trait); display: none; }
  .nav.ouvert { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: .5rem var(--gouttiere) 1rem; }
  .nav a { display: block; padding: .7rem 0; border: 0; border-bottom: 1px solid var(--trait); }
}

/* ─── Boutons, badges ─── */
.bouton {
  display: inline-block; background: var(--terre); color: var(--blanc); text-decoration: none;
  padding: .75rem 1.4rem; border-radius: 999px; font-weight: 500; border: 0; font: inherit; cursor: pointer;
}
.bouton:hover { background: var(--terre-fonce); color: var(--blanc); }
.badge { position: absolute; top: .6rem; left: .6rem; font-size: .75rem; padding: .2rem .6rem; border-radius: 999px; background: var(--blanc); }
.oeuvre-infos .badge { position: static; }

/* ─── Accueil ─── */
.hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; margin-top: clamp(1.5rem, 4vw, 3.5rem); }
.hero-image img { box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 12px 32px -12px rgba(60,40,20,.35); background: var(--blanc); }
.hero-image figcaption { margin-top: .8rem; font-size: .9rem; color: var(--encre-douce); }
.intro { font-family: var(--serif); font-size: 1.3rem; color: var(--encre-douce); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

.bandeau-expo { background: var(--olive); color: var(--blanc); padding: 1.3rem 0; margin-top: clamp(2rem, 5vw, 4rem); }
.bandeau-expo p { margin: 0; }
.bandeau-expo a { color: var(--blanc); }
.bandeau-expo .surtitre { color: #e2e0c4; }

/* ─── Grille d'œuvres ─── */
.grille { list-style: none; padding: 0; margin: 0; display: grid; gap: clamp(1.2rem, 3vw, 2.4rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.oeuvre-carte a { text-decoration: none; color: var(--encre); display: block; }
.vignette { position: relative; aspect-ratio: 1; background: var(--papier-2); display: grid; place-items: center; padding: 6%; }
.vignette img { max-height: 100%; width: auto; object-fit: contain; box-shadow: 0 6px 18px -8px rgba(60,40,20,.4); transition: transform .3s ease; }
.oeuvre-carte a:hover .vignette img { transform: scale(1.02); }
.oeuvre-carte h3 { margin: .8rem 0 .1rem; }

/* ─── Fiche œuvre ─── */
.oeuvre { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); margin-top: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.oeuvre-image { margin: 0; background: var(--papier-2); padding: clamp(1rem, 4vw, 3rem); }
.oeuvre-image img { margin: 0 auto; box-shadow: 0 10px 30px -12px rgba(60,40,20,.45); cursor: zoom-in; }
.oeuvre-infos { position: sticky; top: 100px; }
.oeuvre-infos dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.2rem; margin: 1.2rem 0; }
.oeuvre-infos dt { color: var(--encre-douce); font-size: .9rem; }
.oeuvre-infos dd { margin: 0; }
.prix { font-family: var(--serif); font-size: 1.4rem; margin: 1.5rem 0 .8rem; }
.precsuiv { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--trait); font-size: .92rem; }
@media (max-width: 900px) { .oeuvre { grid-template-columns: 1fr; } .oeuvre-infos { position: static; } }

.visionneuse { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.visionneuse::backdrop { background: rgba(20,16,12,.92); }
.visionneuse img { max-width: 96vw; max-height: 94vh; width: auto; cursor: zoom-out; }
.visionneuse button { position: fixed; top: 1rem; right: 1.2rem; background: none; border: 0; color: #fff; font-size: 2.2rem; cursor: pointer; }

/* ─── Expositions ─── */
.expos { list-style: none; padding: 0; margin: 0; }
.expos a { display: flex; gap: 1.4rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--trait); text-decoration: none; color: var(--encre); }
.expos p { margin: 0; color: var(--encre-douce); }
.expos h3 { margin: 0 0 .2rem; }
.expo-affiche { width: 90px; flex: none; }
.expo-quand { font-size: 1.1rem; color: var(--encre-douce); }
.expo-corps { display: grid; grid-template-columns: 360px 1fr; gap: 2.5rem; align-items: start; }
.expo-corps:not(:has(figure)) { grid-template-columns: 1fr; max-width: 760px; }
.expo-affiche-grande { margin: 0; }
@media (max-width: 820px) { .expo-corps { grid-template-columns: 1fr; } }
.photos { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.presse { padding-left: 1.2rem; }

/* ─── Pagination ─── */
.pagination { display: flex; justify-content: space-between; margin: 2rem 0; color: var(--encre-douce); }

/* ─── Pages, texte ─── */
.page { margin-top: clamp(2rem, 5vw, 3.5rem); margin-bottom: 4rem; }
.texte { max-width: 68ch; }
.texte p { margin: 0 0 1.1em; }
.texte h2 { margin: 1.4em 0 .5em; }
.texte h3 { margin: 1.3em 0 .4em; color: var(--olive); }
.texte > :first-child { margin-top: 0; }
.texte ul { margin: 0 0 1.1em; padding-left: 1.3rem; }
.texte li { margin-bottom: .3em; }
.texte u { text-decoration-thickness: 1px; text-underline-offset: .15em; }
.portrait { margin: 0 0 2rem; max-width: 320px; }
.termes { columns: 2 14rem; padding-left: 1.2rem; }

/* ─── Cartes des expositions ─── */
.carte { height: min(60vh, 520px); border: 1px solid var(--trait); z-index: 0; }
.carte.petite { height: 320px; }
.bloc-carte { margin-bottom: 2.5rem; }
.carte-outils { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-top: .8rem; font-size: .9rem; color: var(--encre-douce); }
.legende { list-style: none; display: flex; gap: 1.2rem; padding: 0; margin: 0; }
.pastille-carte { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; vertical-align: -1px; }
.pastille-carte.a-venir { background: #9a4f2c; }
.pastille-carte.en-cours { background: #b42318; }
.pastille-carte.passee { background: #8a8f5a; }
.frise { display: flex; align-items: center; gap: .8rem; }
.frise input { width: min(260px, 60vw); accent-color: var(--terre); }
.popup ul { list-style: none; padding: 0; margin: .4rem 0 0; }
.popup li { margin-bottom: .4rem; }
.historique .annee { display: grid; grid-template-columns: 5rem 1fr; gap: 1rem; border-top: 1px solid var(--trait); }
.historique .annee-titre { font-size: 1.4rem; color: var(--olive); margin: 1.1rem 0; }
.historique .expos a { border-bottom: 0; }
@media (max-width: 600px) { .historique .annee { grid-template-columns: 1fr; gap: 0; } }
.popup img { margin: .5rem 0; border-radius: 4px; }

/* ─── Pied de page ─── */
.site-footer { border-top: 1px solid var(--trait); margin-top: 4rem; padding: 2rem 0; font-size: .9rem; color: var(--encre-douce); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer-inner p { margin: 0; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.2rem; }
.footer-links a { color: var(--encre-douce); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ─── Ajouts : formulaires, alertes, barre de gestion ─── */
.leger { color: var(--encre-douce); font-weight: 400; }
.vide { color: var(--encre-douce); padding: 2rem 0; }
.bouton.petit { padding: .45rem 1rem; font-size: .9rem; }
.badge-brouillon { left: auto; right: .6rem; background: #fff3cd; color: #7a5b00; }
.pastille { font: 500 .75rem/1 var(--sans); background: var(--olive); color: var(--blanc); padding: .25rem .5rem; border-radius: 999px; vertical-align: middle; }
.expo-corps.sans-affiche { grid-template-columns: 1fr; max-width: 760px; }
.photos figure { margin: 0; }
.photos figcaption { font-size: .88rem; color: var(--encre-douce); margin-top: .4rem; }

.alerte { padding: .9rem 1.1rem; border-radius: 6px; margin: 1rem 0; background: var(--papier-2); }
.alerte.success { background: #e6ead2; color: #3f4322; }
.alerte.error { background: #f3ddd2; color: var(--terre-fonce); }
.alerte.warning { background: #fff3cd; color: #6b5100; }

.formulaire { display: grid; gap: 1rem; margin: 2rem 0 1.5rem; }
.formulaire .champ { display: grid; gap: .35rem; margin: 0; }
.formulaire label { font-size: .92rem; color: var(--encre-douce); }
.formulaire input, .formulaire textarea { font: inherit; padding: .7rem .8rem; border: 1px solid var(--trait); border-radius: 6px; background: var(--blanc); color: var(--encre); width: 100%; }
.formulaire button { justify-self: start; }
.erreur { color: var(--terre-fonce); font-size: .88rem; }
.piege { position: absolute; left: -9999px; }
.rappel-oeuvre { display: flex; gap: 1rem; align-items: center; padding: .8rem; border: 1px solid var(--trait); border-radius: 8px; text-decoration: none; color: var(--encre); background: var(--blanc); margin-top: 1.5rem; }
.rappel-oeuvre img { width: 80px; height: 80px; object-fit: contain; background: var(--papier-2); }


.bandeau-dev { position: fixed; top: .6rem; right: .6rem; z-index: 20; background: #b42318; color: #fff; font: 600 .75rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: .35rem .6rem; border-radius: 4px; pointer-events: none; }
.version { font-variant-numeric: tabular-nums; opacity: .7; }
