/* MEP — charte : anthracite #434344, orange #f7ac15 (logo MEP 2018) */
:root {
  color-scheme: light;
  --mep-anthracite: #434344;
  --mep-orange: #f7ac15;
  --mep-orange-pale: #fef4df;
  --ink: #2b2b2c;
  --muted: #5c5c5f;
  --link: #434344;
  --line: #e4e4e6;
  --bg: #f5f5f6;
  --surface: #fff;
  --focus: #ffdd00;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--link);
  text-decoration-color: var(--mep-orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 3px; }
a:focus-visible, .site:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  background: var(--focus);
  box-shadow: 0 0 0 6px var(--focus);
}

.skip {
  position: absolute; left: 12px; top: -60px;
  padding: 10px 16px; background: var(--focus); color: var(--ink);
  font-weight: 700; z-index: 10;
}
.skip:focus { top: 12px; }

.wrap { width: min(1080px, calc(100% - 32px)); margin: auto; }

/* En-tête */
header { background: var(--surface); border-bottom: 4px solid var(--mep-orange); }
.top { padding: 18px 0; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.brand img { width: 96px; }
.brand strong { display: block; font-size: 17px; line-height: 1.25; }
.brand small { display: block; font-size: 13px; color: var(--muted); }
nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
nav a { font-size: 15px; font-weight: 600; text-decoration: none; padding: 10px 0; border-bottom: 3px solid transparent; }
nav a:hover { border-bottom-color: var(--mep-orange); }

/* Bandeau d'information */
.notice { background: var(--surface); border-bottom: 1px solid var(--line); }
.notice p { margin: auto; padding: 8px 0; font-size: 14px; color: var(--muted); text-align: center; }

/* Blocs */
main { padding: 32px 0 56px; }
.block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(22px, 4vw, 44px);
  margin: 0 0 20px;
  box-shadow: 0 5px 24px #2b2b2c0d;
}
.hero { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.hero-logo { width: 240px; }
h1 { font-size: clamp(28px, 4.5vw, 44px); line-height: 1.18; margin: 0 0 16px; color: var(--mep-anthracite); }
h2 { font-size: 25px; line-height: 1.25; margin: 0 0 22px; color: var(--mep-anthracite); }
h2::after { content: ""; display: block; width: 48px; height: 4px; margin-top: 10px; background: var(--mep-orange); border-radius: 2px; }
h3 { font-size: 17px; margin: 0 0 8px; }
p { margin: 0 0 14px; }
.lead { font-size: 18px; max-width: 720px; color: #3a3a3b; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.detail { background: #f8f8f9; border-radius: 12px; padding: 18px; }
.detail p:last-child { margin: 0; }
.label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin-bottom: 5px; }

/* Sites */
.sites { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 0; }
.site {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 124px; padding: 18px 12px; text-align: center;
  border: 1px solid var(--line); border-radius: 13px;
  text-decoration: none; background: var(--surface);
  transition: border-color .2s, transform .2s;
}
a.site:hover { border-color: var(--mep-orange); transform: translateY(-2px); }
.site strong { font-size: 22px; letter-spacing: -.04em; }
.site span { font-size: 12px; color: var(--muted); }
.site img { width: auto; max-width: 100%; height: 56px; object-fit: contain; }
.sites .site img { max-width: 170px; }
.institution img { height: 64px; }
.institution { max-width: 280px; margin-bottom: 22px; }

.note { font-size: 13px; color: var(--muted); }
.mt { margin-top: 16px; }
.todo { background: #fff3cd; border-left: 4px solid var(--mep-orange); padding: 8px 12px; }
.legal h3 { margin-top: 18px; }
.legal p { color: #48484b; font-size: 15px; }
.legal p:last-child { margin-bottom: 0; }

footer { text-align: center; font-size: 13px; color: var(--muted); padding: 0 0 30px; }

@media (max-width: 700px) {
  .top { align-items: flex-start; flex-direction: column; gap: 10px; }
  .hero { grid-template-columns: 1fr; }
  .hero-logo { display: none; }
  .grid { grid-template-columns: 1fr; }
  .sites { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site { transition: none; }
}
@media print {
  header nav, .skip { display: none; }
  body { background: #fff; }
  .block { box-shadow: none; border: 0; padding: 0; }
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
