/* =========================================================================
   Birdflow v5 : surcouche chargée en dernier.
   Héros "titre à fenêtres", grands compteurs, registre sur deux jours,
   planches tenant sur un écran, seuil de nuit, aube, atlas, pied de page.
   Les sélecteurs à identifiant (#ouverture, #releves...) l'emportent
   volontairement sur les règles héritées de la v2 et de la v4.
   ========================================================================= */

:root { --champ: #FFFFFF; --champ-bord: var(--trait); }
:root[data-theme="dark"] { --champ: #191715; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --champ: #191715; } }

/* Glyke : une seule graisse, des espaces larges ; on resserre les mots des titres */
.titre-2, .titre-3, .tete__titre, .chiffre, .logo__mot { word-spacing: -0.08em; }

/* =========================================================================
   Héros : titre à fenêtres, tout tient dans un écran
   ========================================================================= */
#ouverture.ouverture {
  display: block;
  position: relative;
  height: auto;
  min-height: 100svh;
  padding: 0;
  background: var(--papier);
  color: var(--encre);
}
#ouverture .ouverture__cadre {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(16px, 3svh, 36px);
  padding: calc(var(--entete) + clamp(12px, 3.6svh, 44px)) var(--marge) clamp(18px, 3.4svh, 32px);
}
#ouverture .ouverture__titre {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 1;
  margin: clamp(12px, 2.4svh, 26px) 0 0;
  font-family: var(--f-heros);
  font-weight: 600;
  font-size: clamp(44px, min(9.4vw, 15.2svh), 168px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--encre);
}
.o-ligne { display: block; white-space: nowrap; overflow: hidden; padding: 0.07em 0 0.11em; margin: -0.07em 0 -0.11em; }
.o-ligne__in { display: block; }
.o-ligne--2 .o-ligne__in { padding-left: 0.9em; }
.o-accent { color: var(--lagune); }
#ouverture .fenetre {
  position: relative;
  display: inline-block;
  width: var(--w);
  height: 0.74em;
  margin: 0 0.04em;
  overflow: hidden;
  vertical-align: -0.03em;
  border-radius: 999px;
  background: var(--papier-3);
}
#ouverture .fenetre img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.12);
  filter: var(--photo-filtre);
  transition: opacity 1.3s var(--c-rideau), transform 6.5s var(--c-revelation);
}
#ouverture .fenetre img.est-active { opacity: 1; transform: scale(1); }

/* Entrée : lignes qui montent, fenêtres qui s'ouvrent ; secours si le script échoue */
.js #ouverture .o-ligne__in { transform: translateY(108%); animation: v5-secours 0s 5s forwards; }
.js #ouverture .fenetre { width: 0; animation: v5-secours-fenetre 0s 5s forwards; }
.js #ouverture .ouverture__bas { opacity: 0; transform: translateY(18px); animation: v5-secours 0s 5s forwards; }
.js #ouverture.est-visible .o-ligne__in,
.js #ouverture.est-visible .ouverture__bas { opacity: 1; transform: none; animation: none; transition: opacity 0.9s var(--c-revelation), transform 1.2s var(--c-revelation); }
.js #ouverture.est-visible .o-ligne:nth-child(3) .o-ligne__in { transition-delay: 0.1s; }
.js #ouverture.est-visible .o-ligne:nth-child(4) .o-ligne__in { transition-delay: 0.2s; }
.js #ouverture.est-visible .ouverture__bas { transition-delay: 0.55s; }
.js #ouverture.est-visible .fenetre { width: var(--w); animation: none; transition: width 1.5s var(--c-revelation); transition-delay: calc(var(--d, 0) * 1ms); }
.js #ouverture.est-mesure .fenetre { width: var(--w) !important; transition: none !important; animation: none !important; }
@keyframes v5-secours { to { opacity: 1; transform: none; } }
@keyframes v5-secours-fenetre { to { width: var(--w); } }

#ouverture .ouverture__bas {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 40px;
  align-items: end;
  padding-top: clamp(16px, 2.6svh, 26px);
  border-top: 1px solid var(--trait);
}
#ouverture .ouverture__chapeau {
  position: static;
  max-width: 38ch;
  width: auto;
  margin: 0;
  font-family: var(--f-texte);
  font-size: clamp(16px, 0.45vw + 11px, 19px);
  line-height: 1.5;
  color: var(--graphite);
}
.ouverture__credits { margin-top: 10px; max-width: 60ch; font-size: 12px; line-height: 1.45; color: var(--graphite); }
.ouverture__outils { display: grid; gap: 12px; }
.ouverture__recherche {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 10px 0 18px;
  border: 1px solid var(--champ-bord);
  border-radius: 18px;
  background: var(--champ);
  box-shadow: var(--ombre-1);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ouverture__recherche .ico { width: 20px; height: 20px; color: var(--graphite); fill: currentColor; flex: none; }
.ouverture__recherche input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: 400 17px var(--f-texte); color: var(--encre); }
.ouverture__recherche input::placeholder { color: var(--graphite); opacity: 0.9; }
.ouverture__recherche input::-webkit-search-cancel-button { -webkit-appearance: none; }
.ouverture__recherche kbd { padding: 5px 9px; border: 1px solid var(--trait); border-radius: 8px; background: var(--papier-2); font: 600 12px/1 var(--f-texte); color: var(--graphite); }
.ouverture__recherche:focus-within { border-color: var(--lagune-vive); box-shadow: 0 0 0 4px rgb(180 83 42 / 0.16); }
.ouverture__puces { display: flex; flex-wrap: wrap; gap: 8px; }
.ouverture__puce {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--trait);
  border-radius: 999px;
  background: var(--champ);
  font: 500 14px/1 var(--f-texte);
  text-decoration: none;
  color: var(--encre);
  transition: border-color 0.2s, background-color 0.2s;
}
.ouverture__puce:hover { border-color: var(--trait-fort); }
.ouverture__puce .ico { width: 16px; height: 16px; color: var(--lagune); fill: currentColor; }
@media (max-width: 1100px) {
  #ouverture .ouverture__bas { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 760px) {
  #ouverture .ouverture__titre { font-size: 13.4vw; padding-inline: 0; }
  .o-ligne--2 .o-ligne__in { padding-left: 0; }
  /* Sur téléphone, le héros tient sur un écran sans le remplir : les compteurs apparaissent dessous */
  #ouverture.ouverture, #ouverture .ouverture__cadre { min-height: 0; }
  #ouverture .ouverture__cadre { justify-content: flex-start; gap: clamp(28px, 6svh, 48px); padding-bottom: 8px; }
  /* La recherche passe au registre et au menu */
  .ouverture__outils { display: none; }
  #chiffres.chiffres { padding-top: 28px; }
}

/* =========================================================================
   Compteurs : grands, sur fond neutre, juste sous le héros
   ========================================================================= */
#chiffres.chiffres { padding: clamp(40px, 7svh, 88px) 0 clamp(56px, 9svh, 112px); background: var(--papier); }
#chiffres.chiffres > .g {
  --encre: inherit;
  --graphite: inherit;
  background: none;
  color: var(--encre);
  border-radius: 0;
  padding: 0;
}
#chiffres .chiffres__titre {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 var(--gouttiere) 18px;
  border-bottom: 1px solid var(--trait);
  color: var(--graphite);
  font: 600 13.5px/1.2 var(--f-texte);
  letter-spacing: 0;
  text-transform: none;
}
#chiffres .chiffres__titre::before { color: var(--lagune-vive); }
#chiffres .chiffres__liste { margin-top: 0; row-gap: 0; }
#chiffres .chiffres__liste > div {
  padding: clamp(24px, 4svh, 40px) clamp(14px, 1.6vw, 28px) 0;
  border-left: 1px solid var(--trait);
}
#chiffres .chiffres__liste > div:first-child { border-left: 0; padding-left: var(--gouttiere); }
#chiffres .chiffres__liste > div::before { width: 26px; height: 26px; margin-bottom: 14px; color: var(--lagune-vive); }
#chiffres .chiffres__liste .chiffre {
  color: var(--lagune);
  font-family: var(--f-titre);
  font-weight: 400;
  font-size: clamp(64px, 8.6vw, 156px);
  line-height: 0.9;
  letter-spacing: -0.03em;
}
#chiffres .chiffres__liste dt { margin-top: 14px; max-width: 18em; font-size: clamp(15px, 0.4vw + 10px, 17px); line-height: 1.4; color: var(--graphite); }
#chiffres .appel { background: var(--papier-3); color: var(--encre); }
@media (max-width: 1023px) {
  #chiffres .chiffres__liste > div:nth-child(odd) { border-left: 0; padding-left: var(--gouttiere); }
  #chiffres .chiffres__liste > div:nth-child(n+3) { border-top: 1px solid var(--trait); margin-top: 28px; }
  #chiffres .chiffres__liste .chiffre { font-size: clamp(56px, 15vw, 112px); }
}

/* =========================================================================
   Relevés du jour : un ou deux jours, liste à gauche, carte de la Tunisie fixe à droite
   ========================================================================= */
#releves .releves__corps { align-items: start; }
#releves .registre { grid-column: 1 / -1; min-width: 0; }
#releves .releves__carte { grid-column: 1 / -1; padding-inline: var(--gouttiere); margin-top: 40px; }
#releves .mini-carte { margin: 0; padding: 0; }
#releves .mini-carte__svg { display: block; width: 100%; height: auto; max-height: min(70svh, 640px); margin-inline: auto; }
#releves .mini-carte__svg .mc-tunisie { stroke-width: 1.25; }
#releves .mini-carte__svg .mc-point { cursor: pointer; opacity: 0.75; transition: opacity 0.2s, fill 0.2s; }
#releves .mini-carte__svg .mc-point:hover { opacity: 1; }
#releves .mini-carte__svg .mc-point.est-notable { fill: var(--rose); opacity: 0.95; }
#releves .mini-carte__svg .mc-point.est-actif { fill: var(--rose); opacity: 1; }
#releves .mini-carte__legende { text-align: left; max-width: 46ch; }
#releves .registre__jour { display: flex; align-items: center; justify-content: flex-start; gap: 10px; flex-wrap: wrap; }
.registre__jour-compte { margin-left: auto; font-weight: 500; color: var(--graphite); }
@media (min-width: 1024px) {
  #releves .registre { grid-column: 1 / span 7; }
  #releves .releves__carte { grid-column: 9 / -1; position: sticky; top: calc(var(--entete) + 28px); margin-top: 0; }
  #releves .registre__outils { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  #releves .onglets { grid-column: 1 / span 3; }
  #releves .recherche { grid-column: 4 / -1; }
  #releves .ligne__bouton { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  #releves .ligne__heure { grid-column: 1; }
  #releves .ligne__nom { grid-column: 2 / span 3; }
  #releves .ligne__lieu { grid-column: 5 / span 2; }
  #releves .ligne__batons { display: none; }
  #releves .ligne__effectif { grid-column: 7; }
}
@media (max-width: 767px) {
  #releves .releves__carte { padding-inline: 0; }
  #releves .mini-carte__svg { max-height: 58svh; }
}

/* Tiroir : photo cherchée au clic, et la raison d'une observation notable */
.tiroir__photo { margin: 0 0 18px; }
/* La photo n'est jamais recadrée : le cadre prend son format ; trop haute, elle est réduite et un fond flouté de la même image comble les côtés */
.tiroir__photo-cadre { position: relative; aspect-ratio: 4 / 3; max-height: min(66vh, 640px); overflow: hidden; border-radius: var(--r-3); background: var(--papier-2); }
.tiroir__photo-cadre::before { content: ""; position: absolute; inset: -30px; background: var(--fond, none) center / cover no-repeat; filter: blur(24px) saturate(1.05); opacity: 0.6; }
.tiroir__photo-cadre img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.5s var(--c-interface); }
.tiroir__photo[data-etat="prete"] .tiroir__photo-cadre img { opacity: 1; }
.tiroir__photo[data-etat="chargement"] .tiroir__photo-cadre::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.32), transparent);
  transform: translateX(-100%);
  animation: v5-chargement 1.2s linear infinite;
}
@keyframes v5-chargement { to { transform: translateX(100%); } }
.tiroir__photo[data-etat="absente"] .tiroir__photo-cadre { display: none; }
.tiroir__photo figcaption { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--graphite); }
.tiroir__photo figcaption a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.tiroir__pourquoi { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-2); background: var(--rose-pale); font-size: 15px; line-height: 1.5; }
.tiroir__pourquoi .etiquette { display: block; margin-bottom: 4px; color: var(--rose-texte); font-weight: 700; }

/* Vu sur iNaturalist */
.inat { margin-top: clamp(72px, 11svh, 128px); }
.inat__tete {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto;
  gap: 16px 40px;
  align-items: end;
  padding: 0 var(--gouttiere) 22px;
  border-bottom: 1px solid var(--trait);
}
.inat__tete .titre-3 { margin: 0; }
.inat__chapeau { max-width: 54ch; font-size: 16px; line-height: 1.5; color: var(--graphite); }
.inat__tout { white-space: nowrap; }
.inat__liste { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 16px; margin: 26px 0 0; padding: 0 var(--gouttiere); list-style: none; }
.inat__liste:empty { display: none; }
.inat__carte a { position: relative; display: grid; gap: 3px; color: var(--encre); text-decoration: none; }
.inat__photo { position: relative; display: block; aspect-ratio: 4 / 5; margin-bottom: 9px; overflow: hidden; border-radius: var(--r-3); background: var(--papier-2); }
/* Photo entière, jamais recadrée, sur un fond flouté de la même image */
.inat__photo::before { content: ""; position: absolute; inset: -24px; background: var(--fond, none) center / cover no-repeat; filter: blur(18px) saturate(1.05); opacity: 0.6; }
.inat__photo img { position: relative; width: 100%; height: 100%; object-fit: contain; transition: transform 0.8s var(--c-revelation); }
.inat__carte a:hover .inat__photo img { transform: scale(1.04); }
.inat__nom { font: 400 20px/1.15 var(--f-titre); word-spacing: -0.06em; }
.inat__latin { font-size: 13.5px; color: var(--graphite); }
.inat__lieu { font-size: 13.5px; line-height: 1.35; color: var(--encre); }
.inat__date { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--graphite); }
.inat__valide { padding: 2px 8px; border-radius: 999px; background: var(--lagune-pale); color: var(--lagune); font-weight: 600; font-size: 11.5px; }
.inat__credit { margin-top: 2px; font-size: 11.5px; line-height: 1.4; color: var(--graphite); }
.inat__carte .fleche { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: rgb(255 255 255 / 0.92); color: #171410; opacity: 0; transition: opacity 0.3s; }
.inat__carte a:hover .fleche, .inat__carte a:focus-visible .fleche { opacity: 1; }
.inat__etat { grid-column: 1 / -1; padding: 26px var(--gouttiere) 0; font-size: 15px; color: var(--graphite); }
@media (max-width: 1100px) {
  .inat__tete { grid-template-columns: 1fr; }
  .inat__liste { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .inat__tete, .inat__liste, .inat__etat { padding-inline: 0; }
  .inat__liste { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
}

/* =========================================================================
   Douze planches : fond neutre qui suit le jour et la nuit, un seul accent de terre,
   plus d'aperçu de l'espèce suivante, chant et période en tête de fiche
   ========================================================================= */
#planches .scene, #planches .planche {
  --amb: #F6F5F2; --acc: #9A4326; --acc-sur: #FFFFFF;
  --amb-encre: #171410; --amb-doux: #5E574F; --amb-trait: #E2DED6;
  --trait-fort: #8C8379; --papier-3: #E6E3DC; --rose-lavis: rgb(210 102 43 / 0.08);
  --lagune-pale: #F3E4D8; --ambre-pale: #F5E9D2; --ambre-texte: #7A5110;
}
:root[data-theme="dark"] #planches .scene, :root[data-theme="dark"] #planches .planche {
  --amb: #100F0E; --acc: #E8875A; --acc-sur: #1A0F09;
  --amb-encre: #EEEAE4; --amb-doux: #A69E94; --amb-trait: #2A2723;
  --trait-fort: #6B645B; --papier-3: #221F1C; --rose-lavis: rgb(238 143 95 / 0.12);
  --lagune-pale: #3A2418; --ambre-pale: #3A2C12; --ambre-texte: #F0C47A;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #planches .scene, :root:not([data-theme="light"]) #planches .planche {
    --amb: #100F0E; --acc: #E8875A; --acc-sur: #1A0F09;
    --amb-encre: #EEEAE4; --amb-doux: #A69E94; --amb-trait: #2A2723;
    --trait-fort: #6B645B; --papier-3: #221F1C; --rose-lavis: rgb(238 143 95 / 0.12);
    --lagune-pale: #3A2418; --ambre-pale: #3A2C12; --ambre-texte: #F0C47A;
  }
}
#planches .scene__apercu { display: none !important; }
#planches .planche__texte { color: var(--amb-doux); }
#planches .planche .uicn__face { background: var(--papier-3); color: var(--amb-encre); }
#planches .planche .appel { background: var(--papier-3); color: var(--amb-encre); }
#planches .fm-case.fm-courant { background: var(--rose-lavis); }
#planches .fm-gbif { background: var(--trait-fort); }
#planches .frise-mois .fm-l-gbif::before { background: var(--trait-fort); }
#planches .planche .lecteur__bouton:hover { background: var(--amb-encre); color: var(--amb); }
#planches .scene__commandes .bouton { border-color: var(--trait-fort); color: var(--amb-encre); }
#planches .scene__commandes .bouton:hover { background: var(--amb-encre); border-color: var(--amb-encre); color: var(--amb); }
#planches .planche__nom { color: var(--acc); }
@media (min-width: 1024px) {
  /* Sans l'aperçu, la fiche va jusqu'à la marge droite */
  #planches .planche__fiche { width: calc(var(--col) * 5); }
  #planches .planche__defile { padding: calc(var(--entete) + 22px) var(--gouttiere) 16px 32px; }
  /* Fiche compacte : les annotations sur deux colonnes */
  #planches .annotations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; margin-top: 18px; }
  #planches .annotations > div { display: block; padding: 9px 0; }
  #planches .annotations dt { margin-bottom: 3px; }
  #planches .annotations dd { font-size: 15px; line-height: 1.35; }
  #planches .annotations > div:nth-child(5), #planches .annotations > div:nth-child(6) { grid-column: 1 / -1; }
  #planches .frise-mois { margin-top: 0; }
  #planches .planche .lecteur { margin-top: 16px; }
  #planches .planche__texte { margin-top: 14px; font-size: 15px; line-height: 1.55; }
}

/* =========================================================================
   Passage : la nuit tombe pendant que le haut de la section entre dans l'écran (voir nuit.js) ;
   un peu plus d'air au-dessus du titre, pour que le fondu soit fait quand il arrive
   ========================================================================= */
#passage .passage__tete { padding-top: calc(var(--section) + 8svh); }

/* =========================================================================
   Au matin, ils se posent : un seul écran, titre plus grand
   ========================================================================= */
#aube.aube { height: 100svh; min-height: 560px; }
#aube .aube__texte { top: calc(var(--entete) + 7svh); }
#aube .aube__titre {
  grid-column: 1 / -1;
  font-family: var(--f-titre);
  font-weight: 400;
  font-size: clamp(64px, 10.4vw, 196px);
  line-height: 0.92;
  letter-spacing: 0;
  word-spacing: -0.08em;
}
/* Prochain lever ou coucher du soleil sur le Cap Bon, en petit au bas de la photo (voir nuit.js) */
/* Un voile sombre au bas de la photo, comme sous les noms des planches sur tablette, garde le bloc et le crédit lisibles */
#aube .aube__photo::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgb(15 14 13 / 0.55), rgb(15 14 13 / 0.22) 24%, transparent 42%); pointer-events: none; }
#aube .aube__soleil { position: absolute; left: var(--marge); right: var(--marge); bottom: clamp(36px, 5svh, 56px); z-index: 2; padding-left: var(--gouttiere); color: #FFFFFF; pointer-events: none; }
#aube .aube__heure { display: inline-flex; align-items: center; gap: 12px; margin: 0; font-family: var(--f-titre); font-weight: 400; font-size: clamp(18px, 1.45vw, 24px); line-height: 1.2; word-spacing: -0.04em; text-shadow: 0 1px 10px rgb(0 0 0 / 0.45); }
#aube .aube__heure::before { content: ""; flex: none; width: 1.75em; height: 1.75em; background: var(--ocre-clair); -webkit-mask: url("../assets/icons/duotone/sun-horizon.svg") center / contain no-repeat; mask: url("../assets/icons/duotone/sun-horizon.svg") center / contain no-repeat; }
#aube .aube__date { display: block; margin-top: 3px; font-family: var(--f-texte); font-size: 13px; line-height: 1.3; word-spacing: normal; color: rgb(255 255 255 / 0.85); }
#aube .aube__chapeau { grid-column: 1 / span 6; margin-top: clamp(18px, 3svh, 32px); font-size: clamp(19px, 1vw + 10px, 26px); line-height: 1.4; }
@media (max-width: 767px) {
  #aube .aube__titre { font-size: 15vw; }
  #aube .aube__chapeau { grid-column: 1 / -1; }
  /* Au-dessus du crédit de la photo, en bas à droite */
  #aube .aube__soleil { bottom: 72px; padding-left: 0; }
  #aube .aube__heure { gap: 10px; font-size: 16px; }
  #aube .aube__heure::before { width: 30px; height: 30px; }
}

/* =========================================================================
   Atlas des sites : toute la Tunisie sur la carte, la photo de l'oiseau à côté
   du paysage et non plus posée dessus
   ========================================================================= */
#sites .atlas__carte .carte__affiche circle { fill: var(--lagune); }
@media (min-width: 1024px) {
  #sites .atlas__carte { aspect-ratio: auto; height: min(84svh, 880px); }
  #sites .atlas__index { max-height: min(84svh, 880px); }
  /* La règle des latitudes a sa propre marge : elle ne chevauche plus les textes ni les photos */
  #sites .double { margin-right: calc(var(--marge) + 104px); }
}
#sites .double__medaillon {
  grid-area: auto;
  grid-row: 3;
  position: static;
  display: grid;
  grid-template-columns: clamp(120px, 11vw, 176px) minmax(0, 1fr);
  align-items: end;
  gap: 16px;
  width: auto;
  margin: 22px 0 0;
  transform: none !important;
  justify-self: stretch !important;
}
#sites .double__medaillon-cadre { border: 0; border-radius: var(--r-3); box-shadow: none; }
#sites .double__medaillon figcaption { margin: 0 0 4px; max-width: 34ch; }
#sites .double--gauche .double__medaillon { padding-left: calc(var(--marge) + var(--gouttiere)); }
#sites .double--droite .double__medaillon { padding-right: var(--marge); }
/* Double page large (Cap Bon) : le médaillon de l'épervier est dans le texte, dans la dernière colonne à droite du titre,
   au-dessus d'Infos pratiques (de À voir sur tablette) ; le titre et ses étiquettes gardent les autres colonnes */
#sites .double--large .double__texte > .double__medaillon { grid-column: -2 / -1; grid-row: 1 / span 3; align-self: end; margin: 0; }
#sites .double--large .double__texte > .double__tete,
#sites .double--large .double__texte > .double__nom,
#sites .double--large .double__texte > .double__etiquettes { grid-column: 1 / -2; }
@media (max-width: 1023px) {
  #sites .double__medaillon { width: auto !important; padding-inline: 0 !important; margin-right: 0 !important; }
}
@media (max-width: 767px) {
  #sites .double__medaillon { grid-template-columns: 112px minmax(0, 1fr); }
  #sites .double__medaillon figcaption { display: block; }
  #sites .double--large .double__texte > .double__medaillon { margin: 22px 0 0; }
}

/* =========================================================================
   Pied de page : les douze routes lisibles, un lien vers la page Sources
   ========================================================================= */
.colophon__svg { grid-column: 1 / -1; max-height: 78svh; }
.colophon__svg .cr-cote { stroke: var(--colophon-trait-fort); stroke-opacity: 0.9; }
.colophon__svg .cr-route { stroke-opacity: 0.82; stroke-width: 1.2; transition: stroke-opacity 0.3s linear; }
.colophon__svg .cr-repere { font: 600 10.5px/1 var(--f-texte); letter-spacing: 0.14em; fill: var(--colophon-graphite); text-anchor: middle; }
.colophon__svg .cr-ville { font: 700 11px/1 var(--f-texte); letter-spacing: 0.08em; fill: var(--colophon-encre); }
.colophon__routes figcaption { line-height: 1.5; font-size: 14px; }
.colophon__routes figcaption > span:first-child { max-width: 74ch; }
.colophon__liens { margin-top: clamp(48px, 8svh, 96px); align-items: end; row-gap: 14px; }
.colophon__sources {
  grid-column: 1 / span 6;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  width: max-content;
  max-width: 100%;
  padding-left: var(--gouttiere);
  font: 400 clamp(30px, 3.4vw, 56px)/1.05 var(--f-titre);
  word-spacing: -0.08em;
  color: var(--colophon-encre);
  text-decoration: none;
}
.colophon__sources .fleche { width: 0.62em; height: 0.62em; transition: transform 0.3s var(--c-revelation); }
.colophon__sources:hover .fleche { transform: translateX(6px); }
.colophon__resume { grid-column: 8 / -1; max-width: 46ch; padding-right: var(--gouttiere); font-size: 15px; line-height: 1.5; color: var(--colophon-graphite); }
@media (max-width: 1023px) {
  .colophon__sources, .colophon__resume { grid-column: 1 / -1; padding-inline: 0; }
}

/* =========================================================================
   En-tête : panneau Réglages (chants automatiques, animations)
   ========================================================================= */
.reglages-plus { position: relative; display: flex; }
.reglages-plus__bouton {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: var(--papier-3); color: var(--encre);
  cursor: pointer;
  transition: background-color var(--d-survol) var(--c-interface), color var(--d-survol) var(--c-interface);
}
.reglages-plus__bouton .ico { width: 18px; height: 18px; }
.reglages-plus__bouton:hover { background: var(--trait); }
.reglages-plus__bouton[aria-expanded="true"] { background: var(--encre); color: var(--papier); }
.entete[data-etat="nuit"] .reglages-plus__bouton { background: rgb(255 255 255 / 0.08); color: var(--nuit-encre); }
.reglages-plus__panneau {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 5;
  display: grid; gap: 6px;
  min-width: 272px; padding: 12px 16px;
  border: 1px solid var(--trait); border-radius: var(--r-3);
  background: var(--champ); color: var(--encre);
  box-shadow: var(--ombre-2);
}
.reglages-plus__panneau[hidden] { display: none; }
.reglages-plus__panneau .interrupteur, .sommaire__interrupteurs .interrupteur { color: var(--encre); }
.reglages-plus__panneau .interrupteur__piste, .sommaire__interrupteurs .interrupteur__piste { width: 42px; height: 24px; border: 0; background: var(--papier-3); }
.reglages-plus__panneau .interrupteur__bille, .sommaire__interrupteurs .interrupteur__bille { top: 4px; left: 4px; width: 16px; height: 16px; background: var(--champ); box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); }
.reglages-plus__panneau .interrupteur[aria-checked="true"] .interrupteur__piste,
.sommaire__interrupteurs .interrupteur[aria-checked="true"] .interrupteur__piste { background: var(--lagune-vive); }
.reglages-plus__panneau .interrupteur[aria-checked="true"] .interrupteur__bille,
.sommaire__interrupteurs .interrupteur[aria-checked="true"] .interrupteur__bille { transform: translateX(18px); background: #FFFFFF; }
.sommaire__interrupteurs { display: grid; gap: 8px; width: 100%; margin-top: 4px; }
@media (max-width: 1023px) {
  /* Sur tablette et téléphone, les réglages sont dans le sommaire */
  .reglages-plus { display: none; }
}
/* Bouton Fermer du sommaire : la règle .bouton, venue après, le replace dans le flux ; son décalage à droite le poussait
   alors de 16 px vers la gauche. Il occupe la largeur de la colonne, avec les mêmes marges que la liste. */
.sommaire__fermer { right: auto; }

/* =========================================================================
   Page Sources, crédits et méthode
   ========================================================================= */
.entete--sources { justify-content: space-between; }
.entete--sources .reglages .bascule { display: inline-flex !important; }
.sources { max-width: 1160px; margin: 0 auto; padding: calc(var(--entete) + 48px) var(--marge) 112px; }
.sources__tete { padding-bottom: 36px; border-bottom: 1px solid var(--trait); }
.sources__retour { display: inline-flex; align-items: center; gap: 8px; }
.sources__retour .fleche { width: 16px; height: 16px; }
.sources__titre { margin-top: 26px; }
.sources__chapeau { margin-top: 18px; max-width: 58ch; color: var(--graphite); }
.sources__bloc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr); gap: 20px 56px; padding: 44px 0; border-bottom: 1px solid var(--trait); }
.sources__bloc > h2 { grid-column: 1; margin: 0; }
.sources__texte, .sources__credits, .sources__notes { grid-column: 2; font-size: 15.5px; line-height: 1.65; }
.sources__texte p + p { margin-top: 12px; }
.sources__texte strong { font-weight: 600; }
/* Crédits : photographies et vidéo, puis enregistrements sonores, réunis dans la colonne de droite */
.sources__parties { grid-column: 2; }
.sources__parties > * + * { margin-top: 20px; }
.sources__parties > .sources__sous-titre + * { margin-top: 12px; }
.sources__parties > .sources__credits + .sources__sous-titre { margin-top: 44px; }
.sources__sous-titre { margin: 0; font: 600 17px/1.35 var(--f-texte); color: var(--encre); }
.sources__texte a, .sources__credits a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--trait-fort); }
.sources__texte a:hover, .sources__credits a:hover { text-decoration-color: currentColor; }
.sources__credits, .sources__notes, .sources__liste ul { margin: 0; padding: 0; list-style: none; }
.sources__credits li, .sources__liste li { padding: 9px 0; border-bottom: 1px solid var(--trait); }
.sources__liste a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--trait-fort); }
.sources__liste .passage__source-qui { display: block; margin-top: 2px; font-size: 14px; color: var(--graphite); }
.sources__notes li { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--trait); }
.sources__notes .note__num { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--papier-3); font: 700 12px/1 var(--f-texte); }
@media (max-width: 767px) {
  .sources__bloc { grid-template-columns: 1fr; padding: 32px 0; }
  .sources__bloc > h2, .sources__texte, .sources__credits, .sources__notes, .sources__parties { grid-column: 1; }
}

/* =========================================================================
   Planches : la scène tient dans l'écran sous l'en-tête et y reste collée
   le temps d'un défilement (bureau et tablette)
   ========================================================================= */
.scene-ancre { height: 0; }
.scene-espace { display: none; }
@media (min-width: 768px) {
  #planches .scene {
    position: sticky;
    top: var(--entete);
    height: calc(100svh - var(--entete));
    min-height: 520px;
  }
  #planches .scene-espace { display: block; height: 45svh; }
  #planches .planche__defile { padding-top: 22px; }
}

/* =========================================================================
   Fiche d'un oiseau (tiroir) : résumé Wikipédia, présence mois par mois, observation iNaturalist
   ========================================================================= */
.tiroir__resume { margin-top: 14px; }
.tiroir__resume-texte { font-size: 15.5px; line-height: 1.6; color: var(--encre); }
.tiroir__resume[data-etat="chargement"] .tiroir__resume-texte { color: var(--graphite); font-size: 14px; }
.tiroir__resume-source { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--graphite); }
.tiroir__resume-source a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.tiroir__presence { margin-top: 18px; }
.tiroir__presence > .etiquette { margin-bottom: 8px; font-weight: 600; color: var(--encre); }
/* Mois aérés ; le contour du mois en cours tient dans l'écart, sans passer sous ses voisins */
.fiche-mois { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 7px; }
.fiche-mois__case { display: grid; place-items: center; height: 30px; border-radius: 6px; background: var(--papier-3); font: 700 11px/1 var(--f-texte); color: var(--graphite); }
.fiche-mois__case[data-niveau="1"] { background: var(--lagune-pale); color: var(--lagune); }
.fiche-mois__case[data-niveau="2"] { background: color-mix(in srgb, var(--lagune-vive) 45%, var(--papier)); color: var(--encre); }
.fiche-mois__case[data-niveau="3"] { background: var(--lagune-vive); color: #FFFFFF; }
.fiche-mois__case[data-courant="true"] { position: relative; z-index: 1; outline: 2px solid var(--encre); outline-offset: 2px; }
@media (max-width: 479px) { .fiche-mois { gap: 6px; } }
.tiroir__presence-source { margin-top: 6px; font-size: 12px; color: var(--graphite); }
.tiroir__inat { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--trait); }
.tiroir__inat > .etiquette { font-weight: 600; color: var(--encre); }
.tiroir__inat .tiroir__fiche { margin-top: 8px; }
.tiroir__inat .lien { margin-top: 10px; }

/* Cartes iNaturalist : la carte ouvre la fiche, la flèche en haut à droite ouvre iNaturalist */
.inat__carte { position: relative; }
.inat__ouvrir {
  display: grid; gap: 3px; width: 100%; padding: 0; border: 0; background: none;
  color: var(--encre); font: inherit; text-align: left; cursor: pointer;
}
.inat__ouvrir:hover .inat__photo img { transform: scale(1.04); }
.inat__ouvrir:focus-visible { outline-offset: 4px; border-radius: var(--r-2); }
.inat__carte .inat__lien {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; background: rgb(255 255 255 / 0.94); color: #171410;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.18);
  transition: transform 0.25s var(--c-revelation), background-color 0.2s;
}
.inat__carte .inat__lien .fleche { width: 17px; height: 17px; }
.inat__carte .inat__lien:hover { transform: scale(1.08); background: #FFFFFF; }
.inat__carte .inat__lien:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.inat__carte .fleche { position: static; opacity: 1; padding: 0; background: none; }
.inat__carte--attente .inat__photo { background: var(--papier-2); }
.inat__ligne { display: block; height: 12px; margin-top: 8px; border-radius: 6px; background: var(--papier-2); }
.inat__ligne--courte { width: 60%; }

/* Listes cliquables : derniers relevés d'un site, espèces à voir, lignes du calendrier */
.panneau__releve {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline;
  width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.panneau__releves li:has(.panneau__releve) { display: block; }
.panneau__releve:hover > span:first-child, .double__espece:hover { color: var(--lagune); text-decoration: underline; text-underline-offset: 3px; }
.double__espece { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 16px; font-weight: 500; text-align: left; cursor: pointer; }
.double__espece:focus-visible, .panneau__releve:focus-visible { outline-offset: 3px; border-radius: 4px; }
/* Panneau d'un site : quand ses relevés dépassent, il défile seul (molette comprise, voir sites.js), sans barre de
   défilement, et sans entraîner la page une fois en bout de liste */
.atlas__panneau { overscroll-behavior: contain; scrollbar-width: none; }
.atlas__panneau::-webkit-scrollbar { display: none; }

/* =========================================================================
   En-tête entre 1024 et 1179 px : la navigation et les réglages tiennent côte à côte
   ========================================================================= */
@media (min-width: 1024px) and (max-width: 1179px) {
  .nav ol { gap: 14px; }
  .nav a { font-size: 14px; }
  .reglages { gap: 6px; }
}

/* =========================================================================
   Planches d'oiseaux en vol : l'oiseau entier, ailes comprises, sur un fond flouté de la même photo
   ========================================================================= */
.planche__photo picture.planche__entiere { position: relative; overflow: hidden; }
.planche__photo picture.planche__entiere::before { content: ""; position: absolute; inset: -40px; background: var(--fond, none) center / cover no-repeat; filter: blur(28px) saturate(1.05) brightness(0.92); }
.planche__photo picture.planche__entiere img { position: relative; object-fit: contain; object-position: 50% 50% !important; }

/* =========================================================================
   Mot final du pied de page : lettres entières et approche juste.
   Glyke n'a qu'une graisse (400) ; les caches de l'animation débordent sur les côtés
   pour ne plus rogner les lettres, sans changer leur position.
   ========================================================================= */
.colophon__mot { font-weight: 400; letter-spacing: -0.015em; }
.colophon__mot .lettre-masque { padding-inline: 0.18em; margin-inline: -0.18em; }

/* =========================================================================
   Règle des sites (Atlas) : degrés et site courant à droite de l'axe, numéros des sites à gauche,
   reliés à leur latitude exacte. Rien ne déborde sur le texte des doubles pages.
   ========================================================================= */
.regle-sites { width: 150px; }
.regle-sites__axe { right: 54px; }
.regle-sites__grad { right: auto; left: calc(100% - 54px); width: 5px; transition: opacity var(--d-survol) var(--c-interface); }
.regle-sites__grad.est-entier { width: 9px; }
.regle-sites__grad span { right: auto; left: 13px; top: -7px; font-size: 10.5px; color: var(--graphite); transition: opacity var(--d-survol) var(--c-interface); }
.regle-sites__grad.est-masque span { opacity: 0; }
.regle-sites__liens { position: absolute; top: 0; right: 54px; overflow: visible; pointer-events: none; }
.regle-sites__liens path { fill: none; stroke: var(--trait-fort); stroke-width: 1; transition: stroke var(--d-survol) var(--c-interface); }
.regle-sites__liens path.est-courant { stroke: var(--rose); }
.regle-sites__repere { right: 78px; padding-left: 4px; }
.regle-sites__repere::after { content: none; }
.regle-sites__curseur { right: 50.5px; }
.regle-sites__etiquette { right: auto; left: calc(100% - 54px + 10px); margin-top: -14px; display: grid; gap: 1px; line-height: 1.15; }
.regle-sites__etiquette b { font-size: 11px; font-weight: 700; }
.regle-sites__etiquette span { font-size: 9px; font-weight: 700; letter-spacing: 0.02em; opacity: 0.85; }

/* =========================================================================
   Glyke : espacement natif pour tout texte en lettres. La police est déjà serrée par dessin :
   au moindre resserrement, le bras du r touche le t ou le v, les barres des t et les f se rejoignent,
   et dans les noms découpés en lettres le s entre dans le a (mesuré au pixel sur toutes les paires
   que le site peut afficher, en français et en anglais, noms d'espèces et mois compris).
   Les chiffres gardent -0,03 em au plus : au-delà, 02, 03, 44 et 65 se touchent.
   Les logotypes gardent -0,015 em, sans contact.
   ========================================================================= */
:root { --a-titre: 0em; }
.titre-3,
.planche__nom, .planche__nom-copie,
.double__nom,
.etape__titre,
.sommaire a,
.passage__date,
.passage__panneau h3,
.atlas__panneau h3,
.fiche-saison__titre,
.fiche-saison__espece,
.frise-ciel__titre-groupe,
.a-voir__nom,
.tableau__groupe th,
.fcm__groupe h3,
.double__chiffres dd { letter-spacing: 0; }
.chiffre,
.planche__num,
.classement__rang,
.double__num,
.intro__decompte { letter-spacing: -0.03em; }
.logo__mot { letter-spacing: -0.015em; }
/* Les caches de l'animation des noms débordent sur les côtés : la queue du y n'est plus rognée */
.planche__nom .lettre-masque, .planche__nom-copie .lettre-masque { padding-inline: 0.1em; margin-inline: -0.1em; }

/* Planche à photo très claire en bas (rochers calcaires du faucon d'Éléonore) : voile plus dense pour lire les noms en blanc */
.planche__photo[data-voile="fort"]::after { background: linear-gradient(to top, rgb(0 0 0 / 0.72), rgb(0 0 0 / 0.42) 26%, transparent 56%); }

/* =========================================================================
   Logo : deux oiseaux bec à bec, qui battent des ailes puis deviennent des jumelles, seuls, sans pastille.
   Noir le jour ; clair en mode sombre et sur l'en-tête de nuit. Version fixe quand le mouvement est réduit.
   Les fichiers viennent de outils/logos (fichiers_site.py) ; le cadre, plus large que haut, suit leurs proportions.
   ========================================================================= */
.logo { --logo-anime: url("../assets/logo/birdflow-anime-noir.svg"); --logo-fixe: url("../assets/logo/birdflow-fixe-noir.svg"); }
:root[data-theme="dark"] .logo,
.entete[data-etat="nuit"] .logo { --logo-anime: url("../assets/logo/birdflow-anime.svg"); --logo-fixe: url("../assets/logo/birdflow-fixe.svg"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo { --logo-anime: url("../assets/logo/birdflow-anime.svg"); --logo-fixe: url("../assets/logo/birdflow-fixe.svg"); }
}
.logo { --logo: var(--logo-anime); }
html[data-motion="reduced"] .logo { --logo: var(--logo-fixe); }
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="normal"]) .logo { --logo: var(--logo-fixe); }
}
.logo::before,
.entete[data-etat="nuit"] .logo::before { width: 66px; height: 46px; border-radius: 0; background: var(--logo) center / contain no-repeat; }
/* Logo agrandi, sans la mention du pays */
.logo { gap: 12px; }
.logo__mot { font-size: 27px; }
@media (max-width: 767px) {
  .logo::before, .entete[data-etat="nuit"] .logo::before { width: 57px; height: 40px; }
  .logo__mot { font-size: 24px; }
}

/* =========================================================================
   Héros : le passage, oiseaux en fond (version G des propositions).
   La nuit, les vraies routes GPS sur la carte, et derrière, des photos d'oiseaux de Houssem Ben Othmen.
   ========================================================================= */
.heros { position: relative; height: 100svh; min-height: 600px; max-height: 1100px; overflow: hidden; isolation: isolate; background: var(--nuit); color: var(--nuit-encre); }
.heros__photos { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.heros__photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 1.6s ease, transform 8s cubic-bezier(.2, .6, .2, 1); filter: brightness(0.6) saturate(0.9); }
.heros__photos img.est-active { opacity: 1; transform: scale(1); }
.heros__photos::after { content: ""; position: absolute; inset: 0; background: rgb(15 14 13 / 0.22); }
.heros__carte { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.heros__voile { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(to right, rgb(15 14 13 / 0.92), rgb(15 14 13 / 0.55) 34%, transparent 58%); }
.heros__texte { position: absolute; z-index: 3; left: var(--marge); bottom: clamp(36px, 8svh, 96px); width: min(46%, 640px); }
.heros__sur { margin: 0; display: inline-flex; align-items: center; gap: 10px; font: 600 13px/1.3 var(--f-texte); letter-spacing: 0.02em; color: var(--nuit-rose-texte); }
.heros__sur::before { content: ""; width: 26px; height: 1.5px; background: currentColor; }
.heros__titre { margin: 18px 0 0; font: 400 clamp(56px, 7.2vw, 132px)/0.94 var(--f-titre); letter-spacing: 0; color: var(--nuit-encre); }
.heros__chapeau { margin: 22px 0 0; max-width: 34ch; font-size: clamp(17px, 0.5vw + 12px, 20px); line-height: 1.5; color: var(--nuit-graphite); }
.heros__chiffres { display: flex; gap: clamp(20px, 3vw, 44px); margin: 30px 0 0; }
.heros__chiffres div { display: grid; gap: 4px; }
.heros__chiffres dd { margin: 0; order: -1; font: 400 clamp(32px, 2.6vw, 44px)/1 var(--f-titre); letter-spacing: -0.03em; color: var(--nuit-encre); }
.heros__chiffres dt { font-size: 13.5px; color: var(--nuit-graphite); }
.heros__legende { position: absolute; z-index: 3; right: calc(var(--marge) + 64px); bottom: clamp(36px, 8svh, 96px); margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13.5px; color: var(--nuit-graphite); }
.heros__legende li { display: flex; align-items: center; gap: 10px; }
.heros__legende i { width: 18px; height: 2px; border-radius: 2px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.heros__legende b { color: var(--nuit-encre); font-weight: 600; }
.heros__source { position: absolute; z-index: 3; right: calc(var(--marge) + 64px); bottom: 18px; margin: 0; font-size: 12px; color: var(--nuit-graphite); opacity: 0.8; }
.heros__credit { position: absolute; z-index: 3; top: calc(var(--entete) + 12px); right: calc(var(--marge) + 64px); margin: 0; font-size: 12px; color: var(--nuit-graphite); text-align: right; }
/* Entrée : le texte monte une fois l'intro passée ; secours si le script échoue */
.js .heros__texte { opacity: 0; transform: translateY(18px); animation: v5-secours 0s 5s forwards; }
.js .heros.est-visible .heros__texte { opacity: 1; transform: none; animation: none; transition: opacity 0.9s var(--c-revelation), transform 1.2s var(--c-revelation); }
/* En-tête posé sur le héros, tout en haut : transparent, comme dans la proposition */
.entete.est-sur-heros { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.entete.est-sur-heros::after { opacity: 0; }
@media (max-width: 1023px) {
  .heros__texte { width: min(70%, 560px); }
  .heros__legende { display: none; }
}
@media (max-width: 767px) {
  .heros__voile { background: linear-gradient(to top, rgb(15 14 13 / 0.96), rgb(15 14 13 / 0.6) 46%, transparent 70%); }
  .heros__texte { left: var(--marge); right: var(--marge); width: auto; bottom: 28px; }
  .heros__titre { font-size: clamp(48px, 13.5vw, 72px); }
  .heros__chapeau { font-size: 16px; margin-top: 14px; }
  .heros__chiffres { margin-top: 18px; gap: 18px; }
  .heros__chiffres dd { font-size: 26px; }
  .heros__chiffres dt { font-size: 12px; }
  .heros__source { display: none; }
  .heros__credit { top: calc(var(--entete) + 8px); right: var(--marge); left: var(--marge); font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .heros__photos img { transition: none; transform: none; }
}
html[data-motion="reduced"] .heros__photos img { transition: none; transform: none; }

/* Relevés : la région choisie se colore en orangé sur la carte (gouvernorats officiels regroupés par région) */
.mini-carte__svg .mc-region { fill: var(--rose); fill-opacity: 0.3; fill-rule: evenodd; stroke: var(--rose); stroke-width: 1.25; vector-effect: non-scaling-stroke; stroke-linejoin: round; animation: mc-region-entree 0.35s ease both; }
@keyframes mc-region-entree { from { opacity: 0; } }

/* =========================================================================
   Planches en bandeau (V5 des propositions, intégrée le 17 octobre 2026) :
   la photo entière, à ses proportions, à droite d'un bandeau qui reprend la même image floutée ;
   numéro, flèches, crédit et repères posés sur le flou, nom à cheval sur le bord du bandeau,
   fiche en trois colonnes. Sur ordinateur, le bandeau prend la hauteur qui reste : toute la planche
   tient dans la scène, sans zone qui défile à l'intérieur.
   ========================================================================= */
#planches .planche__nom, #planches .planche__nom-copie { line-height: 1; }
#planches .pl-bandeau { position: relative; z-index: 3; display: flex; overflow: hidden; border-radius: 24px; background: #2B2622; color: #FFFFFF; }
#planches .planche.en-transition .pl-bandeau { background: transparent; }
#planches .pl-flou { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
#planches .pl-flou img { position: absolute; top: -48px; left: -48px; width: calc(100% + 96px); height: calc(100% + 96px); max-width: none; object-fit: cover; filter: blur(30px) saturate(1.2) brightness(0.6); }
#planches .pl-flou::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(15 14 13 / 0.4), rgb(15 14 13 / 0.14) 75%); }
/* La photo garde ses proportions : sa largeur découle de la hauteur du bandeau ; son bord gauche se fond dans le flou */
#planches .pl-photo { position: relative; z-index: 1; flex: none; height: 100%; aspect-ratio: var(--r, 1.5); margin: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px); mask-image: linear-gradient(90deg, transparent, #000 56px); }
#planches .pl-photo .planche__media { display: block; width: 100%; height: 100%; object-fit: cover; filter: var(--photo-filtre); }
#planches .pl-zone { position: relative; z-index: 4; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 28px; }
#planches .pl-haut { align-self: stretch; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
#planches .pl-compteur { display: flex; align-items: baseline; gap: 6px; margin: 0; color: #FFFFFF; }
#planches .pl-compteur .planche__num { font-size: 40px; }
/* Une seule paire de flèches pour les douze planches : même place sur chaque planche et pendant les transitions.
   Flèches seules, sans rond, dans le coin supérieur droit de la photo (calée à droite du bandeau sur les douze
   planches) ; un liseré sombre très fin et une ombre douce les gardent lisibles sur une photo claire (talève,
   érismature). Version "Sans boutons 1" des propositions. */
#planches .pl-commandes { display: none; }
#planches .pl-rond { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: transparent; color: #FFFFFF; filter: drop-shadow(0 0 1px rgb(0 0 0 / 0.75)) drop-shadow(0 0 3px rgb(0 0 0 / 0.35)) drop-shadow(0 1px 6px rgb(0 0 0 / 0.35)); transition: transform var(--d-survol) var(--c-interface); }
#planches .pl-rond:hover { transform: scale(1.15); }
#planches .pl-rond:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
#planches .pl-rond .fleche { width: 26px; height: 26px; }
#planches .pl-rond--g .fleche { transform: scaleX(-1); }
#planches .pl-credit { margin: 0; max-width: min(400px, 100%); font-size: 11.5px; line-height: 1.4; color: rgb(255 255 255 / 0.85); }
#planches .pl-points { display: flex; gap: 6px; }
#planches .pl-points i { width: 8px; height: 8px; border-radius: 50%; background: rgb(255 255 255 / 0.45); }
#planches .pl-points i.est-courant { width: 22px; border-radius: 4px; background: #FFFFFF; }
#planches .planche__nom-copie { z-index: 2; }
/* Nom à cheval : 60 % dans le bandeau (copie blanche), le reste sur le papier */
#planches .pl-tete { position: relative; z-index: 1; flex: none; display: flex; align-items: flex-start; gap: 24px; margin-top: calc(var(--fit, 96px) * -0.6); padding-left: 28px; overflow-x: clip; }
#planches .pl-sous { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 2px; min-width: 0; margin-top: calc(var(--fit, 96px) * 0.6 + 12px); }
#planches .pl-sous .planche__latin { margin: 0; font-size: 18px; font-style: italic; color: var(--amb-encre); }
#planches .pl-sous .planche__en { margin: 0; font-size: 14px; color: var(--amb-doux); }
#planches .pl-pied { display: none; }
#planches .pl-fiche { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); column-gap: clamp(20px, 2.4vw, 40px); margin-top: clamp(10px, 1.8svh, 20px); align-items: start; }
#planches .pl-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
#planches .pl-fiche .frise-mois, #planches .pl-fiche .lecteur, #planches .pl-fiche .planche__texte, #planches .pl-fiche .planche__liens { margin-top: 0; }
#planches .pl-fiche .annotations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; margin-top: 0; }
#planches .pl-fiche .annotations > div:nth-child(n) { grid-column: auto; display: block; padding: 6px 0; }
#planches .pl-fiche .annotations dt { margin-bottom: 2px; }
#planches .pl-fiche .annotations dd { font-size: 14px; line-height: 1.35; }
#planches .pl-fiche .planche__texte { font-size: 14.5px; line-height: 1.5; }
@media (min-width: 768px) {
  /* Centrée en hauteur quand le bandeau atteint sa limite (écrans très hauts) */
  #planches .planche { display: flex; flex-direction: column; justify-content: center; padding: 14px var(--marge) 16px; }
  /* Le bandeau prend la hauteur qui reste ; la photo ne dépasse jamais 60 % de sa largeur */
  #planches .pl-bandeau { flex: 1 1 0%; min-height: 150px; max-height: calc((100vw - 2 * var(--marge)) * 0.6 / var(--pl-r-max, var(--r, 1.5))); }
  #planches .pl-commandes { position: absolute; z-index: 6; top: calc(var(--pl-bandeau-haut, 14px) + 20px); right: calc(var(--marge) + 20px); display: flex; gap: 0; }
  /* Réserves communes aux douze planches (calculées dans planches.js) : le bandeau a la même taille partout */
  #planches .pl-tete { min-height: calc(var(--fit, 96px) * 0.6 + var(--pl-tete-bas, 0px)); }
  #planches .pl-fiche { min-height: var(--pl-fiche-h, 0px); }
}
@media (min-width: 768px) and (max-height: 700px) {
  #planches .pl-points { display: none; }
  #planches .pl-zone { padding: 16px 24px; }
  #planches .pl-compteur .planche__num { font-size: 32px; }
  #planches .pl-rond { width: 40px; height: 40px; }
  #planches .pl-rond .fleche { width: 22px; height: 22px; }
  #planches .pl-commandes { top: calc(var(--pl-bandeau-haut, 14px) + 16px); }
  /* Fenêtre basse : fiche plus serrée, pour laisser de la hauteur à la photo */
  #planches .pl-col { gap: 8px; }
  #planches .pl-fiche .annotations > div:nth-child(n) { padding: 4px 0; }
  #planches .pl-fiche .annotations dd { font-size: 13.5px; line-height: 1.3; }
  #planches .pl-fiche .planche__texte { font-size: 13.5px; line-height: 1.45; }
  #planches .pl-fiche .frise-mois__grille { height: 32px; }
  #planches .pl-fiche .lecteur__desc { font-size: 13px; line-height: 1.35; }
  #planches .pl-fiche .lecteur__credit { font-size: 11px; }
  #planches .pl-fiche .lecteur { padding-top: 10px; }
}
@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
  #planches .pl-fiche { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  #planches .pl-col--c { grid-column: 1 / -1; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  /* Le nom peut mordre sur le bas de la photo : un voile le garde lisible */
  #planches .pl-bandeau::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgb(15 14 13 / 0.45), transparent 30%); pointer-events: none; }
}
@media (max-width: 767px) {
  /* Mobile : le bandeau prend la forme de la photo, rien n'est rogné ; numéro et crédit passent sous le nom */
  #planches .pl-bandeau { flex: none; aspect-ratio: var(--r, 1.5); border-radius: 18px; }
  #planches .pl-bandeau::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgb(15 14 13 / 0.5), transparent 34%); pointer-events: none; }
  #planches .pl-flou, #planches .pl-zone { display: none; }
  #planches .pl-photo { position: absolute; inset: 0; height: auto; aspect-ratio: auto; -webkit-mask-image: none; mask-image: none; }
  #planches .pl-tete { flex-direction: column; gap: 4px; padding-left: 14px; }
  #planches .pl-sous { margin-top: 0; }
  #planches .pl-pied { display: block; margin-top: 12px; }
  #planches .pl-pied__num { margin: 0; font: 400 24px/1 var(--f-affiche); color: var(--amb-encre); }
  #planches .pl-pied__num span { font-family: var(--f-mono); font-size: 13px; }
  #planches .pl-pied__credit { margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: var(--amb-doux); }
  #planches .pl-fiche { grid-template-columns: minmax(0, 1fr); row-gap: 18px; margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  #planches .pl-rond { transition: none; }
  #planches .pl-rond:hover { transform: none; }
}
/* ------------------------------------------------------------------ Données réelles (relais eBird) */
/* Les badges "Exemple" ne servent qu'aux données d'exemple */
[data-donnees="reel"] .exemple { display: none !important; }
/* Présence notée sans comptage : un mot à la place du nombre */
.ligne__effectif .ligne__present { font-family: var(--f-texte); font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--graphite); }
.tiroir__listes { display: block; margin-top: 4px; color: var(--graphite); font-size: 14px; }
.sources__texte > div + div { margin-top: 12px; }
