/* =============================================
   /test/ — « L'effet miroir » : formulaire, progression, résultat.
   Chargé APRÈS refonte.css. N'utilise que les jetons de style.css (--marine, --brique, --brique-fonce,
   --fond-doux, --fond-2, --fond-3, --texte, --texte-2, --d01…--d07, --police-titre, --police-texte).
   ⛔ Accessibilité : la couleur ne porte jamais le sens seule. Titre du résultat + fourchette de points
   + mention « Votre tranche » portent l'information ; vert / ocre / brique des tranches sont décoratifs.
   ⛔ Mouvement : ≤ 350 ms, neutralisé sous prefers-reduced-motion (opacité et translation comprises).
   ============================================= */

/* Texte réservé aux lecteurs d'écran */
.rf-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Le marqueur « [À COMPLÉTER] » de refonte.css est en nowrap : il doit pouvoir passer à la ligne sur téléphone */
#test-miroir .a-completer {
  white-space: normal;
}
#test-miroir {
  max-width: 52rem;
  padding: clamp(1.1rem, 3vw, 2rem);
}

/* ── Sans JavaScript : le formulaire se lit, un message explique, les commandes du moteur sont cachées ── */
.rf-test__nojs {
  margin-bottom: 1.2rem;
  padding: 0.9rem 1.1rem;
  background: var(--fond-2);
  color: var(--texte);
  border-left: 5px solid var(--marine);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 0.95rem;
}
.rf-test__nojs a {
  color: var(--brique-fonce);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rf-js-only,
.rf-res {
  --tranche: var(--d02); /* décoratif : vert / ocre / brique */
  margin-top: 1.4rem;
  padding: clamp(0.9rem, 2.5vw, 1.3rem);
  background: var(--fond-doux);
  border: 1px solid rgba(27, 42, 74, 0.14);
  border-left: 10px solid var(--tranche);
  border-radius: var(--r-lg);
  scroll-margin-top: 7rem;
}
#test-miroir[data-etat="actif"] .rf-test__nojs,
#test-miroir[data-etat="resultat"] .rf-test__nojs {
  display: none;
}
#test-miroir[data-etat="actif"] .rf-js-only,
#test-miroir[data-etat="resultat"] .rf-js-only {
  display: flex;
}
#test-miroir[data-etat="resultat"] .rf-res:not([hidden]) {
  display: block;
}

/* ── Une affirmation = un fieldset ── */
.rf-q {
  min-width: 0;
  margin: 0;
  padding: 1.15rem 0;
  border: 0;
  border-top: 1px solid rgba(27, 42, 74, 0.14);
  scroll-margin-top: 7rem;
}
.rf-q:first-of-type {
  border-top: 0;
  padding-top: 0.2rem;
}
.rf-q__legend {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  width: 100%;
  padding: 0;
  font-family: var(--police-titre);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--marine);
}
.rf-q__legend .pastille {
  margin-top: -0.15rem;
}
/* Pastilles de ce test : fond = variante « texte » du domaine, pour que le chiffre blanc passe 4,5:1
   (--d02 seul donne 4,37:1). Le numéro reste toujours affiché. */
.rf-q .pastille,
.rf-prio .pastille {
  background: var(--dom-texte, var(--marine));
}
.rf-q__texte {
  padding-top: 0.1rem;
}
.rf-q__choix {
  display: grid;
  grid-template-columns: minmax(4.4rem, 6.5rem) minmax(9rem, 11rem) minmax(4.4rem, 6.5rem);   /* la réponse centrale (« Je ne sais pas ») a besoin de plus de place */
  align-items: stretch;   /* les trois boutons ont toujours la même hauteur, même si l'un passe sur deux lignes */
  gap: 0.6rem;
  margin: 0.85rem 0 0 3.45rem;
}
.rf-q__choix .rf-choix,
.rf-q__choix .rf-choix label {
  height: 100%;
}

/* Boutons radio : le vrai <input> recouvre sa pastille (cible ≥ 44 px), il reste focalisable et fléché au clavier */
.rf-choix {
  position: relative;
}
.rf-choix input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.rf-choix label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.4rem 0.9rem;
  border: 2px solid var(--marine);
  border-radius: var(--r);
  background: #fff;
  color: var(--marine);
  font-family: var(--police-texte);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.rf-choix input:hover + label {
  background: var(--fond-3);
}
.rf-choix input:checked + label {
  background: var(--marine);
  color: #fff;
}
/* Réponse choisie : coche + remplissage (jamais une couleur seule) */
.rf-choix input:checked + label::before {
  content: "✓";
  content: "✓" / "";
  margin-right: 0.4em;
  font-weight: 700;
}
.rf-choix input:focus-visible + label {
  outline: 2px solid var(--brique-fonce);
  outline-offset: 3px;
}
.rf-choix input:checked:focus-visible + label {
  outline-color: var(--brique-fonce);
  box-shadow: 0 0 0 5px #fff;
}

/* ── Progression ── */
.rf-test__barre {
  align-items: center;
  gap: 1rem;
  margin-top: 0.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(27, 42, 74, 0.14);
}
.rf-test__progress {
  flex: 0 0 auto;
  margin: 0;
  font-weight: 700;
  color: var(--marine);
  font-variant-numeric: tabular-nums;
}
.rf-bar {
  flex: 1 1 auto;
  height: 0.5rem;
  border-radius: 99px;
  background: var(--fond-3);
  overflow: hidden;
}
.rf-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--marine);
  transition: width 0.2s ease;
}

.rf-test__actions {
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}
.rf-test__actions .rf-btn,
.rf-res__actions .rf-btn {
  min-height: 2.9rem;
}
/* Bouton « Voir mon résultat » tant que les 7 réponses ne sont pas données : texte + pointillés, pas de couleur seule */
.rf-btn[aria-disabled="true"] {
  background: var(--fond-2);
  color: var(--texte-2);
  border: 2px dashed var(--texte-2);
  cursor: not-allowed;
  transform: none;
}
.rf-btn[aria-disabled="true"]:hover {
  background: var(--fond-2);
  transform: none;
}

.rf-test__manque {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  background: #fff;
  border: 2px solid var(--brique-fonce);
  border-left-width: 8px;
  border-radius: var(--r);
  color: var(--texte);
}
.rf-test__manque[hidden] {
  display: none;
}
.rf-test__manque:focus {
  outline: 2px solid var(--brique-fonce);
  outline-offset: 3px;
}
.rf-test__manque p {
  margin: 0 0 0.4rem;
  font-weight: 700;
}
.rf-test__manque ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.rf-test__manque a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--brique-fonce);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Résultat ── */
.rf-res {
  --tranche: var(--d02); /* décoratif : vert / ocre / brique */
  margin-top: 2rem;
  padding: clamp(1.1rem, 3vw, 1.8rem);
  background: var(--fond-doux);
  border: 1px solid rgba(27, 42, 74, 0.14);
  border-left: 10px solid var(--tranche);
  border-radius: var(--r-lg);
  scroll-margin-top: 7rem;
}
.rf-res[data-tranche="1"] {
  --tranche: var(--d05);
}
.rf-res[data-tranche="2"] {
  --tranche: var(--brique);
}
.rf-res.est-apparu {
  animation: rf-apparition 0.25s ease-out both;
}
@keyframes rf-apparition {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.rf-res__tete {
  display: grid;
  grid-template-columns: minmax(8.5rem, 10.5rem) minmax(0, 1fr);
  gap: 0.7rem;
  align-items: stretch;
}
.rf-res__tuile {
  padding: 0.7rem 1rem;
  background: #fff;
  border: 1px solid rgba(27, 42, 74, 0.16);
  border-radius: var(--r-lg);
}
.rf-res__tuile--score {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-top: 5px solid var(--tranche);
}
.rf-res__tuile--message {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
}
.rf-res__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  margin: 0;
}
.rf-res__label {
  font-weight: 700;
  color: var(--texte-2);
  letter-spacing: 0.01em;
  font-size: 0.92rem;
}
.rf-res__val {
  font-family: var(--police-titre);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--marine);
}
.rf-res__val strong {
  font-size: 2.4rem;
  line-height: 1;
  font-weight: 700;
}
.rf-res__titre {
  margin: 0;
  font-family: var(--police-titre);
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--marine);
}
/* Le titre reçoit le focus par script pour que le lecteur d'écran annonce le résultat : pas de cadre, sauf au clavier. */
.rf-res__titre:focus {
  outline: none;
}
.rf-res__titre:focus-visible {
  outline: 2px solid var(--brique-fonce);
  outline-offset: 4px;
  border-radius: 3px;
}
.rf-res__texte {
  margin: 0;
  font-size: 1rem;
  color: var(--texte);
}
.rf-res__fourchette {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--texte-2);
}
/* Blocs séparés par un filet : tranches, priorités, actions */
.rf-res__bloc,
.rf-prio,
.rf-res__actions {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(27, 42, 74, 0.16);
}
.rf-res__soustitre {
  margin: 0 0 0.5rem;
  font-family: var(--police-titre);
  font-size: 1rem;
  font-weight: 600;
  color: var(--marine);
}

/* Échelle des trois tranches : la tranche atteinte est marquée par un cadre épais ET la mention « Votre tranche » */
.rf-echelle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rf-echelle__item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid rgba(27, 42, 74, 0.22);
  border-radius: var(--r);
  color: var(--texte-2);
}
.rf-echelle__pts {
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rf-echelle__titre {
  font-family: var(--police-titre);
  font-weight: 600;
  line-height: 1.25;
  color: var(--marine);
}
.rf-echelle__texte {
  display: none; /* le texte de la tranche atteinte est déjà dans la tuile du résultat */
}
.rf-echelle__ici {
  display: none;
  margin-top: 0.1rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--marine);
}
.rf-echelle__item[aria-current="true"] {
  border: 3px solid var(--marine);
  padding: calc(0.5rem - 2px) calc(0.75rem - 2px);
}
.rf-echelle__item[aria-current="true"] .rf-echelle__ici {
  display: block;
}
.rf-echelle__item[aria-current="true"] .rf-echelle__ici::before {
  content: "▶ ";
  content: "▶ " / "";
}

/* Priorités */
.rf-prio__titre {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}
.rf-prio__titre {
  margin: 0 0 0.2rem;
}
.rf-prio__intro {
  flex: 0 0 auto;
  min-width: 6.5rem;
  margin: 0;
  font-weight: 700;
  color: var(--texte);
}
.rf-prio > div:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
}
.rf-prio > div + div:not([hidden]) {
  margin-top: 0.5rem;
}
.rf-prio__liste {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Une tuile par domaine : filet de la couleur du domaine à gauche, numéro et nom du domaine, puis la réponse qui l'explique */
/* Une pastille par domaine : filet de la couleur du domaine, numéro et nom ; les points sont dans l'intitulé du groupe */
.rf-prio__liste li {
  display: flex;
  align-items: center;
  padding: 0.15rem 0.8rem 0.15rem 0.5rem;
  background: #fff;
  border: 1px solid rgba(27, 42, 74, 0.16);
  border-left: 5px solid var(--dom, var(--marine));
  border-radius: var(--r);
}
.rf-prio__lien {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.9rem;
  color: var(--marine);
  font-weight: 700;
}
.rf-prio__lien .rf-prio__nom {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.rf-prio__lien:hover .rf-prio__nom {
  color: var(--brique-fonce);
}
.rf-prio__lien .pastille {
  width: 2.3rem;
  height: 2.3rem;
  font-size: 0.95rem;
}
.rf-prio__meta {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.rf-prio__vide {
  margin: 0.8rem 0 0;
  font-weight: 700;
}
.rf-prio [hidden] {
  display: none;
}

.rf-res__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.rf-email__note {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}
.rf-email__aide {
  margin: 0.6rem 0 0;
  font-size: 0.92rem;
  color: var(--texte-2);
}
.rf-champ {
  margin-bottom: 0.9rem;
}
.rf-champ label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 700;
  color: var(--texte);
}
.rf-champ input {
  display: block;
  width: 100%;
  max-width: 28rem;
  min-height: 2.9rem;
  padding: 0.5rem 0.8rem;
  border: 2px solid var(--texte-2);
  border-radius: var(--r);
  background: #fff;
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: 1rem;
}
.rf-champ input:focus-visible {
  outline: 2px solid var(--brique-fonce);
  outline-offset: 2px;
}
.rf-check {
  position: relative;
  margin: 1.1rem 0;
}
.rf-check input {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 2.9rem;
  height: 2.9rem;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.rf-check label {
  display: block;
  min-height: 2.9rem;
  padding: 0.35rem 0 0.35rem 3.5rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--texte);
}
.rf-check label::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.55rem;
  width: 1.7rem;
  height: 1.7rem;
  border: 2px solid var(--marine);
  border-radius: 4px;
  background: #fff;
}
.rf-check input:checked + label::before {
  background: var(--marine);
}
.rf-check input:checked + label::after {
  content: "✓";
  content: "✓" / "";
  position: absolute;
  left: 0.85rem;
  top: 0.5rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.7rem;
}
.rf-check input:focus-visible + label::before {
  outline: 2px solid var(--brique-fonce);
  outline-offset: 3px;
}

/* ── Banderole « résultat par e-mail » et conseils de fin de parcours ── */
.rf-banderole {
  margin-top: 1.6rem;
  padding: 1.1rem 1.3rem;
  background: #fff;
  border: 1px solid rgba(27, 42, 74, 0.22);
  border-left: 6px solid var(--marine);
  border-radius: var(--r-lg);
}
.rf-banderole[hidden],
.rf-conseils[hidden],
.rf-email__erreur[hidden] {
  display: none;
}
.rf-banderole__titre {
  margin: 0;
  font-family: var(--police-titre);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--marine);
}
.rf-banderole__sous {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: var(--texte-2);
}
.rf-banderole__etape {
  margin: 0 0 0.3rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--texte-2);
}
.rf-banderole__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-top: 1rem;
}
.rf-banderole .rf-email__form {
  margin: 0;
}
.rf-redir {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}
.rf-redir__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  padding: 0.6rem 0.8rem;
  background: #fff;
  border: 1px solid rgba(27, 42, 74, 0.18);
  border-left: 5px solid var(--dom, var(--marine));
  border-radius: var(--r-lg);
}
.rf-redir__item .pastille {
  width: 2.3rem;
  height: 2.3rem;
  font-size: 0.95rem;
}
.rf-redir__corps {
  flex: 1 1 14rem;
  min-width: 0;
}
.rf-redir__nom {
  margin: 0;
  font-weight: 700;
  color: var(--marine);
}
.rf-redir__pourquoi {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  color: var(--texte-2);
}
.rf-redir__item .rf-btn {
  flex: 0 0 auto;
}
/* Boutons secondaires : une cellule à contour marine, même forme que le bouton plein (cf. .rf-btn--outline) */
.rf-banderole__fermer,
.rf-conseil__fermer,
.rf-email__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.2rem;
  background: transparent;
  color: var(--marine);
  border: 2px solid var(--marine);
  border-radius: var(--r);
  font-family: var(--police-texte);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition:
    background var(--t),
    color var(--t);
}
.rf-banderole__fermer:hover,
.rf-conseil__fermer:hover,
.rf-email__plus:hover {
  background: var(--marine);
  color: #fff;
}
.rf-banderole__fermer:focus-visible,
.rf-conseil__fermer:focus-visible {
  outline: 2px solid var(--brique-fonce);
  outline-offset: 2px;
}
.rf-banderole__ok {
  margin: 0;
  font-weight: 400;
  color: var(--marine);
}
.rf-banderole__ok strong {
  font-weight: 700;
  overflow-wrap: anywhere; /* adresse longue : retour à la ligne plutôt que débordement */
}
.rf-banderole__ok:not(:empty) {
  margin-top: 0.2rem;
  padding-left: 1.9rem;
  position: relative;
}
.rf-banderole__ok:not(:empty)::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}
.rf-banderole__ok:focus {
  outline: none;
}
.rf-email__erreur {
  margin: 0 0 0.9rem;
  padding: 0.6rem 0.8rem;
  border-left: 4px solid var(--brique-fonce);
  background: #fbefee;
  font-weight: 700;
}
.rf-email__erreur::before {
  content: "\26A0\FE0F  ";
}

.rf-conseils {
  margin-top: 1.6rem;
}
.rf-conseils__titre {
  margin: 0;
  font-family: var(--police-titre);
  font-size: 1.3rem;
  color: var(--marine);
}
.rf-conseils__titre:focus {
  outline: none;
}
.rf-conseils__intro {
  margin: 0.3rem 0 0.9rem;
  color: var(--texte-2);
}
.rf-conseils__liste {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rf-conseil {
  padding: 1rem 1.2rem 1.1rem;
  background: #fff;
  border: 1px solid rgba(27, 42, 74, 0.18);
  border-left: 6px solid var(--dom, var(--marine));
  border-radius: var(--r-lg);
}
.rf-conseil__tete {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.rf-conseil__fermer {
  flex: 0 0 auto;
  white-space: nowrap;
}
.rf-conseil__tete .pastille {
  width: 2.3rem;
  height: 2.3rem;
  font-size: 0.95rem;
}
.rf-conseil__titre {
  flex: 1 1 auto;
  margin: 0;
  font-family: var(--police-titre);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--marine);
}
.rf-conseil__texte {
  margin: 0.5rem 0 0.8rem;
}
.rf-conseil__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
  margin-top: 0.3rem;
}
/* Étape 2 compacte : trois champs sur une ligne, information visible d'une ligne, conditions dépliables */
.rf-champs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem 0.9rem;
  margin: 0.7rem 0 0.8rem;
}
.rf-banderole .rf-champ {
  margin-bottom: 0;
}
.rf-champs .rf-champ input {
  max-width: none;
}
.rf-email__pied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem 1rem;
  margin-top: 0.3rem;
}
.rf-email__pied .rf-email__note {
  flex: 1 1 22rem;
  margin: 0;
}
.rf-email__plus:focus-visible {
  outline: 2px solid var(--brique-fonce);
  outline-offset: 2px;
}
.rf-email__conditions {
  margin-top: 0.3rem;
  padding: 0.6rem 0.9rem;
  background: var(--fond-doux);
  border-left: 4px solid var(--marine);
  border-radius: var(--r);
}
.rf-email__conditions[hidden] {
  display: none;
}
.rf-email__conditions .rf-email__aide {
  margin: 0;
}
.rf-email__conditions .rf-email__aide + .rf-email__aide {
  margin-top: 0.4rem;
}
@media (max-width: 960px) and (min-width: 721px) {
  .rf-champs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rf-champs .rf-champ:nth-child(3) {
    grid-column: 1 / -1;
  }
}
@media (max-width: 720px) {
  /* Téléphone : boutons plus petits, à la largeur de leur texte (plus de pleine largeur) */
  #test-resultat .rf-btn,
  #test-resultat .rf-banderole__fermer,
  #test-resultat .rf-conseil__fermer,
  #test-resultat .rf-email__plus {
    width: auto; /* annule le .rf-btn { width: 100% } global de refonte.css */
    min-height: 2.35rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.88rem;
    text-wrap: balance;
  }
  /* Carte de domaine : pastille + texte sur une ligne, bouton dessous aligné sous le texte, à la largeur de son libellé */
  .rf-redir__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.4rem 0.7rem;
  }
  .rf-redir__item .rf-btn {
    grid-column: 2;
    justify-self: start;
  }
  .rf-res__actions,
  .rf-banderole__actions {
    gap: 0.5rem;
  }
  .rf-banderole {
    padding: 0.9rem 0.8rem;
    border-left-width: 5px;
  }
  .rf-redir__item {
    gap: 0.5rem 0.7rem;
    padding: 0.55rem 0.65rem;
  }
  .rf-redir__item .pastille {
    width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
  }
  .rf-redir__corps {
    flex: 1 1 0;
  }
  .rf-redir__pourquoi {
    font-size: 0.88rem;
  }
  .rf-redir__item .rf-btn {
    min-height: 2.75rem;
    padding-block: 0.4rem;
  }
  .rf-conseil {
    padding: 0.8rem 0.8rem 0.9rem;
  }
  .rf-champs {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    margin: 0.5rem 0 0.6rem;
  }
  /* Téléphone : la phrase d'intro de l'étape 2 est masquée */
  .rf-banderole__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
  }
  /* Étape 3 : le remerciement n'a plus de cadre propre (un seul cadre : celui du résultat) ; cartes plus serrées */
  #test-banderole-3 {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
  }
  #test-banderole-3 .rf-banderole__titre {
    font-size: 1.2rem;
    line-height: 1.25;
  }
  #test-banderole-3 .rf-banderole__ok:not(:empty) {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
  }
  #test-banderole-3 .rf-banderole__sous {
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
    line-height: 1.4;
  }
  #test-banderole-3 .rf-banderole__actions {
    margin-top: 0.7rem;
  }
  .rf-conseils {
    margin-top: 1rem;
  }
  .rf-conseils__liste {
    gap: 0.6rem;
  }
  .rf-conseil__tete {
    align-items: flex-start;
    gap: 0.6rem;
  }
  .rf-conseil__tete .pastille {
    width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
  }
  .rf-conseil__titre {
    min-width: 0;
    font-size: 1.05rem;
    line-height: 1.3;
  }
  .rf-conseil__texte {
    margin: 0.4rem 0 0.6rem;
    font-size: 0.95rem;
    line-height: 1.4;
  }
  .rf-conseil {
    padding: 0.8rem 0.7rem 0.9rem;
    border-left-width: 4px;
  }
  .rf-conseil__actions {
    gap: 0.4rem;
  }
  #test-resultat .rf-conseil__actions .rf-btn,
  #test-resultat .rf-conseil__actions .rf-conseil__fermer {
    padding-inline: 0.55rem;
  }
  #test-banderole-2 .rf-banderole__sous {
    display: none;
  }
}

/* Étapes 1 à 3 : le résultat (score, tranches, priorités, boutons) se replie, la banderole reste seule à l'écran.
   Étape 0 = le résultat seul. Sans script, aucun attribut data-etape n'est posé : tout reste affiché. */
#test-resultat:is([data-etape="1"], [data-etape="2"], [data-etape="3"]) > :is(.rf-res__tete, .rf-res__bloc, .rf-prio, .rf-res__actions) {
  display: none;
}
#test-resultat:is([data-etape="1"], [data-etape="2"], [data-etape="3"]) > .rf-banderole {
  margin-top: 0;
}

/* ── Téléphone ── */
@media (max-width: 720px) {
  .rf-res__tete {
    grid-template-columns: minmax(5.8rem, auto) minmax(0, 1fr);
    gap: 0.5rem;
  }
  .rf-res__tuile {
    padding: 0.6rem 0.7rem;
  }
  .rf-echelle {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }
  .rf-echelle__item {
    padding: 0.4rem 0.7rem;
  }
  .rf-echelle__item[aria-current="true"] {
    padding: calc(0.4rem - 2px) calc(0.7rem - 2px);
  }
  .rf-prio__lien {
    min-height: 2.6rem;
    gap: 0.5rem;
  }
  .rf-prio__lien .pastille {
    width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
  }
  .rf-prio__intro {
    flex: 1 0 100%;
  }
  .rf-q__legend {
    gap: 0.7rem;
    font-size: 1.05rem;
  }
  .rf-q__choix {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr) minmax(0, 1fr);
    align-items: stretch;
    margin-left: 0;
  }
  .rf-q__choix .rf-choix,
  .rf-q__choix .rf-choix label {
    height: 100%;
  }
  .rf-q__choix .rf-choix label {
    padding-inline: 0.4rem;   /* « Je ne sais pas » tient sur une ligne dès 320 px */
  }
  .rf-res__tuile {
    padding: 0.9rem 1rem;
  }
  .rf-test__actions .rf-btn,
  .rf-res__actions .rf-btn {
    width: 100%;
  }
  .rf-res__val strong {
    font-size: 2.6rem;
  }
  .rf-res {
    border-left-width: 8px;
  }
}

/* ── Mouvement réduit : plus d'opacité ni de translation animées, plus de transition ── */
@media (prefers-reduced-motion: reduce) {
  .rf-res.est-apparu {
    animation: none;
  }
  .rf-bar span,
  .rf-choix label {
    transition: none;
  }
}

/* ── Alignement sur les pages Expertises : questions en cartes à filet de couleur du domaine ──
   La <legend> d'un fieldset chevauche sa bordure : « float » la ramène dans le flux normal. */
#test-miroir {
  max-width: none;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.rf-test__citation {
  margin: 1rem 0 0;
  font-size: 1.1rem;
}
.rf-q {
  display: flow-root;
  margin: 0 0 1rem;
  padding: 1.3rem 1.7rem;
  background: #fff;
  border: 1px solid rgba(27, 42, 74, 0.12);
  border-left: 6px solid var(--dom, var(--marine));
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.rf-q:first-of-type {
  padding-top: 1.3rem;
  border-top: 1px solid rgba(27, 42, 74, 0.12);
}
.rf-q__legend {
  float: left;
  width: 100%;
}
.rf-q__choix {
  clear: both;
}
@media (min-width: 900px) {
  .rf-q__legend {
    width: calc(100% - 23rem);
    padding-top: 0.5rem;
  }
  .rf-q__choix {
    clear: none;
    float: right;
    width: 22rem;
    margin: 0;
    grid-template-columns: 1fr 1.9fr 1fr;
  }
}
@media (max-width: 640px) {
  .rf-q {
    padding: 1.1rem 1.1rem 1.1rem 1.2rem;
  }
}
