/* ==========================================================================
   Commune d'Allainville-aux-Bois — feuille de style principale
   Couleurs inspirées de la mairie-école (brique, enduit clair) et du blason
   (gueules et or).
   ========================================================================== */

@font-face { font-family: "Public Sans"; font-weight: 400; font-display: swap; src: url("../fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 500; font-display: swap; src: url("../fonts/public-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-display: swap; src: url("../fonts/public-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 700; font-display: swap; src: url("../fonts/public-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-display: swap; src: url("../fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 700; font-display: swap; src: url("../fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); }

:root {
  --brick: #7d2418;
  --brick-600: #973021;
  --brick-50: #f8ece8;
  --gold: #c39a32;
  --gold-50: #faf3df;
  --ink: #1c2230;
  --ink-2: #364055;
  --muted: #5b6273;
  --paper: #fbf8f3;
  --cream: #f3ede2;
  --surface: #ffffff;
  --line: #e4ddd0;
  --line-strong: #cfc5b3;
  --green: #2d6a3e;
  --green-50: #e9f4ec;
  --amber: #8a5800;
  --amber-50: #fdf3dc;
  --red-50: #fbeaea;
  --blue: #23527c;
  --blue-50: #e8f0f7;

  --font-sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(28, 34, 48, .06), 0 1px 3px rgba(28, 34, 48, .08);
  --shadow: 0 4px 14px rgba(28, 34, 48, .08), 0 1px 3px rgba(28, 34, 48, .06);
  --shadow-lg: 0 18px 40px rgba(28, 34, 48, .14);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
}

/* Base ------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brick); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brick-600); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.2; color: var(--ink); margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.05rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
address { font-style: normal; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; border-radius: 0 0 6px 6px; }
.skip-link:focus { top: 0; color: #fff; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brick); margin-bottom: .6rem; }

/* Boutons ---------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 1rem/1.2 var(--font-sans);
  padding: .8rem 1.3rem; border-radius: 8px;
  background: var(--brick); color: #fff; border: 2px solid var(--brick);
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn:hover { background: var(--brick-600); border-color: var(--brick-600); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-outline { background: transparent; color: var(--brick); }
.btn-outline:hover { background: var(--brick-50); color: var(--brick); }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.link-arrow::after { content: "→"; transition: transform .15s; }
.link-arrow:hover::after { transform: translateX(3px); }

/* Barre supérieure & en-tête ---------------------------------------------- */

.topbar { background: var(--ink); color: #d9dce4; font-size: .875rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 40px; }
.topbar p { margin: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: #fff; }
.topbar-links a { font-weight: 600; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.site-header::after { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--brick) 0 70%, var(--gold) 70% 100%); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 84px; }
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand img { width: 46px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-kicker { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.brand-name { font-family: var(--font-serif); font-size: 1.45rem; font-weight: 700; }
.brand-sub { font-size: .78rem; color: var(--brick); font-weight: 600; letter-spacing: .04em; margin-top: 2px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .15rem; }
.main-nav a {
  display: block; padding: .55rem .6rem; border-radius: 6px;
  color: var(--ink-2); font-weight: 600; font-size: .93rem; text-decoration: none; position: relative;
}
.main-nav a:hover { background: var(--cream); color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--brick); }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .15rem; height: 3px; background: var(--brick); border-radius: 3px; }

.main-nav .has-sub { position: relative; }
.sub-toggle { display: flex; align-items: center; gap: .3rem; padding: .55rem .6rem; border: 0; background: none; border-radius: 6px; font: 600 .93rem var(--font-sans); color: var(--ink-2); cursor: pointer; position: relative; }
.sub-toggle::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: .2rem; }
.sub-toggle:hover { background: var(--cream); color: var(--ink); }
.sub-toggle[data-active] { color: var(--brick); }
.sub-toggle[data-active]::before { content: ""; position: absolute; left: .6rem; right: 1.4rem; bottom: .15rem; height: 3px; background: var(--brick); border-radius: 3px; }
.main-nav .sub-menu { display: none; }
.main-nav .has-sub:hover > .sub-menu, .main-nav .has-sub:focus-within > .sub-menu, .main-nav .sub-toggle[aria-expanded="true"] + .sub-menu { display: flex; }
.sub-menu a { white-space: nowrap; }
.sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: .4rem; z-index: 60; flex-direction: column !important; }
.has-sub:hover > .sub-menu, .has-sub:focus-within > .sub-menu, .sub-toggle[aria-expanded="true"] + .sub-menu { display: flex; }
.sub-menu a { padding: .55rem .75rem; font-weight: 500; }
.sub-menu a[aria-current="page"]::after { display: none; }
.sub-menu a[aria-current="page"] { background: var(--brick-50); }
.nav-toggle { display: none; align-items: center; gap: .6rem; font: 600 1rem var(--font-sans); background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px; padding: .6rem .9rem; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1200px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; padding: .5rem var(--gutter) 1rem; }
  .main-nav a { padding: .85rem .75rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .main-nav a[aria-current="page"]::after { left: 0; right: auto; top: .6rem; bottom: .6rem; width: 3px; height: auto; }
  .site-header { position: relative; }
  .sub-toggle { width: 100%; padding: .85rem .75rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; justify-content: space-between; }
  .sub-toggle[data-active]::before { display: none; }
  .sub-menu, .main-nav .sub-menu { display: flex; position: static; box-shadow: none; border: 0; padding: 0 0 .3rem 1rem; min-width: 0; }
  .sub-menu a { font-size: .98rem; padding: .6rem .75rem; }
}
@media (max-width: 720px) {
  .topbar-info span, .topbar-info a[href^="mailto"] { display: none; }
  .header-inner { min-height: 72px; }
  .brand-name { font-size: 1.2rem; }
  .brand img { width: 38px; }
}

.alert-banner { background: var(--gold-50); border-bottom: 1px solid #ecdcae; color: var(--ink); font-size: .95rem; }
.alert-banner .container { padding-top: .7rem; padding-bottom: .7rem; }
.alert-banner strong { display: inline-block; background: var(--gold); color: var(--ink); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 4px; margin-right: .5rem; vertical-align: 1px; }

.flash-zone { padding-top: 1.25rem; }

/* Notices ----------------------------------------------------------------- */

.notice { padding: .9rem 1.1rem; border-radius: 8px; border-left: 4px solid; margin-bottom: 1rem; background: var(--surface); }
.notice-success { border-color: var(--green); background: var(--green-50); }
.notice-error { border-color: #b3261e; background: var(--red-50); }
.notice-info { border-color: var(--blue); background: var(--blue-50); }
.notice-warning { border-color: var(--amber); background: var(--amber-50); }

/* Héros d'accueil --------------------------------------------------------- */

.hero { position: relative; color: #fff; isolation: isolate; overflow: hidden; background: var(--ink); }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20, 24, 34, .88) 0%, rgba(20, 24, 34, .62) 45%, rgba(20, 24, 34, .15) 100%); }
.hero-inner { padding: clamp(4rem, 9vw, 7.5rem) var(--gutter) clamp(6.5rem, 11vw, 9rem); }
.hero h1 { color: #fff; max-width: 20ch; font-size: clamp(2.1rem, 5.4vw, 3.9rem); hyphens: none; }
.hero .eyebrow { color: #f1d488; }
.hero p { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 46ch; color: #eef0f4; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero .hero-credit { position: absolute; right: .75rem; top: .5rem; font-size: .7rem; color: rgba(255,255,255,.75); margin: 0; }

.quick-links { position: relative; margin-top: -4.5rem; z-index: 2; }
.quick-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); }
.quick-grid li + li { border-left: 1px solid var(--line); }
.quick-grid a { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; padding: 1.35rem 1.2rem; height: 100%; text-decoration: none; color: var(--ink); transition: background .15s; }
.quick-grid a:hover { background: var(--brick-50); color: var(--ink); }
.quick-grid .qi { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--brick-50); color: var(--brick); }
.quick-grid a:hover .qi { background: var(--brick); color: #fff; }
.quick-grid svg { width: 22px; height: 22px; }
.quick-grid strong { font-size: 1rem; line-height: 1.25; }
.quick-grid small { color: var(--muted); font-size: .85rem; line-height: 1.35; }
@media (max-width: 1000px) { .quick-grid { grid-template-columns: repeat(3, 1fr); } .quick-grid li:nth-child(4) { border-left: 0; } .quick-grid li:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 560px) { .quick-grid { grid-template-columns: repeat(2, 1fr); } .quick-grid li { border-left: 0 !important; border-top: 1px solid var(--line); } .quick-grid li:nth-child(even) { border-left: 1px solid var(--line) !important; } .quick-grid li:nth-child(-n+2) { border-top: 0; } .quick-grid small { display: none; } }

/* Sections ---------------------------------------------------------------- */

.page-section { padding: clamp(3rem, 7vw, 5rem) 0; }
.page-section.tight { padding-top: 2rem; }
.section-alt { background: var(--cream); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: .35rem 0 0; color: var(--muted); }

.page-header { background: var(--surface); border-bottom: 1px solid var(--line); padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem); position: relative; overflow: hidden; }
.page-header::after { content: ""; position: absolute; right: -60px; top: -40px; width: 280px; height: 300px; background: url("../img/blason.png") center/contain no-repeat; opacity: .05; pointer-events: none; }
.page-header h1 { margin-bottom: .4rem; }
.page-header .lead { margin: 0; }
.breadcrumb { font-size: .875rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.breadcrumb li + li::before { content: "/"; margin-right: .35rem; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); }

/* Cartes d'actualité ------------------------------------------------------ */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.5rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; position: relative; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { aspect-ratio: 16 / 9; background: var(--cream); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media.placeholder { display: grid; place-items: center; background: linear-gradient(135deg, var(--brick) 0%, #5a1a11 100%); }
.card-media.placeholder img { width: 64px; height: auto; object-fit: contain; opacity: .9; }
.card-media.placeholder.assoc { background: linear-gradient(135deg, var(--ink-2) 0%, var(--ink) 100%); }
.card-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: .6rem; }
.card h3 { font-size: 1.22rem; margin-bottom: .5rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card h3 a:hover { color: var(--brick); }
.card p { color: var(--ink-2); font-size: .98rem; margin: 0; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em; padding: .2rem .55rem; border-radius: 999px; background: var(--brick-50); color: var(--brick); }
.tag-assoc { background: var(--blue-50); color: var(--blue); }
.tag-gold { background: var(--gold-50); color: #6e5414; }

.card-featured { grid-column: 1 / -1; flex-direction: row; }
.card-featured .card-media { aspect-ratio: auto; flex: 1 1 55%; min-height: 320px; }
.card-featured .card-body { flex: 1 1 45%; padding: 2rem 2.25rem; justify-content: center; }
.card-featured h3 { font-size: 1.7rem; }
@media (max-width: 760px) { .card-featured { flex-direction: column; } .card-featured .card-media { min-height: 0; aspect-ratio: 16/9; } .card-featured .card-body { padding: 1.25rem 1.35rem 1.4rem; } .card-featured h3 { font-size: 1.3rem; } }

/* Agenda ------------------------------------------------------------------ */

.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.event { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; position: relative; transition: box-shadow .2s, border-color .2s; }
.event:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.event-date { width: 68px; text-align: center; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; flex-shrink: 0; }
.event-date .m { display: block; background: var(--brick); color: #fff; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .25rem 0; }
.event-date .d { display: block; font-family: var(--font-serif); font-size: 1.8rem; font-weight: 700; line-height: 1.15; padding: .3rem 0 .05rem; }
.event-date .w { display: block; font-size: .72rem; color: var(--muted); padding-bottom: .35rem; text-transform: capitalize; }
.event h3 { font-size: 1.15rem; margin: 0 0 .25rem; }
.event h3 a { color: var(--ink); text-decoration: none; }
.event h3 a::after { content: ""; position: absolute; inset: 0; }
.event h3 a:hover { color: var(--brick); }
.event-info { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .9rem; color: var(--muted); margin: 0; }
.event-info span { display: inline-flex; align-items: center; gap: .35rem; }
.event-info svg { width: 15px; height: 15px; flex-shrink: 0; }
.event p.event-summary { margin: .45rem 0 0; font-size: .95rem; color: var(--ink-2); }
.month-title { font-family: var(--font-sans); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 2.25rem 0 .9rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.month-title:first-child { margin-top: 0; }

/* Mise en page accueil ---------------------------------------------------- */

.home-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); }
@media (max-width: 960px) { .home-grid { grid-template-columns: 1fr; } }

.mayor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.mayor-figure { position: relative; }
.mayor-figure img { border-radius: var(--radius-lg); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.mayor-figure .mayor-placeholder { aspect-ratio: 4/5; border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--brick) 0%, #4e160e 100%); display: grid; place-items: center; }
.mayor-figure .mayor-placeholder img { width: 40%; aspect-ratio: auto; box-shadow: none; border-radius: 0; }
.mayor blockquote { margin: 0; font-family: var(--font-serif); font-size: 1.12rem; color: var(--ink-2); position: relative; }
.mayor blockquote::before { content: "“"; position: absolute; left: -.15em; top: -.55em; font-size: 5rem; color: var(--gold); opacity: .45; line-height: 1; }
.mayor-sign { font-weight: 700; color: var(--brick); margin-top: 1rem; }
.clamp-text { max-height: 15.5em; overflow: hidden; position: relative; }
.clamp-text::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4em; background: linear-gradient(transparent, var(--cream)); }
.clamp-text.is-open { max-height: none; }
.clamp-text.is-open::after { display: none; }
@media (max-width: 760px) { .mayor { grid-template-columns: 1fr; } .mayor-figure { max-width: 260px; } }

.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.info-card + .info-card { margin-top: 1.25rem; }
.info-card h2, .info-card h3 { font-size: 1.25rem; }
.info-card dl { margin: 0; display: grid; gap: .9rem; }
.info-card dt { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.info-card dd { margin: .1rem 0 0; }
.info-card.accent { background: var(--ink); color: #e8eaf0; border-color: var(--ink); }
.info-card.accent h2, .info-card.accent h3 { color: #fff; }
.info-card.accent a { color: #f1d488; }
.info-card.accent dt { color: #aab1c2; }

.hours-note { background: var(--gold); color: var(--ink); font-weight: 600; font-size: .92rem; padding: .55rem .75rem; border-radius: 8px; margin: 0; }
.hours-week { border-collapse: collapse; width: 100%; max-width: 360px; margin-top: .2rem; }
.hours-week th { text-align: left; font-weight: 600; padding: .2rem 1rem .2rem 0; white-space: nowrap; }
.hours-week td { padding: .2rem 0; }
.hours-week tr.closed { opacity: .55; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; text-align: center; margin: 0; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem .5rem; }
.stats dt { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stats dd { margin: 0; font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; color: var(--brick); order: -1; }
.stats div { display: flex; flex-direction: column; }

.history-teaser { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; background: var(--ink); color: #e6e8ee; border-radius: var(--radius-lg); overflow: hidden; }
.history-teaser .ht-media img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; filter: saturate(.85); }
.history-teaser .ht-body { padding: clamp(1.75rem, 4vw, 3rem); display: flex; flex-direction: column; justify-content: center; }
.history-teaser h2 { color: #fff; }
.history-teaser .eyebrow { color: #f1d488; }
.history-teaser p { color: #cfd3dd; }
@media (max-width: 820px) { .history-teaser { grid-template-columns: 1fr; } .history-teaser .ht-media img { min-height: 220px; max-height: 260px; } }

/* Associations ------------------------------------------------------------ */

.assoc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.assoc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; display: flex; gap: 1.1rem; align-items: flex-start; position: relative; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.assoc-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.assoc-logo { width: 72px; height: 72px; border-radius: 14px; background: var(--brick-50); color: var(--brick); flex-shrink: 0; display: grid; place-items: center; font-family: var(--font-serif); font-weight: 700; font-size: 1.5rem; overflow: hidden; border: 1px solid var(--line); }
.assoc-logo img { width: 100%; height: 100%; object-fit: cover; }
.assoc-card h3 { font-size: 1.2rem; margin: .2rem 0 .35rem; }
.assoc-card h3 a { color: var(--ink); text-decoration: none; }
.assoc-card h3 a::after { content: ""; position: absolute; inset: 0; }
.assoc-card h3 a:hover { color: var(--brick); }
.assoc-card p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.assoc-hero { display: flex; gap: 1.5rem; align-items: center; }
.assoc-hero .assoc-logo { width: 104px; height: 104px; font-size: 2.1rem; }
@media (max-width: 560px) { .assoc-hero { flex-direction: column; align-items: flex-start; } }

.cta-band { background: linear-gradient(120deg, var(--brick) 0%, #5d1a10 100%); color: #fff; border-radius: var(--radius-lg); padding: clamp(1.75rem, 4vw, 2.75rem); display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .35rem; font-size: 1.6rem; }
.cta-band p { margin: 0; color: #f3dcd6; max-width: 60ch; }

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.contact-list li { display: flex; gap: .7rem; align-items: flex-start; }
.contact-list svg { width: 20px; height: 20px; color: var(--brick); flex-shrink: 0; margin-top: .2rem; }
.info-card.accent .contact-list svg { color: #f1d488; }
.info-card.accent .contact-list { margin-top: .5rem; }

/* Article ----------------------------------------------------------------- */

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } }
.article-hero { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 2rem; box-shadow: var(--shadow); }
.article-hero img { width: 100%; max-height: 520px; object-fit: cover; }
.prose { font-size: 1.1rem; max-width: 70ch; }
.prose h3 { font-size: 1.4rem; margin-top: 2rem; }
.prose ul { margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose p:first-child { font-size: 1.18rem; color: var(--ink-2); }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; color: var(--muted); font-size: .95rem; margin-top: 1rem; }
.event-box { background: var(--gold-50); border: 1px solid #ecdcae; border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 2rem; display: grid; gap: .5rem; }
.event-box p { margin: 0; display: flex; gap: .6rem; align-items: flex-start; }
.event-box svg { width: 20px; height: 20px; color: var(--brick); flex-shrink: 0; margin-top: .2rem; }
.sticky { position: sticky; top: 110px; }

/* Séances du conseil ------------------------------------------------------ */

.meetings { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.meeting { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.35rem 1.5rem; box-shadow: var(--shadow-sm); scroll-margin-top: 120px; }
.meeting h2 { font-size: 1.35rem; margin: .5rem 0 .2rem; }
.meeting .event-date { align-self: start; }
.meeting-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.meeting-actions svg { width: 18px; height: 18px; }
.meeting-video { margin-top: 1rem; }
.meeting-video summary { cursor: pointer; font-weight: 600; color: var(--brick); display: inline-flex; align-items: center; gap: .4rem; }
.meeting-video summary::before { content: "▶"; font-size: .8rem; }
.meeting-video[open] summary::before { content: "▼"; }
.video-frame { position: relative; aspect-ratio: 16 / 9; margin-top: .8rem; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 560px) { .meeting { grid-template-columns: 1fr; padding: 1.1rem; } .meeting .event-date { display: none; } }

/* Lettre d'information ---------------------------------------------------- */

.newsletter-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.4rem, 4vw, 2.2rem); box-shadow: var(--shadow); }
.newsletter-inline { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.newsletter-inline input[type=email] { flex: 1 1 200px; min-width: 0; background: #fff; }
.footer-newsletter p { margin: 0 0 .5rem; }
.footer-newsletter input[type=email] { border-color: rgba(255,255,255,.25); }
.choice-list { display: grid; gap: .6rem; }

/* Écoles ------------------------------------------------------------------ */

.school-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1.25rem; }
.school { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.school h3 { margin: .6rem 0 .8rem; }
.ecoles-blocks { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 1.25rem; }
.ecoles-blocks .service { padding: 1.4rem 1.5rem; }
.ecoles-blocks .prose h3 { font-size: 1.05rem; margin-top: 1rem; }

/* Collecte des déchets ------------------------------------------------------ */

.next-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.next-card { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .2rem; box-shadow: var(--shadow-sm); }
.next-card .next-kind { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--c); }
.next-card strong { font-family: var(--font-serif); font-size: 1.35rem; }
.next-card .muted { font-size: .88rem; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; font-size: .88rem; color: var(--ink-2); }
.legend .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--c); margin: 0 .35rem 0 .4rem; vertical-align: -1px; }
.legend .dot:first-child { margin-left: 0; }
.legend .dot.sq { border-radius: 3px; }
.month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 1rem; }
.month-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.month-box.current { border-color: var(--brick); box-shadow: 0 0 0 2px var(--brick-50); }
.month-box h3 { font-family: var(--font-sans); font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.month-box ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.month-box li { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; font-size: .88rem; }
.month-box li.past { opacity: .45; }
.month-box .d { min-width: 4.2rem; font-weight: 600; color: var(--ink-2); }
.pill { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 700; color: #fff; background: var(--c); }
.kinds { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .4rem 0 0 1.9rem; font-size: .92rem; }
.kinds label { display: inline-flex; gap: .35rem; align-items: center; font-weight: 400; }
.kinds input { accent-color: var(--brick); width: 16px; height: 16px; }

/* Documents (GED) ---------------------------------------------------------- */

.docs-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 860px) { .docs-layout { grid-template-columns: 1fr; } }
.doc-cats { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem; position: sticky; top: 110px; }
.doc-cats a { display: flex; justify-content: space-between; gap: .5rem; padding: .55rem .7rem; border-radius: 6px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .93rem; }
.doc-cats a span { color: var(--muted); font-weight: 500; }
.doc-cats a:hover { background: var(--cream); }
.doc-cats a[aria-current="true"] { background: var(--brick); color: #fff; }
.doc-cats a[aria-current="true"] span { color: #f3dcd6; }
@media (max-width: 860px) { .doc-cats { position: static; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
.doc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.doc-list li { display: flex; gap: .8rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .65rem .8rem; }
.doc-list li > span:not(.doc-ext) { display: flex; flex-direction: column; min-width: 0; }
.doc-list a { font-weight: 600; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.doc-list a:hover { color: var(--brick); text-decoration: underline; }
.doc-list small { color: var(--muted); font-size: .82rem; }
.doc-list .doc-desc { color: var(--ink-2); margin-top: .2rem; }
.doc-list.big li { padding: .85rem 1rem; }
.doc-ext { flex-shrink: 0; display: inline-grid; place-items: center; width: 42px; height: 30px; border-radius: 5px; background: var(--ink-2); color: #fff; font: 700 .68rem/1 var(--font-sans); letter-spacing: .04em; }
.doc-pdf { background: #b3261e; } .doc-doc, .doc-docx, .doc-odt { background: #2b579a; } .doc-xls, .doc-xlsx, .doc-ods, .doc-csv { background: #217346; } .doc-jpg, .doc-jpeg, .doc-png { background: #8a5800; }

/* Calendrier ------------------------------------------------------------- */

.cal-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.cal-toolbar h2 { margin: 0 .5rem; min-width: 11ch; text-align: center; }
.cal-toolbar .filters-toggle { margin-left: auto; font-weight: 600; font-size: .92rem; }
.cal-wrap { overflow-x: auto; }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--surface); border-radius: var(--radius); overflow: hidden; min-width: 640px; }
.cal caption { display: none; }
.cal th { padding: .5rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--cream); }
.cal th abbr { text-decoration: none; }
.cal td { border: 1px solid var(--line); vertical-align: top; height: 108px; padding: .3rem; overflow: hidden; }
.cal td .n { display: block; font-weight: 700; font-size: .85rem; color: var(--ink-2); margin-bottom: .2rem; }
.cal td.out { background: #f7f4ef; }
.cal td.past .n { color: var(--line-strong); }
.cal td.today { box-shadow: inset 0 0 0 2px var(--brick); }
.cal td.today .n { color: var(--brick); }
.cal td.holiday { background: var(--gold-50); }
.cal td.busy { background: #ece2f7; }
.cal td.option { background: repeating-linear-gradient(45deg, #f6effc, #f6effc 6px, #fff 6px, #fff 12px); }
.cal-item { display: block; font-size: .74rem; line-height: 1.25; padding: .15rem .35rem; border-radius: 4px; margin-bottom: .2rem; text-decoration: none; color: #fff; background: var(--brick); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-item:hover { color: #fff; filter: brightness(1.1); }
.cal-item.conseil { background: var(--blue); }
.cal-item.salle { background: #6b5aa6; }
.cal-item.collecte { background: #5b6273; }
.cal-item.collecte-tri { background: #a17c1d; }
.cal-item.collecte-verre { background: var(--green); }
.cal-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.cal-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem; display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; }
.cal-list .cal-item { display: inline-block; font-size: .85rem; margin: 0; white-space: normal; }
.avail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 1rem; }
.cal-compact { min-width: 0; }
.cal-compact caption { display: table-caption; caption-side: top; text-align: left; font-weight: 700; padding: .3rem 0 .5rem; color: var(--ink); }
.cal-compact th { padding: .3rem 0; font-size: .7rem; }
.cal-compact td { height: auto; padding: .35rem 0; text-align: center; }
.cal-compact td .n { margin: 0; font-weight: 600; }
.cal-compact td.busy { background: #c9b3e3; }
.cal-compact td.busy .n { color: #3b2a63; }
.cal-compact td.option { background: #e9d9f7; }

/* Salle des fêtes ---------------------------------------------------------- */

.rates { width: 100%; border-collapse: collapse; font-size: .95rem; }
.rates th, .rates td { padding: .45rem .3rem; border-bottom: 1px solid rgba(255,255,255,.12); text-align: left; }
.rates thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: #aab1c2; }
.rates tbody th { font-weight: 600; }
.rates tbody th small { display: block; font-weight: 400; color: #aab1c2; font-size: .8rem; }
.rates td { white-space: nowrap; font-weight: 700; color: #f1d488; }
.price-estimate { background: var(--gold-50); border: 1px solid #ecdcae; border-radius: 8px; padding: .7rem .9rem; margin: 0; font-weight: 600; }
.booking-dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 1rem 0; }
.booking-dl dt { font-weight: 700; color: var(--muted); font-size: .9rem; }
.booking-dl dd { margin: 0; }

/* Bibliothèque ------------------------------------------------------------ */

.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1.25rem; }
.book { display: grid; grid-template-columns: 96px 1fr; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem; box-shadow: var(--shadow-sm); }
.book-cover { position: relative; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: linear-gradient(160deg, var(--brick) 0%, #4e160e 100%); box-shadow: 2px 3px 8px rgba(0,0,0,.18); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover-ph { display: flex; align-items: center; justify-content: center; height: 100%; padding: .4rem; color: #f6e7c4; font-family: var(--font-serif); font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.2; }
.book-fav { position: absolute; left: 0; right: 0; bottom: 0; background: var(--gold); color: var(--ink); font-size: .62rem; font-weight: 700; text-align: center; padding: .15rem 0; text-transform: uppercase; letter-spacing: .04em; }
.book h3 { font-size: 1.05rem; margin: 0 0 .15rem; }
.book-author { margin: 0; color: var(--ink-2); font-size: .93rem; }
.book-meta { margin: .2rem 0 .5rem; color: var(--muted); font-size: .82rem; }
.book-status { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; }
.book-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; }
.book-status.in { color: var(--green); }
.book-status.in::before { background: var(--green); }
.book-status.out { color: var(--amber); }
.book-status.out::before { background: var(--amber); }
.book details { margin-top: .5rem; font-size: .9rem; }
.book summary { cursor: pointer; color: var(--brick); font-weight: 600; }
.book details p { margin: .4rem 0 0; color: var(--ink-2); }
.catalog-search { display: flex; flex-wrap: wrap; gap: .6rem; }
.catalog-search input[type=search] { flex: 2 1 240px; }
.catalog-search select { flex: 1 1 160px; width: auto; }

/* Équipe municipale ------------------------------------------------------- */

.team-group { margin-bottom: 3rem; }
.team-group > h2 { font-family: var(--font-sans); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding-bottom: .6rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
.team-grid.lead-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.member { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.member-photo { aspect-ratio: 1 / 1; background: linear-gradient(160deg, var(--cream) 0%, #e6dccb 100%); display: grid; place-items: center; overflow: hidden; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.member-photo .initials { font-family: var(--font-serif); font-weight: 700; font-size: 3rem; color: var(--brick); opacity: .8; }
.member-body { padding: 1.1rem 1.2rem 1.3rem; flex: 1; display: flex; flex-direction: column; }
.member-role { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brick); }
.member h3 { font-size: 1.25rem; margin: .2rem 0 .5rem; }
.member p { font-size: .95rem; color: var(--ink-2); margin: 0 0 .5rem; }
.member .delegations { font-size: .92rem; color: var(--ink-2); padding-left: 1.1em; margin: 0 0 .5rem; }
.member details { margin-top: auto; font-size: .95rem; }
.member summary { cursor: pointer; font-weight: 600; color: var(--brick); }
.member-maire { flex-direction: row; grid-column: 1 / -1; }
.member-maire .member-photo { width: min(280px, 40%); aspect-ratio: auto; min-height: 260px; flex-shrink: 0; }
.member-maire .member-body { padding: 2rem; justify-content: center; }
.member-maire h3 { font-size: 1.8rem; }
@media (max-width: 640px) { .member-maire { flex-direction: column; } .member-maire .member-photo { width: 100%; aspect-ratio: 1/1; min-height: 0; } .member-maire .member-body { padding: 1.25rem; } }

/* Histoire ---------------------------------------------------------------- */

.history-hero { position: relative; color: #fff; isolation: isolate; background: #2a2118; overflow: hidden; }
.history-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: sepia(.35) saturate(.8) brightness(.9); }
.history-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(25, 18, 10, .88) 0%, rgba(25, 18, 10, .45) 60%, rgba(25, 18, 10, .3) 100%); }
.history-hero .container { padding-top: clamp(5rem, 12vw, 9rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.history-hero h1 { color: #fff; }
.history-hero .lead { color: #efe7da; }
.history-hero .breadcrumb, .history-hero .breadcrumb a { color: #d8cdbb; }
.history-hero .eyebrow { color: #f1d488; }

.toc { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: .4rem .8rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.toc a:hover { border-color: var(--brick); color: var(--brick); }

.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--gold), var(--brick)); }
.chapter { position: relative; padding-left: 52px; margin-bottom: clamp(2.5rem, 6vw, 4rem); scroll-margin-top: 120px; }
.chapter::before { content: ""; position: absolute; left: 3px; top: 8px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 4px solid var(--brick); }
.chapter-period { display: inline-block; font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--brick); background: var(--brick-50); padding: .2rem .65rem; border-radius: 4px; margin-bottom: .6rem; }
.chapter h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.chapter-content { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.chapter-content.no-image { grid-template-columns: minmax(0, 1fr); max-width: 72ch; }
.chapter:nth-child(even) .chapter-content:not(.no-image) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.chapter:nth-child(even) .chapter-content:not(.no-image) figure { order: -1; }
.chapter .prose { font-size: 1.07rem; }
.chapter .prose p:first-child { font-size: inherit; color: inherit; }
@media (max-width: 820px) { .chapter-content, .chapter:nth-child(even) .chapter-content:not(.no-image) { grid-template-columns: 1fr; } .chapter:nth-child(even) .chapter-content figure { order: 0; } }

.photo-frame { margin: 0; background: #fff; padding: 10px 10px 0; border-radius: 4px; box-shadow: var(--shadow); transform: rotate(-.6deg); }
.chapter:nth-child(even) .photo-frame { transform: rotate(.6deg); }
.photo-frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.photo-frame figcaption { padding: .65rem .25rem .8rem; font-size: .9rem; color: var(--ink-2); }
.photo-frame figcaption small { display: block; color: var(--muted); font-size: .75rem; margin-top: .2rem; }

.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 1.5rem; }
.compare { margin: 0; }
.compare-frame { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow); background: #ccc; touch-action: pan-y; }
.compare-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); pointer-events: none; }
.compare-handle::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--brick); display: grid; place-items: center; font-size: 1.2rem; font-weight: 700; box-shadow: var(--shadow); }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare-range:focus-visible + .compare-handle, .compare-frame:focus-within .compare-handle::after { outline: 3px solid var(--gold); }
.compare-tag { position: absolute; top: .75rem; background: rgba(28, 34, 48, .82); color: #fff; font-size: .8rem; font-weight: 700; padding: .2rem .6rem; border-radius: 4px; pointer-events: none; }
.compare-tag.left { left: .75rem; }
.compare-tag.right { right: .75rem; }
.compare figcaption { padding: .7rem .2rem 0; font-weight: 600; }
.compare figcaption small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.gallery { columns: 3 280px; column-gap: 1.25rem; }
.gallery figure { break-inside: avoid; margin: 0 0 1.25rem; background: #fff; padding: 8px 8px 0; border-radius: 4px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.gallery button { all: unset; cursor: zoom-in; display: block; position: relative; }
.gallery button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.gallery img { width: 100%; border-radius: 2px; }
.gallery .year { position: absolute; left: 8px; top: 8px; background: rgba(28, 34, 48, .85); color: #fff; font-size: .78rem; font-weight: 700; padding: .15rem .5rem; border-radius: 4px; }
.gallery figcaption { padding: .6rem .3rem .75rem; font-size: .92rem; }
.gallery figcaption strong { display: block; }
.gallery figcaption small { display: block; color: var(--muted); font-size: .75rem; margin-top: .15rem; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 94vh; }
.lightbox::backdrop { background: rgba(10, 12, 18, .88); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 4px; }
.lightbox p { color: #fff; text-align: center; margin: .75rem 0 0; }
.lightbox-close { position: fixed; top: 1rem; right: 1rem; background: #fff; color: var(--ink); border: 0; border-radius: 999px; width: 44px; height: 44px; font-size: 1.5rem; cursor: pointer; }

/* Filtres ----------------------------------------------------------------- */

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filters a { padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .92rem; text-decoration: none; }
.filters a:hover { border-color: var(--brick); color: var(--brick); }
.filters a[aria-current="true"] { background: var(--brick); border-color: var(--brick); color: #fff; }

.pagination ul { list-style: none; display: flex; gap: .4rem; padding: 0; margin: 2.5rem 0 0; justify-content: center; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--line-strong); text-decoration: none; font-weight: 600; background: var(--surface); }
.pagination span { background: var(--brick); color: #fff; border-color: var(--brick); }

.empty { text-align: center; padding: 3rem 1.5rem; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--muted); }

/* Formulaires ------------------------------------------------------------- */

.form-grid { display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.field .hint { display: block; font-size: .85rem; color: var(--muted); margin-top: .3rem; font-weight: 400; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=url], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: .7rem .85rem; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brick); box-shadow: 0 0 0 3px rgba(125, 36, 24, .15); }
textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
.checkbox, .field label.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400 !important; }
.checkbox input { margin-top: .35rem; width: 18px; height: 18px; accent-color: var(--brick); }
.hp-field { position: absolute; left: -9999px; }
.req { color: var(--brick); }

.auth-wrap { min-height: 60vh; display: grid; place-items: center; padding: 3rem var(--gutter); }
.auth-card { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 5vw, 2.5rem); box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.8rem; }

/* Pied de page ------------------------------------------------------------ */

.site-footer { background: var(--ink); color: #c9cdd8; margin-top: 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.25fr 1fr 1.25fr 1fr 1fr; gap: 2rem; padding-top: 3.5rem; padding-bottom: 3rem; }
@media (max-width: 1100px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-name { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700; color: #fff; margin: .9rem 0 .4rem; }
.footer-title { font-family: var(--font-sans); font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.footer-bottom p { margin: 0; }
.footer-bottom ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }

/* Divers ------------------------------------------------------------------ */

.two-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 900px) { .two-cols { grid-template-columns: 1fr; } }
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.25rem; }
.service h3 { font-family: var(--font-sans); font-size: 1.02rem; margin-bottom: .35rem; display: flex; align-items: center; gap: .5rem; }
.service h3 svg { width: 20px; height: 20px; color: var(--brick); flex-shrink: 0; }
a.service { transition: border-color .15s, box-shadow .15s; }
a.service:hover { border-color: var(--brick); box-shadow: var(--shadow); }
a.service h3 { color: var(--brick); }
.service p { font-size: .94rem; color: var(--ink-2); margin: 0; }
.legal h2 { margin-top: 2.5rem; font-size: 1.5rem; scroll-margin-top: 110px; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; white-space: nowrap; }
.badge-brouillon { background: #eceef2; color: #4a5164; }
.badge-en_attente { background: var(--amber-50); color: var(--amber); }
.badge-publie { background: var(--green-50); color: var(--green); }
.badge-refuse { background: var(--red-50); color: #9a221b; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .site-header, .site-footer, .alert-banner, .quick-links { display: none; }
  body { background: #fff; }
}
