/* Aide L'ESSOR de la Gendarmerie — feuille de style */
:root {
  --navy: #0d1f3c;
  --navy-2: #16305a;
  --blue: #1d4fb8;
  --blue-soft: #e8eefb;
  --red: #c8102e;
  --ink: #16202e;
  --ink-2: #445066;
  --muted: #6b7587;
  --line: #dde3ec;
  --bg: #f4f6f9;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(13, 31, 60, .06), 0 6px 20px rgba(13, 31, 60, .06);
  --wrap: 1120px;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; font: 17px/1.6 var(--sans); color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid #f5b400; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; color: var(--navy); }
h1 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 50; border-radius: 6px; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }

/* ---- en-tête */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--navy); }
.brand img { display: block; height: 40px; width: auto; }
.brand-sep { width: 1px; height: 28px; background: var(--line); }
.brand-label { font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.top-nav { display: flex; align-items: center; gap: 22px; }
.top-nav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.top-nav a:not(.btn):hover { color: var(--blue); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--blue); color: #fff; border: 0; border-radius: 10px; padding: 12px 20px; font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--navy); color: #fff; }
.btn-small { padding: 9px 14px; font-size: 15px; }
.btn-ghost { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); }
.btn-ghost:hover { background: var(--blue-soft); color: var(--navy); }

.ico { width: 22px; height: 22px; flex: none; }

/* ---- héros */
.hero { background: radial-gradient(1200px 400px at 85% -10%, #2b4f8f 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 64px 0 72px; }
.hero h1 { color: #fff; font-size: clamp(30px, 4.6vw, 48px); margin: 6px 0 28px; max-width: 18ch; }
.hero-small { padding: 56px 0; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .14em; font-size: 13px; font-weight: 700; color: #b9c8e6; }
.hero-hint { color: #c9d4ea; font-size: 15px; margin: 16px 0 0; }
.hero-hint a { color: #fff; }

/* ---- recherche */
.search { position: relative; display: flex; align-items: center; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); max-width: 720px; }
.search:focus-within { box-shadow: 0 0 0 2px var(--blue); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 17px var(--sans); color: var(--ink); padding: 14px 12px 14px 4px; outline: none; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search-ico { margin-left: 14px; color: var(--muted); }
.search .btn { margin: 5px; padding: 10px 16px; }
.search-big { box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.search-big input { font-size: 19px; padding: 18px 12px 18px 4px; }
.search-big .btn { padding: 14px 22px; }
.suggestions { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border-radius: 12px; box-shadow: 0 16px 40px rgba(13, 31, 60, .22); overflow: hidden; z-index: 30; color: var(--ink); text-align: left; }
.suggestions a { display: block; padding: 11px 16px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); }
.suggestions a:first-child { border-top: 0; }
.suggestions a[aria-selected="true"], .suggestions a:hover { background: var(--blue-soft); }
.suggestions .s-title { display: block; font-weight: 600; }
.suggestions .s-meta { display: block; font-size: 13px; color: var(--muted); }
.suggestions .s-all { font-weight: 600; color: var(--blue); }
.suggestions .s-empty { padding: 14px 16px; color: var(--muted); }
mark { background: #fff1b8; color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---- sections accueil */
.section { padding: 48px 20px 8px; }
.section-title { font-family: var(--serif); font-size: 26px; margin: 0 0 20px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.cat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; border: 1px solid transparent; transition: border-color .15s, transform .15s; }
.cat-card:hover { border-color: #c4d1ea; transform: translateY(-2px); }
.cat-head { display: flex; gap: 14px; align-items: center; text-decoration: none; }
.cat-head h3 { margin: 0; font-size: 18px; }
.cat-count { font-size: 14px; color: var(--muted); }
.cat-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); flex: none; }
.cat-ico.big { width: 56px; height: 56px; border-radius: 14px; }
.cat-ico.big .ico { width: 28px; height: 28px; }
.cat-links { list-style: none; margin: 14px 0 12px; padding: 0; flex: 1; }
.cat-links li { padding: 6px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
.cat-links a { color: var(--ink-2); text-decoration: none; }
.cat-links a:hover { color: var(--blue); text-decoration: underline; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; text-decoration: none; }
.more .ico { width: 18px; height: 18px; transition: transform .15s; }
.more:hover .ico { transform: translateX(3px); }

.featured { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.featured a { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 12px; padding: 16px 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); font-weight: 600; line-height: 1.35; }
.featured .f-txt { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.featured a:hover { color: var(--blue); }
.featured .ico { width: 18px; height: 18px; color: var(--muted); }
.tag { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--bg); border-radius: 99px; padding: 3px 10px; white-space: nowrap; }

/* ---- bandeau contact */
.contact-band { margin-top: 56px; background: #fff; border-top: 1px solid var(--line); padding: 44px 0; }
.contact-head h2 { font-family: var(--serif); font-size: 26px; margin: 0 0 4px; }
.contact-head p { margin: 0 0 22px; color: var(--ink-2); }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.contact-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 12px; background: var(--bg); text-decoration: none; color: var(--ink); border: 1px solid var(--line); }
.contact-card:hover { border-color: var(--blue); }
.contact-card .ico { color: var(--blue); margin-top: 2px; }
.contact-card strong { display: block; color: var(--navy); }
.contact-card span span { color: var(--ink-2); font-size: 15px; }

/* ---- en-tête de page interne */
.page-head { background: #fff; border-bottom: 1px solid var(--line); padding: 20px 0 28px; }
.page-head.slim { padding-bottom: 20px; }
.page-head .search { margin-top: 18px; }
.page-title { display: flex; gap: 18px; align-items: center; margin-top: 8px; }
.page-title h1 { margin: 0; font-size: clamp(28px, 3.6vw, 38px); }
.page-title p { margin: 4px 0 0; color: var(--ink-2); }
.search-title { font-size: 32px; margin: 8px 0 0; }
.back { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 7px 14px 7px 10px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: 15px; text-decoration: none; }
.back:hover { background: var(--blue); color: #fff; }
.back .ico { width: 18px; height: 18px; transition: transform .15s; }
.back:hover .ico { transform: translateX(-3px); }
.article .back { margin-bottom: 20px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 6px 0 2px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--blue); text-decoration: underline; }

/* ---- catégorie */
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding-top: 32px; padding-bottom: 8px; align-items: start; }
.side { position: sticky; top: 20px; }
.side-title { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 10px; }
.toc { list-style: none; margin: 0; padding: 0; }
.toc a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.toc a:hover { background: #fff; color: var(--blue); }
.toc span { color: var(--muted); font-weight: 400; }
.folder { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px 10px; margin-bottom: 18px; }
.folder h2 { font-size: 20px; margin: 0 0 6px; }
.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li { border-top: 1px solid var(--line); }
.article-list li:first-child { border-top: 0; }
.article-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; text-decoration: none; color: var(--ink); font-weight: 600; }
.article-list a:hover { color: var(--blue); }
.article-list .ico { width: 18px; height: 18px; color: var(--muted); }

/* ---- article */
.article-layout { grid-template-columns: 1fr 300px; }
.article { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 40px 36px; min-width: 0; }
.kicker { margin: 0 0 6px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.kicker a { text-decoration: none; }
.article h1 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 22px; }
.prose { overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose li { margin: 4px 0; }
.prose li > ul, .prose li > ol { margin-top: 6px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }
.prose img { display: block; margin: 12px 0; border-radius: 8px; border: 1px solid var(--line); }
.prose td img { margin: 0 auto; border: 0; }
.prose pre { white-space: pre-wrap; font: inherit; background: var(--blue-soft); border-left: 4px solid var(--blue); border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 18px 0; }
.prose strong { color: var(--navy); }
.table-wrap { overflow-x: auto; margin: 16px 0 22px; border: 1px solid var(--line); border-radius: 10px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose td { border: 1px solid var(--line); padding: 10px 12px; vertical-align: middle; text-align: center; }
.prose tr:first-child td { border-top: 0; }
.prose td:first-child { border-left: 0; }
.prose td:last-child { border-right: 0; }
.prose tr:last-child td { border-bottom: 0; }
.prose td[colspan] { background: #fafbfd; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 6px 0 18px; border-radius: 12px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.attachments { margin-top: 26px; }
.attachments h2, .related h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 10px; }
.attachments ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.attachments a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.attachments a:hover { border-color: var(--blue); background: var(--blue-soft); }
.helpful { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; padding: 18px 20px; background: var(--bg); border-radius: 12px; }
.helpful p { margin: 0; font-weight: 600; color: var(--ink-2); }
.related { position: sticky; top: 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { border-top: 1px solid var(--line); }
.related li:first-child { border-top: 0; }
.related a { display: block; padding: 10px 0; text-decoration: none; color: var(--ink-2); font-size: 15px; line-height: 1.4; }
.related a:hover { color: var(--blue); }

/* ---- résultats de recherche */
.result-count { color: var(--ink-2); margin: 0 0 14px; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.results a { display: block; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 18px 20px; text-decoration: none; color: var(--ink); }
.results a:hover { outline: 2px solid #c4d1ea; }
.results .r-title { display: block; font-weight: 700; font-size: 18px; color: var(--navy); }
.results .r-meta { display: block; font-size: 14px; color: var(--muted); margin: 2px 0 6px; }
.results .r-snip { display: block; color: var(--ink-2); font-size: 15px; }

/* ---- contact */
.contact-main { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; border-top: 4px solid var(--blue); }
.cm-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.cm-head h2 { font-family: var(--serif); font-size: 26px; margin: 0 0 4px; }
.cm-head p { margin: 0; color: var(--ink-2); }
.cm-head .btn .ico { width: 18px; height: 18px; }
.contact-main .note { margin: 16px 0 0; }
.contact-main div.contact-card { cursor: default; }
.contact-main div.contact-card:hover { border-color: var(--line); }
.others-title { margin: 40px 0 16px; font-size: 22px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.contact-block { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.contact-block h3 { display: flex; align-items: center; gap: 10px; font-size: 19px; margin: 0 0 4px; }
.contact-block h3 .ico { color: var(--blue); }
.cb-desc { margin: 0 0 14px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.contact-lines { list-style: none; margin: 0; padding: 0; }
.contact-lines li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.contact-lines li > .ico { width: 18px; height: 18px; color: var(--muted); margin-top: 3px; }
.cl-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cl-value { display: block; color: var(--ink); }
.contact-card span span, .cl-value a { overflow-wrap: normal; word-break: normal; }
.note { font-size: 15px; color: var(--ink-2); background: var(--bg); padding: 12px 14px; border-radius: 10px; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } .contact-main { padding: 20px; } .cm-head .btn { width: 100%; } }

/* ---- pied de page */
.site-footer { background: var(--navy); color: #c9d4ea; margin-top: 0; padding: 44px 0 0; font-size: 15px; }
.contact-band + .site-footer, .site-footer { margin-top: 0; }
main > :last-child:not(.contact-band) { margin-bottom: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 28px; }
.footer-logo { height: 40px; width: auto; background: #fff; padding: 6px 10px; border-radius: 8px; }
.site-footer h2 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .12em; margin: 4px 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: #fff; text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .muted { color: #9fb0cf; }
.social { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px !important; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 32px; padding-top: 16px; padding-bottom: 20px; font-size: 14px; color: #9fb0cf; }
.footer-bottom p { margin: 0; }

/* ---- responsive */
@media (max-width: 960px) {
  .layout, .article-layout { grid-template-columns: 1fr; }
  .side, .related { position: static; }
  .side { order: -1; }
  .toc { display: flex; flex-wrap: wrap; gap: 6px; }
  .toc a { background: #fff; box-shadow: var(--shadow); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section { padding-left: 16px; padding-right: 16px; }
  .top-nav a:not(.btn) { display: none; }
  .brand img { height: 32px; }
  .brand-label { font-size: 16px; }
  .hero { padding: 40px 0 48px; }
  .search .btn { display: none; }
  .search-big input { font-size: 17px; padding: 16px 12px 16px 4px; }
  .article { padding: 22px 18px 26px; border-radius: 0; margin: 0 -16px; box-shadow: none; }
  .featured { grid-template-columns: 1fr; }
  .page-title .cat-ico.big { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .site-footer, .search, .contact-band, .related, .helpful, .side { display: none !important; }
  body { background: #fff; }
  .article { box-shadow: none; padding: 0; }
}
