/* Mairie d'Abzac – feuille de style unique.
   Couleurs tirées du blason (bleu, or) + rouge brique du pigeonnier, sur fond pierre. */
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url("../fonts/atkinson-400.ttf") format("truetype"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url("../fonts/atkinson-700.ttf") format("truetype"); }

:root {
  --stone: #f6efe0;      /* fond : pierre calcaire */
  --paper: #fffdf7;
  --ink: #151a2e;
  --muted: #4b5266;
  --blue: #2b5df2;       /* bleu du blason */
  --blue-deep: #14246b;
  --blue-tint: #dde6fd;
  --gold: #fcef3c;       /* or du blason */
  --brick: #c13b1e;      /* rouge du pigeonnier */
  --brick-tint: #f8d9cf;
  --line: #d8cfba;
  --radius: 18px;
  --base: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--base); }
html[data-size="1"] { font-size: 21px; }
html[data-size="2"] { font-size: 24px; }

body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 4px solid var(--brick); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1480px, 100% - clamp(32px, 4vw, 80px)); margin-inline: auto; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5.5vw, 3rem); }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 .9em; }
ul { padding-left: 1.2em; }

.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--ink); padding: .7em 1em; z-index: 10; font-weight: 700; }
.skip:focus { left: 8px; top: 8px; }

/* Barre du haut : téléphone toujours visible */
.topbar { background: var(--gold); color: var(--ink); }
.topbar a { color: var(--ink); }
.topbar__in { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; align-items: center; justify-content: space-between; padding: .55rem 0; }
.topbar__tel { font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.topbar__tel:hover { text-decoration: underline; }
.textsize { display: flex; align-items: center; gap: .35rem; font-size: .9rem; }
.textsize button {
  font: inherit; font-weight: 700; min-width: 2.7rem; min-height: 2.3rem; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 8px;
}
.textsize button[aria-pressed="true"] { background: var(--ink); color: var(--gold); }

/* En-tête */
.header { background: var(--paper); border-bottom: 3px solid var(--blue); }
.header__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding: 1rem 0; }
.brand { display: flex; align-items: center; gap: .9rem; color: var(--ink); text-decoration: none; }
.brand img { height: 3.6rem; width: auto; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand__txt strong { font-size: 1.5rem; }
.brand__txt small { color: var(--muted); font-size: .95rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .1rem .4rem; }
.nav a { display: block; padding: .5em .7em; color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 4px solid transparent; }
.nav a:hover { border-bottom-color: var(--blue); }
.nav a[aria-current="page"] { border-bottom-color: var(--brick); }

/* Alerte */
.alert { display: flex; gap: 1rem; align-items: baseline; margin-top: 1.5rem; padding: 1rem 1.3rem; background: var(--ink); color: var(--paper); border-radius: var(--radius); }
.alert a { color: var(--gold); }
.alert p { margin: 0; }
.alert__tag { flex: none; background: var(--gold); color: var(--ink); padding: .1em .7em; border-radius: 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }

/* Accueil : la mairie aujourd'hui + photo en arche */
.now { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; margin-top: 1.5rem; padding: 2.2rem; background: var(--blue); color: #fff; border-radius: var(--radius); }
.now__eyebrow { margin: 0 0 .6rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); }
.now__status { margin: 0 0 1.4rem; font-size: clamp(1.9rem, 4.8vw, 3.1rem); font-weight: 700; line-height: 1.12; }
.now__arch { width: 100%; max-width: 340px; justify-self: center; aspect-ratio: 4 / 5; object-fit: cover; object-position: 72% 50%; border-radius: 999px 999px 14px 14px; border: 6px solid var(--gold); }
.btn--gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn--gold:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn--ghost-light { background: transparent; color: #fff; border-color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--blue-deep); }
@media (max-width: 760px) {
  .now { grid-template-columns: 1fr; padding: 1.5rem; }
  .now__arch { max-width: 260px; }
}

/* « Je veux… » */
.wants { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); column-gap: 2.5rem; }
.wants li { border-top: 2px solid var(--line); }
.wants a { display: block; padding: 1rem .3rem; color: var(--ink); text-decoration: none; font-size: 1.2rem; line-height: 1.35; }
.wants a::after { content: "→"; float: right; padding-left: 1rem; color: var(--blue); font-weight: 700; }
.wants a:hover { background: var(--blue-tint); }
.wants__je { font-weight: 700; color: var(--brick); }

/* Semaine à la mairie */
.addr-inline { color: var(--muted); }
.week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; }
.week li { display: flex; flex-direction: column; gap: .15rem; padding: 1rem; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; }
.week b { font-size: 1.15rem; }
.week__note { color: var(--muted); font-size: .9rem; line-height: 1.3; }
.week li[aria-current="date"] { background: var(--gold); border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.week li[aria-current="date"] b::after { content: " · aujourd'hui"; font-weight: 400; font-size: .9rem; }
.week__foot { margin: .9rem 0 0; color: var(--muted); }
@media (max-width: 760px) { .week { grid-template-columns: 1fr; } .week li { flex-direction: row; flex-wrap: wrap; gap: .2rem 1rem; align-items: baseline; } .week b { min-width: 6.5rem; } }

/* À venir : frise */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.2rem; border-left: 4px solid var(--blue); }
.timeline li { position: relative; display: flex; gap: 1.2rem; padding: .4rem 0 1.4rem; }
.timeline li::before { content: ""; position: absolute; left: calc(-1.2rem - 10px); top: .75rem; width: 16px; height: 16px; background: var(--gold); border: 4px solid var(--blue); border-radius: 50%; }
.timeline time { flex: none; width: 6.2rem; color: var(--brick); font-weight: 700; line-height: 1.2; }
.timeline time b { display: block; font-size: 2rem; }
.news--compact li { grid-template-columns: 6.2rem 1fr; gap: .2rem 1rem; padding: .8rem 0; }
.news--compact h3 { font-size: 1.1rem; }

/* Une balade : collage numéroté */
.walk { display: grid; grid-template-columns: 1fr 1.5fr; grid-template-rows: auto auto; gap: 1rem; }
.walk figure { position: relative; margin: 0; }
.walk img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.walk__a { grid-row: 1 / 3; }
.walk figcaption { position: absolute; left: .8rem; bottom: .8rem; display: flex; align-items: center; gap: .5rem; padding: .3rem .8rem .3rem .3rem; background: var(--paper); border-radius: 99px; font-weight: 700; }
.walk figcaption span, .walk__c > span { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--brick); color: #fff; font-weight: 700; }
.walk__c { display: flex; gap: .9rem; align-items: flex-start; padding: 1.4rem; background: var(--brick-tint); border-radius: var(--radius); }
.walk__c p { margin: 0; }
@media (max-width: 640px) { .walk { grid-template-columns: 1fr; } .walk__a { grid-row: auto; } }

/* Sections */
section.wrap, .section { margin-top: 3rem; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; }
.block { border-radius: var(--radius); padding: 1.6rem; background: var(--paper); border: 2px solid var(--line); }
.block--gold { background: var(--gold); border-color: var(--gold); }
.block--blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.block--blue a { color: var(--gold); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1rem; margin-bottom: .8rem; }
.sec-head h2 { margin: 0; }
.more { font-weight: 700; }

.hours { margin: 0 0 1rem; }
.hours div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 2px solid rgba(21,26,46,.18); }
.hours dt { font-weight: 700; }
.hours dd { margin: 0; text-align: right; }
.addr { font-size: 1.05rem; }

.btn {
  display: inline-block; padding: .8em 1.4em; background: var(--ink); color: var(--gold); border-radius: 12px;
  font-weight: 700; text-decoration: none; border: 3px solid var(--ink);
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--gold); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--gold); }
.btns { display: flex; flex-wrap: wrap; gap: .6rem; }

.events { list-style: none; margin: 0 0 1rem; padding: 0; }
.events li { display: flex; gap: 1rem; align-items: center; padding: .8rem 0; border-bottom: 2px solid var(--line); }
.date { flex: none; width: 4.4rem; text-align: center; background: var(--brick); color: #fff; border-radius: 12px; padding: .4rem 0; line-height: 1.1; font-size: .85rem; text-transform: uppercase; }
.date b { display: block; font-size: 1.7rem; }

/* Actualités : liste, pas cartes */
.news { list-style: none; margin: 0; padding: 0; }
.news li { display: grid; grid-template-columns: 9rem 1fr; gap: .3rem 1.5rem; padding: 1.1rem 0; border-top: 2px solid var(--line); }
.news time { color: var(--muted); font-weight: 700; }
.news h3 { margin: 0 0 .2em; }
.news h3 a { color: var(--ink); }
.news p { margin: 0; color: var(--muted); }
@media (max-width: 640px) { .news li { grid-template-columns: 1fr; } }

/* Découvrir Abzac */
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.photos figure { margin: 0; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.photos figcaption { padding-top: .5rem; font-weight: 700; }

/* Pages intérieures */
.page { padding: 2.5rem 0 1rem; }
.page__head { margin-bottom: 2rem; }
.page__head h1 { margin-bottom: .2em; }
.page__head .lead { font-size: 1.2rem; color: var(--muted); max-width: 40rem; }
.crumbs { font-size: .95rem; margin-bottom: 1rem; }
.page h2 { margin-top: 2.2rem; scroll-margin-top: 1rem; }
.page h2:first-of-type { margin-top: 0; }
.prose { max-width: 44rem; }
.list { list-style: none; margin: 0 0 1rem; padding: 0; }
.list li { border-top: 2px solid var(--line); }
.list li:last-child { border-bottom: 2px solid var(--line); }
.list a, .list .row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .95rem .3rem; font-weight: 700; text-decoration: none; color: var(--ink); }
.list a::after { content: "→"; color: var(--blue); font-size: 1.3rem; }
.list a:hover { background: var(--blue-tint); }
.list small { display: block; font-weight: 400; color: var(--muted); }
.numbers { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.numbers li { display: flex; align-items: center; gap: 1rem; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: .8rem 1rem; }
.numbers b { flex: none; min-width: 4.2rem; text-align: center; background: var(--brick); color: #fff; border-radius: 10px; padding: .25rem .4rem; font-size: 1.4rem; }
.numbers a { font-weight: 700; }

/* Notice de contenu à compléter (visible volontairement pendant la construction) */
.todo { border: 3px dashed var(--brick); background: var(--brick-tint); border-radius: 12px; padding: .8rem 1.1rem; margin: 0 0 1.2rem; font-size: .95rem; }
.todo::before { content: "À compléter avec la mairie : "; font-weight: 700; }

/* Pied de page */
.footer { margin-top: 4rem; background: var(--blue-deep); color: #fff; padding: 2.2rem 0; }
.footer a { color: #fff; }
.footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.footer__brand { display: flex; gap: 1rem; align-items: flex-start; }
.footer__brand img { height: 3.4rem; width: auto; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { padding: .25rem 0; }

@media (max-width: 600px) {
  .banner__card { margin-top: -2.5rem; padding: 1.2rem; }
  .alert { flex-direction: column; gap: .5rem; }
  .nav a { padding: .55em .5em; }
}
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover { transform: none; } }
