/* Section Guides : pages statiques, mêmes couleurs que shared/styles/_public.scss. */
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url('/fonts/arabic/plex-arabic-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url('/fonts/arabic/plex-arabic-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url('/fonts/arabic/plex-arabic-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Noto Kufi Arabic'; src: url('/fonts/arabic/noto-kufi-arabic.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }

:root {
  --paper: #F6F7F5; --surface: #FFFFFF; --ink: #14233D; --ink-2: #4B5872; --line: #D8DDE3;
  --brand: #1C4E96; --brand-deep: #153D77; --brand-wash: #E7EDF6;
  --paid: #3E7D4F; --late: #C08A2B; --unpaid: #A8432F; --unlit: #E1E5EA; --lamp: #F4D58D;
  --text: 'Plus Jakarta Sans', system-ui, sans-serif;
  --display: 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
}
html[dir='rtl'] {
  --text: 'IBM Plex Sans Arabic', 'Plus Jakarta Sans', system-ui, sans-serif;
  --display: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 17px; line-height: 1.7; }
html[dir='rtl'] body { line-height: 1.85; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); letter-spacing: -0.015em; text-wrap: balance; }
html[dir='rtl'] h1, html[dir='rtl'] h2, html[dir='rtl'] h3 { letter-spacing: 0; line-height: 1.45; }
a { color: var(--brand); }
a:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 760px; margin-inline: auto; padding-inline: 20px; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 10; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* En-tête et pied */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-family: 'Bricolage Grotesque', sans-serif; font-size: 18px; font-weight: 700; color: var(--ink); text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot { margin-top: 64px; padding-block: 22px; background: var(--ink); }
.foot-inner { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; font-size: 14px; text-decoration: none; }
.foot a:hover { color: var(--lamp); }
.foot a:focus-visible { outline-color: var(--lamp); }

/* Sommaire : un étage par guide */
.hub { padding-top: 48px; }
.hub h1 { margin: 0; font-size: clamp(32px, 6vw, 46px); font-weight: 700; line-height: 1.08; max-width: 15em; }
.lead { margin: 14px 0 36px; color: var(--ink-2); max-width: 34em; }
.roof { height: 16px; background: var(--ink); border-radius: 8px 8px 0 0; }
.building { list-style: none; margin: 0; padding: 0; border-inline: 3px solid var(--ink); background: var(--surface); }
.building li + li { border-top: 3px solid var(--ink); }
.floor { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 22px; align-items: center; padding: 22px; color: var(--ink); text-decoration: none; }
.floor:hover { background: var(--brand-wash); }
.floor:focus-visible { outline-offset: -3px; }
.floor strong { display: block; font-family: var(--display); font-size: 21px; line-height: 1.3; }
.floor-text span { display: block; margin-top: 4px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.wins { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.win { height: 46px; border-radius: 6px 6px 2px 2px; }
[data-tone='paid'] { --tone: var(--paid); }
[data-tone='unpaid'] { --tone: var(--unpaid); }
[data-tone='lit'] { --tone: var(--lamp); }
[data-tone='unlit'] { --tone: var(--unlit); }
[data-tone='late'] { --tone: var(--late); }
.win { background: var(--tone); }
.ground { display: flex; justify-content: center; align-items: flex-end; height: 40px; background: var(--ink); border-radius: 0 0 4px 4px; }
.door { width: 34px; height: 30px; background: var(--brand); border-radius: 17px 17px 0 0; }

/* Article */
.prose { padding-top: 44px; }
.prose > * { max-width: 68ch; }
.prose h1 { margin: 0 0 18px; font-size: clamp(30px, 5.5vw, 42px); font-weight: 700; line-height: 1.12; }
.prose h2 { margin: 40px 0 12px; font-size: 25px; font-weight: 700; line-height: 1.25; }
.prose h3 { margin: 28px 0 8px; font-size: 19px; font-weight: 700; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-inline-start: 22px; }
.prose li { margin: 6px 0; }
.prose blockquote { margin: 0 0 16px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.prose hr { margin: 36px 0 16px; border: 0; border-top: 1px solid var(--line); }
.note { color: var(--ink-2); font-size: 14px; }
.note em { font-style: normal; }
.encadre { margin: 28px 0; padding: 4px 20px 8px; background: var(--brand-wash); border-radius: 12px; }
.encadre h2 { margin-top: 16px; font-size: 21px; }

.table-wrap { margin: 0 0 18px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 15px; }
th, td { padding: 10px 14px; border: 1px solid var(--line); text-align: start; }
th { background: var(--paper); font-weight: 700; }
.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Frise : la fenêtre change de couleur à mesure que le retard s'installe */
.prose .frise { list-style: none; margin: 24px 0; padding: 0; }
.frise li { position: relative; margin: 0; padding-inline-start: 46px; padding-bottom: 22px; }
.frise li::before { content: ''; position: absolute; inset-inline-start: 0; top: 2px; width: 28px; height: 36px; background: var(--tone); border-radius: 14px 14px 2px 2px; }
.frise li:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: 13px; top: 42px; bottom: 2px; width: 2px; background: var(--line); }
.frise strong { display: block; font-size: 16px; }
.frise p { margin: 0; }
.frise .why { color: var(--ink-2); font-size: 15px; }

/* Fin d'article */
.cta { margin-top: 36px; padding: 24px; background: var(--ink); border-radius: 12px; color: #fff; }
.cta p { margin: 0 0 16px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 22px; border-radius: 10px; background: #fff; color: var(--brand-deep); font-weight: 700; text-decoration: none; }
.btn:hover { background: var(--brand-wash); }
.cta .btn:focus-visible { outline-color: var(--lamp); }
.related h2 { margin: 36px 0 8px; font-size: 21px; font-weight: 700; }
.related ul { margin: 0; padding: 0; list-style: none; }
.related a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 16px; }
  .floor { grid-template-columns: 62px minmax(0, 1fr); gap: 14px; padding: 16px 14px; }
  .floor strong { font-size: 18px; }
  .win { height: 34px; }
  .wins { gap: 5px; }
  .cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cards, .cards tbody, .cards tr, .cards td { display: block; }
  .cards { background: none; }
  .cards tr { margin-bottom: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
  .cards td { padding: 0 0 8px; border: 0; }
  .cards td:last-child { padding-bottom: 0; }
  .cards td:first-child { font-family: var(--display); font-size: 17px; font-weight: 700; }
  .cards td:not(:first-child)::before { content: attr(data-label); display: block; color: var(--ink-2); font-size: 13px; font-weight: 600; }
}
