/* Inner pages: species fiches, definition lists and tables, on the tokens of site.css. */

.texte section { scroll-margin-top: calc(var(--barre-h) + 1rem); }
.texte .note { margin: 0 0 2rem; }
.texte code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .92em; color: var(--creme); }
.texte .bouton { margin-top: 1.5rem; color: var(--encre-sur-orange); }
.texte p:has(> .bouton:only-child) { margin-top: 3rem; }

/* Species fiche: name with the shared stylised pictogram, then a ruled list of facts. */
.fiche h2 { display: flex; align-items: center; gap: .75rem; }
.fiche h2 svg { flex: none; width: 2.1rem; height: 2.1rem; color: var(--ocre); }
.fiche-taxon { margin-top: -.4rem; font-size: var(--t-petit); }

.fiche-donnees, .sources { margin: 1.25rem 0 1.25rem; border-top: 1px solid var(--filet-doux); }
.fiche-donnees div, .sources div {
  display: grid; grid-template-columns: minmax(9rem, 13rem) 1fr; gap: .25rem 1.5rem;
  padding: .7rem 0; border-bottom: 1px solid var(--filet-doux);
}
.fiche-donnees dt, .sources dt { font-weight: 650; color: var(--creme); }
.fiche-donnees dd, .sources dd { margin: 0; }

/* Tables: thin rules, figures aligned, horizontal scroll inside the frame only. */
.tableau { overflow-x: auto; margin: 1.25rem 0 1.5rem; }
.texte table { width: 100%; border-collapse: collapse; font-size: .95rem; color: var(--creme-doux); }
.texte caption { text-align: left; font-size: var(--t-petit); padding-bottom: .6rem; color: var(--ocre); }
.texte th, .texte td { text-align: left; vertical-align: top; padding: .6rem .9rem .6rem 0; border-bottom: 1px solid var(--filet-doux); }
.texte thead th { font-weight: 650; font-size: var(--t-petit); color: var(--ocre); border-bottom-color: var(--filet); }
.texte tbody th { font-weight: 600; color: var(--creme); }
.texte td.num, .texte th.num { text-align: right; white-space: nowrap; }

@media (max-width: 560px) {
  .fiche-donnees div, .sources div { grid-template-columns: 1fr; }
}

/* ---- Massifs page: sticky Alps map beside the massifs ---- */
.page-large { max-width: 92rem; }
.massifs-page { display: grid; grid-template-columns: minmax(18rem, 32rem) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.massifs-carte { margin: 0; position: sticky; top: calc(var(--barre-h) + 1.5rem); }
.massifs-carte figcaption p { margin-top: .75rem; font-size: var(--t-petit); color: var(--creme-doux); }
.massifs-texte-page { max-width: 44rem; }
.massif-bloc { scroll-margin-top: calc(var(--barre-h) + 1rem); padding-top: .5rem; margin-bottom: 3rem; }
.massif-bloc + .massif-bloc { border-top: 1px solid var(--filet-doux); padding-top: 2rem; }
.massif-cretes { display: block; width: 100%; height: clamp(5.5rem, 9vw, 8rem); }
.massif-entete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin: .9rem 0 1rem; }
.texte .massif-entete h2 { margin: 0; font-size: clamp(2rem, 1.6rem + 1.6vw, 3rem); font-stretch: 80%; }
.texte .massif-entete .massif-alt { margin: 0; color: var(--ocre); }
.massifs-grille { list-style: none; padding: 0; margin: 1.25rem 0 2.5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 1.5rem 1.25rem; }
.texte .massifs-grille li { margin: 0; scroll-margin-top: calc(var(--barre-h) + 1rem); }
.massif-vignette img { display: block; width: 100%; height: 3.6rem; border-bottom: 1px solid var(--filet-doux); }
.texte .massif-vignette h3 { margin: .55rem 0 .1rem; font-size: 1.05rem; font-stretch: 88%; }
.texte .massif-vignette p { margin: 0; font-size: .82rem; color: var(--ocre); }
.massifs-grille-ensuite .massif-vignette { opacity: .72; }

@media (max-width: 960px) {
  .massifs-page { grid-template-columns: 1fr; }
  .massifs-carte { position: static; max-width: 30rem; }
}

/* ---- Method page: map layers, weight bars, slope cross-section ---- */
.texte .h2-picto { display: flex; align-items: center; gap: .8rem; }
.texte .h2-picto .picto { width: 3.4rem; height: 3.4rem; flex: none; }
.couches, .poids, .coupe { margin: 2rem 0 2.25rem; }
.couches ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.texte .couches li { margin: 0; }
.couches img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; border: 1px solid var(--filet); }
.couches span { display: block; margin-top: .6rem; font-size: .9rem; line-height: 1.4; }
.couches b, .poids figcaption { color: var(--creme); font-weight: 700; }
.couches figcaption, .coupe figcaption { margin-top: .9rem; font-size: var(--t-petit); color: var(--creme-doux); }
.poids figcaption { margin-bottom: 1rem; font-size: 1rem; }
.poids ul { list-style: none; padding: 0; margin: 0; }
.texte .poids li { display: grid; grid-template-columns: minmax(10rem, 15rem) 1fr 3.5rem; align-items: center; gap: 1rem; margin: 0; padding: .5rem 0; border-bottom: 1px solid var(--filet-doux); }
.poids-nom { font-size: .95rem; color: var(--creme); }
.poids-piste { height: .75rem; }
.poids-barre { display: block; height: 100%; background: var(--ocre); border-radius: 0 4px 4px 0; transition: background-color .2s var(--sortie); }
.poids li:hover .poids-barre { background: var(--creme); }
.poids-val { text-align: right; font-weight: 700; color: var(--creme); }
.details-tableau { margin: 0 0 2rem; }
.details-tableau summary { cursor: pointer; font-weight: 650; color: var(--creme); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: .22em; }
.coupe svg { display: block; width: 100%; height: auto; border: 1px solid var(--filet); }

@media (max-width: 640px) {
  .couches ul { grid-template-columns: 1fr; }
  .texte .poids li { grid-template-columns: 1fr 3rem; }
  .poids-piste { grid-column: 1 / -1; grid-row: 2; }
}

/* ---- Photographs: wide milieu photo under the page header, species photo beside each fiche ---- */
.photo-milieu { margin: 0 0 clamp(2.5rem, 5vw, 4rem); max-width: 74rem; }
.photo-milieu img, .fiche-image img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid var(--filet); background: var(--humus-clair); }
.photo-milieu img { aspect-ratio: 21 / 9; }
.photo-milieu figcaption, .fiche-image figcaption { margin-top: .5rem; font-size: .78rem; color: var(--creme-doux); }
.photo-milieu figcaption a, .fiche-image figcaption a { text-decoration-color: var(--filet); }

.texte-especes { max-width: none; }
.texte-especes > .note { max-width: 46rem; }
.texte-especes .calendrier { margin: 1rem 0 clamp(3rem, 6vw, 5rem); max-width: 62rem; }
.fiche { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; padding: clamp(2rem, 4vw, 3.5rem) 0; border-top: 1px solid var(--filet); scroll-margin-top: calc(var(--barre-h) + 1rem); }
.fiche-image { margin: 0; position: sticky; top: calc(var(--barre-h) + 1.5rem); }
.fiche-texte { max-width: 40rem; }
.texte .fiche h2 { margin-top: 0; font-size: clamp(2rem, 1.6rem + 1.6vw, 3rem); font-stretch: 80%; }
.texte-especes > h2 { max-width: 46rem; }
.texte-especes > p { max-width: 46rem; }

@media (max-width: 900px) {
  .fiche { grid-template-columns: 1fr; }
  .fiche-image { position: static; }
}

/* ---- Round two review: margin figures, tighter method banner ---- */
.photo-fine img { aspect-ratio: 3 / 1; object-position: 50% 90%; }
.figure-marge { margin: 0 0 1.5rem; }
.figure-marge img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--filet); }
.figure-marge figcaption { margin-top: .5rem; font-size: .78rem; color: var(--creme-doux); }
.figure-marge figcaption a { text-decoration-color: var(--filet); }
@media (min-width: 1180px) {
  .figure-marge, .couches { float: right; clear: right; width: 22rem; margin: .4rem -25rem 1.75rem 2rem; }
  .couches ul { grid-template-columns: 1fr; gap: 1.25rem; }
  .couches img { aspect-ratio: 16 / 10; }
}
