/* CFS — pages métiers, conseils et lectures complémentaires. */

.detail-page main {
  --paper: #f6f2e9;
  --paper-2: #eee7d8;
  --ink: #24272c;
  --ink-soft: #4a5159;
  --ink-mute: #606972;
  --line: rgba(36, 39, 44, .13);
  --line-strong: rgba(36, 39, 44, .26);
  background: var(--paper);
}

.detail-page main .section {
  max-width: 1320px;
  padding: clamp(56px, 6vw, 88px) var(--pad);
}

.detail-page main .section-tight { padding-top: 0; }
.detail-page main [id] { scroll-margin-top: 112px; }

.detail-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 25px var(--pad) 28px;
  color: #606972;
  font-size: .82rem;
  line-height: 1.6;
}
.detail-subnav > span { color: #24272c; font-weight: 600; }
.detail-subnav a { padding: 4px 0; border-bottom: 1px solid rgba(36, 39, 44, .13); }
.detail-subnav a:hover { color: var(--red); border-color: var(--red); }
.detail-navigation { border-bottom: 1px solid rgba(36, 39, 44, .13); }

.detail-page main .section-head { max-width: 760px; margin-bottom: 36px; }
.detail-page main .section-head::before { display: none; }
.detail-page main .section-head.center { margin-left: 0; margin-right: 0; text-align: left; }
.detail-page main .section-head.split { max-width: none; gap: 40px; }
.detail-page main .section-head.split > div { max-width: 710px; }
.detail-page main .section-head.split p.note { max-width: 350px; line-height: 1.75; }
.detail-page main .section-head h2,
.detail-page main .dossier-note h2,
.detail-page main .notice h2,
.detail-faq-callout h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.3vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
}
.detail-page main .section-head h2 { margin-top: 14px; }
.detail-page main .section-head h2 + .detail-prose { margin-top: 22px; }
.detail-page main h3, .detail-page main h4 {
  font-family: var(--font-hero);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.35;
}

/* Les changements de rythme restent clairs, dans les tons papier du site. */
.detail-page main .on-dark, .detail-page main .section-tint {
  --paper: #f6f2e9;
  --paper-2: #eee7d8;
  --ink: #24272c;
  --ink-soft: #4a5159;
  --ink-mute: #606972;
  --ink-faint: #68717a;
  --line: rgba(36, 39, 44, .13);
  --line-strong: rgba(36, 39, 44, .26);
  --red: #a52a1f;
  background: var(--paper-2);
  color: #24272c;
}
.detail-page main .on-dark .eyebrow,
.detail-page main .on-dark .index-block > .idx { color: #6b6e73; }

.detail-page main .index-grid { gap: 20px; }
.detail-page main .index-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: none;
}
.detail-page main .index-block:hover { transform: none; border-color: var(--line-strong); box-shadow: none; }
.detail-page main .index-block .idx { margin-bottom: 22px; }
.detail-page main .index-block h3 { font-size: 1.15rem; margin-bottom: 12px; }
.detail-page main .index-block p { font-size: .92rem; line-height: 1.8; }
.detail-page main .index-block > .text-link { margin-top: 24px; }

/* Vigik : les pictogrammes fournis gardent la même hauteur visible. */
.vigik-service-cards .vigik-card-icon { position: relative; display: block; flex-shrink: 0; width: 40px; height: 40px; margin-bottom: 20px; }
.vigik-card-icon img { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; max-width: none; object-fit: contain; transform: translate(-50%, -50%); }
.vigik-card-icon-maintenance img { width: 44.3px; height: 44.3px; }

.detail-page main .ledger { border-top: 1px solid var(--line); }
.detail-page main .ledger-row { grid-template-columns: 46px minmax(0, 1fr); padding: 26px 0; gap: 24px; }
.detail-page main .ledger-row > :nth-child(n+3) { display: none; }
.detail-page main .ledger-row:hover { padding-left: 0; background: none; border-radius: 0; }
.detail-page main .ledger-row .idx { color: #6b6e73; font-size: 11px; align-self: start; padding-top: 6px; }
.detail-page main .ledger-row h3 { font-size: 1.15rem; }
.detail-page main .ledger-row p { max-width: 800px; line-height: 1.8; }

.detail-page main .dossier-split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.detail-page main .dossier-split .dossier-media {
  position: relative;
  top: auto;
  height: auto;
  min-height: 0;
}
.detail-page main .dossier-media {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: var(--paper);
  box-shadow: none;
  min-height: 0;
}
.detail-page main .dossier-media::after { display: none; }
.detail-page main .dossier-media img,
.detail-page main .dossier-media video {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  object-fit: cover;
}
.detail-page main .dossier-media figcaption {
  position: static;
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 13px 6px 6px;
  background: none;
  border-radius: 0;
  backdrop-filter: none;
  color: #68717a;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .06em;
}
.detail-page main .dossier-media figcaption span { color: inherit; }
.detail-page main .dossier-note h2 { margin: 15px 0 24px; }
.detail-page main .dossier-note p.lede { line-height: 1.85; }
.detail-page main .dossier-note > .detail-prose + .detail-prose { margin-top: 18px; }
.detail-page main .dossier-note > .detail-prose + .marks-list { margin-top: 24px; }
.detail-page main .marks-list li { padding: 16px 0; font-size: .96rem; }
.detail-page main .marks-list li:first-child { padding-top: 0; }
.detail-page main .marks-list li .rn { color: #a52a1f; }

.detail-page main .plate-row { gap: 22px; }
.detail-page main .plate-static { padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: none; }
.detail-page main .plate-static:hover { transform: none; box-shadow: none; border-color: var(--line-strong); }
.detail-page main .plate-static .ph { aspect-ratio: 4 / 3; border-radius: 7px; }
.detail-page main .plate-static figcaption { padding: 15px 8px 10px; line-height: 1.6; color: #68717a; font-size: 9px; letter-spacing: .05em; }
.detail-page main .plate-static .fig-title { display: block; font-family: var(--font-hero); font-size: .92rem; font-weight: 600; color: #24272c; letter-spacing: 0; text-transform: none; }

.detail-page main .img-band {
  max-width: min(calc(100% - 2 * var(--pad)), calc(1320px - 2 * var(--pad)));
  height: auto;
  min-height: 0;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: var(--paper);
  overflow: hidden;
}
.detail-page main .img-band img {
  display: block;
  position: relative;
  width: 100%;
  height: clamp(280px, 36vw, 460px);
  object-fit: cover;
  border-radius: 7px;
}
.detail-page main .img-band::after { display: none; }
.detail-page main .img-band figcaption {
  position: static;
  max-width: none;
  color: #68717a;
  background: none;
  border-radius: 0;
  backdrop-filter: none;
  padding: 13px 6px 6px;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .06em;
}
.detail-page main .img-band figcaption span { color: inherit; }

/* Laisser respirer les cadres photo avant une section colorée. */
.detail-page main .img-band + .on-dark { margin-top: clamp(48px, 6vw, 88px); }

.detail-page main .roman-steps, .detail-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.detail-page main .roman-step, .detail-steps > li, .detail-steps > div {
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
}
.detail-page main .roman-step:hover { transform: none; box-shadow: none; border-color: var(--line-strong); }
.detail-page main .roman-step .rn { font-family: var(--font-mono); font-size: .8rem; font-style: normal; color: #68717a; margin-bottom: 20px; }
.detail-page main .roman-step h3, .detail-page main .roman-step h4, .detail-steps h3 { font-size: 1rem; margin-bottom: 12px; }
.detail-page main .roman-step p, .detail-steps p { font-size: .9rem; color: #606972; line-height: 1.8; }
.detail-steps { list-style: none; margin: 0; padding: 0; }
.detail-prose { max-width: 780px; color: #4a5159; }
.detail-prose p + p { margin-top: 18px; }
.detail-prose a { color: #a52a1f; text-decoration: underline; text-underline-offset: 4px; }
.detail-prose li { margin-top: 10px; }
.detail-inline-links { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; margin-top: 26px; }
.detail-address { font-style: normal; color: #4a5159; font-size: .95rem; line-height: 1.8; }
.detail-contact-card .detail-address { margin-top: 8px; }
.detail-contact-card > p { margin-top: 16px; }
.detail-contact-card a:not(.text-link) { text-decoration: underline; text-decoration-color: rgba(36, 39, 44, .26); text-underline-offset: 4px; }

.detail-page main .figures {
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px var(--pad);
  background: var(--paper-2);
  border-top: 1px solid rgba(36, 39, 44, .13);
  border-bottom: 1px solid rgba(36, 39, 44, .13);
}
.detail-page main .figure-cell { padding: 26px 24px; border-right-color: rgba(36, 39, 44, .13); }
.detail-page main .figure-cell .num { color: #a52a1f; font-family: var(--font-display); font-size: clamp(1.6rem, 2.3vw, 2.2rem); line-height: 1.15; }
.detail-page main .figure-cell p { color: #68717a; font-size: 9px; }
.detail-page main .materials-strip { background: var(--paper-2); border-color: rgba(36, 39, 44, .13); color: #606972; }
.detail-page main .materials-strip .m { padding: 23px 16px; border-color: rgba(36, 39, 44, .13); font-size: .85rem; }

.detail-page main .notice { padding: 40px; gap: 28px; border: 1px solid rgba(36, 39, 44, .13); border-radius: 12px; background: var(--paper-2); }
.detail-page main .notice-text { max-width: 700px; }
.detail-page main .notice h2 { font-size: clamp(1.9rem, 2.7vw, 2.5rem); }
.detail-page main .notice p { max-width: 640px; font-size: .98rem; }
.detail-page main .notice-fill { display: none; }
.detail-page main .notice .stamp { margin-left: auto; }
.detail-page main .notice-section { padding-top: 0; }

/* Cette grille est aussi utilisée dans « Lectures conseillées » sur l’accueil. */
.guide-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.guide-cards.is-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.guide-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(36, 39, 44, .13);
  border-radius: 12px;
  background: #f6f2e9;
  color: #24272c;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.guide-card:hover { border-color: rgba(36, 39, 44, .26); box-shadow: 0 10px 26px rgba(36,39,44,.07); }
.guide-card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.guide-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.guide-card:hover .guide-card-media img { transform: scale(1.035); }
.guide-card-body { display: flex; flex-direction: column; flex: 1; padding: 26px; }
.guide-card-kicker {
  position: relative;
  padding-left: 36px;
  margin: 0 0 16px;
  color: #6b6e73;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.7;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.guide-card-kicker::before { content: ""; position: absolute; left: 0; top: .8em; width: 24px; height: 1px; background: #a52a1f; }
.guide-card-body h3, .detail-page main .guide-card-body h3 { font-family: var(--font-hero); font-size: 1.15rem; font-weight: 600; line-height: 1.35; letter-spacing: -.015em; margin: 0 0 12px; }
.guide-card-body > p:not(.guide-card-kicker) { color: #606972; font-size: .9rem; line-height: 1.8; margin: 0 0 26px; }
.guide-card-link { display: flex; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(36, 39, 44, .13); color: #a52a1f; font-family: var(--font-hero); font-size: .82rem; font-weight: 600; }
.guide-card-link > span { font-size: 1.1rem; line-height: 1; }

.detail-context-links { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-bottom: 32px; }
.detail-faq-callout { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-top: 32px; padding: 32px 36px; border: 1px solid rgba(36, 39, 44, .13); border-radius: 12px; background: var(--paper-2); }
.detail-faq-callout > div { max-width: 730px; }
.detail-faq-callout h2 { margin: 12px 0 10px; font-size: clamp(1.8rem, 2.5vw, 2.3rem); }
.detail-faq-callout p:not(.eyebrow) { color: #606972; font-size: .92rem; line-height: 1.8; }
.detail-faq-callout > a { flex-shrink: 0; }
.detail-page main .detail-faq-section { padding-top: 0; }
.detail-faq-section .detail-faq-callout { margin-top: 0; }

.guide-card:focus-visible, .detail-subnav a:focus-visible { outline: 2px solid #a52a1f; outline-offset: 5px; }

@media (max-width: 1100px) {
  .detail-page main .index-grid { gap: 16px; }
  .detail-page main .index-block { padding: 24px; }
  .detail-page main .roman-steps, .detail-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-page main .plate-row[style*="--plate-columns:4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-card-body { padding: 22px; }
}

@media (max-width: 900px) {
  .detail-page main .dossier-split, .detail-page main .dossier-split.reverse { grid-template-columns: minmax(0, 1fr); direction: ltr; }
  .detail-page main .dossier-media { max-width: 760px; }
  .detail-page main .section-head.split { flex-direction: column; align-items: flex-start; gap: 22px; }
  .detail-page main .section-head.split p.note { max-width: 640px; }
  .detail-page main .index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-page main .index-grid:not([style]) > .index-block:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .guide-cards { gap: 18px; }
  .guide-card-body { padding: 20px; }
  .guide-card-body h3, .detail-page main .guide-card-body h3 { font-size: 1rem; }
  .guide-card-kicker { font-size: 8px; letter-spacing: .07em; padding-left: 32px; }
  .detail-faq-callout { align-items: flex-start; flex-direction: column; gap: 22px; }
}

@media (max-width: 640px) {
  .detail-subnav { gap: 10px 18px; padding-top: 22px; padding-bottom: 18px; }
  .detail-subnav > span { flex-basis: 100%; }
  .detail-page main .section { padding-top: 48px; padding-bottom: 48px; }
  .detail-page main .section-head { margin-bottom: 28px; }
  .detail-page main .index-grid, .detail-page main .plate-row, .detail-page main .plate-row[style*="--plate-columns:4"], .detail-page main .roman-steps, .detail-steps, .guide-cards, .guide-cards.is-pair { grid-template-columns: minmax(0, 1fr); }
  .detail-page main .index-block { padding: 26px; }
  .detail-page main .index-grid > .index-block { grid-column: auto; }
  .detail-page main .ledger-row { grid-template-columns: 26px minmax(0, 1fr); gap: 14px; padding: 22px 0; }
  .detail-page main .dossier-media img, .detail-page main .dossier-media video { aspect-ratio: 4 / 3; }
  .detail-page main .img-band { max-width: calc(100% - 2 * var(--pad)); }
  .detail-page main .img-band img { height: auto; aspect-ratio: 4 / 3; }
  .detail-page main .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px var(--pad); }
  .detail-page main .figure-cell { padding: 22px 14px; border-right: 0; }
  .detail-page main .figure-cell:nth-child(odd) { border-right: 1px solid rgba(36, 39, 44, .13); }
  .detail-page main .figure-cell:nth-child(-n+2) { border-bottom: 1px solid rgba(36, 39, 44, .13); }
  .detail-page main .materials-strip { flex-wrap: wrap; }
  .detail-page main .materials-strip .m { flex: 1 1 33%; }
  .detail-page main .notice { padding: 28px; }
  .detail-page main .notice .stamp { margin-left: 0; white-space: normal; }
  .detail-page main .notice-section { padding-top: 0; }
  .guide-card-media { aspect-ratio: 16 / 9; }
  .guide-card-body { padding: 26px; }
  .guide-card-body h3, .detail-page main .guide-card-body h3 { font-size: 1.15rem; }
  .guide-card-kicker { font-size: 9px; letter-spacing: .11em; }
  .detail-faq-callout { padding: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .guide-card, .guide-card-media img { transition: none; }
}
