/* peches.be v2 — Ligue Francophone de Pêche Sportive
   Palette : les bleus du site d'origine (#266EDD), le jaune de ses titres (#FFCC00) et l'orange d'une antenne de flotteur. */
@font-face { font-family: "Archivo"; src: url("fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  --canal: #123a80;
  --canal-clair: #2360c4;
  --brume: #eef2f9;
  --ciel: #d9e5f8;
  --blanc: #ffffff;
  --encre: #101c33;
  --gris: #55627a;
  --filet: #cdd7e8;
  --antenne: #ff5b24;
  --bague: #ffcc00;
  --lien: #1b52b3;
  --titre: "Archivo", "Arial Narrow", Arial, sans-serif;
  --texte: "Atkinson", Verdana, Arial, sans-serif;
  --rail: 18.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 106.25%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--brume); color: var(--encre); font-family: var(--texte); line-height: 1.6; }
img { max-width: 100%; height: auto; border: 0; }
a { color: var(--lien); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--encre); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--antenne); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--titre); font-stretch: 78%; line-height: 1.1; margin: 0; color: var(--canal); }

.evitement { position: absolute; left: -999px; top: 0; background: var(--bague); color: var(--encre); padding: 0.6rem 1rem; z-index: 20; font-weight: 700; }
.evitement:focus { left: 0; }

/* ---------- Rail des rubriques ---------- */
.barre { position: fixed; inset: 0 auto 0 0; width: var(--rail); background: var(--canal); color: #fff; overflow-y: auto; padding: 1.5rem 0 2rem; scrollbar-width: thin; scrollbar-color: var(--canal-clair) transparent; }
.marque { display: flex; align-items: center; gap: 0.8rem; padding: 0 1.4rem 1.4rem; color: #fff; text-decoration: none; font-family: var(--titre); font-stretch: 78%; font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.marque img { width: 56px; height: 56px; flex: none; background: #fff; border-radius: 50%; }
.marque:hover { color: var(--bague); }
.bouton-menu { display: none; }
.nav-groupe { padding: 0.9rem 0 0.3rem; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.nav-titre { margin: 0 0 0.3rem; padding: 0 1.4rem; font-size: 0.8rem; color: #b3c6ea; }
.rubriques ul { list-style: none; margin: 0; padding: 0; }
.rubriques a { display: block; padding: 0.34rem 1.4rem; color: #fff; text-decoration: none; font-size: 0.95rem; line-height: 1.3; }
.rubriques a:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
.rubriques li.actif > a { font-weight: 700; background: var(--canal-clair); position: relative; }
/* l'antenne du flotteur marque la rubrique ouverte */
.rubriques li.actif > a::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(var(--antenne) 0 55%, var(--encre) 55% 70%, var(--bague) 70% 100%); }
.nav-sous { background: rgba(0, 0, 0, 0.18); padding: 0.3rem 0 0.5rem !important; }
.nav-sous a { padding-left: 2.3rem; font-size: 0.88rem; color: #dbe5f7; }
.nav-sous li.ici > a { color: var(--bague); font-weight: 700; }

/* ---------- Structure ---------- */
main { margin-left: var(--rail); min-height: 100vh; display: flex; flex-direction: column; }
.corps { flex: 1; display: grid; grid-template-columns: minmax(0, 46rem); gap: 3rem; padding: 2.2rem clamp(1.2rem, 4vw, 3.5rem) 3rem; }
.accueil .corps { grid-template-columns: minmax(0, 46rem) 13.5rem; align-items: start; }

.entete { padding: 2.2rem clamp(1.2rem, 4vw, 3.5rem) 1.6rem; background: var(--blanc); border-bottom: 1px solid var(--filet); }
.entete h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; font-stretch: 70%; letter-spacing: -0.01em; max-width: 46rem; }
.fil { font-size: 0.85rem; color: var(--gris); margin-bottom: 0.5rem; }
.fil a { color: var(--gris); }
.fil span { margin: 0 0.25rem; }

/* ---------- En-tête d'accueil : la rive, la ligne d'eau, le flotteur ---------- */
.rive { position: relative; overflow: hidden; }
.rive-ciel { background: var(--ciel); padding: clamp(2.5rem, 7vw, 5rem) clamp(1.2rem, 4vw, 3.5rem) 1.1rem; }
.rive h1 { font-size: clamp(2.6rem, 7.2vw, 5.6rem); font-weight: 800; font-stretch: 66%; line-height: 0.92; letter-spacing: -0.015em; color: var(--canal); max-width: 11em; padding-right: 5rem; }
.rive h1 span { display: block; }
.rive-eau { position: relative; background: var(--canal); color: #fff; padding: 1.3rem clamp(1.2rem, 4vw, 3.5rem) 1.6rem; }
.rive-eau::after { content: ""; position: absolute; inset: 0; background: rgba(18, 58, 128, 0.62); pointer-events: none; }
.rive-eau p { position: relative; z-index: 2; margin: 0; max-width: 34rem; padding-right: 5rem; }
.rive-role { font-size: 1.15rem; line-height: 1.35; }
.rive-meta { font-size: 0.88rem; color: #bccdee; margin-top: 0.4rem !important; }
.flotteur { position: absolute; right: clamp(1.5rem, 9vw, 7rem); top: -168px; width: 60px; height: 300px; transform-origin: 50% 60%; animation: touche 2.6s cubic-bezier(0.3, 0, 0.3, 1) 0.7s 1 both; }
@keyframes touche {
  0%, 100% { transform: translateY(0) rotate(0); }
  12% { transform: translateY(16px) rotate(-2deg); }
  26% { transform: translateY(-3px) rotate(1deg); }
  44% { transform: translateY(44px) rotate(-3deg); }
  66% { transform: translateY(-5px) rotate(1deg); }
  82% { transform: translateY(3px) rotate(0); }
}

/* ---------- Contenu ---------- */
.bloc { padding-top: 1.7rem; margin-top: 1.7rem; border-top: 1px solid var(--filet); overflow-wrap: break-word; }
.bloc:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.bloc > h2 { font-size: 1.7rem; font-weight: 750; margin-bottom: 0.8rem; }
.contenu h3 { font-size: 1.25rem; font-weight: 700; margin: 1.4rem 0 0.5rem; }
.contenu p { margin: 0 0 0.9rem; }
.contenu ul, .contenu ol { padding-left: 1.3rem; margin: 0 0 0.9rem; }
.contenu li { margin-bottom: 0.25rem; }
.contenu hr { border: 0; border-top: 1px solid var(--filet); margin: 1.5rem 0; }
.contenu u { text-decoration: none; font-weight: 700; }
.centre { text-align: center; }
.droite { text-align: right; }
.repere { display: block; font-family: var(--titre); font-stretch: 78%; font-size: 1.3rem; color: var(--canal); margin: 0.4rem 0 0.2rem; }
.nouveau { display: inline-block; background: var(--bague); color: var(--encre); font-size: 0.72rem; font-weight: 700; line-height: 1; padding: 0.22em 0.5em; border-radius: 3px; vertical-align: 0.12em; }

/* le type de fichier est annoncé avant le clic */
.contenu a[href$=".pdf" i]::after, .contenu a[href$=".doc" i]::after, .contenu a[href$=".docx" i]::after,
.contenu a[href$=".xls" i]::after, .contenu a[href$=".xlsx" i]::after {
  content: "PDF"; display: inline-block; margin-left: 0.35em; font-size: 0.66rem; font-weight: 700; line-height: 1; padding: 0.2em 0.4em; border: 1px solid currentColor; border-radius: 3px; vertical-align: 0.15em; text-decoration: none; }
.contenu a[href$=".doc" i]::after, .contenu a[href$=".docx" i]::after { content: "Word"; }
.contenu a[href$=".xls" i]::after, .contenu a[href$=".xlsx" i]::after { content: "Excel"; }
.contenu a:has(> img)::after, .vignette::after { content: none !important; }

.encadre { background: var(--blanc); border: 1px solid var(--filet); border-left: 5px solid var(--bague); padding: 1.1rem 1.3rem; margin: 0 0 1rem; }
.encadre > :last-child { margin-bottom: 0; }
.pile > div { margin-bottom: 0.6rem; }
.tableau { overflow-x: auto; margin: 0 0 1rem; background: var(--blanc); border: 1px solid var(--filet); }
.tableau table { border-collapse: collapse; width: 100%; font-size: 0.94rem; }
.tableau td, .tableau th { min-width: 5.5rem; overflow-wrap: normal; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--filet); vertical-align: top; text-align: left; }
.tableau tr:last-child > td { border-bottom: 0; }
.tableau td.centre, .tableau th.centre { text-align: center; }
.tableau p { margin-bottom: 0.3rem; }
.tableau img { max-width: none; }
.tableau td > img:only-child { max-width: 100%; }

.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.5rem; margin: 0.4rem 0 1rem; }
.galerie:has(> :only-child) { grid-template-columns: minmax(0, 30rem); }
.vignette { display: block; background: var(--filet); }
.vignette img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: opacity 0.15s; }
.galerie:has(> :only-child) .vignette img { aspect-ratio: auto; }
.vignette:hover img { opacity: 0.85; }

/* ---------- Partenaires (accueil) ---------- */
.partenaires { font-size: 0.88rem; text-align: center; }
.partenaires br { display: none; }
.partenaires .encadre, .partenaires .pile { background: var(--blanc); border: 1px solid var(--filet); padding: 0.9rem 0.7rem; margin: 0 0 0.7rem; }
.partenaires .pile > div { margin: 0 0 0.7rem; }
.partenaires .pile > div:last-child { margin: 0; }
.partenaires p { margin: 0; font-family: var(--titre); font-stretch: 80%; font-size: 1rem; color: var(--canal); }
.partenaires em { font-style: normal; }
.partenaires img { display: block; margin: 0 auto; max-height: 8rem; width: auto; }
.partenaires p br { display: inline; }

/* ---------- Pied ---------- */
.pied { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding: 1.2rem clamp(1.2rem, 4vw, 3.5rem); border-top: 1px solid var(--filet); font-size: 0.88rem; color: var(--gris); }
.pied p { margin: 0; }
.pied a, .lien { color: var(--gris); }
.lien { background: none; border: 0; padding: 0; margin-left: 1.2rem; font: inherit; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }

/* ---------- Écrans étroits ---------- */
@media (max-width: 75rem) {
  .accueil .corps { grid-template-columns: minmax(0, 46rem); }
  .partenaires { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.7rem; align-items: start; text-align: center; }
  .partenaires > div { display: contents; }
  .partenaires .encadre, .partenaires .pile { margin: 0; }
}
@media (max-width: 56rem) {
  .barre { position: sticky; top: 0; inset: auto; width: auto; z-index: 10; padding: 0.6rem 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; overflow: visible; max-height: 100vh; }
  .marque { padding: 0; font-size: 1rem; }
  .marque img { width: 42px; height: 42px; }
  .js .bouton-menu { display: block; font: 700 0.95rem var(--texte); color: var(--encre); background: var(--bague); border: 0; border-radius: 4px; padding: 0.55rem 0.9rem; cursor: pointer; }
  .rubriques { flex: 0 0 calc(100% + 2rem); margin: 0.6rem -1rem -0.6rem; max-height: calc(100vh - 4.2rem); overflow-y: auto; }
  .js .rubriques { display: none; }
  .js .menu-ouvert .rubriques { display: block; }
  .rubriques a { padding-top: 0.55rem; padding-bottom: 0.55rem; }
  main { margin-left: 0; }
  .rive h1, .rive-eau p { padding-right: 4rem; }
  .flotteur { right: 1rem; top: -150px; width: 48px; height: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flotteur { animation: none; }
  .vignette img { transition: none; }
}
@media print {
  .barre, .pied, .evitement, .flotteur, .partenaires { display: none !important; }
  main { margin: 0; }
  body { background: #fff; }
  .rive-ciel, .rive-eau { background: none; color: #000; padding-left: 0; }
  .rive-eau::after { content: none; }
  .corps { padding: 1rem 0; display: block; }
}

.bloc > hr:last-child, .bloc > p:last-child { margin-bottom: 0; }
.bloc > hr:last-child { display: none; }

/* ---------- Actualités (accueil et archives) ---------- */
.mois { margin-top: 2.2rem; }
.mois-titre { font-size: 1.9rem; font-weight: 800; font-stretch: 70%; padding-bottom: 0.4rem; border-bottom: 3px solid var(--bague); margin-bottom: 1.4rem; }
.mois .bloc:first-of-type { padding-top: 0; margin-top: 0; border-top: 0; }
.actu-meta { font-size: 0.85rem; color: var(--gris); margin: 0 0 0.3rem !important; }
.actu-rubrique { margin-left: 0.4rem; color: var(--gris); }
.actu-titre { font-size: 1.5rem !important; font-weight: 750; margin: 0 0 0.7rem !important; }
.archives { margin-top: 2.5rem; }
.archives p a { display: inline-block; margin-right: 0.8rem; font-weight: 700; }
.apercu { margin: 0; padding: 0.6rem clamp(1.2rem, 4vw, 3.5rem); background: var(--bague); color: var(--encre); font-weight: 700; font-size: 0.9rem; }
.partenaires .tuile { background: var(--blanc); border: 1px solid var(--filet); padding: 0.9rem 0.7rem; margin: 0 0 0.7rem; }
.partenaires .tuile > div { margin: 0 0 0.7rem; }
.partenaires .tuile > div:last-child { margin: 0; }
@media (max-width: 75rem) { .partenaires .tuile { margin: 0; } }
