/* Pages intérieures : s'appuient sur base.css. Chaque h2 ouvre un bloc : titre à gauche, contenu à droite. */
.tete { position: relative; min-height: 72svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.tete-image { position: absolute; inset: 0; }
.tete-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,25,29,0.62) 0%, rgba(26,25,29,0.5) 40%, rgba(26,25,29,0.95) 100%); }
.tete-texte { position: relative; width: var(--cadre); margin-inline: auto; padding: 9rem 0 var(--e7); }
.tete h1 { max-width: 18ch; margin-bottom: var(--e5); }
.fil { font-size: 0.98rem; color: rgba(255,255,255,0.7); margin-bottom: var(--e6); }
.fil a { color: inherit; }
.maj { font-size: 1rem; color: rgba(255,255,255,0.7); margin: 0; display: flex; align-items: center; gap: var(--e3); }
.maj::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--orange); flex: none; }

.page { padding: var(--section) 0; }
.page p, .page li { font-size: 1.125rem; line-height: 1.6; }
.page li { margin-bottom: var(--e2); }
.page a:not(.bouton):not(.lien) { color: var(--lecture); text-underline-offset: 0.18em; }
.page strong { font-weight: 700; }

.intro { row-gap: var(--e6); padding-bottom: var(--section); }
.intro-texte { grid-column: 1 / span 7; }
.reponse p { font-size: var(--h4); line-height: 1.3; letter-spacing: -0.015em; }
.reponse p + p { color: var(--gris); }
.intro-texte > p { max-width: 40rem; color: var(--gris); }
.cote { grid-column: 9 / span 4; align-self: start; border-top: 1px solid var(--noir); padding-top: var(--e5); display: flex; flex-direction: column; align-items: flex-start; gap: var(--e4); }
.cote.sombre { border: 0; border-radius: var(--rayon-g); padding: var(--e6); }
.cote p { margin: 0; }
.cote-grand { font-size: var(--h4) !important; line-height: 1.25 !important; letter-spacing: -0.015em; }
.cote-prix { font-size: var(--h2) !important; line-height: 1 !important; letter-spacing: -0.03em; color: var(--orange); }
.cote.sombre p:not(.cote-prix):not(.sur-titre) { color: rgba(255,255,255,0.75); font-size: 1rem; }
.sommaire { list-style: none; margin: 0; padding: 0; counter-reset: s; width: 100%; }
.sommaire li { counter-increment: s; margin: 0; border-bottom: 1px solid var(--pierre); font-size: 1rem !important; }
.sommaire a { display: grid; grid-template-columns: 2rem 1fr; padding: var(--e3) 0; text-decoration: none; color: var(--noir) !important; }
.sommaire a::before { content: counter(s, decimal-leading-zero); color: var(--gris); font-variant-numeric: tabular-nums; }
.sommaire a:hover { color: var(--lecture) !important; }

.bloc { padding: var(--e8) 0; border-top: 1px solid var(--pierre); row-gap: var(--e6); }
.bloc > h2 { grid-column: 1 / span 4; font-size: var(--h3); align-self: start; position: sticky; top: 6rem; }
.bloc-corps { grid-column: 6 / span 7; }
.bloc.large > h2 { grid-column: 1 / span 8; position: static; }
.bloc.large > .bloc-corps { grid-column: 1 / -1; }
.bloc.large > .bloc-corps > p, .bloc.large > .bloc-corps > ul, .bloc.large > .bloc-corps > ol:not(.reglet) { max-width: 44rem; }
.bloc-corps > :first-child { margin-top: 0; }
.bloc-corps h3 { font-size: var(--h4); margin: var(--e6) 0 var(--e3); }
.bloc-corps > h3:first-child { margin-top: 0; }
.bloc.encadre { border: 0; border-radius: var(--rayon-g); padding: clamp(2rem, 5vw, 4rem); margin: var(--e6) calc(clamp(2rem, 5vw, 4rem) * -0.4); }
.bloc.encadre p { color: rgba(255,255,255,0.8); }
.bloc.encadre + .bloc { border-top: 0; }

/* Le réglet des dates */
.reglet { list-style: none; margin: var(--e6) 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 2px solid var(--noir);
  background: repeating-linear-gradient(to right, var(--noir) 0 1px, transparent 1px 12px) top / 100% 9px no-repeat; }
.reglet li { padding: var(--e5) var(--e4) 0 0; position: relative; font-size: 1rem !important; line-height: 1.4 !important; color: var(--gris); margin: 0; }
.reglet li::before { content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 1.1rem; background: var(--noir); }
.reglet .jour { display: block; font-size: var(--h4); color: var(--noir); letter-spacing: -0.015em; margin-bottom: var(--e2); }
.reglet .repere-fort::before { background: var(--orange); width: 10px; height: 1.5rem; }
.reglet .repere-fort .jour { font-size: var(--h3); color: var(--lecture); }

/* Tableaux */
.tableau { overflow-x: auto; margin: var(--e5) 0 var(--e6); }
.tableau.large { background: linear-gradient(to left, rgba(24,22,26,0.08), transparent 2rem) right / 2rem 100% no-repeat local, none; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; line-height: 1.45; }
caption { text-align: left; color: var(--gris); padding-bottom: var(--e3); font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: var(--e4) var(--e5) var(--e4) 0; border-bottom: 1px solid var(--pierre); font-weight: 400; }
thead th { font-weight: 500; color: var(--gris); border-bottom: 2px solid var(--noir); font-size: 0.95rem; }
tbody th { font-weight: 500; font-size: 1.1rem; min-width: 10rem; }
.large table { min-width: 62rem; }

/* Trois formules */
.voies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gout); }
.voies > div { border: 1px solid var(--pierre); border-radius: var(--rayon); padding: var(--e6) var(--e5) var(--e7); display: flex; flex-direction: column; align-items: flex-start; }
.voies .voie-forte { background: var(--nuit); color: #fff; border-color: var(--nuit); }
.voies h3 { font-size: 1.05rem; font-weight: 500; letter-spacing: 0; margin: 0 0 var(--e7); }
.voies .prix { font-size: var(--h4) !important; line-height: 1.1 !important; letter-spacing: -0.02em; margin-bottom: var(--e5); }
.voie-forte .prix { font-size: var(--h3) !important; color: var(--orange); }
.voies p:not(.prix) { color: var(--gris); font-size: 1.02rem; }
.voie-forte p:not(.prix) { color: rgba(255,255,255,0.75); }
.voie-forte .bouton:hover { color: var(--orange); border-color: var(--orange); }

/* Métiers du collectif */
.metiers { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gout); counter-reset: m; }
.metiers li { counter-increment: m; background: var(--pale); border-radius: var(--rayon); padding: var(--e6) var(--e5); margin: 0; }
.metiers li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.metiers li::before { content: counter(m, decimal-leading-zero); color: var(--lecture); font-size: 1rem; }
.metiers h3 { font-size: var(--h4); margin: var(--e3) 0; }
.metiers p { font-size: 1.05rem; margin-bottom: var(--e2); }
.quand { font-size: 0.98rem !important; color: var(--gris); }
.quand span { font-weight: 500; color: var(--noir); }

/* Démonstration */
.essai { margin: 0 0 var(--e4); border-radius: var(--rayon-g); overflow: hidden; border: 1px solid var(--pierre); background: #fff; }
.essai iframe { display: block; width: 100%; height: 47rem; border: 0; }

.sources li { overflow-wrap: anywhere; font-size: 1rem; }
.page .bloc details { border-top: 1px solid var(--pierre); }
.page .bloc summary { cursor: pointer; padding: var(--e4) 0; font-size: var(--h4); }

@media (max-width: 900px) {
  .intro-texte, .cote, .bloc > h2, .bloc-corps, .bloc.large > h2 { grid-column: 1 / -1; }
  .bloc > h2 { position: static; }
  .voies, .metiers { grid-template-columns: 1fr; }
  .tete { min-height: 60svh; }
  .bloc.encadre { margin-inline: 0; }
  .reglet { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--noir); background: none; }
  .reglet li { padding: 0 0 var(--e5) var(--e5); }
  .reglet li::before { width: 1.1rem; height: 2px; top: 0.9rem; }
  .reglet .repere-fort::before { width: 1.5rem; height: 10px; top: 0.9rem; }
}
