/* guides/guides.css — LA feuille des pages guides (regle 2 : une seule source pour les 11 pages).
   Pages statiques, sans script ; theme clair ; cibles tactiles >= 44 px (regle 3).
   EXCEPTIONS NOMMEES (decision de Zouber, 18/10), non gardees : les renvois entre guides places DANS une phrase gardent
   la hauteur de la ligne (exception « en ligne » du critere WCAG 2.5.8) ; les adresses des sources, une par ligne, aussi
   (exception d'ESPACEMENT du meme critere : 25 px mesures entre deux lignes, pour 24 demandes).
   Les appels de note .ref font 44 px de HAUT (garde : tests/unit/guides-publics.test.js) ; leur largeur, environ 15 px,
   releve de l'exception « en ligne ». */
html { color-scheme: light; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #4F46E5; --primary-h: #4338CA; --primary-light: #EEF2FF; --primary-border: #C7D2FE;
  --text: #1E293B; --text-muted: #64748B; --border: #E2E8F0; --bg: #F8FAFC; --white: #fff; --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; }
a { color: var(--primary); }
.barre { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); padding-top: env(safe-area-inset-top); }
.barre-in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); }
.marque { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text);
  text-decoration: none; font-weight: 700; font-size: 17px; }
.marque b { color: var(--primary); font-weight: 700; }
.marque span { white-space: nowrap; }
.court { display: none; }
.sommaire-mobile { display: none; }
.barre-liens { display: flex; align-items: center; gap: 8px; }
.lien-barre { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--text);
  text-decoration: none; font-size: 15px; font-weight: 500; }
.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px;
  border-radius: 999px; font-size: 15px; font-weight: 600; text-decoration: none; }
.bouton.plein { background: var(--primary); color: #fff; }
.bouton.plein:hover { background: var(--primary-h); }
.bouton.contour { border: 1px solid var(--primary-border); color: var(--primary); background: var(--white); }
.page { max-width: 1120px; margin: 0 auto; padding: 12px max(16px, env(safe-area-inset-right)) 64px max(16px, env(safe-area-inset-left));
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 4px 48px; }
.fil { grid-column: 1 / -1; font-size: 14px; color: var(--text-muted); }
.fil a { color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.fil a:hover { color: var(--primary); }
article { min-width: 0; }
.fil-actuel { display: inline-block; color: var(--primary); background: var(--primary-light); border: 1px solid var(--primary-border);
  border-radius: 999px; padding: 4px 14px; font-weight: 600; }
h1 { font-size: clamp(30px, 4.6vw, 42px); line-height: 1.15; letter-spacing: -0.02em; margin: 4px 0 14px; }
.chapo { font-size: 19px; line-height: 1.6; background: var(--primary-light); border: 2px solid var(--primary);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 8px; }
.maj-haut { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
h2 { font-size: 24px; line-height: 1.3; letter-spacing: -0.01em; margin: 44px 0 14px; scroll-margin-top: 80px; }
h3 { font-size: 19px; margin: 26px 0 10px; }
p { margin-bottom: 14px; }
ul, ol { margin: 0 0 16px 22px; }
li { margin-bottom: 8px; }
sup { line-height: 0; }
.ref { font-size: 12px; line-height: 1; text-decoration: none; display: inline-block; padding: 16px 4px; margin: -16px 0; }
.tableau { margin: 8px 0 16px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { background: var(--primary-light); font-size: 14px; }
tr:last-child td { border-bottom: 0; }
.checklist { list-style: none; margin-left: 0; }
.checklist li { position: relative; padding-left: 34px; }
.checklist li::before { content: ''; position: absolute; left: 0; top: 4px; width: 20px; height: 20px;
  border: 2px solid var(--primary); border-radius: 6px; background: var(--white); }
.checklist li::after { content: ''; position: absolute; left: 7px; top: 7px; width: 6px; height: 11px;
  border: solid var(--primary); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.faq { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 44px 14px 18px; min-height: 44px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 18px; top: 12px; font-size: 22px; color: var(--primary); }
.faq[open] summary::after { content: '–'; }
.faq p { padding: 0 18px 14px; margin: 0; }
.produit { background: linear-gradient(135deg, var(--primary-light), var(--white)); border: 1px solid var(--primary-border);
  border-radius: var(--radius); padding: 4px 22px 22px; margin: 44px 0 20px; }
.produit h2 { margin-top: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.maj { font-size: 14px; color: var(--text-muted); }
.sources { font-size: 14px; color: var(--text-muted); word-break: break-word; }
.sources li { scroll-margin-top: 80px; }
aside { position: relative; }
.sommaire { position: sticky; top: 84px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.sommaire-titre { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.sommaire ol { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.45; }
.sommaire li { margin-bottom: 0; }
.sommaire a { display: flex; align-items: center; min-height: 44px; padding: 4px 0; color: var(--text); text-decoration: none; }
.sommaire a:hover { color: var(--primary); }
footer { border-top: 1px solid var(--border); background: var(--white); }
.pied { max-width: 1120px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 14px; color: var(--text-muted); }
.pied span { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.pied a { color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 960px) {
  .page { grid-template-columns: minmax(0, 1fr); gap: 0; }
  aside { display: none; }
  .sommaire-mobile { display: block; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); margin: 16px 0 8px; }
  .sommaire-mobile summary { cursor: pointer; list-style: none; padding: 12px 44px 12px 16px; min-height: 44px; font-weight: 600; position: relative; }
  .sommaire-mobile summary::-webkit-details-marker { display: none; }
  .sommaire-mobile summary::after { content: '+'; position: absolute; right: 16px; top: 10px; font-size: 22px; color: var(--primary); }
  .sommaire-mobile[open] summary::after { content: '–'; }
  .sommaire-mobile .sommaire { position: static; border: 0; padding: 0 16px 12px; }
  .sommaire-mobile .sommaire-titre { display: none; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .lien-barre { display: none; }
  .long { display: none; }
  .court { display: inline; }
  .chapo { font-size: 17px; padding: 14px 16px; }
  h2 { font-size: 21px; margin-top: 36px; }
  .tableau { border: 0; background: none; overflow: visible; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; padding: 6px 0; }
  td { border: 0; padding: 6px 14px; }
  td::before { content: attr(data-titre); display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px; }
  .actions { flex-direction: column; }
  .actions .bouton { width: 100%; }
}
.page.sans-aside { grid-template-columns: minmax(0, 1fr); }
.grille-guides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.carte-guide { display: flex; flex-direction: column; gap: 8px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--text); min-height: 44px; }
.carte-guide:hover { border-color: var(--primary-border); box-shadow: 0 4px 16px rgba(79,70,229,.08); }
.carte-titre { font-weight: 700; font-size: 17px; line-height: 1.35; }
.carte-texte { font-size: 15px; color: var(--text-muted); line-height: 1.5; }
.carte-lire { margin-top: auto; font-size: 15px; font-weight: 600; color: var(--primary); }
@media (max-width: 760px) { .grille-guides { grid-template-columns: 1fr; } }
