/* ==========================================================================
   Sapeurs-Pompiers de Reuilly
   Charte : charbon mat, rouge engin, bande jaune haute visibilité.
   Titres Barlow Condensed (affiche), texte Inter. Pas de dégradés déco.
   ========================================================================== */

/* ---------- Polices locales ---------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/BarlowCondensed-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/BarlowCondensed-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/BarlowCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #15171b;
  --bg-2: #1b1e23;
  --line: #32363d;
  --text: #e9e9e6;
  --muted: #9ba1a8;
  --red: #c8102e;
  --red-bright: #e6273f;
  --jaune: #f5c518;
  --titres: "Barlow Condensed", "Arial Narrow", sans-serif;
  --texte: "Inter", system-ui, sans-serif;
  --largeur: 1080px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--texte);
  font-size: 15.5px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--text);
  text-decoration-color: var(--red-bright);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: #fff;
  text-decoration-color: var(--jaune);
}

:focus-visible {
  outline: 2px solid var(--jaune);
  outline-offset: 2px;
}

.container {
  max-width: var(--largeur);
  margin-inline: auto;
  padding-inline: 22px;
}

h1,
h2,
h3 {
  font-family: var(--titres);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  line-height: 1.05;
  margin: 0 0 0.4em;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

h3 {
  font-size: 1.35rem;
  letter-spacing: 0.03em;
}

p {
  margin: 0 0 1em;
}

/* Bande haute visibilité (motif engins) */
.bande {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    var(--red) 0 22px,
    var(--jaune) 22px 44px
  );
}

/* ---------- Bandeau urgence ---------- */
.urgence-bar {
  background: #841322;
  color: #f6d7db;
  font-size: 0.84rem;
  text-align: center;
  padding: 7px 16px;
}

.urgence-bar a {
  color: #fff;
  font-weight: 700;
}

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(21, 23, 27, 0.94);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-ecusson {
  width: 40px;
  height: 46px;
  flex: none;
}

.brand-text {
  line-height: 1.1;
}

.brand-name {
  display: block;
  font-family: var(--titres);
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.brand-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: block;
  padding: 8px 13px;
  font-family: var(--titres);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.nav-menu a:hover {
  color: var(--text);
}

.nav-menu a.actif {
  color: var(--text);
  border-bottom-color: var(--red-bright);
}

.nav-menu a.nav-cta {
  color: #fff;
  background: var(--red);
  border-bottom: none;
  margin-left: 8px;
}

.nav-menu a.nav-cta:hover {
  background: var(--red-bright);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  font-family: var(--titres);
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-rouge {
  background: var(--red);
  color: #fff;
}

.btn-rouge:hover {
  background: var(--red-bright);
  color: #fff;
}

.btn-contour {
  border-color: var(--text);
  color: var(--text);
}

.btn-contour:hover {
  border-color: var(--jaune);
  color: var(--jaune);
}

/* ---------- Hero photo ---------- */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  background: #000 url("../images/interv-01.jpg") center 30% / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13, 14, 16, 0.94) 0%,
    rgba(13, 14, 16, 0.35) 55%,
    rgba(13, 14, 16, 0.15) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: 54px 44px;
}

.hero-surtitre {
  font-family: var(--titres);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--jaune);
  margin-bottom: 6px;
}

.hero h1 {
  max-width: 14ch;
}

.hero h1 .rouge {
  color: var(--red-bright);
}

.hero-lead {
  max-width: 52ch;
  color: #cfd2d6;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.hero-credit {
  position: absolute;
  right: 10px;
  bottom: 6px;
  z-index: 1;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- Ruban numéros ---------- */
.ruban-numeros {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.ruban-numeros .container {
  display: flex;
  flex-wrap: wrap;
}

.ruban-item {
  flex: 1 1 160px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 20px;
  text-decoration: none;
  border-left: 1px solid var(--line);
}

.ruban-item:first-child {
  border-left: none;
}

.ruban-item .n {
  font-family: var(--titres);
  font-weight: 700;
  font-size: 2.3rem;
  color: var(--red-bright);
  line-height: 1;
}

.ruban-item:hover .n {
  color: var(--jaune);
}

.ruban-item .l {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(56px, 8vh, 88px);
}

.section-titre {
  display: flex;
  align-items: baseline;
  gap: 16px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 34px;
}

.section-titre .no {
  font-family: var(--titres);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--red-bright);
  letter-spacing: 0.1em;
}

.section-titre h2 {
  margin: 0;
}

.section-intro {
  max-width: 62ch;
  color: var(--muted);
}

.fond-2 {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

/* ---------- Missions (lignes numérotées) ---------- */
.missions-liste {
  list-style: none;
  margin: 0;
  padding: 0;
}

.missions-liste li {
  display: grid;
  grid-template-columns: 90px 1fr 2fr;
  gap: 20px;
  align-items: baseline;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}

.missions-liste .m-no {
  font-family: var(--titres);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--line);
}

.missions-liste h3 {
  margin: 0;
}

.missions-liste p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.missions-note {
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Deux colonnes texte / photo ---------- */
.duo {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 42px;
  align-items: start;
}

.duo-texte p {
  color: var(--muted);
}

.duo-texte strong {
  color: var(--text);
}

figure {
  margin: 0;
}

figure.photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--line);
}

figcaption {
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 7px;
  line-height: 1.45;
}

.liste-simple {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.liste-simple li {
  position: relative;
  padding: 7px 0 7px 22px;
  color: var(--muted);
}

.liste-simple li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 10px;
  height: 3px;
  background: var(--red-bright);
}

/* ---------- Volontariat : étapes ---------- */
.etapes {
  list-style: none;
  counter-reset: etape;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.etapes li {
  counter-increment: etape;
  background: var(--bg);
  padding: 20px 18px 22px;
}

.etapes li::before {
  content: "0" counter(etape);
  display: block;
  font-family: var(--titres);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--red-bright);
  margin-bottom: 4px;
}

.etapes h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.etapes p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.encart-jsp {
  margin-top: 30px;
  padding: 20px 24px;
  border-left: 4px solid var(--jaune);
  background: var(--bg-2);
}

.encart-jsp h3 {
  margin-bottom: 6px;
}

.encart-jsp p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Galerie (aperçu + page) ---------- */
.galerie-grille {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 8px;
}

.galerie-grille figure.photo button {
  all: unset;
  display: block;
  cursor: zoom-in;
  width: 100%;
}

.galerie-grille figure.photo button:focus-visible {
  outline: 2px solid var(--jaune);
  outline-offset: 2px;
}

.galerie-grille img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  filter: saturate(0.92);
  transition: filter 0.2s;
}

.galerie-grille figure.photo:hover img {
  filter: saturate(1.1);
}

.galerie-note {
  margin-top: 26px;
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 16px;
}

.sous-titre {
  font-family: var(--titres);
  font-weight: 600;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--jaune);
  margin: 42px 0 16px;
}

.sous-titre:first-of-type {
  margin-top: 0;
}

.credits {
  font-size: 0.82rem;
  color: var(--muted);
}

.credits ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

/* ---------- Visionneuse (lightbox) ---------- */
.visionneuse {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(94vw, 1200px);
}

.visionneuse::backdrop {
  background: rgba(8, 9, 10, 0.92);
}

.visionneuse img {
  max-width: 100%;
  max-height: 82vh;
  margin-inline: auto;
  border: 1px solid var(--line);
}

.visionneuse-legende {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 10px 40px;
}

.visionneuse-fermer {
  position: fixed;
  top: 14px;
  right: 18px;
  font-size: 1rem;
  font-family: var(--titres);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 14px;
  cursor: pointer;
}

.visionneuse-fermer:hover {
  border-color: var(--jaune);
  color: var(--jaune);
}

/* ---------- Contact ---------- */
.contact-bloc dt {
  font-family: var(--titres);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--jaune);
  margin-top: 18px;
}

.contact-bloc dt:first-child {
  margin-top: 0;
}

.contact-bloc dd {
  margin: 4px 0 0;
  color: var(--muted);
}

.contact-bloc strong {
  color: var(--text);
}

.map {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  filter: grayscale(0.25);
}

/* ---------- Pied de page ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding-block: 30px;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-inner {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.footer-devise {
  font-family: var(--titres);
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
}

.footer-devise .rouge {
  color: var(--red-bright);
}

.site-footer p {
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .duo {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .galerie-grille {
    grid-template-columns: repeat(2, 1fr);
  }
  .etapes {
    grid-template-columns: repeat(2, 1fr);
  }
  .missions-liste li {
    grid-template-columns: 60px 1fr;
  }
  .missions-liste p {
    grid-column: 2;
  }
}

@media (max-width: 620px) {
  .galerie-grille {
    grid-template-columns: 1fr;
  }
  .etapes {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 10px 18px 16px;
    display: none;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu a.nav-cta {
    margin-left: 0;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
