/* =====================================================================
   OUTIL « CONFORMITÉ & SÉCURITÉ ÉLECTRIQUE » — habillage de l'écran de RÉSULTAT
   (bloc injecté dans l'écran de fin de rp-quiz par rp-core/js/conformite-electrique.js).

   Portée VOLONTAIREMENT étroite, même doctrine que facade-exterieur.css : le
   parcours lui-même est déjà habillé par rp-quiz.css (PARTAGÉ, 3 métiers, 4
   questionnaires en prod) — on n'y touche pas, on ne surcharge rien de `.rp-quiz-*`.
   Ici, uniquement le préfixe `.rp-ce-*`, chargé sur la seule page
   /conformite-electrique (brand.json → tool_pages).

   COULEURS : aucune valeur en dur. L'échelle de risque réutilise EXACTEMENT la
   rampe de gravité déjà posée par diagnostic.css (niveau 0 = famille de marque,
   niveau 1 = --chip-yellow, niveau 2 = --chip-terra) — donc des jetons de marque,
   qui se reteintent tout seuls par métier (sur électricité : ambre / jaune / cuivre).
   Le SENS ne repose jamais sur la seule couleur : chaque niveau est nommé en toutes
   lettres (« Indice rouge ») et porte une icône distincte (accessibilité).
   ===================================================================== */

/* L'écran de fin de rp-quiz est centré : le résultat, lui, se lit à plat. */
.rp-ce-result {
  text-align: left; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.rp-ce-result * { box-sizing: border-box; min-width: 0; }

/* ---------- En-tête : l'indice ---------- */
.rp-ce-head {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 20px 18px; background: var(--card);
}
.rp-ce-badge {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase;
}
.rp-ce-badge-ic { display: inline-flex; }
.rp-ce-badge-ic svg { width: 20px; height: 20px; }
.rp-ce-titre {
  font-family: var(--display); font-size: clamp(21px, 4.6vw, 30px); line-height: 1.1;
  letter-spacing: -.02em; color: var(--ink); margin: 0;
}
.rp-ce-sub { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

/* Rampe de gravité — jetons de marque uniquement (miroir de diagnostic.css). */
.rp-ce-head--vert   { background: var(--mint); border-color: var(--green-soft); }
.rp-ce-head--vert   .rp-ce-badge { color: var(--green-ink); }
.rp-ce-head--orange { background: color-mix(in srgb, var(--chip-yellow) 16%, var(--card));
                      border-color: color-mix(in srgb, var(--chip-yellow) 55%, var(--card)); }
.rp-ce-head--orange .rp-ce-badge { color: var(--ink); }
.rp-ce-head--rouge  { background: color-mix(in srgb, var(--chip-terra) 14%, var(--card));
                      border-color: color-mix(in srgb, var(--chip-terra) 62%, var(--card));
                      box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--chip-terra) 22%, transparent); }
.rp-ce-head--rouge  .rp-ce-badge { color: var(--chip-terra); }

/* ---------- Règle de calcul (assumée, pas un score opaque) ---------- */
.rp-ce-regle {
  margin: 16px 0 0; padding: 13px 15px; border-radius: var(--radius-sm);
  background: var(--cream); border: 1px dashed var(--line);
  font-size: 13.5px; line-height: 1.55; color: var(--muted);
}
.rp-ce-regle strong { color: var(--ink); font-weight: 700; }

/* ---------- Bandeau d'urgence ---------- */
.rp-ce-urgence {
  margin-top: 18px; padding: 16px 16px 18px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--chip-terra) 10%, var(--card));
  border: 1.5px solid color-mix(in srgb, var(--chip-terra) 55%, var(--card));
}
.rp-ce-urgence-t {
  display: flex; align-items: center; gap: 9px; margin: 0 0 8px;
  font-family: var(--display); font-size: 17px; font-weight: 800; color: var(--ink);
}
.rp-ce-urgence-t svg { flex: 0 0 auto; color: var(--chip-terra); }
.rp-ce-urgence-p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.rp-ce-urgence-ol { margin: 0; padding-left: 20px; font-size: 14.5px; line-height: 1.55; color: var(--ink); }
.rp-ce-urgence-ol li { margin: 6px 0; }
.rp-ce-urgence-cta { margin-top: 14px; width: 100%; }

/* ---------- Blocs ---------- */
.rp-ce-block { margin-top: 26px; }
.rp-ce-h3 {
  font-family: var(--display); font-size: 18px; font-weight: 800; letter-spacing: -.01em;
  color: var(--ink); margin: 0 0 10px;
}
.rp-ce-p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.rp-ce-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.rp-ce-list--tight { gap: 7px; }
.rp-ce-list li {
  position: relative; padding-left: 20px; font-size: 14.5px; line-height: 1.55; color: var(--muted);
}
.rp-ce-list li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 7px; height: 7px; border-radius: 2px; background: var(--green-soft);
}
.rp-ce-list strong { color: var(--ink); font-weight: 700; }

/* ---------- Détail des points relevés ---------- */
.rp-ce-points { display: flex; flex-direction: column; gap: 12px; }
.rp-ce-point {
  border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: var(--radius-sm); background: var(--card); padding: 15px 16px;
}
.rp-ce-point--s1 { border-left-color: var(--green-soft); }
.rp-ce-point--s2 { border-left-color: var(--chip-yellow); }
.rp-ce-point--s3 { border-left-color: var(--chip-terra); }
.rp-ce-point-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 10px; }
.rp-ce-point-t {
  font-family: var(--display); font-size: 16.5px; font-weight: 800; line-height: 1.25;
  color: var(--ink); margin: 0;
}
.rp-ce-point-rub {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.rp-ce-norme, .rp-ce-risque { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.rp-ce-risque { margin-bottom: 0; }
.rp-ce-lbl {
  display: block; font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--green-ink); margin-bottom: 3px;
}
.rp-ce-risque .rp-ce-lbl { color: var(--chip-terra); }

/* ---------- Rien relevé ---------- */
.rp-ce-ok { padding: 16px; border-radius: var(--radius-sm); background: var(--mint); border: 1px solid var(--green-soft); }

/* ---------- Mise en sécurité vs mise aux normes ---------- */
.rp-ce-duo { display: grid; gap: 12px; grid-template-columns: 1fr; }
.rp-ce-col {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 16px 18px;
}
.rp-ce-col-eyebrow {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--green-ink); margin: 0 0 6px;
}
.rp-ce-col-t { font-family: var(--display); font-size: 17px; font-weight: 800; color: var(--ink); margin: 0 0 8px; line-height: 1.2; }
.rp-ce-col-p { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.rp-ce-note { margin: 12px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); font-style: italic; }

/* ---------- Diagnostic obligatoire / visite ---------- */
.rp-ce-diag {
  padding: 16px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--chip-yellow) 12%, var(--card));
  border: 1px solid color-mix(in srgb, var(--chip-yellow) 42%, var(--line));
}
.rp-ce-diag .rp-ce-p:last-child { margin-bottom: 0; }
.rp-ce-visite { padding: 16px; border-radius: var(--radius-sm); background: var(--cream); border: 1px solid var(--line); }

/* ---------- Action ---------- */
.rp-ce-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.rp-ce-cta .rp-btn { flex: 1 1 220px; justify-content: center; text-align: center; }
.rp-ce-legal { margin: 16px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }

@media (min-width: 620px) {
  .rp-ce-duo { grid-template-columns: 1fr 1fr; gap: 14px; }
  .rp-ce-head { padding: 24px 22px; }
  .rp-ce-urgence-cta { width: auto; }
}

/* ---------- Page : bandeau « ce que l'outil sait faire » ---------- */
.rp-ce-intro { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 30px; }
.rp-ce-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 18px 20px; }
.rp-ce-card h3 { font-family: var(--display); font-size: 17px; font-weight: 800; margin: 0 0 6px; color: var(--ink); }
.rp-ce-card p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.rp-ce-card .rp-ce-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px; background: var(--mint); color: var(--green-ink);
  font-family: var(--mono); font-size: 13px; font-weight: 600; margin-bottom: 10px;
}
