/* ============================================================
   GIGN — Gendarmerie nationale
   Charte : bleu Gendarmerie (#0f3f91) + or (#d9b23c), fond clair
   ============================================================ */
:root {
  --bleu: #0f3f91;
  --bleu-900: #0a2c68;
  --bleu-700: #14509e;
  --bleu-050: #eef3fc;
  --or: #d9b23c;
  --or-600: #b8912a;
  --encre: #16233a;
  --texte: #35455c;
  --muted: #64748b;
  --ligne: #dde4f0;
  --fond: #ffffff;
  --fond-alt: #f4f7fc;
  --ombre: 0 18px 40px -22px rgba(15, 63, 145, 0.35);
  --radius: 10px;
  --radius-lg: 16px;
  --container: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Archivo", var(--font);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--texte);
  background: var(--fond);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); color: var(--encre); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.15rem; margin-bottom: 0.4em; }
p { margin: 0 0 1rem; }
a { color: var(--bleu); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong { color: var(--encre); }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - 2.5rem, 820px); }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 300; background: var(--bleu); color: #fff; padding: 0.7rem 1.1rem; border-radius: 0 0 8px 0; font-weight: 600; }
.skip-link:focus { left: 0; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.85rem 1.6rem; border-radius: 4px; font-weight: 600; font-size: 0.95rem; border: 1px solid transparent; transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--or { background: var(--or); color: #241c00; }
.btn--or:hover { background: var(--or-600); }
.btn--bleu { background: var(--bleu); color: #fff; }
.btn--bleu:hover { background: var(--bleu-900); }
.btn--clair { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.55); }
.btn--clair:hover { background: #fff; color: var(--bleu); }

/* ---------- Barre institutionnelle ---------- */
.topbar { background: var(--bleu-900); color: #cfdcf3; font-size: 0.8rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 40px; }
.topbar p { margin: 0; display: inline-flex; align-items: center; gap: 0.6rem; }
.topbar__left { color: #eaf1fd; font-weight: 500; letter-spacing: 0.01em; }
.topbar__right { color: #9fb4d8; }
.tricolore { display: inline-flex; width: 26px; height: 16px; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,0.25); }
.tricolore i { flex: 1; }
.tricolore i:nth-child(1) { background: #1c3f94; }
.tricolore i:nth-child(2) { background: #fff; }
.tricolore i:nth-child(3) { background: #ce1126; }
@media (max-width: 720px) { .topbar__right { display: none; } }

/* ---------- En-tête ---------- */
.nav { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--ligne); transition: box-shadow .2s ease; }
.nav.is-scrolled { box-shadow: 0 8px 24px -16px rgba(15, 63, 145, 0.5); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 82px; }
.brand { display: flex; align-items: center; gap: 0.85rem; }
.brand:hover { text-decoration: none; }
.brand__crest { width: 42px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: 0.04em; color: var(--bleu); }
.brand__text small { font-size: 0.72rem; color: var(--muted); max-width: 320px; }

.nav__menu { display: flex; align-items: center; gap: 1.5rem; }
.nav__menu a { color: var(--encre); font-weight: 500; font-size: 0.94rem; position: relative; padding: 0.3rem 0; }
.nav__menu a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--or); transition: width .2s ease; }
.nav__menu a:hover { color: var(--bleu); text-decoration: none; }
.nav__menu a:hover::after { width: 100%; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 26px; height: 2px; background: var(--encre); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

@media (max-width: 1000px) {
  .nav__toggle { display: flex; }
  .nav__menu { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--ligne); box-shadow: var(--ombre); padding: 0.5rem 1.25rem 1rem; max-height: 0; overflow: hidden; transition: max-height .28s ease; }
  .nav__menu.is-open { max-height: 560px; }
  .nav__menu a { padding: 0.8rem 0; border-bottom: 1px solid var(--ligne); }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; color: #fff; overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; z-index: -2; }
.hero__overlay { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgba(10,44,104,0.72) 0%, rgba(10,44,104,0.55) 45%, rgba(10,44,104,0.92) 100%),
  linear-gradient(90deg, rgba(10,30,70,0.85) 0%, rgba(10,30,70,0.35) 70%);
}
.hero__inner { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(7rem, 12vw, 9rem); max-width: 820px; }
.hero__crest { width: clamp(72px, 10vw, 104px); height: auto; margin-bottom: 1.4rem; filter: drop-shadow(0 12px 24px rgba(0,0,0,0.45)); }
.eyebrow { display: inline-block; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; color: #ffe9a8; margin: 0 0 1rem; }
.hero__title { color: #fff; font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 800; margin-bottom: 1.1rem; text-wrap: balance; }
.hero__lead { color: #dbe6fa; font-size: clamp(1rem, 1.6vw, 1.14rem); max-width: 640px; margin-bottom: 1.9rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero__ribbon { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(9, 26, 58, 0.82); border-top: 3px solid var(--or); backdrop-filter: blur(4px); }
.hero__ribbon-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.1rem 0; }
.hero__ribbon-inner div { text-align: left; }
.hero__ribbon-inner strong { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(1.2rem, 2vw, 1.5rem); color: #fff; }
.hero__ribbon-inner span { font-size: 0.8rem; color: #a9bedf; }
@media (max-width: 760px) {
  .hero__ribbon { position: static; background: var(--bleu-900); }
  .hero__ribbon-inner { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { padding-bottom: 3rem; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--alt { background: var(--fond-alt); border-block: 1px solid var(--ligne); }
.section__head { max-width: 720px; margin-bottom: 2.6rem; }
.kicker { display: inline-block; color: var(--bleu); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.75rem; margin: 0 0 0.7rem; }
.kicker::before { content: ""; display: inline-block; width: 26px; height: 2px; background: var(--or); vertical-align: middle; margin-right: 0.6rem; }

.grid-2 { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.grid-2--reverse { grid-template-columns: 0.95fr 1.05fr; }
@media (max-width: 900px) { .grid-2, .grid-2--reverse, .grid-2--hist { grid-template-columns: 1fr; } }

.list-check { display: grid; gap: 0.7rem; margin-top: 1.2rem; }
.list-check li { position: relative; padding-left: 2rem; color: var(--texte); }
.list-check li::before { content: ""; position: absolute; left: 0; top: 0.15em; width: 20px; height: 20px; border-radius: 3px; background: var(--bleu-050); border: 1px solid #c3d2ec; }
.list-check li::after { content: ""; position: absolute; left: 6px; top: 0.4em; width: 6px; height: 10px; border: solid var(--bleu); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---------- Figures ---------- */
.figure { margin: 0; }
.figure img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--ligne); box-shadow: var(--ombre); }
.figure figcaption { margin-top: 0.8rem; font-size: 0.82rem; color: var(--muted); }
.figure--emblem { display: flex; flex-direction: column; align-items: center; background: #fff; border: 1px solid var(--ligne); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--ombre); }
.figure--emblem img { border: 0; box-shadow: none; max-width: 300px; }
.figure--emblem figcaption { text-align: center; }

/* ---------- Missions ---------- */
.missions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 1000px) { .missions { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .missions { grid-template-columns: 1fr; } }
.mission { background: #fff; border: 1px solid var(--ligne); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 1px 0 rgba(15,63,145,0.03); transition: transform .2s ease, box-shadow .2s ease; }
.mission:hover { transform: translateY(-4px); box-shadow: var(--ombre); }
.mission__img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bleu-050); }
.mission__img img { width: 100%; height: 100%; object-fit: cover; }
.mission__body { padding: 1.3rem 1.4rem 1.5rem; border-top: 3px solid var(--or); }
.mission__body h3 { margin-bottom: 0.35rem; }
.mission__body p { margin: 0; font-size: 0.94rem; }

/* ---------- Organisation ---------- */
.forces { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
@media (max-width: 640px) { .forces { grid-template-columns: 1fr; } }
.force { background: #fff; border: 1px solid var(--ligne); border-left: 4px solid var(--bleu); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.force h3 { display: flex; align-items: baseline; gap: 0.7rem; margin-bottom: 0.4rem; }
.force h3 span { font-family: var(--display); color: var(--or-600); font-size: 1rem; }
.force p { margin: 0; font-size: 0.95rem; }

.callout { margin-top: 1.6rem; background: var(--bleu); color: #e8f0ff; border-radius: var(--radius-lg); padding: 1.6rem 1.8rem; }
.callout h3 { color: #fff; }
.callout p { margin: 0; color: #cfe0fb; }

/* ---------- Histoire ---------- */
.grid-2--hist { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 86px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, var(--or), #e7ddc0); }
.timeline li { display: grid; grid-template-columns: 130px 1fr; gap: 1.8rem; padding: 1.05rem 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 79px; top: 1.55rem; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--bleu); }
.timeline__year { font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: var(--bleu); text-align: right; }
.timeline h3 { margin-bottom: 0.2rem; font-size: 1.05rem; }
.timeline p { margin: 0; font-size: 0.95rem; }
@media (max-width: 640px) {
  .timeline::before { left: 8px; }
  .timeline li { grid-template-columns: 1fr; gap: 0.3rem; padding-left: 2.2rem; }
  .timeline li::before { left: 0; top: 1.35rem; }
  .timeline__year { text-align: left; }
}
.hist-gallery { display: grid; gap: 1rem; position: sticky; top: 100px; }
.hist-gallery img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--ligne); box-shadow: var(--ombre); }
@media (max-width: 900px) { .hist-gallery { position: static; grid-template-columns: 1fr 1fr; } }

/* ---------- Sélection ---------- */
.steps { display: grid; gap: 1rem; margin: 1.4rem 0 2rem; }
.steps li { display: flex; gap: 1.1rem; align-items: flex-start; }
.steps__n { font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--or-600); min-width: 40px; }
.steps h3 { margin-bottom: 0.15rem; font-size: 1.02rem; }
.steps p { margin: 0; font-size: 0.93rem; }

/* ---------- Moyens ---------- */
.means { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-bottom: 2.6rem; }
@media (max-width: 900px) { .means { grid-template-columns: repeat(2, 1fr); } }
.means__item { margin: 0; position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--ligne); box-shadow: var(--ombre); aspect-ratio: 4 / 5; }
.means__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.means__item:hover img { transform: scale(1.05); }
.means__item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.9rem 1rem; background: linear-gradient(0deg, rgba(10,30,70,0.9), rgba(10,30,70,0)); color: #fff; font-size: 0.85rem; font-weight: 600; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; background: #fff; border: 1px solid var(--ligne); border-top: 3px solid var(--bleu); border-radius: var(--radius); padding: 1.6rem 1rem; }
.stat__num { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 4.5vw, 2.7rem); color: var(--bleu); line-height: 1; }
.stat__label { display: block; margin-top: 0.5rem; font-size: 0.84rem; color: var(--muted); }

/* ---------- Valeurs ---------- */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .values { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }
.value { padding: 1.5rem 1.5rem 1.6rem; border: 1px solid var(--ligne); border-radius: var(--radius-lg); background: #fff; }
.value h3 { color: var(--bleu); }
.value p { margin: 0; font-size: 0.94rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0.7rem; }
.faq__item { border: 1px solid var(--ligne); border-radius: var(--radius); background: #fff; overflow: hidden; }
.faq__item summary { cursor: pointer; padding: 1.1rem 1.3rem; font-weight: 600; color: var(--encre); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font-size: 1.4rem; color: var(--bleu); line-height: 1; transition: transform .2s ease; }
.faq__item[open] { border-color: #b9cbec; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { padding: 0 1.3rem 1.2rem; margin: 0; }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(120deg, var(--bleu-900), var(--bleu)); color: #fff; padding: clamp(3rem, 6vw, 4.5rem) 0; }
.cta__inner { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.cta h2 { color: #fff; }
.cta p { margin: 0; color: #cdddf8; max-width: 560px; }
.cta__actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
@media (max-width: 820px) { .cta__inner { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { background: #0a1730; color: #9fb2d2; padding: 3rem 0 1.5rem; font-size: 0.9rem; }
.footer a { color: #cdddf8; }
.footer__top { display: grid; grid-template-columns: 1.3fr 0.8fr 1.1fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.12); }
@media (max-width: 860px) { .footer__top { grid-template-columns: 1fr; gap: 1.6rem; } }
.footer__brand img { background: #fff; padding: 0.7rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.footer__brand p { margin: 0; color: #9fb2d2; max-width: 460px; }
.footer__nav { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__credits h3, .footer__brand strong { color: #fff; font-size: 1rem; }
.footer__credits h3 { margin-bottom: 0.6rem; }
.footer__credits p { margin: 0 0 0.6rem; }
.footer__note { color: #7f93b6; font-size: 0.82rem; }
.footer__bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.4rem; color: #7f93b6; font-size: 0.82rem; }
.footer__bottom strong { color: #eaf1fd; }

/* ---------- Animations ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .means__item img { transition: none; }
}

:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; border-radius: 2px; }
