/*
 * Site municipal Municipolis - système visuel « Affiche ».
 * Aplats des trois couleurs de l'identité (--mp-fond, --mp-principal, --mp-accent,
 * calculées par mp_theme_css() avec leurs couleurs de texte lisibles), filets
 * noirs, grande typographie Archivo (police variable, SIL OFL 1.1, fonts/OFL.txt).
 * Lisible d'abord : 18 px de base, contrastes WCAG AA, focus visibles.
 */
@font-face {
    font-family: "Archivo";
    src: url(fonts/archivo.woff2) format("woff2");
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-style: normal;
    font-display: swap;
}

:root {
    --mp-fond: #ffdd00;
    --mp-on-fond: #111111;
    --mp-principal: #008ac9;
    --mp-on-principal: #111111;
    --mp-accent: #e42219;
    --mp-on-accent: #ffffff;
    --mp-brand: #00648f;
    --mp-accent-text: #c81d15;
    --mp-ink: #111111;
    --mp-muted: #4a5360;
    --mp-line: #e7e3d8;
    --mp-rule: #e2ddd0;
    --mp-bg: #ffffff;
    --mp-soft: #f7f4ec;
    --mp-paper: #ffffff;
    --mp-card: #ffffff;
    /* Courbes : grands rayons, boutons en pilule, ombres douces et colorées. */
    --mp-radius: 22px;
    --mp-radius-sm: 14px;
    --mp-pill: 999px;
    --mp-shadow: 0 14px 34px rgba(17, 17, 17, 0.1), 0 3px 8px rgba(17, 17, 17, 0.05);
    --mp-shadow-hover: 0 22px 46px rgba(17, 17, 17, 0.14), 0 6px 14px rgba(17, 17, 17, 0.06);
    --mp-font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mp-wrap: 1200px;
}

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

html { font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }

body {
    margin: 0;
    background: var(--mp-bg);
    color: var(--mp-ink);
    font-family: var(--mp-font);
    font-weight: 400;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

h1, h2, h3, h4 { font-family: var(--mp-font); font-weight: 800; font-stretch: 96%; letter-spacing: -0.015em; line-height: 1.15; text-wrap: balance; }
p, li { text-wrap: pretty; }
img, svg, video { max-width: 100%; }

a { color: var(--mp-brand); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.14em; }
:focus-visible { outline: 3px solid var(--mp-ink); outline-offset: 3px; box-shadow: 0 0 0 6px var(--mp-fond); }
::selection { background: var(--mp-fond); color: var(--mp-on-fond); }

.mp-wrap { width: min(var(--mp-wrap), 100% - 40px); margin: 0 auto; }

.mp-skip { position: absolute; left: -9999px; }
.mp-skip:focus { left: 16px; top: 16px; padding: 10px 16px; background: var(--mp-ink); color: #fff; font-weight: 800; z-index: 100; }

/* En-tête : aplat de la couleur de fond, nom en grand, navigation en capitales. */
.mp-header { position: relative; z-index: 20; background: var(--mp-fond); color: var(--mp-on-fond); }
/* Deux étages : nom et bouton d'abonnement, puis la navigation sur toute la largeur. */
.mp-header-in { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; padding: 14px 0 0; }
.mp-brand { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; min-width: 0; padding-bottom: 14px; }
.mp-brand-emblem { width: 46px; height: auto; flex: none; }
.mp-brand-text { display: flex; flex-direction: column; min-width: 0; }
.mp-brand-name { font-size: 1.5rem; font-weight: 900; font-stretch: 90%; letter-spacing: -0.025em; line-height: 1; white-space: nowrap; }
.mp-brand-tag { display: none; }
.mp-header-cta { margin: 0 0 14px auto; min-height: 42px; padding: 10px 18px; font-size: 0.8rem; }
.mp-nav { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 8px 0 12px; border-top: 1.5px solid rgba(17, 17, 17, 0.14); }
.mp-nav a { padding: 9px 10px; color: inherit; text-decoration: none; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.045em; text-transform: uppercase; border-radius: var(--mp-pill); }
.mp-nav a:first-child { margin-left: -10px; }
.mp-page-accueil .mp-header-cta { visibility: hidden; }
/* Sur grand écran, le nom (avec les armoiries) mène à l'accueil : le lien « Accueil » reste au menu des petits écrans. */
@media (min-width: 901px) { .mp-nav a[href="/"] { display: none; } .mp-nav a:nth-child(2) { margin-left: -10px; } }
@media (max-width: 1240px) { .mp-nav a { padding: 9px 7px; font-size: 0.68rem; letter-spacing: 0.03em; } .mp-nav a:first-child, .mp-nav a:nth-child(2) { margin-left: -7px; } }
.mp-nav a:hover { box-shadow: inset 0 -3px 0 currentColor; }
/* « Plus » : rubriques secondaires dans un panneau (grand écran) ; à plat dans le menu des petits écrans. */
.mp-nav-more { position: relative; }
.mp-nav-more-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 9px 10px; border: 0; background: transparent; color: inherit; font: 800 0.76rem/1.6 var(--mp-font); letter-spacing: 0.045em; text-transform: uppercase; cursor: pointer; border-radius: var(--mp-pill); }
.mp-nav-more-toggle::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.15s; }
.mp-nav-more.is-open .mp-nav-more-toggle::after { transform: translateY(1px) rotate(225deg); }
.mp-nav-more-toggle:hover { box-shadow: inset 0 -3px 0 currentColor; }
.mp-nav-more.is-current .mp-nav-more-toggle { background: var(--mp-ink); color: var(--mp-fond); }
.mp-nav-more-panel { display: none; position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; min-width: 230px; padding: 10px; background: var(--mp-paper); color: var(--mp-ink); border-radius: var(--mp-radius); box-shadow: var(--mp-shadow-hover); flex-direction: column; gap: 2px; }
.mp-nav-more.is-open .mp-nav-more-panel { display: flex; }
.mp-nav-more-panel a { margin: 0 !important; padding: 10px 12px; }
.mp-nav-more-panel a:hover { background: var(--mp-fond); color: var(--mp-on-fond); box-shadow: none; }
.mp-nav-more-panel a[aria-current="page"] { background: var(--mp-ink); color: var(--mp-fond); }
.mp-nav a[aria-current="page"] { background: var(--mp-ink); color: var(--mp-fond); box-shadow: none; }
.mp-menu-toggle { display: none; margin: 0 0 14px auto; align-items: center; gap: 10px; padding: 10px 14px; border: 2px solid currentColor; background: transparent; color: inherit; font: 800 0.8rem/1 var(--mp-font); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.mp-menu-bars, .mp-menu-bars::before, .mp-menu-bars::after { display: block; width: 18px; height: 2px; background: currentColor; transition: transform 0.2s; }
.mp-menu-bars { position: relative; }
.mp-menu-bars::before, .mp-menu-bars::after { content: ""; position: absolute; left: 0; }
.mp-menu-bars::before { top: -6px; }
.mp-menu-bars::after { top: 6px; }
.mp-header.is-open .mp-menu-bars { background: transparent; }
.mp-header.is-open .mp-menu-bars::before { transform: translateY(6px) rotate(45deg); }
.mp-header.is-open .mp-menu-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
    .mp-header.has-js .mp-header-cta { display: none; }
    .mp-header.has-js .mp-menu-toggle { display: inline-flex; }
    .mp-header.has-js .mp-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: 8px 20px 22px; background: var(--mp-fond); border-top: 0; border-radius: 0 0 28px 28px; box-shadow: 0 22px 34px rgba(0, 0, 0, 0.14); }
    .mp-header.has-js.is-open .mp-nav { display: flex; }
    .mp-header.has-js .mp-nav a { margin: 0; padding: 14px 12px; font-size: 0.9rem; border-radius: 14px; }
    .mp-header.has-js .mp-nav a[aria-current="page"] { padding-left: 12px; }
    .mp-header.has-js .mp-header-in { flex-wrap: nowrap; }
    .mp-nav-more-toggle { display: none; }
    .mp-nav-more-panel { display: flex; position: static; min-width: 0; padding: 0; background: transparent; color: inherit; border: 0; box-shadow: none; }
    .mp-nav-more-panel a:hover { background: transparent; color: inherit; }
    .mp-brand { flex: 1 1 auto; }
    .mp-brand-name { font-size: 1.2rem; white-space: normal; }
}

/* Page */
.mp-main { padding: 40px 0 72px; }
.mp-main h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 900; font-stretch: 90%; letter-spacing: -0.035em; line-height: 1; margin: 0 0 22px; }
.mp-main h1::after { content: ""; display: block; width: 80px; height: 10px; margin-top: 18px; border-radius: var(--mp-pill); background: linear-gradient(90deg, var(--mp-accent) 0 60%, var(--mp-fond) 60% 80%, var(--mp-principal) 80%); }
.mp-section-title { margin: 40px 0 16px; font-size: 1.6rem; font-weight: 900; }
.mp-intro { font-size: 1.18rem; color: var(--mp-muted); max-width: 46em; }
.mp-crumbs { margin: 0 0 10px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.mp-crumbs a { text-decoration: none; }
.mp-small { font-size: 0.9rem; }
.mp-muted { color: var(--mp-muted); }
.mp-when { font-size: 0.82rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mp-accent-text); }
.mp-what { font-weight: 700; }
.mp-more { margin: 18px 0 0; font-weight: 800; }
.mp-more a { text-decoration: none; }
.mp-more a::after { content: " \2192"; }
.mp-kicker { margin: 0 0 10px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }

/* Boutons */
.mp-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 26px; border: 2px solid var(--mp-ink); border-radius: var(--mp-pill); background: var(--mp-ink); color: #fff; font: 800 0.92rem/1.1 var(--mp-font); letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s, background 0.15s; }
.mp-button:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(17, 17, 17, 0.22); }
.mp-button:active { transform: none; box-shadow: none; }
.mp-button-ghost { background: transparent; color: var(--mp-ink); }
.mp-button-fond { background: var(--mp-fond); color: var(--mp-on-fond); border-color: var(--mp-fond); }
.mp-button-danger { background: #b42318; border-color: #b42318; }
.mp-button[disabled] { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }
.mp-linkbtn { border: 0; background: none; padding: 0; color: var(--mp-brand); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.mp-chip-x { font: inherit; font-size: 0.85rem; border: 0; background: transparent; color: var(--mp-brand); cursor: pointer; text-decoration: underline; }

/* Blocs, cartes, listes */
.mp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.mp-block { background: var(--mp-soft); border: 0; border-radius: calc(var(--mp-radius) + 6px); padding: 26px 28px; }
.mp-block-wide { grid-column: 1 / -1; }
.mp-block h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 1.35rem; font-weight: 900; }
.mp-block h2::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; background: var(--mp-accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--mp-accent) 18%, transparent); }
.mp-block h3 { margin: 18px 0 8px; font-size: 1rem; }

.mp-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.mp-card a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 22px 22px 24px; background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: var(--mp-radius); box-shadow: var(--mp-shadow); color: var(--mp-ink); text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.mp-card a:hover { transform: translateY(-4px); box-shadow: var(--mp-shadow-hover); }
.mp-card-meta { font-size: 0.76rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mp-accent-text); }
.mp-card-title { font-size: 1.18rem; font-weight: 800; font-stretch: 96%; line-height: 1.25; letter-spacing: -0.01em; }
.mp-card-intro { color: var(--mp-muted); font-size: 0.96rem; }

.mp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mp-list li { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--mp-line); }
.mp-list li:first-child { padding-top: 0; }
.mp-list li:last-child { border-bottom: 0; padding-bottom: 0; }

.mp-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.mp-event { background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: var(--mp-radius); padding: 22px 26px; box-shadow: var(--mp-shadow); }
.mp-event h2, .mp-event h3 { margin: 2px 0 6px; font-size: 1.25rem; }
.mp-event p { margin: 0 0 6px; }

.mp-dl { margin: 0; display: flex; flex-direction: column; }
.mp-dl div { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--mp-line); }
.mp-dl div:last-child { border-bottom: 0; }
.mp-dl dt { color: var(--mp-muted); }
.mp-dl dd { margin: 0; font-weight: 700; }
.mp-note { margin: 14px 0 0; font-weight: 700; }

.mp-page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin: 0 0 16px; }
.mp-page-head h1, .mp-page-head h2 { margin: 0; }
.mp-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.mp-filters a { padding: 9px 18px; border: 2px solid var(--mp-line); border-radius: var(--mp-pill); background: var(--mp-card); color: var(--mp-ink); text-decoration: none; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.mp-filters a:hover { background: var(--mp-soft); }
.mp-filters a[aria-current="page"] { background: var(--mp-ink); color: var(--mp-fond); }

/* Accueil : affiche */
.mp-page-accueil .mp-main { padding-top: 0; }
.mp-hero-affiche { position: relative; overflow: hidden; width: calc(100vw - var(--mp-sbw, 0px)); margin-left: calc(50% - 50vw + var(--mp-sbw, 0px) / 2); background: var(--mp-fond); color: var(--mp-on-fond); }
.mp-hero-in { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr); align-items: start; gap: 32px 48px; padding: clamp(36px, 6vw, 72px) 0 clamp(150px, 19vw, 250px); }
.mp-main .mp-hero-title { margin: 0; font-size: clamp(3rem, 8.6vw, 7.6rem); font-weight: 900; font-stretch: 88%; line-height: 0.86; letter-spacing: -0.05em; }
.mp-hero-title span { display: block; }
.mp-hero-title span:first-child { color: var(--mp-brand-on-fond, var(--mp-principal)); }
.mp-hero-title span + span { color: var(--mp-accent-on-fond, var(--mp-accent)); }
.mp-main .mp-hero-title::after { display: none; }
.mp-hero-lead { margin: 24px 0 0; max-width: 30em; font-size: clamp(1.05rem, 1.6vw, 1.25rem); font-weight: 600; }
.mp-hero-facts { margin: 0 0 16px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.mp-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.mp-hero-actions .mp-button-ghost { border-color: var(--mp-on-fond); color: var(--mp-on-fond); }
.mp-decor { position: absolute; inset: auto 0 0 0; z-index: 1; pointer-events: none; }
.mp-decor-monts { display: block; width: 100%; height: clamp(120px, 17vw, 240px); }
/* L'épinette se dresse sur la rive, entre le texte et la vignette météo. */
.mp-decor-epinette { position: absolute; right: calc(max(20px, 50vw - 600px) + clamp(300px, 26vw, 380px)); bottom: clamp(48px, 7vw, 92px); width: clamp(96px, 11vw, 160px); color: var(--mp-accent); filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.08)); }
.mp-decor-epinette svg { display: block; width: 100%; height: auto; }
.mp-hero-affiche .mp-weather { align-self: start; }
@media (max-width: 960px) {
    .mp-hero-in { grid-template-columns: 1fr; }
    .mp-hero-affiche .mp-weather { max-width: 420px; }
    .mp-decor-epinette { right: 6vw; }
}

.mp-tiles { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: -54px 0 64px; }
.mp-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 148px; padding: 22px 24px 22px; border-radius: calc(var(--mp-radius) + 4px); text-decoration: none; box-shadow: var(--mp-shadow); transition: transform 0.18s, box-shadow 0.18s; }
.mp-tile:hover { transform: translateY(-4px); box-shadow: var(--mp-shadow-hover); }
.mp-tile small { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.9; }
.mp-tile b { font-size: clamp(1.2rem, 1.7vw, 1.5rem); font-weight: 900; font-stretch: 92%; letter-spacing: -0.02em; line-height: 1.05; }
.mp-tile small { padding-right: 48px; }
.mp-tile::after { content: "\2192"; position: absolute; right: 16px; top: 16px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: #111; font-weight: 800; transition: transform 0.18s; }
.mp-tile:hover::after { transform: translateX(3px); }
.mp-tile-accent { background: var(--mp-accent); color: var(--mp-on-accent); }
.mp-tile-principal { background: var(--mp-principal); color: var(--mp-on-principal); }
.mp-tile-ink { background: var(--mp-ink); color: #fff; }
.mp-tile-fond { background: var(--mp-fond); color: var(--mp-on-fond); }
.mp-tile-paper { background: var(--mp-paper); color: var(--mp-ink); border: 1px solid var(--mp-line); }
.mp-tile-paper::after { background: var(--mp-fond); color: var(--mp-on-fond); }

.mp-home-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.mp-home-grid > * { grid-column: span 6; }
.mp-home-grid > .mp-block-wide { grid-column: 1 / -1; }
.mp-home-grid > .mp-block-third { grid-column: span 4; }
@media (max-width: 960px) { .mp-home-grid > *, .mp-home-grid > .mp-block-third { grid-column: 1 / -1; } }
.mp-home-section { margin: 0 0 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 4px; }
.mp-home-section h2 { margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 900; font-stretch: 90%; letter-spacing: -0.035em; line-height: 1; }
.mp-home-section a { font-weight: 800; text-decoration: none; white-space: nowrap; }
.mp-home-section a::after { content: " \2192"; }
.mp-home-section h2::after { content: ""; display: block; width: 56px; height: 8px; margin-top: 12px; border-radius: var(--mp-pill); background: var(--mp-accent); }
.mp-home-section-spaced { margin-top: 64px; }
.mp-home-news { margin: 0 0 8px; }

/* Météo (accueil) */
.mp-weather { background: var(--mp-paper); color: var(--mp-ink); border-radius: calc(var(--mp-radius) + 6px); box-shadow: 0 24px 50px rgba(17, 17, 17, 0.16); padding: 22px 24px; }
.mp-weather p { margin: 0; }
.mp-weather-label { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mp-muted); }
.mp-weather-temp { font-size: 3rem; font-weight: 900; font-stretch: 88%; line-height: 1; letter-spacing: -0.04em; margin: 6px 0 2px !important; }
.mp-weather-desc { font-weight: 700; }
.mp-badges { display: flex; flex-direction: column; gap: 4px; margin-top: 12px !important; font-size: 0.88rem; }
.mp-badge { display: inline-flex; align-items: center; gap: 8px; }
.mp-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(0, 0, 0, 0.2); }

.mp-forecast { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.mp-forecast li { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--mp-paper); border-radius: var(--mp-radius-sm); }
.mp-forecast-temps { font-size: 1.35rem; font-weight: 900; }

/* Webcams routières vues aux jumelles : deux lentilles qui se chevauchent, bord sombre, image qui glisse sous la souris. */
.mp-webcams-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.mp-jumelles { margin: 0; }
.mp-jumelles-view { --jx: 0; --jy: 0; position: relative; aspect-ratio: 2 / 1; overflow: hidden; background: #0b0f14;
    -webkit-mask: radial-gradient(circle closest-side at 31% 50%, #000 97%, transparent 100%), radial-gradient(circle closest-side at 69% 50%, #000 97%, transparent 100%);
    mask: radial-gradient(circle closest-side at 31% 50%, #000 97%, transparent 100%), radial-gradient(circle closest-side at 69% 50%, #000 97%, transparent 100%); }
.mp-jumelles-view video { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: contrast(1.08) saturate(1.05);
    transform: translate(calc(var(--jx) * -7%), calc(var(--jy) * -7%)); transition: transform 0.4s ease-out; }
/* Bord des lentilles : vignette sombre et reflet. */
.mp-jumelles-view::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle closest-side at 31% 50%, transparent 72%, rgba(0, 0, 0, 0.55) 97%),
        radial-gradient(circle closest-side at 69% 50%, transparent 72%, rgba(0, 0, 0, 0.55) 97%),
        radial-gradient(ellipse 30% 20% at 24% 30%, rgba(255, 255, 255, 0.16), transparent 70%),
        radial-gradient(ellipse 30% 20% at 62% 30%, rgba(255, 255, 255, 0.16), transparent 70%); }
.mp-jumelles-off { display: none; position: absolute; inset: 0; place-items: center; color: #cfd6dd; font-size: 0.85rem; font-weight: 700; text-align: center; }
.mp-jumelles-view.is-off .mp-jumelles-off { display: grid; }
.mp-jumelles figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; text-align: center; }
.mp-jumelles figcaption a { font-weight: 700; }
.mp-weather-cam { margin: 16px -6px -4px; padding-top: 14px; border-top: 1px solid var(--mp-line); }
.mp-jumelles-compact figcaption .mp-muted { display: none; }
@media (prefers-reduced-motion: reduce) { .mp-jumelles-view video { transition: none; } }

.mp-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mp-bars li { display: grid; grid-template-columns: 48px 1fr 56px; align-items: center; gap: 10px; }
.mp-bar { height: 12px; background: var(--mp-soft); overflow: hidden; }
.mp-bar span { display: block; height: 100%; background: var(--mp-principal); }
.mp-bar-value { text-align: right; font-weight: 700; }
.mp-sources { margin: 24px 0 0; font-size: 0.85rem; color: var(--mp-muted); }

/* Alertes : bandeau sur toutes les pages, fiches sur la page Alertes */
.mp-alert-bar { padding: 12px 0; font-size: 1rem; }
.mp-alert-bar a { font-weight: 800; color: inherit; }
.mp-alert-urgence { background: #b42318; color: #fff; }
.mp-alert-important { background: #f5b301; color: #111; }
.mp-alert-info { background: #dbe9f6; color: #111; }
.mp-alert { margin: 0 0 16px; padding: 22px 26px 22px 30px; border: 1px solid var(--mp-line); border-left: 10px solid; border-radius: var(--mp-radius); box-shadow: var(--mp-shadow); background: var(--mp-card); color: var(--mp-ink); }
.mp-alert.mp-alert-urgence { border-left-color: #b42318; }
.mp-alert.mp-alert-important { border-left-color: #f5b301; }
.mp-alert.mp-alert-info { border-left-color: #4a7fb5; }
.mp-alert.mp-alert-past { opacity: 0.75; }
.mp-alert h2 { margin: 2px 0 6px; font-size: 1.3rem; }
.mp-alert-level { margin: 0; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mp-muted); }
.mp-important { margin: 0; padding: 12px 16px; border-left: 6px solid #b45309; background: #fff7ed; color: #7c2d12; font-weight: 700; }

.mp-teaser { margin-top: 28px; }
.mp-teaser p { margin: 0 0 10px; }

.mp-calendar { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mp-calendar li { display: grid; grid-template-columns: minmax(200px, 30%) 1fr; gap: 12px; padding: 14px 18px; background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: var(--mp-radius-sm); }

.mp-map { height: 560px; border-radius: calc(var(--mp-radius) + 6px); margin: 0 0 28px; z-index: 0; overflow: hidden; box-shadow: var(--mp-shadow); }
/* Onglets des types de carte : pilules de couleur au-dessus de la carte. */
.mp-map-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 6px; width: max-content; max-width: 100%; background: var(--mp-soft); border-radius: var(--mp-pill); }
.mp-map-tabs [role="tab"] { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 0; border-radius: var(--mp-pill); background: transparent; color: var(--mp-ink); font: 800 0.88rem/1 var(--mp-font); cursor: pointer; transition: background 0.15s; }
.mp-map-tabs [role="tab"]:hover { background: #fff; }
.mp-map-tabs [role="tab"][aria-selected="true"] { background: var(--mp-principal); color: var(--mp-on-principal); box-shadow: 0 8px 18px rgba(17, 17, 17, 0.14); }
.mp-map-tab-n { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: var(--mp-pill); background: rgba(255, 255, 255, 0.85); color: #111; font-size: 0.74rem; }
.mp-map-panel[hidden] { display: none; }
/* Fond de carte : sélecteur posé sur la carte. */
.mp-map-bases { display: flex; gap: 4px; padding: 5px; background: rgba(255, 255, 255, 0.95); border-radius: var(--mp-pill); box-shadow: 0 8px 22px rgba(17, 17, 17, 0.18); }
.mp-map-bases button { min-height: 36px; padding: 6px 14px; border: 0; border-radius: var(--mp-pill); background: transparent; color: #111; font: 800 0.78rem/1 var(--mp-font); cursor: pointer; }
.mp-map-bases button[aria-pressed="true"] { background: var(--mp-ink); color: var(--mp-fond); }
.mp-map .leaflet-control-zoom { border: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 22px rgba(17, 17, 17, 0.18); }
.mp-map .leaflet-popup-content-wrapper { border-radius: 18px; }
.mp-map .leaflet-popup-content { font-family: var(--mp-font); }
/* Webcam sur la carte : pastille ronde, extrait aux jumelles dans la bulle. */
.mp-cam-pin span { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--mp-accent); border: 3px solid #fff; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3); position: relative; }
.mp-cam-pin span::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 3px solid #fff; }
.mp-cam-pop { width: 280px; text-align: center; }
.mp-cam-pop .mp-jumelles-view { margin-bottom: 8px; }
.mp-map-small { height: 300px; margin: 12px 0 0; }

/* Formulaires */
.mp-form { display: flex; flex-direction: column; gap: 18px; max-width: 600px; }
.mp-field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.mp-field small { font-weight: 400; color: var(--mp-muted); }
.mp-field input:not([type="radio"]):not([type="checkbox"]), .mp-field select, .mp-field textarea, #mp-address input, .mp-doc-search input {
    font: inherit; font-weight: 400; min-height: 50px; padding: 10px 16px; border: 2px solid var(--mp-line); border-radius: var(--mp-radius-sm); background: #fff; color: var(--mp-ink); }
.mp-field input:not([type="radio"]):not([type="checkbox"]):focus, .mp-field select:focus, .mp-field textarea:focus, #mp-address input:focus, .mp-doc-search input:focus { outline: 3px solid var(--mp-principal); outline-offset: 0; box-shadow: none; }
.mp-field > input[name="phone"] { max-width: 280px; }
.mp-choices { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.mp-choices legend { font-weight: 800; margin-bottom: 6px; }
.mp-choices label, .mp-check { display: flex; gap: 12px; align-items: flex-start; }
.mp-check { font-weight: 700; }
.mp-choices input, .mp-check input { margin: 4px 0 0; width: 20px; height: 20px; accent-color: var(--mp-ink); flex: none; }
.mp-msg { margin: 0; padding: 14px 18px; border: 0; border-radius: var(--mp-radius-sm); }
.mp-msg-error { background: #fdecea; color: #8a1c12; }
.mp-msg-ok { background: #e7f5ec; color: #14532d; }
.mp-msg-ok p { margin: 0 0 6px; }
.mp-phone-type { font-weight: 400; }
.mp-suggest { list-style: none; margin: 4px 0 0; padding: 6px; background: var(--mp-card); border-radius: var(--mp-radius-sm); box-shadow: var(--mp-shadow-hover); font-weight: 400; }
.mp-suggest li { padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.mp-suggest li:hover, .mp-suggest li.is-active { background: var(--mp-fond); color: var(--mp-on-fond); }
.mp-suggest .mp-suggest-empty { color: var(--mp-muted); cursor: default; }
.mp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-weight: 400; }
.mp-chips li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; background: var(--mp-soft); border-radius: var(--mp-radius-sm); }
#mp-address-result { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
#mp-address-result .mp-alert h3 { margin: 4px 0; }

/* Mot du jour et revue de presse */
.mp-edito { margin: 0 0 40px; padding: 28px 32px; background: color-mix(in srgb, var(--mp-principal) 9%, #fff); border: 0; border-radius: calc(var(--mp-radius) + 6px); }
.mp-edito h2, .mp-edito-past h2 { margin: 2px 0 10px; font-size: 1.4rem; }
.mp-edito p { margin: 0 0 10px; }
.mp-edito-kicker { margin: 0; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mp-brand); }
.mp-edito-past { padding: 0 0 20px; margin: 0 0 20px; border-bottom: 1px solid var(--mp-line); }
.mp-ai-note { font-size: 0.8rem; color: var(--mp-muted); margin: 8px 0 0 !important; }

/* Annonces, s'établir, espace du résident */
.mp-listing img { width: 100%; height: 180px; object-fit: cover; margin-bottom: 10px; background: var(--mp-soft); border-radius: var(--mp-radius-sm); }
.mp-listing-price { font-weight: 900; color: var(--mp-brand); }
.mp-listing-price-big { font-size: 1.6rem; margin: 0 0 12px; }
.mp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0 0 18px; }
.mp-gallery img { width: 100%; height: 200px; object-fit: cover; display: block; border-radius: var(--mp-radius-sm); }
.mp-actions-row { display: flex; flex-wrap: wrap; gap: 10px; }
.mp-step-card { display: block; color: var(--mp-ink); text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.mp-step-card:hover { transform: translateY(-4px); box-shadow: var(--mp-shadow-hover); }
.mp-step-card h3 { margin: 0 0 6px; color: var(--mp-brand); }
.mp-step-card p { margin: 0; color: var(--mp-muted); }
.mp-acc-who { margin: 0 0 16px; }
.mp-acc-item { padding: 14px 0; border-bottom: 1px solid var(--mp-line); }
.mp-status { font-weight: 800; color: var(--mp-brand); }
.mp-rules { padding: 16px 20px; background: var(--mp-soft); border-radius: var(--mp-radius-sm); }
.mp-rules ul { margin: 6px 0 0; padding-left: 20px; }
.mp-account .mp-block, #mp-account .mp-block { margin: 0 0 20px; }

/* Histoire : navigation, frise (affiche) */
.mp-history-nav { margin-bottom: 18px; }
.mp-timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 3px solid var(--mp-rule); }
.mp-period h2 { margin: 28px 0 12px -22px; padding-left: 22px; font-size: 1.3rem; color: var(--mp-brand); }
.mp-event-h { position: relative; margin: 0 0 22px; padding: 20px 24px; background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: var(--mp-radius); box-shadow: var(--mp-shadow); scroll-margin-top: 16px; }
.mp-event-h::before { content: ""; position: absolute; left: -32px; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--mp-accent); }
.mp-event-h h3 { margin: 2px 0 8px; font-size: 1.15rem; }
.mp-event-h .mp-when { margin: 0; }

.mp-frise-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 18px; }
.mp-frise-decades { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; background: var(--mp-soft); border-radius: var(--mp-pill); width: max-content; max-width: 100%; }
.mp-frise-decades a { padding: 9px 13px; background: var(--mp-paper); color: var(--mp-ink); text-decoration: none; font-weight: 900; font-size: 0.86rem; border-radius: var(--mp-pill); }
.mp-frise-decades a:hover, .mp-frise-decades a.is-current { background: var(--mp-ink); color: var(--mp-fond); }
.mp-frise-steps { display: flex; gap: 8px; }
.mp-frise-steps button { width: 54px; height: 54px; border: 0; border-radius: 50%; box-shadow: var(--mp-shadow); background: var(--mp-fond); color: var(--mp-on-fond); font: 900 1.3rem/1 var(--mp-font); cursor: pointer; }
.mp-frise-steps button:hover { background: var(--mp-ink); color: var(--mp-fond); }
.mp-frise-steps button[disabled] { opacity: 0.35; cursor: default; background: var(--mp-paper); color: var(--mp-ink); }
/* Toute la largeur de la fenêtre, hors de la colonne du contenu (body : overflow-x clip). */
.mp-frise { position: relative; outline: none; width: calc(100vw - var(--mp-sbw, 0px)); margin: 0 0 24px calc(50% - 50vw + var(--mp-sbw, 0px) / 2); }
.mp-frise:focus-visible { outline: 3px solid var(--mp-ink); outline-offset: -3px; box-shadow: none; }
.mp-frise-track { list-style: none; margin: 0; padding: 18px max(20px, calc(50vw - 600px)) 34px; scroll-padding-inline: max(20px, calc(50vw - 600px)); gap: 16px; display: flex; align-items: stretch; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--mp-ink) transparent; cursor: grab; overscroll-behavior-x: contain; }
.mp-frise-track.is-dragged { cursor: grabbing; }
.mp-frise-track.is-dragged * { pointer-events: none; }
.mp-frise-decade { flex: 0 0 auto; display: flex; align-items: flex-end; padding: 28px 22px; scroll-snap-align: start; background: var(--mp-principal); color: var(--mp-on-principal); border-radius: calc(var(--mp-radius) + 10px); box-shadow: var(--mp-shadow); }
.mp-frise-decade:nth-child(3n + 4) { background: var(--mp-accent); color: var(--mp-on-accent); }
.mp-frise-decade:nth-child(3n + 7) { background: var(--mp-ink); color: var(--mp-fond); }
.mp-frise-decade h2 { margin: 0; writing-mode: vertical-rl; transform: rotate(180deg); font-size: clamp(5rem, 9vw, 9rem); font-weight: 900; font-stretch: 82%; line-height: 0.8; letter-spacing: -0.06em; }
.mp-frise-decade-text h2 { font-size: clamp(2.4rem, 4vw, 3.6rem); }
.mp-frise-card { position: relative; flex: 0 0 clamp(270px, 24vw, 330px); display: flex; flex-direction: column; padding: 22px 22px 20px; scroll-snap-align: start; background: var(--mp-paper); border: 1px solid var(--mp-line); border-radius: calc(var(--mp-radius) + 4px); box-shadow: var(--mp-shadow); transition: transform 0.18s, box-shadow 0.18s; }
.mp-frise-card:hover { transform: translateY(-4px); box-shadow: var(--mp-shadow-hover); }
.mp-frise-year { margin: 0 0 16px; font-size: clamp(2.6rem, 3.6vw, 3.4rem); font-weight: 900; font-stretch: 86%; letter-spacing: -0.05em; line-height: 0.9; }
.mp-frise-text { display: flex; flex-direction: column; flex: 1; }
.mp-frise-text .mp-when { margin: 16px 0 0; font-size: 0.74rem; }
.mp-frise-text h3 { margin: 4px 0 8px; font-size: 1.06rem; font-weight: 800; line-height: 1.28; }
.mp-frise-text p { margin: 0 0 8px; }
.mp-frise-summary { font-size: 0.92rem; color: var(--mp-muted); }
.mp-frise-theme { margin: auto 0 0 !important; padding-top: 12px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mp-accent-text); }
.mp-frise-photo .mp-frise-text h3 { font-size: 1rem; }
.mp-frise-more { margin: 0 0 6px; }
.mp-frise-more summary { cursor: pointer; font-weight: 800; color: var(--mp-brand); }
.mp-frise-more .mp-body { margin-top: 8px; font-size: 0.95rem; }
.mp-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Photo d'une carte de la frise : noir et blanc, teinte de l'identité au survol. */
.mp-print { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--mp-paper); border-radius: var(--mp-radius-sm); }
.mp-print img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1) contrast(1.1); mix-blend-mode: multiply; transition: transform 0.6s ease; }
.mp-frise-card:hover .mp-print, .mp-print:focus-visible { background: var(--mp-tint, var(--mp-principal)); }
.mp-frise-card:hover .mp-print img { transform: scale(1.04); }
.mp-frise-card:nth-child(3n + 1) .mp-print { --mp-tint: var(--mp-principal); }
.mp-frise-card:nth-child(3n + 2) .mp-print { --mp-tint: var(--mp-accent); }
.mp-frise-card:nth-child(3n) .mp-print { --mp-tint: var(--mp-fond); }
@media (prefers-reduced-motion: reduce) { .mp-print img, .mp-card a, .mp-button { transition: none; } }

.mp-body blockquote { margin: 1em 0; padding: 6px 16px; border-left: 6px solid var(--mp-fond); color: var(--mp-muted); font-style: italic; }

/* Photos d'archives (mur d'images, agrandissement) : image fixe vue sur un téléviseur cathodique (masque crt-mask.png, lignes de balayage, grain léger) */
.mp-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #1b2430; }
.mp-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-crt { aspect-ratio: 800 / 616; background: #0e1317; -webkit-mask: url(crt-mask.png) center / 100% 100% no-repeat; mask: url(crt-mask.png) center / 100% 100% no-repeat; }
.mp-wall .mp-crt { margin: 10px 10px 0; }
.mp-crt img { filter: contrast(1.05) brightness(1.03); }
/* Profondeur : l'écran s'incline vers la souris et la photo glisse derrière la vitre (--px, --py : histoire.js). */
.mp-crt { transform: perspective(900px) rotateX(calc(var(--py, 0) * -7deg)) rotateY(calc(var(--px, 0) * 9deg)); transition: transform 0.35s ease-out; }
.mp-crt img { transform: scale(1.07) translate(calc(var(--px, 0) * -16px), calc(var(--py, 0) * -11px)); transition: transform 0.35s ease-out; }
[data-zoom] { cursor: zoom-in; }
[data-zoom]:focus-visible { outline: 3px solid var(--mp-ink); outline-offset: 3px; }
.mp-crt::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, 0.07) 0%, transparent 55%, rgba(0, 0, 0, 0.42) 100%),
        repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 0 1px, transparent 1px 3px);
    animation: mp-crt-flicker 6s steps(1) infinite; }
.mp-crt::after { content: ""; position: absolute; inset: -40px; z-index: 2; pointer-events: none; opacity: 0.1; mix-blend-mode: overlay;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: mp-crt-grain 0.8s steps(1) infinite; }
@keyframes mp-crt-grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-17px, 11px); } 50% { transform: translate(13px, -21px); } 75% { transform: translate(-9px, -7px); } }
@keyframes mp-crt-flicker { 0%, 100% { opacity: 1; } 47% { opacity: 0.93; } 48% { opacity: 1; } 81% { opacity: 0.96; } 82% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mp-crt::before, .mp-crt::after { animation: none; } }
/* Note légale discrète : ne doit pas gêner la lecture. */
.mp-restored-note { display: block; margin-top: 4px; font-size: 0.66rem; font-weight: 500; line-height: 1.3; letter-spacing: 0.01em; text-transform: none; color: var(--mp-muted); opacity: 0.8; }
.mp-wall { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.mp-wall figure { margin: 0; height: 100%; overflow: hidden; background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: var(--mp-radius); box-shadow: var(--mp-shadow); transition: transform 0.15s, box-shadow 0.15s; }
.mp-wall figure:hover { transform: translateY(-4px); box-shadow: var(--mp-shadow-hover); }
.mp-wall figcaption { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px 12px; }
/* Photo agrandie : le même écran cathodique, sans cadre ; fermeture hors de l'écran, en haut à droite. */
.mp-lightbox { max-width: none; max-height: none; width: min(1100px, 90vw, 96vh); padding: 52px 0 0; border: 0; background: transparent; color: #eee; overflow: visible; text-align: center; }
.mp-lightbox::backdrop { background: rgba(6, 10, 14, 0.88); }
.mp-lightbox-stage { position: relative; }
.mp-lightbox-screen { width: 100%; }
.mp-lightbox p { margin: 0; padding: 12px 8px 0; white-space: pre-line; }
.mp-lightbox-caption { font-size: 1rem; font-weight: 600; }
.mp-lightbox .mp-restored-note { color: #b9c3cc; padding-top: 4px; }
.mp-lightbox [hidden] { display: none; }
.mp-lightbox-tools .mp-chip-x { color: var(--mp-fond); }
.mp-lightbox-close { position: absolute; right: -6px; top: -50px; width: 44px; height: 44px; border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 50%; background: transparent; color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.mp-lightbox-close:hover, .mp-lightbox-close:focus-visible { background: var(--mp-fond); color: var(--mp-on-fond); border-color: var(--mp-fond); }

/* Journal d'époque : papier ancien, à part du reste du site */
.mp-gazette-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.mp-gazette-card a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px; text-decoration: none; color: #2b2219; border-radius: var(--mp-radius); box-shadow: var(--mp-shadow); transition: transform 0.15s, box-shadow 0.15s; }
.mp-gazette-card a:hover { transform: translateY(-4px); box-shadow: var(--mp-shadow-hover); }
.mp-gazette-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: grayscale(0.2) sepia(0.25); }
.mp-gazette-headline { font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.mp-gazette-mast { font-family: "Old English Text MT", "UnifrakturCook", Georgia, serif; font-size: 1rem; letter-spacing: 0.02em; text-align: center; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.mp-gazette-period { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; text-align: center; }
.mp-gazette--ancient, .mp-gazette-card.mp-gazette--ancient a { background: #efe2c4; color: #3a2a17; }
.mp-gazette--old, .mp-gazette-card.mp-gazette--old a { background: #f3ecd9; color: #2b2219; }
.mp-gazette--modern, .mp-gazette-card.mp-gazette--modern a { background: #fbfaf6; color: #1b1b1b; }
.mp-gazette { margin: 0 0 24px; padding: 28px clamp(16px, 4vw, 44px); border-radius: var(--mp-radius-sm); box-shadow: var(--mp-shadow); font-family: Georgia, "Times New Roman", serif; }
.mp-gazette h1, .mp-gazette h2, .mp-gazette h3 { font-family: Georgia, "Times New Roman", serif; font-stretch: normal; letter-spacing: 0; }
.mp-main .mp-gazette h1::after { display: none; }
.mp-gazette-head { text-align: center; border-bottom: 3px double currentColor; margin-bottom: 18px; padding-bottom: 12px; }
.mp-gazette-head .mp-gazette-mast { font-size: clamp(1.6rem, 4vw, 2.6rem); border: 0; margin: 0; }
.mp-gazette-dateline { margin: 6px 0 12px; padding: 4px 0; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.14em; }
.mp-gazette h1 { margin: 10px 0 8px; font-size: clamp(1.6rem, 3.6vw, 2.5rem); line-height: 1.15; }
.mp-gazette-chapeau { margin: 0; font-size: 1.1rem; font-style: italic; }
.mp-gazette-body { column-count: 2; column-gap: 32px; column-rule: 1px solid rgba(0, 0, 0, 0.18); line-height: 1.6; text-align: justify; hyphens: auto; }
.mp-gazette-body > p:first-of-type::first-letter { float: left; font-size: 3.4em; line-height: 0.85; padding: 4px 8px 0 0; font-weight: 700; }
.mp-gazette-body h3 { column-span: none; break-after: avoid; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.04em; margin: 14px 0 6px; }
.mp-gazette-fig { margin: 0 0 18px; }
.mp-gazette-fig .mp-media { filter: sepia(0.12); }
.mp-gazette-fig figcaption { font-size: 0.85rem; font-style: italic; margin-top: 4px; }
.mp-gazette-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.mp-gazette-box { margin: 18px 0 0; padding: 12px 16px; border: 2px solid currentColor; }
.mp-gazette-box h2 { margin: 0 0 6px; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; }
.mp-gazette-box p { margin: 0; }
.mp-gazette-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 12px; border-top: 1px solid currentColor; font-family: var(--mp-font); }
.mp-gazette .mp-sources-list summary { color: inherit; }
@media (max-width: 720px) { .mp-gazette-body { column-count: 1; } }

/* Devinez l'époque */
.mp-game { max-width: 760px; }
.mp-game-count { font-weight: 800; color: var(--mp-muted); }
.mp-game-photo { margin: 0 0 16px; background: #111; border-radius: var(--mp-radius); overflow: hidden; }
.mp-game-photo img { display: block; width: 100%; max-height: 480px; object-fit: contain; }
.mp-game-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mp-game-options .is-good { background: #e7f5ec; border-color: #14532d; color: #14532d; }
.mp-game-options .is-wrong { background: #fdecea; border-color: #8a1c12; color: #8a1c12; }
.mp-game-answer { min-height: 2.5em; margin-top: 14px; }

.mp-figure { margin: 0 0 14px; }
.mp-figure img { max-width: 100%; max-height: 440px; display: block; border-radius: var(--mp-radius-sm); }
.mp-figure figcaption { font-size: 0.85rem; color: var(--mp-muted); margin-top: 6px; }
.mp-sources-list { margin: 10px 0 0; font-size: 0.92rem; }
.mp-sources-list summary { cursor: pointer; font-weight: 800; color: var(--mp-brand); }
.mp-sources-list ol { margin: 6px 0 0; padding-left: 22px; }

/* Agent citoyen */
.mp-agent { position: fixed; right: 18px; bottom: 18px; z-index: 50; }
.mp-agent-open { min-height: 52px; padding: 12px 22px; border: 0; border-radius: var(--mp-pill); background: var(--mp-ink); color: var(--mp-fond); font: 800 0.95rem/1 var(--mp-font); box-shadow: 0 12px 28px rgba(17, 17, 17, 0.28); cursor: pointer; transition: transform 0.15s; }
.mp-agent-open:hover { transform: translateY(-2px); }
.mp-agent-panel { width: min(410px, calc(100vw - 24px)); max-height: min(640px, calc(100vh - 36px)); display: flex; flex-direction: column; background: var(--mp-card); color: var(--mp-ink); border-radius: calc(var(--mp-radius) + 4px); box-shadow: var(--mp-shadow-hover); overflow: hidden; }
.mp-agent-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--mp-fond); color: var(--mp-on-fond); font-weight: 800; }
.mp-agent-close { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.mp-agent-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.mp-agent-note, .mp-agent-foot { margin: 0; font-size: 0.8rem; color: var(--mp-muted); }
.mp-agent-foot { padding: 0 16px 12px; }
.mp-agent-msg { max-width: 92%; padding: 10px 14px; border-radius: 16px; font-size: 0.95rem; }
.mp-agent-msg p { margin: 0 0 6px; }
.mp-agent-msg p:last-child { margin: 0; }
.mp-agent-msg ul { margin: 0 0 6px; padding-left: 18px; }
.mp-agent-user { align-self: flex-end; background: var(--mp-ink); color: #fff; }
.mp-agent-bot { align-self: flex-start; background: var(--mp-soft); border: 1px solid var(--mp-line); }
.mp-agent-wait { margin: 0; font-style: italic; color: var(--mp-muted); }
.mp-agent-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 16px; border-top: 1px solid var(--mp-line); }
.mp-agent-label { position: absolute; left: -9999px; }
.mp-agent-form textarea { flex: 1; resize: none; font: inherit; padding: 8px 12px; border: 2px solid var(--mp-line); border-radius: 14px; }

/* Calendrier : un jour par ligne, fêtes et journées en lignes compactes, événements en cartes. */
.mp-agenda-month { margin: 36px 0 12px; font-size: 1.6rem; font-weight: 900; }
.mp-agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.mp-agenda-day { padding: 0 0 14px; border-bottom: 1px solid var(--mp-line); }
.mp-agenda-day.is-today > .mp-when { display: inline-block; padding: 3px 12px; border-radius: var(--mp-pill); background: var(--mp-fond); color: var(--mp-on-fond); }
.mp-agenda-day > .mp-when { margin: 0 0 6px; }
.mp-agenda-day .mp-event { margin: 8px 0 0; }
.mp-agenda-entry { margin: 0 0 4px; }
.mp-kind { display: inline-block; margin-right: 6px; padding: 3px 10px; border: 1.5px solid var(--mp-line); border-radius: var(--mp-pill); background: var(--mp-card); color: var(--mp-ink); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.mp-kind-ferie .mp-kind { background: var(--mp-accent); border-color: var(--mp-accent); color: var(--mp-on-accent); }
.mp-kind-scolaire .mp-kind, .mp-kind-regional .mp-kind { background: var(--mp-principal); border-color: var(--mp-principal); color: var(--mp-on-principal); }
.mp-agenda-sources { margin: 24px 0 0; font-size: 0.9rem; }
.mp-today-cal { margin: 0 0 12px; display: flex; flex-direction: column; gap: 2px; }

/* Documents */
.mp-docs { margin: 0 0 36px; scroll-margin-top: 16px; }
.mp-docs h2 { font-size: 1.5rem; font-weight: 900; padding-bottom: 8px; border-bottom: 2px solid var(--mp-line); }
.mp-docs h3 { margin: 22px 0 10px; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mp-muted); }
.mp-doc-index { margin: 0 0 32px; }
.mp-doc-index ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mp-doc-index a { display: inline-block; padding: 9px 18px; border: 2px solid var(--mp-line); border-radius: var(--mp-pill); color: var(--mp-ink); font-weight: 800; text-decoration: none; }
.mp-doc-index a:hover { background: var(--mp-fond); color: var(--mp-on-fond); }
.mp-doc-search { margin: 0 0 28px; max-width: 600px; }
.mp-doc-search p { margin: 8px 0 0; }
.mp-doc-summary { max-width: 780px; margin-top: 2px; }
.mp-docs[hidden], .mp-docs [hidden], .mp-doc-index[hidden] { display: none; }

/* Article */
.mp-article { max-width: 780px; }
.mp-body { font-size: 1.05rem; }
.mp-body h3, .mp-body h4, .mp-body h5 { margin: 1.5em 0 0.4em; }
.mp-body table { border-collapse: collapse; width: 100%; }
.mp-body th, .mp-body td { border: 1px solid var(--mp-line); padding: 8px 12px; text-align: left; }
.mp-body th { background: var(--mp-soft); }

/* Pied de page */
.mp-footer { margin-top: 40px; background: var(--mp-ink); color: #e9ecef; overflow: hidden; }
.mp-footer-bands { display: flex; justify-content: center; gap: 10px; padding-top: 30px; }
.mp-footer-bands span { width: 54px; height: 10px; border-radius: var(--mp-pill); }
.mp-footer-bands span:nth-child(1) { background: var(--mp-fond); }
.mp-footer-bands span:nth-child(2) { background: var(--mp-principal); }
.mp-footer-bands span:nth-child(3) { background: var(--mp-accent); }
.mp-footer-in { display: grid; grid-template-columns: 1.3fr 1fr 1.1fr; gap: 36px; padding: 40px 0 36px; }
.mp-footer h2 { margin: 0 0 14px; font-size: 1.15rem; font-weight: 900; color: #fff; }
.mp-footer p { margin: 0 0 6px; }
.mp-footer a { color: #fff; }
.mp-footer :focus-visible { outline-color: var(--mp-fond); box-shadow: none; }
.mp-footer-id img { display: block; width: 56px; height: auto; margin-bottom: 14px; }
.mp-footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mp-footer-links a { text-decoration: none; font-weight: 600; }
.mp-footer-links a:hover { text-decoration: underline; }
.mp-footer-cta p { color: #c9ced4; margin-bottom: 16px; }
.mp-footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 18px 0 24px; border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: 0.85rem; color: #aeb5bd; }
.mp-footer-base p { margin: 0; }
.mp-footer-base a { color: #aeb5bd; }
@media (max-width: 860px) { .mp-footer-in { grid-template-columns: 1fr; gap: 28px; } }

@media (max-width: 760px) {
    html { font-size: 106.25%; }
    .mp-wrap { width: min(var(--mp-wrap), 100% - 28px); }
    .mp-hero-in { grid-template-columns: 1fr; }
    .mp-calendar li { grid-template-columns: 1fr; gap: 2px; }
    .mp-agent { right: 12px; bottom: 12px; }
    .mp-map { height: 340px; }
    .mp-block { padding: 20px; }
    .mp-tiles { margin-top: -40px; }
    .mp-decor-epinette { opacity: 0.9; }
}

@media print {
    .mp-header, .mp-footer, .mp-agent, .mp-menu-toggle, .mp-frise-tools, .mp-decor, .mp-tiles { display: none !important; }
    body { font-size: 11pt; }
    .mp-block, .mp-card a, .mp-event { box-shadow: none; }
}
