/* Styles de fewbricks.com.
   Les jetons (couleurs des deux thèmes, espacements, rayons, polices, styles de texte)
   viennent de tokens.css, copié depuis brand/ au moment de l'image Docker. Rien n'est
   redéfini ici : ce fichier ne fait que les assembler. Aucun style en ligne dans les pages
   (la politique CSP les interdit), aucune ombre, aucun dégradé. */

:root { color-scheme: light dark; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.62;
  font-weight: 400;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 { text-wrap: balance; }
strong, b { font-weight: 600; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--space-4); top: -6rem; z-index: 10;
  padding: var(--space-2) var(--space-4);
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--blue); border-radius: var(--radius-md);
  font-weight: 600;
}
.skip:focus { top: var(--space-2); }

/* Les titres de la charte, adaptés aux petits écrans : un titre long tient sur deux lignes à 390 px. */
@media (max-width: 64rem) { .t-display { font-size: 2.75rem; } }
@media (max-width: 40rem) {
  .t-display { font-size: 2.25rem; }
  .t-title { font-size: 1.75rem; }
  .t-heading { font-size: 1.3125rem; }
}

.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: var(--space-4); }
@media (min-width: 48rem) { .wrap { padding-inline: var(--space-8); } }

/* Lignes de 65 caractères au plus pour le texte courant */
main p, main li, footer p { max-width: 65ch; }
.report p, .report li { max-width: none; }

/* ---------- En-tête ---------- */

.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-2) var(--space-6); padding-block: var(--space-4);
}
.brand { display: inline-block; line-height: 0; }
.brand img { height: 28px; width: auto; }
.nav ul { display: flex; flex-wrap: wrap; gap: 0 var(--space-6); }
.nav a {
  display: inline-block; padding: var(--space-3) 0;
  color: var(--ink); font-weight: 600; text-decoration: none;
}
.nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }

/* ---------- Sections ---------- */

.section { padding-top: var(--space-12); }
.band { background: var(--wash); padding-block: var(--space-12); margin-top: var(--space-12); }
@media (min-width: 48rem) {
  .section { padding-top: var(--space-16); }
  .band { padding-block: var(--space-16); margin-top: var(--space-16); }
}
.section-head { display: grid; gap: var(--space-3); margin-bottom: var(--space-8); }
.muted { color: var(--ink-2); }

/* ---------- Accueil : en-tête de page ---------- */

.hero { padding-top: var(--space-12); }
.hero-grid { display: grid; gap: var(--space-8); align-items: center; }
@media (min-width: 56rem) {
  .hero { padding-top: var(--space-16); }
  .hero-grid { grid-template-columns: 1.45fr 1fr; gap: var(--space-12); }
}
.hero-text { display: grid; gap: var(--space-4); justify-items: start; }
.hero-text h1 { max-width: 16ch; }
.hero-note { color: var(--ink-2); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); margin-top: var(--space-2); }
.btn {
  display: inline-block; padding: var(--space-3) var(--space-6);
  background: var(--blue); color: var(--on-blue);
  border: 2px solid var(--blue); border-radius: var(--radius-md);
  font-weight: 600; text-decoration: none;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-quiet { background: transparent; color: var(--blue); }
.btn-quiet:hover { background: var(--blue-tint); border-color: var(--blue); color: var(--ink); }

.bricks { width: 100%; max-width: 20rem; height: auto; justify-self: center; }
.brick-blue { fill: var(--blue); }
.brick-tint { fill: var(--blue-tint); }
.brick-clay { fill: var(--clay); }

/* ---------- Reconstitution de la page 1 du rapport ---------- */

.report {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-md);
  padding: var(--space-4);
}
@media (min-width: 40rem) { .report { padding: var(--space-8); } }

.report-top {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1) var(--space-4);
  padding-bottom: var(--space-3); border-bottom: 1px solid var(--rule);
  color: var(--ink-2); font-size: 0.875rem; line-height: 1.43;
}
.report-host {
  margin-top: var(--space-6);
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.25;
  letter-spacing: -0.01em; overflow-wrap: anywhere;
}
.report-date { color: var(--ink-2); font-size: 0.875rem; line-height: 1.43; }

.verdict { display: flex; align-items: flex-start; gap: var(--space-4); margin-top: var(--space-6); }
.grade {
  flex: none; width: 5rem; padding: var(--space-3) var(--space-2);
  background: var(--warn); color: var(--on-blue);
  border-radius: var(--radius-md); text-align: center; line-height: 1;
}
.grade-letter { display: block; font-family: var(--font-display); font-weight: 700; font-size: 3rem; }
.grade-score { display: block; margin-top: var(--space-2); font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.verdict-text { display: grid; gap: var(--space-2); }
.verdict-lead { font-family: var(--font-display); font-weight: 700; font-size: 1.1875rem; line-height: 1.35; }

.report-cols { display: grid; gap: var(--space-8); margin-top: var(--space-8); }
@media (min-width: 48rem) { .report-cols { grid-template-columns: 1.5fr 1fr; gap: var(--space-12); } }
.report-cols h3 { margin-bottom: var(--space-4); }

.prio { display: grid; gap: var(--space-4); }
.prio li {
  display: grid; grid-template-columns: 2rem 1fr; gap: var(--space-2);
  padding-top: var(--space-4); border-top: 1px solid var(--rule);
}
.prio-n { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.2; color: var(--blue); }
.prio-body { display: grid; gap: var(--space-1); }
.tag { color: var(--warn); }
.tag-sep { color: var(--ink-2); font-weight: 400; }

.notes { display: grid; gap: var(--space-4); }
.notes li { display: grid; gap: var(--space-1); padding-top: var(--space-3); border-top: 1px solid var(--rule); }
.note-row { display: flex; justify-content: space-between; gap: var(--space-4); font-weight: 600; }
.note-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.note-val small { color: var(--ink-2); font-weight: 400; font-size: 0.875rem; }
.gauge { width: 100%; height: 6px; }
.gauge-track { fill: var(--wash); }
.gauge-fill { fill: var(--blue); }
.note-sub { color: var(--ink-2); font-size: 0.875rem; line-height: 1.43; }

.report-foot { margin-top: var(--space-6); color: var(--ink-2); font-size: 0.875rem; line-height: 1.43; }
figcaption { margin-top: var(--space-4); color: var(--ink-2); }
figcaption { max-width: 65ch; }

/* ---------- Domaines ---------- */

.cards { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: var(--space-6); display: grid; gap: var(--space-3); align-content: start; }
.card::before { content: ""; display: block; width: 2rem; height: 0.5rem; background: var(--blue); border-radius: var(--radius-sm); }
.card p { max-width: none; }
.card .small { color: var(--ink-2); font-size: 0.875rem; line-height: 1.43; }

.score-rule { margin-top: var(--space-8); display: grid; gap: var(--space-2); }
.data { font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.57; }

/* ---------- Langues et pays ---------- */

.two-col { display: grid; gap: var(--space-8); }
@media (min-width: 48rem) { .two-col { grid-template-columns: 1fr 1fr; gap: var(--space-12); } }
.two-col > div { display: grid; gap: var(--space-3); align-content: start; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.chips li { padding: var(--space-2) var(--space-4); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-sm); font-weight: 600; }

/* ---------- Utilisation ---------- */

.steps { display: grid; gap: var(--space-4); counter-reset: step; }
.steps li { display: grid; grid-template-columns: 2.5rem 1fr; gap: var(--space-4); counter-increment: step; padding-top: var(--space-4); border-top: 1px solid var(--rule); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 2.5rem; height: 2rem;
  background: var(--blue); color: var(--on-blue); border-radius: var(--radius-sm);
  font-family: var(--font-display); font-weight: 700;
}
.steps li > div { display: grid; gap: var(--space-1); }
.limits { margin-top: var(--space-8); display: grid; gap: var(--space-3); }

/* ---------- Appel à l'action ---------- */

.cta { background: var(--blue-tint); border-radius: var(--radius-md); padding: var(--space-6); display: grid; gap: var(--space-4); justify-items: start; color: var(--ink); }
@media (min-width: 48rem) { .cta { padding: var(--space-12); } }

/* ---------- Pages de texte (mentions légales, confidentialité, 404) ---------- */

.page { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.prose { display: grid; gap: var(--space-4); max-width: 65ch; }
.prose h1 { margin-bottom: var(--space-2); }
.prose h2 { margin-top: var(--space-6); }
.prose ul { display: grid; gap: var(--space-2); padding-left: var(--space-6); list-style: square; }
.prose dl { display: grid; gap: var(--space-3); }
.prose dt { font-weight: 600; }
.prose dd { color: var(--ink); }

/* ---------- Pied de page ---------- */

.site-footer { margin-top: var(--space-16); background: var(--wash); border-top: 1px solid var(--rule); padding-block: var(--space-8); }
.footer-grid { display: grid; gap: var(--space-6); }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.footer-brand { display: grid; gap: var(--space-3); justify-items: start; }
.footer-brand img { height: 24px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 var(--space-6); }
.footer-links a { display: inline-block; padding: var(--space-2) 0; }
.footer-note { color: var(--ink-2); font-size: 0.875rem; line-height: 1.43; }
