/* Section /ressources/ — s'appuie sur les variables de /css/style.css */

.res-hero { padding-top: calc(var(--header-h) + 56px); padding-bottom: 32px; }
.res-crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.res-crumbs a:hover { color: var(--white); }
.res-crumbs span[aria-hidden] { opacity: 0.5; }
.res-hero h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; max-width: 860px; }
.res-meta { margin-top: 18px; font-size: 0.9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.res-meta strong { color: var(--light-silver); font-weight: 600; }

.res-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; padding-bottom: 96px; }
.res-main { min-width: 0; max-width: 760px; }

/* Reponse directe */
.res-answer { border: 1px solid var(--border); border-left: 3px solid var(--silver-light); background: var(--anthracite); padding: 22px 24px; border-radius: var(--radius-sm); margin-bottom: 32px; }
.res-answer__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.res-answer p { font-size: 1.05rem; line-height: 1.6; color: var(--white); }

/* Sommaire */
.res-toc { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px 24px; margin: 0 0 36px; }
.res-toc__title { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.res-toc ol { list-style: decimal; padding-left: 20px; color: var(--muted); }
.res-toc li { margin: 6px 0; }
.res-toc a { color: var(--light-silver); }
.res-toc a:hover { color: var(--white); text-decoration: underline; }

/* Corps */
.res-body { font-size: 1.06rem; line-height: 1.75; color: var(--light-silver); }
.res-body > * + * { margin-top: 1.15em; }
.res-body h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-top: 2.2em; scroll-margin-top: calc(var(--header-h) + 16px); }
.res-body h3 { font-size: 1.2rem; margin-top: 1.8em; }
.res-body ul, .res-body ol { padding-left: 24px; }
.res-body ul { list-style: disc; }
.res-body ol { list-style: decimal; }
.res-body li + li { margin-top: 0.45em; }
.res-body a { color: var(--white); text-decoration: underline; text-decoration-color: var(--silver-mid); text-underline-offset: 3px; }
.res-body a:hover { text-decoration-color: var(--white); }
.res-body strong { color: var(--white); font-weight: 700; }
.res-body blockquote { border-left: 3px solid var(--border); padding-left: 18px; color: var(--muted); font-style: italic; }
.res-table { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.res-body table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 480px; }
.res-body th, .res-body td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.res-body th { background: var(--anthracite); color: var(--white); font-weight: 700; }
.res-body tr:last-child td { border-bottom: none; }
.res-body figure figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }
.res-body img { height: auto; border-radius: var(--radius-sm); }
.res-video { position: relative; aspect-ratio: 16 / 9; }
.res-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius-sm); }

/* CTA : fond clair aux couleurs de la marque (dégradé argent), pour ressortir sur la page sombre */
.res-cta { background: var(--silver-gradient); border-radius: var(--radius-md); padding: 28px 26px; box-shadow: var(--shadow-md); }
.res-cta__img { width: 100%; height: auto; border-radius: var(--radius-sm); margin-bottom: 18px; }
.res-cta__title { font-size: 1.45rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; color: var(--black); margin-bottom: 10px; }
.res-cta__text { font-size: 1rem; line-height: 1.45; font-weight: 500; color: #1f1f1f; margin-bottom: 18px; }
.res-cta__btn { width: 100%; white-space: normal; text-align: center; background: var(--black); color: var(--white); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); }
.res-cta__btn:hover { transform: translateY(-2px); filter: brightness(1.25); }
.res-body .res-cta a.res-cta__btn { color: var(--white); text-decoration: none; }
.res-side { position: sticky; top: calc(var(--header-h) + 24px); }
.res-cta--inline, .res-cta--end { margin: 40px 0; }
.res-cta--inline { display: none; }
.res-cta--end .res-cta__title { font-size: 1.7rem; }
.res-cta--end .res-cta__img { max-width: 380px; }
.res-cta--end .res-cta__btn { width: auto; }

/* Image principale, mention d'affiliation, calculateurs */
.res-hero-img { margin: 0 0 28px; }
.res-hero-img img { width: 100%; height: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
.res-disclosure { font-size: 0.85rem; color: var(--muted); border-left: 2px solid var(--border); padding-left: 12px; margin-bottom: 28px; }
.res-calc { border: 1px solid var(--border); background: var(--anthracite); border-radius: var(--radius-md); padding: 24px; }
.res-calc__title { font-size: 1.15rem; font-weight: 700; color: var(--white); margin-bottom: 16px; }
.res-calc__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.res-calc label { display: block; font-size: 0.85rem; color: var(--muted); line-height: 1.35; }
.res-calc input { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; background: var(--black); color: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); font-variant-numeric: tabular-nums; }
.res-calc input:focus { outline: none; border-color: var(--silver-light); }
.res-calc__out { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 18px; }
.res-calc__out div { background: var(--black); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.res-calc__out span { display: block; font-size: 0.78rem; color: var(--muted); }
.res-calc__out strong { display: block; font-size: 1.25rem; color: var(--white); margin-top: 2px; font-variant-numeric: tabular-nums; }
.res-calc__note { font-size: 0.8rem; color: var(--muted); margin-top: 14px; }

/* FAQ, sources, signature, associes */
.res-block { margin-top: 56px; }
.res-block > h2 { font-size: 1.5rem; margin-bottom: 18px; }
.res-faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.res-faq summary { cursor: pointer; font-weight: 600; color: var(--white); }
.res-faq details p { margin-top: 10px; color: var(--light-silver); line-height: 1.65; }
.res-sources ol { list-style: decimal; padding-left: 22px; color: var(--muted); font-size: 0.92rem; }
.res-sources li { margin: 8px 0; }
.res-sources a { color: var(--light-silver); text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }
.res-sign { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.92rem; color: var(--muted); }
.res-sign strong { color: var(--white); }
.res-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }

/* Cartes (index + associes) */
.res-card { display: block; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px; background: var(--anthracite); transition: border-color 0.2s ease, transform 0.2s ease; }
.res-card:hover { border-color: var(--silver-mid); transform: translateY(-2px); }
.res-card__cat { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.res-card__title { font-size: 1.08rem; font-weight: 700; color: var(--white); margin: 8px 0; line-height: 1.3; }
.res-card__desc { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.res-index { padding-bottom: 96px; }
.res-index__lead { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin-top: 16px; }
.res-index h2 { font-size: 1.4rem; margin: 0 0 18px; }
.res-cat { padding-top: 40px; scroll-margin-top: calc(var(--header-h) + 8px); }
.res-cats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.res-cats__link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--border); border-radius: 99px; font-size: 0.9rem; font-weight: 600; color: var(--light-silver); transition: border-color 0.2s ease, color 0.2s ease; }
.res-cats__link:hover { border-color: var(--silver-light); color: var(--white); }
.res-cats__link span { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.res-empty { color: var(--muted); margin-top: 32px; }

/* Bandeau de consentement : deux choix de même importance visuelle */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200; max-width: 760px; margin: 0 auto; background: var(--anthracite); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 18px 20px; display: flex; gap: 18px; align-items: center; }
.consent[hidden] { display: none; }
.consent p { font-size: 0.88rem; line-height: 1.5; color: var(--light-silver); }
.consent__actions { display: flex; gap: 10px; flex-shrink: 0; }
.consent__btn { background: var(--silver-gradient); color: var(--black); padding: 10px 18px; font-size: 0.88rem; }

@media (max-width: 980px) {
  .consent { flex-direction: column; align-items: stretch; }
  .consent__actions .consent__btn { flex: 1; }
  .res-layout { grid-template-columns: 1fr; gap: 0; }
  /* Mobile : pas de sidebar fixe. Le CTA apparait une fois pendant la lecture, une fois en fin d'article. */
  .res-side { display: none; }
  .res-cta--inline { display: block; }
  .res-cta--end .res-cta__img { max-width: 100%; }
  .res-cta--end .res-cta__btn { width: 100%; }
  .res-hero { padding-top: calc(var(--header-h) + 32px); }
}
