/* ==========================================================================
   Personnalite.me — feuille de style du site
   Monde visuel : le psychotest de magazine ▲●■
   Encres de quadrichromie, titrage condensé, filets d'encre, symboles.
   ========================================================================== */

/* --- Polices auto-hébergées ------------------------------------------- */
@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/big-shoulders-display-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/big-shoulders-display-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-sans-3-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-sans-3-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Jetons ------------------------------------------------------------- */
:root {
  --encre: #111111;
  --papier: #ffffff;
  --gris: #f2f2f2;
  --filet: #d9d9d9;
  --texte-2: #4a4a4a;

  --magenta: #ff2e86;
  --cyan: #00b4e6;
  --jaune: #ffd400;

  --rubrique: var(--magenta);

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --texte: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  /* échelle typographique : 14 16 18 22 28 36 48 64 96 168 */
  --t-14: 0.875rem;
  --t-16: 1rem;
  --t-18: 1.125rem;
  --t-22: 1.375rem;
  --t-28: 1.75rem;
  --t-36: 2.25rem;
  --t-48: 3rem;
  --t-64: 4rem;
  --t-96: 6rem;
  --t-168: 10.5rem;

  --e-1: 8px;
  --e-2: 16px;
  --e-3: 24px;
  --e-4: 40px;
  --e-5: 64px;
  --e-6: 96px;

  --trait: 2px;
  --sortie: cubic-bezier(0.16, 1, 0.3, 1);
  --page: 1200px;
}

.rubrique-comportement { --rubrique: var(--magenta); }
.rubrique-caractere    { --rubrique: var(--cyan); }
.rubrique-perception   { --rubrique: var(--jaune); }

/* --- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--texte);
  font-size: var(--t-18);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--rubrique); }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }
::selection { background: var(--rubrique); color: var(--encre); }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; text-wrap: balance; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }
button { font: inherit; color: inherit; }
.visually-hidden, .visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.saut {
  position: absolute; left: var(--e-2); top: -100px; z-index: 50;
  padding: var(--e-1) var(--e-2); background: var(--encre); color: var(--papier);
  font-weight: 700; text-decoration: none;
}
.saut:focus { top: var(--e-2); }

/* --- Symboles ----------------------------------------------------------- */
.sym {
  width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em;
  fill: var(--rubrique); stroke: var(--encre); stroke-width: 8; stroke-linejoin: round;
  overflow: visible;
}
.sym--encre { fill: var(--encre); }
.sym--vide { fill: transparent; }

/* --- En-tête ------------------------------------------------------------ */
.entete {
  position: sticky; top: 0; z-index: 40;
  background: var(--papier);
  border-bottom: var(--trait) solid var(--encre);
}
.entete__inner {
  max-width: var(--page); margin: 0 auto; padding: 0 var(--e-3);
  min-height: 64px; display: flex; align-items: center; gap: var(--e-3);
}
.marque {
  display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto;
  font-family: var(--display); font-weight: 900; font-size: var(--t-28); letter-spacing: 0.01em; line-height: 1;
}
.marque img { width: 40px; height: 40px; }
.marque span { padding-top: 3px; }
.menu { display: flex; align-items: center; gap: var(--e-1); }
.menu__ouvrir { display: none; }
.menu__liste { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: var(--e-1); }
.menu__liste > li { position: relative; }
.rubrique-lien, .menu__liste a.langue {
  display: inline-block; padding: 10px 14px; font-weight: 700; font-size: var(--t-16);
  text-decoration: none; cursor: pointer; list-style: none; border-bottom: 4px solid var(--rubrique-chip, transparent);
}
.rubrique-lien::-webkit-details-marker { display: none; }
.rubrique-lien { --rubrique-chip: var(--rubrique-propre); }
.menu__liste a.langue { border-bottom-color: var(--filet); }
.menu__liste details[open] > .rubrique-lien { background: var(--rubrique-propre); }
.menu__panneau {
  position: absolute; right: 0; top: calc(100% + 2px); z-index: 45;
  min-width: 360px; margin: 0; padding: var(--e-1) 0; list-style: none;
  background: var(--papier); border: var(--trait) solid var(--encre);
  box-shadow: 0 12px 32px -12px rgba(17, 17, 17, 0.35);
}
.menu__panneau a {
  display: block; padding: 10px var(--e-2); text-decoration: none; font-size: var(--t-16);
}
.menu__panneau a:hover, .menu__panneau a:focus-visible { background: var(--rubrique-propre); outline-offset: -3px; }
.menu__panneau a[aria-current="page"] { font-weight: 700; background: var(--gris); }
.menu__liste .r-comportement { --rubrique-propre: var(--magenta); }
.menu__liste .r-caractere    { --rubrique-propre: var(--cyan); }
.menu__liste .r-perception   { --rubrique-propre: var(--jaune); }

/* --- Bande de rubrique -------------------------------------------------- */
.bande { background: var(--rubrique); color: var(--encre); }
.bande__inner {
  max-width: var(--page); margin: 0 auto; padding: var(--e-3) var(--e-3) var(--e-4);
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--e-4); align-items: end;
}
.bande__symboles { display: flex; gap: var(--e-2); align-items: flex-end; padding-bottom: 10px; }
.bande__symboles .sym { font-size: var(--t-96); fill: var(--encre); stroke: var(--encre); }
.bande__symboles .sym:nth-child(2) { font-size: var(--t-64); }
.bande__symboles .sym:nth-child(3) { font-size: var(--t-48); }
.bande__test { margin: 0; line-height: 1; }
.bande__test span {
  display: block; font-family: var(--display); font-weight: 900; font-size: var(--t-168);
  line-height: 0.82; letter-spacing: -0.01em;
}
.bande__test small {
  display: block; margin-top: var(--e-2); font-size: var(--t-16); font-weight: 700;
}
.bande__titre {
  font-family: var(--display); font-weight: 900; font-size: var(--t-64); line-height: 0.95;
  max-width: 16ch; padding-bottom: 6px;
}

/* --- Feuille (grille de page) ------------------------------------------- */
.feuille {
  max-width: var(--page); margin: 0 auto; padding: var(--e-4) var(--e-3) var(--e-6);
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--e-5);
  align-items: start;
}
.rail { position: sticky; top: 80px; display: grid; gap: var(--e-3); }

/* --- Intro du test ------------------------------------------------------ */
.test__intro { max-width: 70ch; }
.test__intro h2 {
  font-size: var(--t-28); font-weight: 700; line-height: 1.2; margin-bottom: var(--e-2);
}
.test__intro p { font-size: var(--t-18); color: var(--texte-2); }
.test__chapeau p:last-child { margin-bottom: 0; }
.chapeau__plus { display: none; }
.consigne {
  margin: var(--e-3) 0 0; padding: var(--e-2) 0; font-weight: 700; color: var(--encre);
  border-top: var(--trait) solid var(--encre); border-bottom: var(--trait) solid var(--encre);
  display: flex; gap: 12px; align-items: baseline;
}
.consigne .sym { flex: none; font-size: 1.1em; }

/* --- Quiz --------------------------------------------------------------- */
.quiz { margin-top: var(--e-4); }
.quiz__questions { list-style: none; margin: 0; padding: 0; }
.question { display: none; }
.question.is-active { display: block; animation: question-entre 0.42s var(--sortie) both; }
@keyframes question-entre {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.no-js .question { display: block; margin-bottom: var(--e-4); }
.question__tete { display: grid; grid-template-columns: 64px 1fr; gap: var(--e-3); align-items: start; }
.question__num {
  font-family: var(--display); font-weight: 900; font-size: var(--t-48); line-height: 64px; height: 64px;
  text-align: center; background: var(--rubrique); color: var(--encre);
}
.question h3 {
  font-size: var(--t-28); font-weight: 600; line-height: 1.25; padding-top: 10px; text-wrap: pretty;
}
.reponses { list-style: none; margin: var(--e-3) 0 0; padding: 0; border-bottom: var(--trait) solid var(--encre); }
.reponse {
  display: grid; grid-template-columns: 36px 1fr; gap: var(--e-2); align-items: center;
  padding: 14px var(--e-1); min-height: 64px; cursor: pointer;
  border-top: var(--trait) solid var(--encre);
  font-size: var(--t-22); font-weight: 600; line-height: 1.3;
  transition: background-color 0.18s var(--sortie), padding-left 0.18s var(--sortie);
}
.reponse .sym { font-size: 28px; }
.reponse:hover, .reponse:focus-visible { background: var(--gris); padding-left: var(--e-2); outline-offset: -3px; }
.reponse[aria-checked="true"], .reponse.is-choisi { background: var(--rubrique); }
.reponse[aria-checked="true"] .sym, .reponse.is-choisi .sym { fill: var(--encre); }
.reponse .reponse__coche { display: none; }
.reponse.is-choisi .reponse__coche {
  display: inline-block; justify-self: end; font-size: var(--t-16); font-weight: 700;
}
.quiz__nav { margin-top: var(--e-2); display: flex; justify-content: space-between; font-size: var(--t-16); }
.quiz__nav button {
  background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: 0.18em; font-weight: 600;
}
.quiz__nav button[hidden] { display: none; }
.quiz__nav button:hover { text-decoration-color: var(--rubrique); }

/* --- Compteur de symboles (geste signature) ----------------------------- */
.compteur { border: var(--trait) solid var(--encre); padding: var(--e-2) var(--e-2) var(--e-2); background: var(--papier); }
.compteur__titre {
  font-family: var(--display); font-weight: 900; font-size: var(--t-28); line-height: 1; margin-bottom: var(--e-2);
  display: flex; justify-content: space-between; align-items: baseline;
}
.compteur__etat { font-family: var(--texte); font-size: var(--t-16); font-weight: 700; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.compteur__cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)); gap: 6px; }
.case {
  aspect-ratio: 1; border: 1px solid var(--filet); display: grid; place-items: center; font-size: 20px;
  background: var(--papier);
}
.case.is-courante { border-color: var(--encre); border-width: 2px; }
.case .sym { animation: case-pose 0.32s var(--sortie) both; }
@keyframes case-pose {
  from { transform: scale(1.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.compteur__total { margin: var(--e-2) 0 0; display: flex; flex-wrap: wrap; gap: var(--e-2); font-size: var(--t-16); font-weight: 700; }
.compteur__total span { display: inline-flex; gap: 6px; align-items: center; }
.compteur__total .sym { font-size: 18px; }
.compteur__total:empty { display: none; }

/* --- Résultats ---------------------------------------------------------- */
.quiz__resultats, .juma-score { list-style: none; margin: 0; padding: 0; }
.resultat { display: none; }
.resultat.is-visible { display: block; }
.resultat__encadre {
  background: var(--rubrique); color: var(--encre); padding: var(--e-4);
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; column-gap: var(--e-4); row-gap: var(--e-2); align-items: start;
  grid-template-areas:
    "titre titre"
    "verdict verdict"
    "echelle echelle"
    "texte figure"
    "partage figure"
    "actions figure";
}
.resultat__titre { grid-area: titre; }
.resultat__verdict { grid-area: verdict; }
.resultat .echelle { grid-area: echelle; }
.resultat__texte { grid-area: texte; }
.resultat__figure { grid-area: figure; }
.resultat .shareon { grid-area: partage; }
.resultat__actions { grid-area: actions; }
.resultat__titre:focus { outline: none; }
.resultat.is-visible .resultat__encadre { animation: encadre-balaye 0.56s var(--sortie) both; }
@keyframes encadre-balaye {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
.resultat__verdict { margin: 0; font-size: var(--t-18); font-weight: 700; }
.resultat__titre {
  font-family: var(--display); font-weight: 900; font-size: var(--t-64); line-height: 0.95; margin-bottom: var(--e-1);
}
.resultat__figure { margin: 0; }
.resultat__figure img { border: var(--trait) solid var(--encre); width: 100%; background: var(--papier); }
.resultat__texte { font-size: var(--t-18); line-height: 1.5; max-width: 62ch; }
.resultat__texte p:last-child { margin-bottom: 0; }
.resultat__actions { margin: var(--e-2) 0 0; display: flex; gap: var(--e-2); flex-wrap: wrap; align-items: center; }
.bouton {
  display: inline-block; padding: 12px 22px; background: var(--encre); color: var(--papier);
  border: var(--trait) solid var(--encre); font-weight: 700; text-decoration: none; font-size: var(--t-16);
  transition: background-color 0.18s var(--sortie), color 0.18s var(--sortie);
}
.bouton:hover, .bouton:focus-visible { background: var(--papier); color: var(--encre); }

/* échelle de score */
.echelle { margin: 0 0 var(--e-2); }
.echelle__ligne { display: flex; justify-content: space-between; font-size: var(--t-16); font-weight: 700; margin-bottom: 6px; }
.echelle__score { font-family: var(--display); font-weight: 900; font-size: var(--t-36); line-height: 1; }
.echelle__barre { position: relative; height: 14px; border: var(--trait) solid var(--encre); background: var(--papier); display: flex; }
.echelle__zone { border-right: var(--trait) solid var(--encre); height: 100%; }
.echelle__zone:last-child { border-right: 0; }
.echelle__zone.is-atteinte { background: var(--encre); }
.echelle__marque {
  position: absolute; top: -12px; width: 0; height: 0; transform: translateX(-50%);
  border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 10px solid var(--encre);
}
.echelle__legende { display: flex; margin: 6px 0 0; padding: 0; list-style: none; font-size: var(--t-14); font-weight: 600; }
.echelle__legende li { padding-right: var(--e-1); line-height: 1.2; }

/* partage (shareon réhabillé) */
.resultat .shareon { margin-top: 0; }
.resultat .shareon > * {
  background-color: var(--encre) !important; border-radius: 0 !important; margin: 0 6px 6px 0 !important;
  height: 28px; padding: 6px 10px; transition: opacity 0.18s var(--sortie);
}
.resultat .shareon > :hover { opacity: 0.75; }
.resultat .shareon > :focus-visible { outline: 3px solid var(--encre); outline-offset: 2px; }

/* --- Même rubrique ------------------------------------------------------ */
.suite { margin-top: var(--e-6); border-top: var(--trait) solid var(--encre); padding-top: var(--e-3); }
.suite h2 { font-family: var(--display); font-weight: 900; font-size: var(--t-36); line-height: 1; margin-bottom: var(--e-2); }
.suite ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: var(--e-4); }
.suite li { break-inside: avoid; border-bottom: 1px solid var(--filet); }
.suite a { display: flex; gap: 10px; align-items: baseline; padding: 10px 0; text-decoration: none; font-weight: 600; }
.suite a:hover span { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--rubrique); }
.suite .sym { font-size: 14px; flex: none; }

/* --- Publicité ---------------------------------------------------------- */
.pub { border-top: 1px solid var(--filet); padding-top: var(--e-1); }
.pub__etiquette { margin: 0 0 var(--e-1); font-size: var(--t-14); font-weight: 700; color: var(--texte-2); letter-spacing: 0.04em; }

/* --- Pied de page ------------------------------------------------------- */
.pied { border-top: var(--trait) solid var(--encre); margin-top: var(--e-4); }
.page-accueil .pied { margin-top: var(--e-6); }
.pied__inner { max-width: var(--page); margin: 0 auto; padding: var(--e-5) var(--e-3) var(--e-4); }
.pied__apropos { max-width: 70ch; margin-bottom: var(--e-5); }
.pied__apropos h2 { font-family: var(--display); font-weight: 900; font-size: var(--t-36); margin-bottom: var(--e-2); }
.pied__apropos p { color: var(--texte-2); }
.pied__rubriques { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--e-4); }
.pied__rubriques h2 {
  font-family: var(--display); font-weight: 900; font-size: var(--t-28); line-height: 1; margin-bottom: var(--e-2);
  display: inline-block; padding: 6px 10px 4px; background: var(--rubrique-propre); color: var(--encre);
}
.pied__rubriques ul { list-style: none; margin: 0; padding: 0; }
.pied__rubriques li { border-bottom: 1px solid var(--filet); }
.pied__rubriques a { display: block; padding: 8px 0; text-decoration: none; font-size: var(--t-16); }
.pied__rubriques a:hover { text-decoration: underline; text-decoration-color: var(--rubrique-propre); }
.pied .r-comportement { --rubrique-propre: var(--magenta); }
.pied .r-caractere    { --rubrique-propre: var(--cyan); }
.pied .r-perception   { --rubrique-propre: var(--jaune); }
.page-accueil .pied__rubriques { display: none; }
.page-accueil .pied__apropos { margin-bottom: 0; }
.pied__bas {
  border-top: var(--trait) solid var(--encre); margin-top: var(--e-5); padding-top: var(--e-3);
  display: flex; flex-wrap: wrap; gap: var(--e-3); align-items: center; justify-content: space-between;
  font-size: var(--t-16); color: var(--texte-2);
}
.pied__bas img { height: 28px; width: auto; }
.pied__bas p { margin: 0; }

/* --- Accueil ------------------------------------------------------------ */
.accueil-bande .bande__inner { grid-template-columns: 1fr auto; padding-bottom: var(--e-4); }
.accueil-bande .bande__symboles { grid-row: 1 / span 3; grid-column: 2; align-self: end; }
.accueil-bande h1 {
  font-family: var(--display); font-weight: 900; font-size: var(--t-168); line-height: 0.82; letter-spacing: -0.01em;
  max-width: 10ch;
}
.accueil-bande p { margin: var(--e-3) 0 0; font-size: var(--t-22); font-weight: 600; max-width: 42ch; grid-column: 1; }
.accueil-bande h1 { grid-column: 1; }
.accueil-bande .bande__actions { grid-column: 1; }
.accueil-bande .bande__actions { margin-top: var(--e-3); display: flex; flex-wrap: wrap; gap: var(--e-2); }
.accueil-bande .bouton { font-size: var(--t-18); padding: 14px 24px; }
.accueil-bande .bouton--blanc { background: var(--papier); color: var(--encre); }
.accueil-bande .bouton--blanc:hover { background: var(--encre); color: var(--papier); }

.mode-emploi { max-width: var(--page); margin: 0 auto; padding: var(--e-5) var(--e-3) 0; }
.mode-emploi ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--e-4); counter-reset: etape; }
.mode-emploi li { border-top: var(--trait) solid var(--encre); padding-top: var(--e-2); counter-increment: etape; }
.mode-emploi li::before {
  content: counter(etape); display: block; font-family: var(--display); font-weight: 900; font-size: var(--t-64); line-height: 1;
}
.mode-emploi h2 { font-size: var(--t-22); font-weight: 700; margin: var(--e-1) 0; }
.mode-emploi p { color: var(--texte-2); margin: 0; }
.mode-emploi .sym { font-size: 18px; }

.rubriques { max-width: var(--page); margin: 0 auto; padding: var(--e-6) var(--e-3) 0; display: grid; gap: var(--e-5); }
.rubrique { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--e-4); align-items: start; }
.rubrique__tete { background: var(--rubrique-propre); padding: var(--e-3); min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; position: sticky; top: 88px; }
.rubrique__tete h2 { font-family: var(--display); font-weight: 900; font-size: var(--t-36); line-height: 0.9; }
.rubrique__tete p { margin: var(--e-2) 0 0; font-weight: 600; }
.rubrique__tete .sym { font-size: 40px; fill: var(--encre); stroke: var(--encre); }
.rubrique.r-comportement { --rubrique-propre: var(--magenta); }
.rubrique.r-caractere    { --rubrique-propre: var(--cyan); }
.rubrique.r-perception   { --rubrique-propre: var(--jaune); }
.rubrique__liste { list-style: none; margin: 0; padding: 0; border-top: var(--trait) solid var(--encre); }
.rubrique__liste li { border-bottom: 1px solid var(--filet); }
.rubrique__liste a {
  display: grid; grid-template-columns: 1fr auto; gap: var(--e-2); align-items: baseline;
  padding: var(--e-2) 0; text-decoration: none;
  transition: padding-left 0.18s var(--sortie), background-color 0.18s var(--sortie);
}
.rubrique__liste a:hover, .rubrique__liste a:focus-visible { background: var(--gris); padding-left: var(--e-2); outline-offset: -3px; }
.rubrique__liste strong { font-family: var(--display); font-weight: 900; font-size: var(--t-28); line-height: 1; display: block; }
.rubrique__liste strong + span { display: block; color: var(--texte-2); font-size: var(--t-16); margin-top: 4px; }
.rubrique__liste .fleche { width: 28px; height: 28px; fill: none; stroke: var(--encre); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1023px) {
  .feuille { grid-template-columns: 1fr; gap: var(--e-4); }
  .rail { position: static; }
  .bande__test span { font-size: var(--t-96); }
  .bande__titre { font-size: var(--t-48); }
  .rubrique { grid-template-columns: 1fr; }
  .rubrique__tete { position: static; min-height: 0; }
  .accueil-bande h1 { font-size: var(--t-96); }
  .mode-emploi ol { grid-template-columns: 1fr; gap: var(--e-3); }
  .pied__rubriques { grid-template-columns: 1fr; }
  .suite ul { columns: 1; }
}

@media (max-width: 767px) {
  body { font-size: var(--t-16); }
  .entete__inner { min-height: 56px; padding: 0 var(--e-2); }
  .marque { font-size: var(--t-22); }
  .marque img { width: 32px; height: 32px; }
  .menu__ouvrir {
    display: inline-block; cursor: pointer; list-style: none; font-weight: 700; padding: 8px 12px;
    border: var(--trait) solid var(--encre);
  }
  .menu__ouvrir::-webkit-details-marker { display: none; }
  .menu[open] .menu__ouvrir { background: var(--encre); color: var(--papier); }
  .menu__liste {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 45;
    display: none; background: var(--papier); border-bottom: var(--trait) solid var(--encre);
    max-height: calc(100vh - 56px); overflow: auto; padding: var(--e-1) var(--e-2) var(--e-3);
  }
  .menu__liste.is-ouvert, .no-js .menu__liste { display: block; }
  .no-js .menu__liste { position: static; }
  .no-js .menu__ouvrir { display: none; }
  .menu__liste > li { border-top: 1px solid var(--filet); }
  .rubrique-lien, .menu__liste a.langue { display: block; padding: 12px 0; border-bottom: 0; }
  .menu__liste details[open] > .rubrique-lien { background: none; text-decoration: underline; text-decoration-thickness: 4px; text-decoration-color: var(--rubrique-propre); }
  .menu__panneau { position: static; min-width: 0; border: 0; box-shadow: none; padding: 0 0 var(--e-1); }
  .menu__panneau a { padding: 8px 0 8px var(--e-3); margin-bottom: 4px; position: relative; }
  .menu__panneau a::before {
    content: ""; position: absolute; left: 4px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
    background: var(--rubrique-propre); border: 1px solid var(--encre);
  }

  .bande__inner { grid-template-columns: 1fr; gap: var(--e-1); padding: var(--e-2) var(--e-2) var(--e-3); }
  .bande__symboles { display: none; }
  .bande__test span { font-size: var(--t-96); }
  .bande__test small { margin-top: 6px; font-size: var(--t-14); }
  .bande__titre { font-size: var(--t-36); max-width: none; padding-bottom: 0; }
  .accueil-bande .bande__inner { grid-template-columns: minmax(0, 1fr); }
  .accueil-bande h1 { font-size: var(--t-64); overflow-wrap: anywhere; }
  .accueil-bande p { font-size: var(--t-18); }

  .feuille { padding: var(--e-3) var(--e-2) calc(var(--e-6) + 72px); }
  .test__intro h2 { font-size: var(--t-18); margin-bottom: var(--e-1); }
  .test__intro p { font-size: var(--t-16); }
  .consigne { margin-top: var(--e-2); padding: 10px 0; }
  .quiz { margin-top: var(--e-3); }
  .test__chapeau.is-replie { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
  .chapeau__plus {
    display: inline-block; background: none; border: 0; padding: 4px 0; margin-top: 4px; cursor: pointer;
    font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em;
  }
  .chapeau__plus[hidden] { display: none; }
  .question__tete { grid-template-columns: 48px 1fr; gap: var(--e-2); }
  .question__num { font-size: var(--t-36); line-height: 48px; height: 48px; }
  .question h3 { font-size: var(--t-22); padding-top: 8px; }
  .reponse { font-size: var(--t-18); min-height: 56px; padding: 10px var(--e-1); grid-template-columns: 28px 1fr; }
  .reponse .sym { font-size: 22px; }

  /* compteur en barre collante : le compte en display, les cases a 20 px */
  .rail { display: contents; }
  .compteur {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    border-width: var(--trait) 0 0; padding: var(--e-1) var(--e-2);
    display: grid; grid-template-columns: auto 1fr; gap: var(--e-2); align-items: center;
  }
  .compteur.is-fini { position: static; border-width: var(--trait); display: block; margin: var(--e-3) 0 0; }
  .compteur__titre { margin: 0; display: block; }
  .compteur__mot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compteur__titre .compteur__etat { display: block; font-family: var(--display); font-weight: 900; font-size: var(--t-36); line-height: 1; color: var(--encre); }
  .compteur__cases { grid-template-columns: repeat(10, 20px); gap: 3px; justify-content: end; }
  .case { font-size: 14px; }
  .compteur.is-fini .compteur__mot { position: static; width: auto; height: auto; clip: auto; font-family: var(--display); font-weight: 900; font-size: var(--t-28); }
  .compteur.is-fini .compteur__titre { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--e-2); }
  .compteur.is-fini .compteur__titre .compteur__etat { font-size: var(--t-28); }
  .compteur.is-fini .compteur__cases { justify-content: start; grid-template-columns: repeat(auto-fill, minmax(28px, 1fr)); gap: 6px; }
  .compteur.is-fini .case { font-size: 18px; }
  .compteur__total { display: none; }
  .compteur.is-fini .compteur__total { display: flex; }
  .pub { order: 2; }

  .resultat__encadre {
    grid-template-columns: 1fr; padding: var(--e-3) var(--e-2); gap: var(--e-2);
    grid-template-areas: "titre" "verdict" "echelle" "figure" "texte" "partage" "actions";
  }
  .resultat__titre { font-size: var(--t-36); }
  .suite { margin-top: var(--e-5); }
}

@media (prefers-reduced-motion: reduce) {
  .question.is-active, .case .sym, .resultat.is-visible .resultat__encadre { animation: none; }
  .reponse, .bouton, .rubrique__liste a { transition: none; }
}

@media print {
  .entete, .pied, .pub, .compteur, .quiz__nav, .suite, .shareon { display: none !important; }
  .question { display: block !important; }
}
