/* =====================================================================
   Famille de la Dhuys — feuille de style unique
   Tout le thème tient dans les variables ci-dessous : change-les ici et
   tout le site suit.
   ===================================================================== */

:root {
  /* Couleurs tirées du blason : champ d'or, lettres d'azur, arcs de gueules */
  --azur:        #1b3a6b;
  --azur-fonce:  #132a4d;
  --or:          #c8a34a;
  --or-clair:    #e8d9ae;
  --gueules:     #9e2b25;

  --encre:       #23262b;
  --gris:        #5c6470;
  --gris-clair:  #e4e6ea;
  --fond:        #ffffff;
  --fond-doux:   #f7f5f0;

  --titre-police: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --texte-police: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --largeur:     980px;
  --rayon:       4px;
  --ombre:       0 1px 3px rgba(0, 0, 0, .08), 0 6px 20px rgba(0, 0, 0, .05);
}

/* ------------------------------- Base ------------------------------ */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--texte-police);
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; }

a { color: var(--azur); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--gueules); }

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

.saut {
  position: absolute;
  left: -9999px;
  background: var(--azur);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 100;
}
.saut:focus { left: .5rem; top: .5rem; }

/* ------------------------------ En-tête ---------------------------- */

.entete {
  border-top: 4px solid var(--or);
  background: var(--fond);
}

.entete__marque {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 1.6rem 1.25rem 1.2rem;
  text-align: center;
}

.entete__logo img {
  width: min(190px, 45vw);
  height: auto;
  display: block;
  margin: 0 auto .7rem;
}

.entete__nom {
  margin: 0;
  font-family: var(--titre-police);
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1.1;
}
.entete__nom a { color: var(--azur); text-decoration: none; }
.entete__nom a:hover { color: var(--azur-fonce); }

.entete__devise {
  margin: .35rem 0 0;
  font-family: var(--titre-police);
  font-style: italic;
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  color: var(--gris);
  letter-spacing: .06em;
}

/* --------------------------- Navigation ---------------------------- */

.nav { background: var(--azur); position: relative; }

.nav__liste {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.nav__item { position: relative; }

.nav__lien,
.nav__sous-lien {
  display: block;
  padding: .85rem 1rem;
  color: #fff;
  font-size: .93rem;
  text-decoration: none;
  border: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.nav__lien { border-bottom: 3px solid transparent; }
.nav__lien:hover,
.nav__lien[aria-expanded="true"] { background: var(--azur-fonce); color: #fff; }
.nav__lien.est-actif { border-bottom-color: var(--or); color: var(--or-clair); }

.nav__chevron {
  display: inline-block;
  margin-left: .4rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  padding: 2.5px;
  transform: translateY(-2px) rotate(45deg);
}

.nav__sous-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: var(--azur-fonce);
  box-shadow: var(--ombre);
  z-index: 20;
}

.nav__item--parent:hover .nav__sous-liste,
.nav__sous-liste.est-ouvert { display: block; }

.nav__sous-lien { padding: .7rem 1rem; white-space: normal; }
.nav__sous-lien:hover { background: var(--azur); color: var(--or-clair); }
.nav__sous-lien.est-actif { color: var(--or-clair); }

.nav__burger {
  display: none;
  width: 100%;
  padding: .8rem 1rem;
  background: var(--azur);
  color: #fff;
  border: 0;
  font: inherit;
  font-size: .95rem;
  text-align: left;
  cursor: pointer;
}
.nav__burger-trait,
.nav__burger-trait::before,
.nav__burger-trait::after {
  display: inline-block;
  width: 20px;
  height: 2px;
  background: #fff;
  vertical-align: middle;
  margin-right: .6rem;
  position: relative;
}
.nav__burger-trait::before,
.nav__burger-trait::after {
  content: "";
  position: absolute;
  left: 0;
  margin: 0;
}
.nav__burger-trait::before { top: -6px; }
.nav__burger-trait::after  { top: 6px; }

@media (max-width: 860px) {
  .nav__burger { display: block; }
  .nav__liste { display: none; flex-direction: column; }
  .nav__liste.est-ouvert { display: flex; }
  .nav__item { width: 100%; }
  .nav__lien { border-bottom: 1px solid rgba(255,255,255,.12); }
  .nav__lien.est-actif { border-left: 4px solid var(--or); border-bottom-color: rgba(255,255,255,.12); }
  .nav__sous-liste { position: static; width: 100%; box-shadow: none; }
  .nav__item--parent:hover .nav__sous-liste { display: none; }
  .nav__sous-liste.est-ouvert { display: block; }
  .nav__sous-lien { padding-left: 2rem; }
}

/* ----------------------------- Contenu ----------------------------- */

.contenu {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 2.2rem 1.25rem 3rem;
}

.titre-page {
  font-family: var(--titre-police);
  font-weight: 400;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 1.6rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--gris-clair);
}
.titre-page::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: var(--or);
  margin-top: .6rem;
}

.contenu h2 {
  font-family: var(--titre-police);
  font-weight: 400;
  font-size: 1.6rem;
  margin: 2.4rem 0 .8rem;
}
.contenu h3 {
  font-family: var(--titre-police);
  font-weight: 400;
  font-size: 1.3rem;
  margin: 2rem 0 .6rem;
  color: var(--azur);
}
.contenu h4 {
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gris);
  margin: 1.8rem 0 .5rem;
}

.contenu p { margin: 0 0 1.1rem; }
.contenu ul, .contenu ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.contenu li { margin-bottom: .35rem; }

.chapo {
  font-size: 1.1rem;
  color: var(--gris);
  border-left: 3px solid var(--or);
  padding-left: 1rem;
  margin-bottom: 2rem;
}

/* Bloc encadré (règlements, conditions de tir…) */
.encart {
  background: var(--fond-doux);
  border: 1px solid var(--gris-clair);
  border-radius: var(--rayon);
  padding: 1.2rem 1.4rem;
  margin: 0 0 1.6rem;
}
.encart > :last-child { margin-bottom: 0; }
.encart--important { border-left: 4px solid var(--gueules); }

/* Liste de définitions type « barème » */
.bareme { margin: 0 0 1.2rem; }
.bareme dt { float: left; clear: left; width: 9rem; font-weight: 600; }
.bareme dd { margin: 0 0 .3rem 9rem; }
@media (max-width: 520px) {
  .bareme dt { float: none; width: auto; }
  .bareme dd { margin-left: 0; margin-bottom: .8rem; }
}

/* --------------------- Grille Prix Généraux ------------------------- */

.grille-pg {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0 2.5rem;
  align-items: start;
  margin-bottom: 1rem;
}
.grille-pg__laterale {
  padding: 1.4rem 1.4rem 0;
  background: var(--fond-doux);
  border: 1px solid var(--gris-clair);
  border-radius: var(--rayon);
}
.grille-pg__laterale h2 { margin-top: 0; }
.grille-pg__laterale h2 + .docs,
.grille-pg__laterale h2:first-child { margin-top: 0; }

@media (max-width: 780px) {
  .grille-pg { grid-template-columns: 1fr; gap: 2rem 0; }
  .grille-pg__laterale { padding: 1.2rem 1.4rem; }
}

/* ------------------------- Liens documents ------------------------- */

.docs { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.docs li { margin-bottom: .5rem; }

.doc {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .95rem;
  background: var(--fond-doux);
  border: 1px solid var(--gris-clair);
  border-left: 3px solid var(--azur);
  border-radius: var(--rayon);
  text-decoration: none;
  color: var(--encre);
  font-size: .95rem;
}
.doc:hover { background: #fff; border-left-color: var(--gueules); color: var(--encre); box-shadow: var(--ombre); }
.doc::before {
  content: attr(data-type);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: #fff;
  background: var(--azur);
  padding: .18rem .4rem;
  border-radius: 2px;
}
.doc:hover::before { background: var(--gueules); }
.doc small { display: block; color: var(--gris); font-weight: 400; }

.bouton {
  display: inline-block;
  padding: .7rem 1.3rem;
  background: var(--azur);
  color: #fff;
  text-decoration: none;
  border-radius: var(--rayon);
  font-size: .95rem;
}
.bouton:hover { background: var(--gueules); color: #fff; }

/* ---------------------- Étapes (coupes) ---------------------------- */

.etapes { list-style: none; padding: 0; margin: 0 0 1.8rem; counter-reset: etape; }

.etape {
  position: relative;
  padding: .9rem 0 .9rem 3.4rem;
  border-bottom: 1px solid var(--gris-clair);
}
.etape:last-child { border-bottom: 0; }
.etape::before {
  counter-increment: etape;
  content: counter(etape);
  position: absolute;
  left: 0;
  top: .85rem;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--fond-doux);
  border: 1px solid var(--or);
  color: var(--azur);
  font-family: var(--titre-police);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.etape--finale::before { content: "★"; background: var(--or); color: #fff; border-color: var(--or); }
.etape__nom { display: block; font-weight: 600; }
.etape__info { display: block; color: var(--gris); font-size: .94rem; }

/* -------------------------- Compagnies ----------------------------- */

.compagnies {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.2rem;
}

.compagnie a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  height: 100%;
  padding: 1rem .7rem;
  border: 1px solid var(--gris-clair);
  border-radius: var(--rayon);
  text-decoration: none;
  color: var(--encre);
  text-align: center;
  transition: box-shadow .15s ease, transform .15s ease;
}
.compagnie a:hover { box-shadow: var(--ombre); transform: translateY(-2px); border-color: var(--or); }
.compagnie img { width: 92px; height: 92px; object-fit: contain; }
.compagnie span { font-size: .84rem; line-height: 1.35; color: var(--gris); }

/* --------------------------- Archives ------------------------------ */

.archive { list-style: none; padding: 0; margin: 0; }

.archive__item {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--gris-clair);
}
.archive__titre {
  font-family: var(--titre-police);
  font-size: 1.25rem;
  font-weight: 400;
  margin: 0 0 .3rem;
}
.archive__titre a { text-decoration: none; }
.archive__titre a:hover { text-decoration: underline; }
.archive__extrait { margin: 0 0 .4rem; color: var(--gris); font-size: .95rem; }
.archive__suite { font-size: .9rem; }

/* ----------------------------- Carte ------------------------------- */

.carte {
  border: 1px solid var(--gris-clair);
  border-radius: var(--rayon);
  overflow: hidden;
  margin: 0 0 2rem;
}
.carte iframe { display: block; width: 100%; height: 460px; border: 0; }
@media (max-width: 600px) { .carte iframe { height: 340px; } }

/* ---------------------------- Classement ---------------------------- */

.classement-embed {
  border: 1px solid var(--gris-clair);
  border-radius: var(--rayon);
  overflow: hidden;
  margin: 0 0 1.2rem;
}
.classement-embed iframe { display: block; width: 100%; height: 260px; border: 0; overflow: hidden; }
@media (max-width: 600px) { .classement-embed iframe { height: 200px; } }

/* Historique : page dédiée, on accepte un défilement vertical propre à cette page */
.classement-embed--historique { margin-bottom: 1.6rem; }
.classement-embed--historique iframe { height: calc(100vh - 260px); overflow: auto; }

/* --------------------------- Pied de page -------------------------- */

.pied {
  border-top: 3px solid var(--or);
  background: var(--fond-doux);
  padding: 1.8rem 1.25rem 2.2rem;
  text-align: center;
  font-size: .92rem;
  color: var(--gris);
}
.pied p { margin: 0 0 .4rem; }
.pied__adresse strong { color: var(--encre); }
.pied__legal { font-size: .85rem; }
.pied__legal a { color: var(--gris); }

/* --------------------------- Impression ---------------------------- */

@media print {
  .nav, .saut, .carte, .classement-embed { display: none; }
  body { font-size: 12pt; color: #000; }
  .contenu { max-width: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}

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