/* Musée Eugène Burnand – feuille de style du site statique */
:root {
  --rouge: #e02b20;
  --rouge-menu: #ff3037;
  --texte: #555;
  --titre: #333;
  --fond: #fff;
  --fond-doux: #f6f4f1;
  --ligne: #e3e0dc;
  --largeur: 1080px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--fond); color: var(--texte);
  font: 400 16px/1.7 "Open Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rouge); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { color: var(--titre); font-weight: 600; line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 2rem; } h2 { font-size: 1.55rem; } h3 { font-size: 1.2rem; } h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid #222; margin: 2.5rem 0; }
.wrap { width: min(var(--largeur), 100% - 32px); margin-inline: auto; }
.small { font-size: .875rem; }
main { flex: 1 0 auto; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 var(--ligne); }
.header-in { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.logo img { height: 46px; width: auto; }
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.nav li { position: relative; }
.nav a { color: var(--titre); font-weight: 600; font-size: .9rem; display: block; padding: 24px 0; }
.nav > ul > li.active > a, .nav a:hover { color: var(--rouge-menu); text-decoration: none; }
.nav li ul {
  list-style: none; margin: 0; padding: 12px 0; position: absolute; top: 100%; left: -16px; min-width: 240px;
  background: #fff; border-top: 3px solid var(--rouge-menu); box-shadow: 0 6px 18px rgba(0,0,0,.12);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.nav li ul a { padding: 7px 20px; font-weight: 400; }
.nav li:hover > ul, .nav li:focus-within > ul { opacity: 1; visibility: visible; transform: none; }
.burger { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 8px; cursor: pointer; }
.burger span { display: block; height: 2px; background: var(--rouge-menu); margin: 5px 0; transition: .2s; }

/* Hero (accueil) */
.hero {
  position: relative; min-height: 78vh; display: flex; align-items: center; justify-content: center;
  background: #000 center bottom / cover no-repeat; color: #fff; text-align: center; padding: 80px 16px;
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.hero-in { position: relative; max-width: 760px; }
.hero h1 { color: #fff; font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 400; margin-bottom: .4em; }
.hero-text p { margin-bottom: .7em; }
.hero-text strong { color: #fff; }
.btn {
  display: inline-block; padding: .55em 1.4em; border: 2px solid var(--rouge); color: var(--rouge);
  font-weight: 600; border-radius: 3px; transition: .2s; text-decoration: none !important;
}
.btn:hover { background: var(--rouge); color: #fff; }
.btn-light { border-color: #fff; color: #fff; margin-top: 1rem; }
.btn-light:hover { background: #fff; color: #555; }
.btn-wrap { text-align: center; margin: 2rem 0; }

/* Mise en page des contenus */
.content { padding: 48px 0 64px; }
.content.divi { padding-top: 0; }
.content.divi > .wrap:first-child { padding-top: 48px; }
.section { padding: 56px 0; }
.section + .section { padding-top: 0; }
.section.fullwidth { padding: 0; }
.row { width: min(var(--largeur), 100% - 32px); margin-inline: auto; display: flex; flex-wrap: wrap; gap: 0 5%; }
.col { flex: var(--w) 1 0; min-width: 0; }
.row + .row { margin-top: 3rem; }
.col > * + * { margin-top: 1.5rem; }
.text h4, .text h5, .text h6 { font-size: 1.05rem; margin-top: 0; }
.text * + h2, .text * + h3, .text * + h4, .text * + h5 { margin-top: 1.6em; }
.text img { margin: .5rem 0 1rem; }
.col, .text { overflow-wrap: break-word; }
.text :last-child { margin-bottom: 0; }
.text ul, .text ol { padding-left: 1.3em; }
/* Images : alignées à gauche dans les colonnes, centrées quand elles occupent toute la largeur */
.image { margin: 0; }
.image img { margin: 0; }
.col[style="--w:100"] > .image { margin-inline: auto; }
.col[style="--w:100"] > .image img { margin-inline: auto; }
.col > .text + .image, .col > .text + .gallery { margin-top: 1.25rem; }
.text h1 { font-size: 1.8rem; }
.text h2 { font-size: 1.5rem; }
.page-title { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 1.2rem; }
.heading { margin-top: .5rem; }
iframe { max-width: 100%; border: 0; }
audio { width: 100%; }
figure { margin: 0; }
.wp-caption { margin: 1.5rem 0; font-size: .9rem; color: #777; }

/* Galeries */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.gallery figure a { display: block; aspect-ratio: 1; overflow: hidden; background: var(--fond-doux); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption, .gallery dd { font-size: .8rem; color: #777; margin: 4px 0 0; line-height: 1.4; }
.gallery dl { margin: 0; }
.gallery dt a { display: block; aspect-ratio: 1; overflow: hidden; background: var(--fond-doux); }
.gallery figure a img, .gallery dt img { width: 100%; height: 100%; object-fit: cover; }

/* Cartes (collections) */
.cards + *, * + .cards { margin-top: 2rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.card { display: block; color: var(--titre); text-decoration: none !important; }
.card img, .card .noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--fond-doux); display: block; }
.card-t { display: block; font-weight: 600; margin-top: .6rem; }
.card:hover .card-t { color: var(--rouge); }

/* Actualités */
.news { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--ligne); }
.news-img img, .news-img.noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--fond-doux); display: block; }
.noimg { background: var(--fond-doux) url(logo-meb.png) center / 40% auto no-repeat !important; opacity: .85; }
.news h2 { font-size: 1.3rem; margin-bottom: .4rem; }
.news h2 a { color: var(--titre); }
.news h2 a:hover { color: var(--rouge); }
.date { color: #999; font-size: .85rem; margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .04em; }
/* Articles : titre, texte et images sur une même colonne de lecture */
.single .wrap { max-width: 820px; }
.single .row { width: min(820px, 100% - 32px); }
.single .section { padding: 24px 0; }
.single .post-body > :not(.section) { width: min(820px, 100% - 32px); margin-inline: auto; }
.single .post-body img { margin-inline: auto; }
.single .image { margin: 1.5rem 0; }
.back { margin-bottom: 1.5rem; font-size: .9rem; }

/* Encadrés, accordéons */
.cta { background: var(--fond-doux); padding: 32px; text-align: center; border-radius: 4px; }
details { border-bottom: 1px solid var(--ligne); padding: 14px 0; }
summary { cursor: pointer; font-weight: 600; color: var(--titre); }
details[open] summary { margin-bottom: .8rem; }

/* Pied de page */
.site-footer { background: #222; color: #bbb; font-size: .9rem; padding: 48px 0 16px; }
.site-footer a { color: #fff; }
.site-footer strong { color: #fff; }
.footer-in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.copy { text-align: center; color: #888; font-size: .8rem; margin: 36px 0 0; }

/* Visionneuse d'images */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 84vh; max-width: 100%; width: auto; }
.lb-cap { color: #ddd; margin-top: 12px; text-align: center; max-width: 800px; }
.lb-close { position: absolute; top: 10px; right: 16px; font-size: 2.4rem; line-height: 1; background: none; border: 0; color: #fff; cursor: pointer; }

/* Tablette / mobile */
@media (max-width: 980px) {
  .burger { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: 0 8px 18px rgba(0,0,0,.12); display: none; max-height: calc(100vh - 72px); overflow-y: auto; }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; gap: 0; padding: 8px 16px 16px; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--ligne); }
  .nav li ul { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; min-width: 0; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .col { flex-basis: 100% !important; }
  .col + .col { margin-top: 1.5rem; }
  .image[style] { max-width: 100% !important; }
  .news { grid-template-columns: 1fr; gap: 12px; }
  .footer-in { grid-template-columns: 1fr; gap: 20px; }
  .hero { min-height: 70vh; }
  .hero-text { font-size: .95rem; }
  .text h1 { font-size: 1.55rem; }
  .page-title { font-size: 1.7rem; }
  .cta { padding: 24px 18px; }
  .section { padding: 28px 0; }
  .text [style*="justify"] { text-align: left !important; }
}

/* Ancres : ne pas passer sous le menu fixe */
[id] { scroll-margin-top: 90px; }

/* Lignes de séparation seules : pas de double espacement */
.col > hr:only-child { margin: 0; }
/* Texte justifié d'origine : aligné à gauche, plus lisible (pas de « trous » entre les mots) */
.text [style*="justify"] { text-align: left !important; }
/* Après une grande image pleine largeur : redonner de l'air au contenu */
.section.fullwidth + .section { padding-top: 64px; }
@media (max-width: 760px) { .section.fullwidth + .section { padding-top: 40px; } }

/* Page d'exposition : encadré pratique aux couleurs de l'exposition */
.expo-dates { font-weight: 600; color: #8f1d48; font-size: 1.05rem; }
.infos-expo { background: #fbf3f6; border-left: 4px solid #8f1d48; padding: 28px 28px 20px; border-radius: 0 4px 4px 0; }
.infos-expo h2 { color: #00405a; margin-bottom: 1rem; }
.infos-expo strong { color: #00405a; }
.infos-expo .btn { border-color: #8f1d48; color: #8f1d48; }
.infos-expo .btn:hover { background: #8f1d48; color: #fff; }
.infos-expo a:not(.btn) { color: #8f1d48; }
@media (max-width: 760px) { .infos-expo { padding: 22px 18px 14px; } }
@media (max-width: 760px) { img[src*="Logo-Paysannes"] { max-width: 200px; margin: 0 auto !important; } }
