/* Visuels de l'en-tête (version 2) : les deux photos de l'accueil, la fiche d'identité, le plan de situation de la
   côte vendéenne. Les photos d'une fiche prennent la brique photo-tete (site.css). */

/* ---- accueil : l'après en grand, l'avant en vignette posée sur son angle ---- */
.duo-photos { margin: 0 0 0 auto; max-width: 640px; }
.duo-photos__scene { position: relative; isolation: isolate; padding: 0 0 20% 9%; }
.duo-photos__apres, .duo-photos__avant { position: relative; overflow: hidden; border-radius: var(--k-rayon-grand); background: var(--k-piste); }
.duo-photos__apres { box-shadow: var(--k-ombre-forte); aspect-ratio: 4 / 3; }
.duo-photos__avant { position: absolute; left: 0; bottom: 0; width: 46%; aspect-ratio: 4 / 3; border: 6px solid var(--k-fond);
  border-radius: 22px; box-shadow: var(--k-ombre-forte); transform: rotate(-3deg); }
.duo-photos__img { width: 100%; height: 100%; object-fit: cover; }
.duo-photos__pastille { position: absolute; right: 14px; top: 14px; padding: 6px 14px; border-radius: var(--k-rayon-bouton); font-size: var(--k-mini);
  font-weight: 650; background: var(--k-fond); color: var(--k-encre); box-shadow: var(--k-ombre); }
.duo-photos__pastille--apres { background: var(--k-vert-texte); color: var(--k-sur-accent); }
.duo-photos__avant .duo-photos__pastille { right: auto; left: 10px; top: 10px; }
.duo-photos__scene::before { content: ""; position: absolute; z-index: -1; right: -16px; top: -16px; width: 42%; height: 46%; border-radius: var(--k-rayon-grand);
  background: var(--k-soleil); }
.duo-photos__legende { margin-top: 10px; padding-left: 50%; font-size: var(--k-petit); color: var(--k-encre-2); }
.duo-photos__legende a { color: var(--k-accent-texte); font-weight: 600; white-space: nowrap; text-underline-offset: 3px; }
@media (max-width: 1023px) {
  .duo-photos { max-width: none; margin: 0; }
  .duo-photos__scene { padding: 0 0 24% 5%; }
  .duo-photos__scene::before { right: -8px; top: -8px; }
  .duo-photos__legende { padding-left: 0; }
}
@media (max-width: 640px) {
  .duo-photos__avant { width: 50%; border-width: 4px; border-radius: 16px; }
  .duo-photos__pastille { right: 10px; top: 10px; padding: 4px 10px; }
}

/* ---- mentions légales : la société en fiche ---- */
.identite { margin: 0; padding: clamp(24px, 3vw, 36px); border-radius: var(--k-rayon-grand); background: var(--k-fond); border: 1px solid var(--k-filet);
  box-shadow: var(--k-ombre-forte); }
.identite__tete { display: flex; align-items: center; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--k-filet); }
.identite__logo { display: grid; place-items: center; flex: none; width: 72px; height: 72px; border-radius: 18px; background: var(--k-accent-doux); }
.identite__logo svg { width: 48px; height: 16px; fill: none; stroke: var(--k-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.identite__nom { font-family: var(--k-police-titres); font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.identite__forme { color: var(--k-encre-2); font-size: var(--k-petit); }
.identite__faits { margin: 0; display: grid; gap: 0; }
.identite__fait { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--k-filet); }
.identite__fait dt { color: var(--k-encre-2); font-size: var(--k-petit); }
.identite__fait dd { margin: 0; font-weight: 600; }
.identite__source { margin-top: 14px; font-size: var(--k-mini); color: var(--k-encre-2); }
.identite__source a { color: var(--k-accent-texte); }

/* ---- plan de situation d'une côte (Vendée) : océan, terre, repères nommés, échelle, nord ---- */
.plan { margin: 0; max-width: 560px; margin-left: auto; }
.plan__cadre { position: relative; overflow: hidden; border-radius: var(--k-rayon-grand); box-shadow: var(--k-ombre-forte); background: var(--k-fond-3);
  font-size: var(--k-mini); line-height: 1.2; }
.plan__dessin { position: absolute; inset: 0; width: 100%; height: 100%; }
.plan__ocean { fill: var(--k-accent-doux); }
.plan__terre { fill: var(--k-fond-2); stroke: var(--k-accent); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.plan__lieux { margin: 0; padding: 0; list-style: none; }
.plan__lieu { position: absolute; left: var(--x); top: var(--y); display: flex; align-items: center; gap: 6px; transform: translate(-6px, -50%);
  white-space: nowrap; color: var(--k-encre-2); }
.plan__lieu--ouest { flex-direction: row-reverse; transform: translate(calc(-100% + 6px), -50%); }
.plan__point { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--k-fond); border: 2px solid var(--k-encre-2); }
.plan__nom { padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.82); }
.plan__lieu--operation { color: var(--k-encre); font-weight: 700; }
.plan__lieu--operation .plan__point { width: 18px; height: 18px; margin: 0 -3px; border: 0; background: var(--k-corail-texte);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95), 0 0 0 7px rgba(240, 96, 58, 0.25); }
.plan__lieu--operation .plan__nom { background: var(--k-fond); box-shadow: var(--k-ombre); }
.plan__mer { position: absolute; left: var(--x); top: var(--y); color: var(--k-accent-texte); font-style: italic; opacity: 0.85; }
.plan__nord { position: absolute; right: 14px; top: 12px; display: grid; justify-items: center; font-weight: 700; color: var(--k-encre); }
.plan__nord svg { width: 14px; height: 20px; fill: var(--k-encre); }
.plan__sud { position: absolute; right: 10px; bottom: 8px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.82); color: var(--k-encre-2); }
/* la barre mesure 5 km : sa largeur est la part du cadre que couvrent 5 km (calculée par generateur/tete.py) */
.plan__echelle { position: absolute; left: 14px; bottom: 10px; width: var(--l); display: grid; gap: 3px; font-weight: 600; color: var(--k-encre);
  white-space: nowrap; }
.plan__barre { display: block; width: 100%; height: 7px; border: 2px solid var(--k-encre); border-top: 0; }
@media (max-width: 1023px) { .plan { max-width: none; margin-left: 0; } }

/* ---- chiffre de la tête d'une page clé (generateur/pieces.py) : un nombre compté, son libellé, ses noms ---- */
.tete-chiffre { display: flex; align-items: center; gap: 14px; margin-top: var(--k-pas-3); padding: 14px 20px 14px 16px; max-width: max-content;
  border-radius: 20px; background: var(--k-fond); border: 1px solid var(--k-filet); box-shadow: var(--k-ombre); }
.tete-chiffre__nombre { display: grid; place-items: center; flex: none; min-width: 58px; height: 58px; padding: 0 10px; border-radius: 16px;
  background: var(--k-accent); color: var(--k-sur-accent); font-family: var(--k-police-titres); font-size: 2.1rem; font-weight: 800;
  font-stretch: var(--k-serre); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
  box-shadow: 0 10px 24px -12px rgba(43, 89, 255, 0.8); }
.tete-chiffre__mot { display: grid; gap: 2px; font-weight: 650; line-height: 1.3; color: var(--k-encre); }
.tete-chiffre__detail { font-size: var(--k-petit); font-weight: 400; color: var(--k-encre-2); }
.actions + .tete-chiffre { margin-top: var(--k-pas-3); }
@media (max-width: 640px) {
  .tete-chiffre { padding: 10px 14px 10px 10px; gap: 12px; }
  .tete-chiffre__nombre { min-width: 48px; height: 48px; font-size: 1.75rem; border-radius: 13px; }
  .tete-chiffre__mot { font-size: 0.95rem; }
  .tete-chiffre__detail { font-size: 0.875rem; }
}
/* le plan de la côte vendéenne, haut et étroit, se borne à la hauteur du texte d'en face (N20) */
@media (min-width: 1024px) { .tete__visuel .plan { max-width: min(440px, 100%); } }
/* portrait d'en-tête de 1 024 à 1 439 pixels : cadré au carré, à la hauteur du texte d'en face ; en 4/5 il laissait
   sous le texte une bande vide de près de 300 pixels (N20) */
@media (min-width: 1024px) and (max-width: 1439px) {
  .tete__visuel .photo-tete--portrait { max-width: 400px; }
  .tete__visuel .photo-tete--portrait .photo-tete__cadre { aspect-ratio: 1 / 1; }
  .tete__visuel .photo-tete--portrait .photo-tete__cadre img { object-position: 50% 25%; }
}

/* Chiffres de l'opération sur une fiche (contrôle du 5/11, O-4) : quatre cases sur le même gabarit. */
.fiche-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 12px; margin: var(--k-pas-3, 24px) 0; }
.fiche-chiffres__case { padding: 12px 16px; border-radius: 14px; background: var(--k-fond-doux, #f4f6fb); }
.fiche-chiffres__case dt { font-size: 0.875rem; font-weight: 650; }
.fiche-chiffres__case dd { margin: 4px 0 0; font-size: 1.5rem; font-weight: 750; }
.fiche-chiffres__case--attente { outline: 2px dashed currentColor; }
