/* france-environnement — feuille unique, sans police externe */
:root {
  --deep: #0b2f4e;
  --deep-2: #12406a;
  --teal: #0e7c8a;
  --turq: #12a5a5;
  --turq-light: #e6f6f6;
  --foam: #7fe0dc;
  --white: #ffffff;
  --ink: #14212e;
  --muted: #4a5a6a;
  --line: #d5e0e8;
  --bg-alt: #f3f8fb;
  --ok: #1d6b3a;
  --ok-bg: #e5f4ea;
  --warn: #7a4b00;
  --warn-bg: #fff4dc;
  --err: #a1192b;
  --err-bg: #fdecee;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(11, 47, 78, .06), 0 4px 16px rgba(11, 47, 78, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--white); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--deep); }
:focus-visible { outline: 3px solid #f4b400; outline-offset: 2px; }
h1, h2, h3, .h3 { line-height: 1.25; color: var(--deep); margin: 1.4em 0 .5em; }
h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); margin-top: .2em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
h3, .h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code { background: var(--bg-alt); padding: 0 .3em; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--deep); color: #fff; padding: .6em 1em; z-index: 100; }
.skip:focus { left: 1rem; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.small { font-size: .9rem; color: var(--muted); }
.unknown { color: var(--muted); font-style: italic; }
.precision { color: var(--muted); font-size: .9rem; }
.count { color: var(--muted); font-weight: 400; font-size: .8em; }
.req { color: var(--err); }

/* En-tête */
.preprod { background: var(--warn-bg); color: var(--warn); text-align: center; font-size: .875rem; padding: .35em 16px; }
.site-header { background: var(--deep); color: #fff; position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand:hover { color: var(--foam); }
.nav-toggle { display: none; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 8px; padding: .45em .9em; font: inherit; cursor: pointer; }
.main-nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .1rem; }
.main-nav a { color: #dcebf5; text-decoration: none; padding: .45em .6em; border-radius: 6px; display: block; font-size: .95rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.12); }
.main-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--foam); }
.nav-search { display: flex; gap: .3rem; }
.nav-search input { width: 9rem; padding: .4em .6em; border-radius: 6px; border: 0; font: inherit; font-size: .9rem; }
.nav-search button { background: var(--turq); color: #fff; border: 0; border-radius: 6px; padding: 0 .7em; font: inherit; cursor: pointer; }

@media (max-width: 960px) {
  .js .nav-toggle { display: inline-block; }
  .js .main-nav { display: none; width: 100%; padding-bottom: 1rem; }
  .js .main-nav.open { display: flex; flex-direction: column; align-items: stretch; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: .7em .6em; }
  .nav-search input { flex: 1; width: auto; }
}

/* Héros et sections */
.hero { background: linear-gradient(160deg, var(--deep) 0%, var(--deep-2) 55%, var(--teal) 100%); color: #fff; padding: 3rem 0 0; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: end; }
.hero h1 { color: #fff; }
.hero .lead { color: #dcebf5; }
.hero-text { padding-bottom: 3rem; }
.hero-art { display: block; width: 100%; max-width: 420px; justify-self: end; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--foam); margin-bottom: .4rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 2rem 0 1.2rem; }
.page-head .eyebrow { color: var(--teal); }
.crumbs { margin: 0; font-size: .9rem; }
.section { padding: 2.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--deep); color: #dcebf5; }
.section-dark h2 { color: #fff; margin-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.section-intro { color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; }
.two-col-wide { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 800px) {
  .hero-inner, .two-col, .two-col-wide { grid-template-columns: 1fr; }
  .hero-art { max-width: 280px; justify-self: center; }
  .hero-text { padding-bottom: 0; }
}

/* Boutons */
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1rem 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55em 1.2em; border-radius: 999px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--turq); color: #fff; border-color: var(--turq); }
.btn-primary:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-ghost { background: #fff; color: var(--deep); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-light { background: #fff; color: var(--deep); }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.6); }
.btn-outline-light:hover, .btn-light:hover { color: var(--deep); background: var(--foam); }
.btn-danger { background: #fff; color: var(--err); border-color: var(--err); }
.linklike { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }

/* Cartes, grilles */
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: .3em; }
.card-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .5rem; }
.tag { display: inline-block; font-size: .8rem; padding: .1em .6em; border-radius: 999px; background: var(--turq-light); color: var(--deep); }
.badge { display: inline-block; font-size: .8rem; font-weight: 700; padding: .12em .65em; border-radius: 999px; border: 1px solid; }
.badge-documente { background: var(--ok-bg); color: var(--ok); border-color: #9fd3b1; }
.badge-temoignage { background: #eef0fb; color: #33408f; border-color: #b9c0ea; }
.badge-a_confirmer { background: var(--warn-bg); color: var(--warn); border-color: #edc77a; }
.badge-projet { background: #f2f2f2; color: #444; border-color: #c9c9c9; }
dl.mini { display: grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; margin: 0; font-size: .92rem; }
dl.mini dt { color: var(--muted); }
dl.mini dd { margin: 0; }
dl.facts { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
dl.facts dt, dl.facts dd { padding: .7rem .4rem; border-bottom: 1px solid var(--line); margin: 0; }
dl.facts dt { font-weight: 600; color: var(--deep); }
@media (max-width: 600px) { dl.facts { grid-template-columns: 1fr; } dl.facts dt { border-bottom: 0; padding-bottom: 0; } }

/* Compteurs */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; margin: 1rem 0; }
.stat { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--turq); border-radius: var(--radius); padding: 1rem 1.1rem; }
.stat-declared { border-top-color: #8a93c9; background: #fafbff; }
.stat-label { font-weight: 700; color: var(--deep); margin: 0 0 .3rem; }
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--deep); margin: 0; line-height: 1.2; }
.stat-value small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.stat-note { font-size: .85rem; color: var(--muted); margin: .4rem 0 0; }

/* Notes, alertes */
.note { background: var(--turq-light); border-left: 4px solid var(--turq); padding: .9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.2rem 0; }
.note p:last-child { margin-bottom: 0; }
.alert { padding: .8rem 1rem; border-radius: var(--radius); margin: 1rem 0; border: 1px solid; }
.alert ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: #9fd3b1; }
.alert-error { background: var(--err-bg); color: var(--err); border-color: #f0a9b3; }
.alert-warn { background: var(--warn-bg); color: var(--warn); border-color: #edc77a; }
.alert a { color: inherit; }

/* Frise */
.timeline { list-style: none; padding: 0; margin: 1.5rem 0; border-left: 3px solid var(--line); }
.tl-item { position: relative; padding: 0 0 1.4rem 1.4rem; }
.tl-item::before { content: ""; position: absolute; left: -9px; top: .35rem; width: 15px; height: 15px; border-radius: 50%; background: var(--turq); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.tl-temoignage::before { background: #8a93c9; }
.tl-date { font-weight: 700; color: var(--teal); margin: 0; }
.tl-body h2 { margin-top: .1em; }
.source-line { font-size: .9rem; color: var(--muted); }

/* Témoignage, sources */
.testimony { margin: 1.5rem 0; padding: 1rem 1.3rem; background: #f6f7fd; border-left: 4px solid #8a93c9; border-radius: 0 var(--radius) var(--radius) 0; }
.testimony blockquote { margin: 0; font-style: italic; }
.testimony figcaption { font-size: .9rem; color: var(--muted); margin-top: .4rem; }
ul.sources { list-style: none; padding: 0; }
ul.sources > li { border-bottom: 1px solid var(--line); padding: .9rem 0; }
ul.sources p { margin: 0 0 .3rem; }
.lead-list { padding-left: 1.2rem; columns: 2 18rem; column-gap: 2rem; }
.lead-list li { break-inside: avoid; margin-bottom: .35rem; }
.checklist li, .steps li, .charter li { margin-bottom: .45rem; }

/* Tableaux */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-alt); color: var(--deep); }
tr.is-test td { background: #fffbe9; }

/* Formulaires */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); }
.narrow-card { max-width: 480px; margin: 2rem auto; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { font-weight: 700; color: var(--deep); font-size: 1.1rem; margin-bottom: .5rem; }
.field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .3rem; }
.field label, .ro-label { font-weight: 600; font-size: .95rem; margin: 0; }
.field input[type=text], .field input[type=email], .field input[type=url], .field input[type=tel], .field input[type=search],
.field input[type=password], .field input[type=date], .field input[type=file], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .6em .7em; border: 1px solid #9fb2c2; border-radius: 8px; background: #fff; color: var(--ink); min-height: 44px;
}
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.field.check { flex-direction: row; align-items: flex-start; gap: .6rem; }
.field.check input { width: 1.2rem; height: 1.2rem; margin-top: .25rem; flex: none; }
.field.check label { font-weight: 400; }
.field.check .field-error { flex-basis: 100%; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0 1rem; }
.hint { font-size: .85rem; color: var(--muted); margin: 0; }
.field-error { color: var(--err); font-size: .9rem; font-weight: 600; margin: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ro-value { padding: .3rem 0; white-space: pre-wrap; }
.inline { display: inline; }

.filters { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: flex-end; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
.filters .field { margin: 0; flex: 1 1 160px; }
.filters .field-grow { flex: 3 1 260px; }
.filters .field-actions { flex: 0 0 auto; flex-direction: row; align-items: center; gap: .8rem; }
.result-count { color: var(--muted); }
.pager { display: flex; gap: .4rem; flex-wrap: wrap; margin: 1.5rem 0; }
.pager a { padding: .4em .8em; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.pager a[aria-current="page"] { background: var(--deep); color: #fff; border-color: var(--deep); }

/* Pied de page */
.site-footer { background: var(--deep); color: #c7d9e6; padding: 2.5rem 0 2rem; margin-top: 3rem; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 1.5rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .4rem; }
.footer-brand { color: #fff; font-weight: 700; font-size: 1.1rem; }
.footer-title { color: #fff; font-weight: 700; }
.site-footer .small { color: #a9c1d3; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Administration */
.admin { background: var(--bg-alt); }
.admin-header { background: var(--deep); }
.admin-nav { display: flex; flex-wrap: wrap; gap: .2rem .9rem; align-items: center; font-size: .9rem; }
.admin-nav a, .admin-nav .linklike { color: #dcebf5; text-decoration: none; }
.admin-nav a:hover { color: #fff; text-decoration: underline; }
.admin-main { padding-top: 1.5rem; padding-bottom: 3rem; }
.admin-form { max-width: 860px; }
.admin .stat-value { font-size: 1.6rem; }

/* Sticker */
.sticker-page { background: #fff; padding: 2rem; }
.sticker { width: 80mm; border: 2px solid var(--deep); border-radius: 12px; padding: 6mm; text-align: center; font-family: var(--font); margin: 0 auto; }
.sticker-site { margin: 0; font-weight: 700; color: var(--teal); font-size: .9rem; }
.sticker-title { margin: .2rem 0 .6rem; font-weight: 800; font-size: 1.3rem; color: var(--deep); }
.sticker-qr { display: flex; justify-content: center; margin: 0 auto .6rem; min-height: 150px; }
.sticker-org { font-weight: 700; margin: 0; }
.sticker-note { font-size: .78rem; margin: .3rem 0; color: var(--muted); }
.sticker-url { font-size: .7rem; margin: 0; word-break: break-all; }
.no-print { text-align: center; margin-top: 1rem; }
@media print { .no-print, .preprod { display: none; } .sticker-page { padding: 0; } }

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

/* Photographies de contenu (fiches lieux) */
.place-figure { margin: 0 0 1.25rem; }
.place-figure img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; display: block; background: #e6f6f6; }
.place-figure figcaption { font-size: .8rem; color: #4a5a68; margin-top: .4rem; }
.place-figure figcaption a { color: inherit; }

/* ===== Refonte visuelle (portail de référence) ===== */
/* Effet de survol sur toutes les cartes */
.card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.grid-2 .card:hover, .grid-3 .card:hover, .audiences .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(11,47,78,.08), 0 12px 28px rgba(11,47,78,.12);
  border-color: var(--foam);
}
.card .h3 a, .card h2 a { text-decoration: none; }
.card .h3 a:hover, .card h2 a:hover { text-decoration: underline; }

/* Cartes-photo (lieux) */
.media-grid { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.place-card { position: relative; display: block; min-height: 230px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(150deg, var(--deep), var(--teal)); color: #fff; text-decoration: none; box-shadow: var(--shadow); }
.place-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.place-card .pc-body { position: relative; z-index: 2; min-height: 230px; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1rem 1.1rem; background: linear-gradient(to top, rgba(6,22,38,.88) 0%, rgba(6,22,38,.35) 50%, rgba(6,22,38,.05) 100%); }
.place-card:hover img { transform: scale(1.06); }
.place-card:hover { box-shadow: 0 6px 14px rgba(11,47,78,.18), 0 18px 40px rgba(11,47,78,.22); }
.place-card h3 { color: #fff; margin: .15rem 0 .1rem; font-size: 1.12rem; }
.place-card .pc-meta { font-size: .82rem; color: #d7ecf3; display: flex; flex-wrap: wrap; gap: .3rem .6rem; }
.place-card .pc-country { font-weight: 700; }
.place-card.no-photo .pc-body { background: linear-gradient(150deg, rgba(11,47,78,.2), rgba(14,124,138,.25)); }

/* Bandeau de photos en vedette (accueil) */
.feature-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }

/* Insigne de pays (annuaire) */
.pill { display: inline-block; font-size: .76rem; font-weight: 700; letter-spacing: .02em; padding: .18em .7em;
  border-radius: 999px; background: var(--turq-light); color: var(--teal); border: 1px solid #bfe6e6; }
.card .pill { margin-bottom: .5rem; }

/* Accent coloré en haut de carte, par section */
.card-accent { border-top: 3px solid var(--turq); }

/* Hero : un peu plus présent */
.hero { padding-top: 3.5rem; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
.hero .lead { font-size: 1.2rem; max-width: 40rem; }

/* Grille de vignettes compactes (accueil vedette) */
.thumb-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.thumb { position: relative; display: block; border-radius: 14px; overflow: hidden; min-height: 150px; text-decoration: none; box-shadow: var(--shadow); background: var(--deep); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.thumb:hover img { transform: scale(1.06); }
.thumb .thumb-cap { position: relative; z-index: 2; min-height: 150px; display: flex; align-items: flex-end; padding: .7rem .8rem;
  color: #fff; font-weight: 700; font-size: .95rem; background: linear-gradient(to top, rgba(6,22,38,.85), rgba(6,22,38,0) 70%); }
