/* Guides et À propos : lecture longue, cartes, figures */
.guides-hero { max-width: 760px; margin: 0 auto 8px; text-align: center; }
.guides-hero h1 { font-size: clamp(34px, 5vw, 54px); }

.guide-chip { display: inline-block; padding: 6px 12px; color: var(--cat-fg, var(--on-primary-container)); background: var(--cat-bg, var(--primary-container)); border-radius: var(--radius-full); font-size: 12px; font-weight: 700; text-decoration: none; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 18px; }
.guide-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 14px 14px 20px; background: var(--surface-container); border-radius: var(--radius-lg); text-decoration: none; transition: background .2s ease, transform .2s ease; }
.guide-card:hover, .guide-card:focus-visible { background: var(--surface-high); transform: translateY(-3px); }
.guide-card img { width: 100%; height: auto; border-radius: var(--radius-md); background: var(--surface); }
.guide-card strong { padding: 0 6px; font-size: 18px; line-height: 1.25; letter-spacing: -.02em; }
.guide-card-lead { padding: 0 6px; color: var(--on-surface-variant); font-size: 14px; line-height: 1.5; }
.guide-card .guide-chip { margin: 4px 0 0 6px; }

.guide { max-width: 760px; margin: 0 auto; }
.guide-header { margin-bottom: 24px; }
.guide h1 { margin: 14px 0 12px; font-size: clamp(32px, 5vw, 48px); line-height: 1.08; letter-spacing: -.04em; }
.guide-lead { margin: 0 0 12px; color: var(--on-surface-variant); font-size: 19px; line-height: 1.55; }
.guide-meta { margin: 0; color: var(--on-surface-variant); font-size: 13px; }
.guide-cover { display: block; width: 100%; height: auto; margin: 0 0 24px; background: var(--surface-container); border-radius: var(--radius-lg); }
.guide-toc { margin: 0 0 32px; padding: 18px 22px; background: var(--surface-container); border-radius: var(--radius-md); }
.guide-toc ol { display: grid; gap: 6px; margin: 10px 0 0; padding-left: 20px; }
.guide-toc a { color: var(--on-surface); text-decoration: none; }
.guide-toc a:hover, .guide-toc a:focus-visible { color: var(--primary); text-decoration: underline; }

.guide-body { font-size: 18px; line-height: 1.75; }
.guide-body h2 { margin: 44px 0 12px; font-size: clamp(24px, 3.2vw, 32px); line-height: 1.2; letter-spacing: -.03em; scroll-margin-top: 20px; }
.guide-body h3 { margin: 30px 0 8px; font-size: 21px; letter-spacing: -.02em; scroll-margin-top: 20px; }
.guide-body a { color: var(--primary); text-underline-offset: 3px; }
.guide-body ul, .guide-body ol { display: grid; gap: 8px; padding-left: 24px; }
.guide-body blockquote { margin: 24px 0; padding: 4px 0 4px 18px; color: var(--on-surface-variant); border-left: 4px solid var(--accent); }
.guide-body table { display: block; width: 100%; margin: 22px 0; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.guide-body th, .guide-body td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--outline-variant); }
.guide-body th { background: var(--surface-container); }
.guide-body img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.guide-body figure { margin: 30px 0; }
.guide-body figcaption { margin-top: 10px; color: var(--on-surface-variant); font-size: 14px; }
.guide-figure { padding: 18px; background: var(--surface-container); border-radius: var(--radius-lg); }
.guide-figure svg { display: block; width: 100%; height: auto; color: var(--on-surface); }

.guide-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 44px 0 0; padding: 22px 24px; background: var(--surface-container); border: 1px solid var(--outline-variant); border-radius: var(--radius-lg); }
.guide-cta strong { font-size: 20px; letter-spacing: -.02em; }
.guide-cta p { margin: 4px 0 0; color: var(--on-surface-variant); }
.guide-cta .filled-button { text-decoration: none; }
.guide-sources { margin-top: 44px; }
.guide-sources h2 { margin: 0 0 14px; font-size: clamp(24px, 3.2vw, 32px); letter-spacing: -.03em; }
.guide-sources ol { margin: 0; padding-left: 1.4em; line-height: 1.6; }
.guide-sources li { margin-bottom: 6px; overflow-wrap: anywhere; }
.guide-faq { margin-top: 44px; }
.guide-faq h2 { margin: 0 0 14px; font-size: clamp(24px, 3.2vw, 32px); letter-spacing: -.03em; }
.guide-related { max-width: 1000px; margin: 56px auto 0; }
.guide-links { display: grid; gap: 10px; padding: 0; list-style: none; }
.guide-links a { display: block; padding: 14px 18px; background: var(--surface-container); border-radius: var(--radius-md); font-weight: 650; text-decoration: none; }
.guide-links a:hover, .guide-links a:focus-visible { background: var(--surface-high); }

/* ===== Page Guides : en-tête de magazine, à la une, rubriques ===== */
.guides-masthead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--outline-variant); }
.guides-masthead-copy { max-width: 680px; }
.guides-masthead h1 { margin: 0 0 12px; font-size: clamp(36px, 5vw, 56px); }
.guides-masthead .hero-copy { margin: 0; max-width: none; text-wrap: pretty; }
.guide-filter { align-self: flex-end; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--outline-variant); }
.section-head h2 { margin: 0; font-family: var(--font-display); font-size: clamp(24px, 3vw, 30px); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.section-head span, .section-head a { color: var(--on-surface-variant); font-size: 14px; font-weight: 600; }
.section-head a { color: var(--primary); text-decoration: none; }
.section-head a:hover { text-decoration: underline; }
.guide-group { margin-bottom: 56px; }
.guide-group[hidden] { display: none; }
.guides-featured { margin-bottom: 56px; }
.featured-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: stretch; }
.featured-lead { display: flex; flex-direction: column; overflow: hidden; color: var(--on-surface); background: var(--surface-container); border: 1px solid var(--outline-variant); border-radius: var(--radius-lg); text-decoration: none; transition: border-color .2s ease; }
.featured-lead img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--outline-variant); background: var(--surface-high); }
.featured-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 12px; padding: clamp(20px, 3vw, 32px); }
.featured-body h3 { margin: 0; font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.025em; line-height: 1.12; text-wrap: balance; }
.featured-body p { margin: 0; color: var(--on-surface-variant); line-height: 1.55; text-wrap: pretty; }
.featured-picks { display: grid; gap: 16px; }
.featured-pick { display: flex; align-items: center; gap: 16px; padding: 14px; color: var(--on-surface); background: var(--surface-container); border: 1px solid var(--outline-variant); border-radius: var(--radius-md); text-decoration: none; transition: border-color .2s ease; }
.featured-pick img { flex: none; width: 150px; height: 79px; object-fit: cover; border: 1px solid var(--outline-variant); border-radius: var(--radius-sm); }
.featured-pick h3 { margin: 4px 0 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.featured-lead:hover, .featured-lead:focus-visible, .featured-pick:hover, .featured-pick:focus-visible { border-color: var(--on-surface); }
.featured-lead:hover h3, .featured-pick:hover h3 { color: var(--primary); }
.tile-cat { display: block; color: var(--primary); font-size: 13px; font-weight: 600; }
[data-cat="pdf"] > .tile-cat, [data-cat="pdf"] .tile-cat { color: var(--secondary); }
[data-cat="retouche"] > .tile-cat, [data-cat="retouche"] .tile-cat { color: var(--on-surface-variant); }
.guide-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.guide-tile { grid-column: span 2; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 22px; color: var(--on-surface); background: var(--surface-container); border: 1px solid var(--outline-variant); border-radius: var(--radius-md); text-decoration: none; transition: border-color .2s ease; }
.guide-tile:hover, .guide-tile:focus-visible { border-color: var(--on-surface); }
.guide-tile h3 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; text-wrap: balance; }
.guide-tile p { margin: 8px 0 0; color: var(--on-surface-variant); font-size: 14px; line-height: 1.5; }
.tile-more { color: var(--primary); font-size: 14px; font-weight: 700; }
[data-cat="pdf"].guide-tile .tile-more, [data-cat="pdf"] .tile-more { color: var(--secondary); }
[data-cat="retouche"].guide-tile .tile-more, [data-cat="retouche"] .tile-more { color: var(--on-surface); }
.guide-tile:last-child:nth-child(3n + 1) { grid-column: span 6; }
.guide-tile:nth-last-child(2):nth-child(3n + 1), .guide-tile:last-child:nth-child(3n + 2) { grid-column: span 3; }
@media (max-width: 900px) {
  .featured-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-list { grid-template-columns: minmax(0, 1fr); }
  .guide-tile, .guide-tile:last-child:nth-child(3n + 1), .guide-tile:nth-last-child(2):nth-child(3n + 1), .guide-tile:last-child:nth-child(3n + 2) { grid-column: auto; }
}

/* ===== Page article : en-tête, sommaire collant et fiche outil, texte ===== */
.guide-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 48px); align-items: center; margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--outline-variant); }
.guide-head-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.guide-head h1 { margin: 0; font-size: clamp(34px, 4.6vw, 52px); line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; }
.guide-head .guide-lead { margin: 0; text-wrap: pretty; }
.guide-head .guide-meta { margin: 4px 0 0; }
.guide-head .guide-cover { margin: 0; border: 1px solid var(--outline-variant); border-radius: var(--radius-lg); }
.guide-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.guide-aside { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 1001px) { .guide-aside { position: sticky; top: 88px; } }
.guide-aside .guide-toc { margin: 0; padding: 22px; background: var(--surface-container); border: 1px solid var(--outline-variant); border-radius: var(--radius-lg); }
.toc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--outline-variant); }
.toc-head strong { font-family: var(--font-display); font-size: 17px; }
.toc-head span { color: var(--on-surface-variant); font-size: 13px; }
.guide-toc ol { margin: 0; padding: 0; list-style: none; gap: 10px; counter-reset: toc; }
.guide-toc li { counter-increment: toc; }
.guide-toc a { color: var(--on-surface-variant); font-size: 14px; line-height: 1.35; text-decoration: none; }
.guide-toc a:hover, .guide-toc a:focus-visible { color: var(--primary); text-decoration: none; }
.guide-tool { display: grid; gap: 14px; padding: 22px; background: var(--primary-container); border: 1px solid var(--outline-variant); border-radius: var(--radius-lg); }
.guide-tool .tool-icon { width: 44px; height: 44px; margin: 0; background: var(--surface-container); }
.guide-tool strong { display: block; font-family: var(--font-display); font-size: 17px; }
.guide-tool p { margin: 2px 0 0; color: var(--on-primary-container); font-size: 14px; }
.guide-tool .filled-button { text-decoration: none; }
.guide-layout .guide { max-width: none; margin: 0; }
.guide-body { font-size: 18px; line-height: 1.75; }
.guide-body > h2 { margin: 56px 0 14px; padding-top: 32px; border-top: 1px solid var(--outline-variant); font-family: var(--font-display); font-weight: 700; scroll-margin-top: 90px; }
.guide-body > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.guide-body h3 { font-family: var(--font-display); scroll-margin-top: 90px; }
.guide-body table { border: 1px solid var(--outline-variant); border-radius: var(--radius-md); border-collapse: separate; border-spacing: 0; background: var(--surface-container); }
.guide-body th { color: var(--on-surface-variant); background: var(--surface-high); font-size: 13px; font-weight: 600; }
.guide-body td, .guide-body th { padding: 12px 14px; }
.guide-body tr:last-child td { border-bottom: 0; }
.guide-body blockquote { padding: 16px 20px; border-left: 0; background: var(--primary-container); border-radius: var(--radius-md); color: var(--on-primary-container); }
.guide-sources, .guide-faq { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--outline-variant); }
.guide-sources h2, .guide-faq h2 { font-family: var(--font-display); font-weight: 700; }
.guide-faq details { margin-bottom: 10px; padding: 16px 18px; background: var(--surface-container); border: 1px solid var(--outline-variant); border-radius: var(--radius-md); }
.guide-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-family: var(--font-display); font-size: 17px; font-weight: 700; list-style: none; cursor: pointer; }
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary::after { content: ""; flex: none; width: 18px; height: 18px; background: var(--on-surface-variant); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .2s ease; }
.guide-faq details[open] summary::after { transform: rotate(180deg); }
.guide-faq details p { margin: 12px 0 0; color: var(--on-surface-variant); line-height: 1.6; }
.guide-cta { display: none; }
.guide-related { max-width: none; margin: 64px 0 0; padding-top: 40px; border-top: 1px solid var(--outline-variant); }
.guide-related + .guide-related { margin-top: 48px; padding-top: 0; border-top: 0; }
@media (max-width: 1000px) {
  .guide-head, .guide-layout { grid-template-columns: minmax(0, 1fr); }
  .guide-head .guide-cover { order: -1; }
  .guide-aside .guide-tool { display: none; }
  .guide-cta { display: flex; }
}
@media (prefers-reduced-motion: reduce) { .guide-faq summary::after { transition: none; } }
.guide-body table { display: table; width: 100%; overflow: hidden; }
@media (max-width: 700px) { .guide-body table { display: block; overflow-x: auto; } }

/* Photos éditoriales dans le corps des guides */
.guide-photo { margin: 32px 0; }
.guide-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--outline-variant); border-radius: var(--radius-lg); background: var(--surface-high); }
.guide-photo figcaption { margin-top: 10px; color: var(--on-surface-variant); font-size: 14px; line-height: 1.5; }

/* Cartes de guides : image à la une en tête de carte */
.guide-tile { padding: 14px 14px 20px; gap: 14px; justify-content: flex-start; }
.guide-tile img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--outline-variant); border-radius: var(--radius-md); background: var(--surface-high); }
.guide-tile .tile-text { flex: 1; padding: 0 8px; }
.guide-tile .tile-more { padding: 0 8px; }
.guide-tile:last-child:nth-child(3n + 1) img { aspect-ratio: 3 / 1; }
.guide-tile:nth-last-child(2):nth-child(3n + 1) img, .guide-tile:last-child:nth-child(3n + 2) img { aspect-ratio: 2.2 / 1; }
@media (max-width: 900px) { .guide-tile img, .guide-tile:last-child:nth-child(3n + 1) img, .guide-tile:nth-last-child(2):nth-child(3n + 1) img, .guide-tile:last-child:nth-child(3n + 2) img { aspect-ratio: 16 / 9; } }

/* Blocs de code : défilement horizontal dans la colonne, jamais de débordement de la page */
.guide-layout > * { min-width: 0; }
.guide-body pre { max-width: 100%; margin: 20px 0; padding: 16px 18px; overflow-x: auto; color: var(--on-surface); background: var(--surface-high); border: 1px solid var(--outline-variant); border-radius: var(--radius-md); font-size: 14px; line-height: 1.6; -webkit-overflow-scrolling: touch; }
.guide-body pre code { padding: 0; background: none; font-size: inherit; white-space: pre; }
.guide-body :not(pre) > code { padding: 2px 6px; background: var(--surface-high); border-radius: 6px; font-size: .9em; overflow-wrap: anywhere; }
