/* Rue360 — pages légales et page 404 (mêmes couleurs et polices que la vitrine) */
@font-face { font-family: "Bricolage Grotesque"; src: url("/polices/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/polices/dm-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/polices/dm-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --surface: #FBF5EC; --surface-raised: #FFFFFF; --surface-sunken: #F3E9DA;
  --line: #E6DACB; --ink: #24160F; --ink-muted: #6B5246;
  --brique: #9E2B1F; --brique-deep: #AE3326; --brique-soft: #F7E3DE;
  --on-brique: #FBF5EC; --on-brique-muted: #F3D9D3;
  --ebene: #24160F; --on-ebene: #FBF5EC; --on-ebene-muted: #D9C6B8;
  --dore: #F6C27A; --attention-soft: #FCEFD9; --attention: #8A5300;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, p { margin: 0; }
a { color: var(--brique); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--dore); outline-offset: 3px; border-radius: 6px; }
.aller-au-contenu { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ebene); color: var(--on-ebene); padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.aller-au-contenu:focus { top: 12px; }
.largeur { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 900px) { .largeur { padding: 0 40px; } }

/* bandeau brique */
.bandeau { position: relative; overflow: hidden; background: var(--brique); color: var(--on-brique); padding: 18px 0 44px; }
.bandeau .compteur { position: absolute; right: -140px; top: 30px; width: 420px; color: var(--brique-deep); pointer-events: none; }
.bandeau .largeur { position: relative; }
.haut { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.marque img { height: 30px; width: auto; display: block; }
.accueil { display: inline-flex; align-items: center; gap: 6px; color: var(--on-brique); text-decoration: none; font-weight: 700; font-size: 16px; padding: 12px 0; }
.accueil:hover { color: var(--dore); }
.accueil svg { width: 18px; height: 18px; }
.bandeau h1 { margin-top: 32px; font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1.1; letter-spacing: -.02em; }
.bandeau .version { margin-top: 10px; font-size: 16px; color: var(--on-brique-muted); }
@media (min-width: 900px) { .bandeau { padding-bottom: 60px; } .bandeau h1 { font-size: 48px; } }

/* projet à valider */
.projet { background: var(--attention-soft); color: var(--attention); border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 700; padding: 12px 0; }
mark.a-valider { background: var(--attention-soft); color: var(--attention); font-weight: 700; padding: 0 4px; border-radius: 4px; }

/* corps : sommaire + feuille */
.corps { display: grid; gap: 20px; padding-top: 28px; padding-bottom: 64px; }
@media (min-width: 900px) { .corps { grid-template-columns: 260px 1fr; gap: 40px; align-items: start; padding-top: 40px; } }
.sommaire { background: var(--surface-raised); border: 1px solid var(--line); border-radius: 16px; }
.sommaire summary { cursor: pointer; padding: 14px 18px; font-weight: 700; font-size: 16px; list-style: none; display: flex; justify-content: space-between; min-height: 48px; align-items: center; }
.sommaire summary::-webkit-details-marker { display: none; }
.sommaire summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--brique); }
.sommaire[open] summary::after { content: "−"; }
.sommaire ol { margin: 0; padding: 0 18px 14px 36px; font-size: 16px; line-height: 1.4; }
.sommaire li { padding: 5px 0; color: var(--ink-muted); }
.sommaire a { color: var(--ink); text-decoration: none; }
.sommaire a:hover { text-decoration: underline; }
@media (min-width: 900px) {
  .sommaire { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; }
  .sommaire summary { pointer-events: none; }
  .sommaire summary::after, .sommaire[open] summary::after { content: none; }
}
.feuille { background: var(--surface-raised); border: 1px solid var(--line); border-radius: 20px; padding: 24px 20px; min-width: 0; }
@media (min-width: 900px) { .feuille { padding: 40px 48px; } }
.en-bref { background: var(--brique-soft); border-radius: 14px; padding: 16px 18px; margin-bottom: 28px; }
.en-bref h2 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.en-bref ul { margin: 0; padding-left: 20px; }
.en-bref li + li { margin-top: 4px; }
.article + .article { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.article h2 { font-size: 20px; font-weight: 700; line-height: 1.3; }
.article h2 .n { color: var(--brique); margin-right: 6px; }
.article p, .article ul, .article ol { margin-top: 10px; color: #3E2A20; overflow-wrap: anywhere; }
.article ul, .article ol { padding-left: 22px; }
.article li + li { margin-top: 6px; }
.article strong { color: var(--ink); }
.tableau { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 16px; }
.tableau th, .tableau td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.tableau th { font-weight: 700; color: var(--ink); background: var(--surface); }
@media (max-width: 600px) {
  .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; width: 100%; }
  .tableau thead { display: none; }
  .tableau tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .tableau td { border: 0; padding: 3px 0; }
  .tableau td::before { content: attr(data-titre) " : "; font-weight: 700; color: var(--ink); }
}
.etapes { counter-reset: e; list-style: none; padding-left: 0 !important; }
.etapes li { counter-increment: e; position: relative; padding-left: 42px; min-height: 30px; }
.etapes li::before { content: counter(e); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--brique); color: var(--on-brique); font-weight: 700; font-size: 15px; display: grid; place-items: center; }

/* pied */
.pied { background: var(--ebene); color: var(--on-ebene-muted); padding: 28px 0; font-size: 15px; }
.pied .largeur { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.pied a { color: var(--on-ebene); text-decoration: none; padding: 8px 0; }
.pied a:hover { color: var(--dore); }
.pied .copie { flex: 1 1 100%; }
@media (min-width: 900px) { .pied .copie { flex: 1; } }

/* 404 */
.introuvable { min-height: 100vh; display: flex; flex-direction: column; }
.introuvable .bandeau { flex: 1; display: flex; flex-direction: column; }
.introuvable .message { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 48px; padding-bottom: 48px; }
.introuvable .message > * { max-width: 600px; }
.introuvable .code { font: 800 88px/1 var(--display); color: var(--dore); letter-spacing: -.03em; }
.introuvable h1 { margin-top: 18px; }
.introuvable p { margin-top: 14px; color: var(--on-brique-muted); font-size: 18px; }
.boutons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; border: 2px solid var(--on-brique); border-radius: 999px; background: var(--on-brique); color: var(--brique); font: 700 17px/1.25 var(--sans); padding: 12px 24px; text-decoration: none; }
.bouton:hover { background: var(--dore); border-color: var(--dore); color: var(--ebene); }
.bouton.clair { background: transparent; color: var(--on-brique); border-color: rgba(251, 245, 236, .55); }
.bouton.clair:hover { border-color: var(--on-brique); color: var(--on-brique); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
