/* ==========================================================================
   SCEALIA — STYLES DES PAGES INTÉRIEURES (cas d'usage, certificat,
   avocats, vérificateur). Chargé en complément de style.css via la
   variable extraCss du partial head.ejs. Préfixes : cuh-, cud-, crt-,
   avk-, vrf-, demo-.
   ========================================================================== */

/* ─── Héros commun des pages intérieures ─────────────────────────────────── */
.page-hero {
  max-width: 1140px;
  margin: 0 auto;
  padding: 56px 24px 8px;
  text-align: center;
}
.page-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  color: var(--nuit);
  margin: 14px 0 16px;
}
.page-hero h1 em { font-style: italic; color: var(--teal); }
.page-hero .lede {
  max-width: 680px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

/* ─── HUB CAS D'USAGE ────────────────────────────────────────────────────── */
.cuh-wrap { max-width: 1140px; margin: 0 auto; padding: 32px 24px 72px; }
.cuh-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}
.cuh-grid .case-card h5 { font-size: 18px; }
.cuh-wrap .cuh-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
}
/* Sur la carte vedette, « Lire la fiche » vit dans la barre meta (flex) à côté du
   badge certificat : on annule le décalage vertical pour l'aligner (bug 2). */
.case-feature .case-meta .cuh-more { margin-top: 0; }
.cuh-disclaimer {
  margin: 36px auto 0;
  max-width: 820px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
@media (max-width: 980px) { .cuh-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cuh-grid { grid-template-columns: 1fr; } }

/* ─── FICHE CAS D'USAGE ──────────────────────────────────────────────────── */
/* Annule le padding de la règle globale `section {…}` (style.css) qui fuit sur
   les <section class="cud-block"> et créait d'énormes écarts verticaux. */
.article-body .cud-block { padding: 0; max-width: none; }
.cud-hero-img {
  width: 100%;
  aspect-ratio: 5/2;
  object-fit: cover;
  border-radius: var(--r-lg);
  margin: 26px 0 6px;
}
.cud-block { margin: 34px 0; }
.cud-block h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  color: var(--nuit);
  margin-bottom: 12px;
}
.cud-block p { font-size: 15.5px; line-height: 1.7; color: var(--text); }
/* Aère les sections à plusieurs paragraphes (« La situation » : sit1/sit2/sit3) :
   un blanc entre paragraphes consécutifs évite l'effet bloc de texte compact. */
.cud-block p + p { margin-top: 16px; }
.cud-list { list-style: none; padding: 0; margin: 6px 0 0; }
.cud-list li {
  position: relative;
  padding: 10px 0 10px 30px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.cud-list li:last-child { border-bottom: none; }
.cud-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 17px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
}
.cud-note {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}
.cud-cert-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--teal);
  text-decoration: none;
}
.cud-cert-link:hover { text-decoration: underline; }
.cud-related {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}
@media (max-width: 620px) { .cud-related { grid-template-columns: 1fr; } }

/* ─── PAGE CERTIFICAT ────────────────────────────────────────────────────── */
.crt-wrap { max-width: 1140px; margin: 0 auto; padding: 16px 24px 72px; }
.crt-demo-banner {
  max-width: 860px;
  margin: 24px auto;
  padding: 10px 18px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.crt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 36px;
  align-items: start;
  margin-top: 28px;
}
@media (max-width: 980px) { .crt-layout { grid-template-columns: 1fr; } }

/* Reproduction stylisée du certificat (données fictives) */
.crt-doc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(18, 38, 62, 0.12);
  padding: 34px 36px;
  font-size: 13px;
  color: var(--nuit);
  position: relative;
}
.crt-entete {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--nuit);
  padding-bottom: 12px;
}
.crt-logo { font-family: var(--serif); font-size: 22px; }
.crt-logo small {
  display: block;
  font-family: var(--sans);
  font-size: 8.5px;
  color: var(--muted);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-top: 2px;
}
.crt-droite { text-align: right; }
.crt-type { font-family: var(--serif); font-size: 17px; }
.crt-num { font-family: 'Courier New', monospace; font-size: 11px; color: var(--muted); margin-top: 2px; }
.crt-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 11px;
  border-radius: 100px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  background: var(--nuit);
  color: var(--cream);
  border: 1.5px solid #B08D3E;
}
.crt-attestation {
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.5;
  margin: 18px 0 14px;
  text-align: justify;
}
.crt-attestation strong { border-bottom: 2px solid var(--teal); font-weight: normal; }
.crt-ident {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 11.5px;
}
.crt-ident .lib {
  color: var(--muted);
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 2px;
}
.crt-ident .val { font-weight: 600; }
.crt-ident .pleine { grid-column: 1 / -1; }
.crt-hash { font-family: 'Courier New', monospace; font-size: 10px; word-spacing: 3px; line-height: 1.6; }
.crt-frise-titre {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--muted);
  margin: 18px 0 10px;
}
.crt-frise { display: flex; }
.crt-etape { flex: 1; position: relative; padding-right: 8px; }
.crt-etape::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 14px;
  right: 0;
  height: 2px;
  background: var(--teal);
}
.crt-etape:last-child::before { display: none; }
.crt-puce {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--teal);
  position: relative;
  z-index: 1;
}
.crt-puce--pleine { background: var(--teal); }
.crt-puce--cachet { border-color: var(--nuit); background: var(--nuit); box-shadow: 0 0 0 2px #B08D3E inset; }
.crt-etape h4 { font-size: 10.5px; margin: 7px 0 2px; }
.crt-etape .h { font-family: 'Courier New', monospace; font-size: 8.5px; color: var(--teal); }
.crt-etape p { font-size: 9px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.crt-atteste {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 10.5px;
}
.crt-atteste > div { padding: 11px 13px; }
/* coins arrondis sans overflow:hidden (qui clippait le repère n°5 dans la gouttière) */
.crt-atteste-oui { border-top-left-radius: 5px; border-bottom-left-radius: 5px; }
.crt-atteste-non { border-top-right-radius: 5px; border-bottom-right-radius: 5px; }
.crt-atteste h4 { font-size: 9.5px; text-transform: uppercase; letter-spacing: .9px; margin-bottom: 7px; }
.crt-atteste-oui { background: var(--cream); border-right: 1px solid var(--border); }
.crt-atteste-oui h4 { color: var(--teal); }
.crt-atteste-non h4 { color: var(--muted); }
.crt-atteste ul { list-style: none; margin: 0; padding: 0; }
.crt-atteste li { padding-left: 14px; position: relative; margin-bottom: 5px; line-height: 1.4; }
.crt-atteste-oui li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.crt-atteste-non li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }
.crt-pied {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
  margin-top: 18px;
}
.crt-qr {
  width: 46px;
  height: 46px;
  flex: none;
  background: repeating-conic-gradient(var(--nuit) 0% 25%, #fff 0% 50%) 0 0 / 11px 11px;
  border: 3px solid #fff;
  outline: 1px solid var(--border);
}
.crt-pied-texte { font-size: 9.5px; line-height: 1.5; }

/* Annotations en regard */
.crt-annos { display: flex; flex-direction: column; gap: 14px; }
.crt-anno {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.crt-anno .n {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  margin-right: 9px;
  vertical-align: middle;
}
.crt-anno h3 {
  display: inline;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17px;
  color: var(--nuit);
  vertical-align: middle;
}
.crt-anno p { margin-top: 8px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }

/* Bouton de redirection vers la vérification (annotation 6) */
.crt-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 18px;
  border-radius: 100px;
  background: var(--teal);
  color: var(--cream);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(20, 130, 135, 0.28);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.crt-cta span { transition: transform 0.2s; }
.crt-cta:hover {
  background: #10696d;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(20, 130, 135, 0.38);
}
.crt-cta:hover span { transform: translateX(3px); }

/* ─── Survol couplé : annotation ↔ zone du certificat ────────────────────── */
.crt-anno[data-crt-anno] { cursor: default; transition: border-color .2s, background-color .2s, box-shadow .2s; }
[data-crt-zone] { transition: background-color .2s, box-shadow .2s; }

/* Surbrillance très légère d'une zone du certificat */
.crt-doc .crt-hl {
  border-radius: 6px;
  background-color: rgba(20, 130, 135, 0.06);
  box-shadow: 0 0 0 2px rgba(20, 130, 135, 0.35), 0 0 0 7px rgba(20, 130, 135, 0.10);
}

/* Surbrillance de l'annotation correspondante */
.crt-anno.crt-hl {
  border-color: var(--teal);
  background-color: rgba(20, 130, 135, 0.06);
  box-shadow: 0 0 0 1px rgba(20, 130, 135, 0.3);
}
.crt-anno.crt-hl .n { transform: scale(1.12); box-shadow: 0 0 0 4px rgba(20, 130, 135, 0.22); }
.crt-anno .n { transition: transform .2s, box-shadow .2s; }

/* ─── PAGE VÉRIFICATEUR ──────────────────────────────────────────────────── */
.vrf-wrap { max-width: 1060px; margin: 0 auto; padding: 16px 24px 72px; }
.vrf-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; align-items: stretch; }
@media (max-width: 880px) { .vrf-cards { grid-template-columns: 1fr; } }
.vrf-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
}
/* groupe d'actions épinglé en bas → les boutons « Simulation » s'alignent entre les cartes */
.vrf-actions {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vrf-actions .vrf-btn { margin-top: 0; }
/* bouton « Vérifier » : bleu turquoise (même teinte que l'accent du titre) */
.vrf-btn.vrf-btn--verify { background: var(--teal); }
.vrf-btn.vrf-btn--verify:hover { background: #10696d; }
.vrf-card h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  color: var(--nuit);
  margin-bottom: 8px;
}
.vrf-card p { font-size: 13.5px; line-height: 1.6; color: var(--muted); margin-bottom: 14px; }
.vrf-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  background: #fff;
  color: var(--nuit);
}
.vrf-input--code { margin-top: 10px; }
.vrf-ext { font-family: 'Courier New', monospace; font-size: 0.82em; color: var(--teal); }

/* Carte « Par QR Code » */
.vrf-qr { display: flex; justify-content: center; margin: 6px 0 16px; }
.vrf-qr-svg {
  width: 104px;
  height: 104px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(18, 38, 62, 0.1);
}
.vrf-btn {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--nuit);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.vrf-btn:hover { background: var(--profond); }
.vrf-btn.vrf-btn--ghost { margin-top: 10px; background: transparent; color: var(--profond); border: 1px solid var(--border); }
.vrf-btn.vrf-btn--ghost:hover { background: var(--cream-2); color: var(--nuit); }
.vrf-drop {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 30px 16px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: #fff;
}
.vrf-drop.dragover { border-color: var(--teal); background: var(--cream); }
.vrf-result {
  margin-top: 16px;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
  display: none;
}
.vrf-result.ok { display: block; background: #E8F2EC; border: 1px solid #2c8a5e; color: #1d5c40; }
.vrf-result.ko { display: block; background: #F9ECEC; border: 1px solid #b85c5c; color: #7c3434; }
.vrf-result.info { display: block; background: var(--cream); border: 1px solid var(--border); color: var(--text); }
.vrf-result .mono { font-family: 'Courier New', monospace; font-size: 11px; word-break: break-all; }

/* ─── Validation « waouh » ──────────────────────────────────────────────── */
.vrf-result.vrf-wow {
  display: block;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(20, 130, 135, 0.08), rgba(248, 245, 238, 0) 60%),
    var(--cream);
  border: 1px solid rgba(20, 130, 135, 0.4);
  color: var(--text);
  padding: 22px 20px 20px;
  overflow: hidden;
}

.vrf-success { text-align: center; }

/* Sceau animé */
.vrf-seal { position: relative; width: 66px; height: 66px; margin: 2px auto 14px; }
.vrf-seal-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(20, 130, 135, 0.35);
  animation: vrfPop 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.5) both;
}
.vrf-seal-disc::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--teal);
  animation: vrfRing 0.9s ease-out 0.15s both;
}
.vrf-seal-check {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.vrf-seal-check path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: vrfCheck 0.4s 0.34s ease forwards;
}

/* Confettis */
.vrf-confetti { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.vrf-confetti-bit {
  position: absolute;
  left: 0;
  top: 0;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  opacity: 0;
  animation: vrfConfetti 0.95s ease-out var(--delay, 0ms) forwards;
}

.vrf-success-title { font-family: var(--serif); font-weight: 400; font-size: 20px; color: var(--nuit); }
.vrf-success-sub { font-size: 12.5px; font-weight: 600; color: var(--teal); margin-top: 2px; }

/* Aperçu du contenu certifié */
.vrf-content {
  display: flex;
  gap: 14px;
  align-items: center;
  text-align: left;
  margin-top: 18px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  animation: vrfFadeUp 0.5s 0.18s both;
}
.vrf-content-media {
  flex: 0 0 auto;
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  line-height: 0;
}
.vrf-content-img {
  display: block;
  width: 118px;
  height: 74px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: filter 0.2s, transform 0.2s;
}
.vrf-content-media:hover .vrf-content-img,
.vrf-content-media:focus-visible .vrf-content-img { filter: brightness(0.95); transform: scale(1.02); }
.vrf-content-zoom {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(18, 38, 62, 0.62);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vrf-content-zoom svg { width: 13px; height: 13px; }

/* Lightbox d'aperçu agrandi */
.vrf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(18, 38, 62, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: vrfBackdropIn 0.25s ease both;
}
.vrf-lightbox[hidden] { display: none; }
.vrf-lightbox-fig {
  margin: 0;
  max-width: 720px;
  width: 100%;
  text-align: center;
  animation: vrfModalIn 0.3s cubic-bezier(0.2, 0.8, 0.3, 1.1) both;
}
.vrf-lightbox-media {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}
.vrf-lightbox-media svg { display: block; width: 100%; height: auto; border-radius: 10px; }
.vrf-lightbox-cap { margin-top: 14px; color: var(--cream); font-size: 14px; }
.vrf-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s;
}
.vrf-lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }
.vrf-content-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vrf-content-label { font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--sub); font-weight: 600; }
.vrf-content-name { font-size: 14px; font-weight: 600; color: var(--nuit); }
.vrf-content-dossier { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
@media (max-width: 460px) {
  .vrf-content { flex-direction: column; align-items: flex-start; }
  .vrf-content-img { width: 100%; height: auto; }
}

/* Carte certificat */
.vrf-cert {
  text-align: left;
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  animation: vrfFadeUp 0.5s 0.25s both;
}
.vrf-cert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.vrf-cert-type { font-family: var(--serif); font-weight: 400; font-size: 17px; color: var(--nuit); }
.vrf-cert-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--teal);
  border-radius: 100px;
  padding: 3px 10px;
  white-space: nowrap;
}
.vrf-cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 18px; margin: 0; }
.vrf-cert-grid .vrf-cert-full { grid-column: 1 / -1; }
.vrf-cert-grid dt {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sub);
  font-weight: 600;
}
.vrf-cert-grid dd { margin: 3px 0 0; font-size: 13px; color: var(--text); line-height: 1.5; }
.vrf-cert-grid dd.mono { font-family: 'Courier New', monospace; font-size: 11px; word-break: break-all; color: var(--profond); }
.vrf-cert-link { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--teal); text-decoration: none; }
.vrf-cert-link:hover { text-decoration: underline; }

@keyframes vrfPop {
  0% { transform: scale(0); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes vrfRing {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.7); opacity: 0; }
}
@keyframes vrfCheck { to { stroke-dashoffset: 0; } }
@keyframes vrfConfetti {
  0% { transform: translate(0, 0) scale(0.4) rotate(0); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(1) rotate(var(--rot)); opacity: 0; }
}
@keyframes vrfFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .vrf-seal-disc,
  .vrf-seal-disc::before,
  .vrf-seal-check path,
  .vrf-cert { animation: none; }
  .vrf-seal-check path { stroke-dashoffset: 0; }
}

/* Codes de démonstration cliquables */
.vrf-examples { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vrf-examples-label { width: 100%; font-size: 11.5px; color: var(--sub); }
.vrf-chip {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--profond);
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.vrf-chip:hover { background: rgba(20, 130, 135, 0.1); border-color: var(--teal); color: var(--teal); }

/* ─── Modal de vérification (« grand cadran ») ───────────────────────────── */
.vrf-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 38, 62, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: vrfBackdropIn 0.25s ease both;
}
.vrf-modal-backdrop[hidden] { display: none; }

.vrf-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px 34px;
  box-shadow: 0 40px 100px rgba(18, 38, 62, 0.4);
  animation: vrfModalIn 0.3s cubic-bezier(0.2, 0.8, 0.3, 1.1) both;
}
.vrf-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--cream);
  color: var(--profond);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.vrf-modal-close:hover { background: var(--cream-2); color: var(--nuit); }

.vrf-modal-msg { font-size: 14px; line-height: 1.65; color: var(--text); text-align: center; padding: 8px 4px; }
.vrf-modal-msg .mono { font-family: 'Courier New', monospace; font-size: 11px; word-break: break-all; }

@keyframes vrfBackdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes vrfModalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* État « vérification en cours » : roue + étapes */
.vrf-loading { text-align: center; padding: 8px 0 4px; }
.vrf-spinner {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 4px solid rgba(20, 130, 135, 0.16);
  border-top-color: var(--teal);
  animation: vrfSpin 0.8s linear infinite;
}
.vrf-loading-title { font-family: var(--serif); font-weight: 400; font-size: 21px; color: var(--nuit); }
.vrf-steps {
  list-style: none;
  margin: 20px auto 0;
  padding: 0;
  max-width: 320px;
  text-align: left;
}
.vrf-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--sub);
  padding: 6px 0;
  opacity: 0.5;
  transition: opacity 0.3s, color 0.3s;
}
.vrf-steps li::before {
  content: '';
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  transition: background 0.3s, border-color 0.3s;
}
.vrf-steps li.done {
  opacity: 1;
  color: var(--profond);
}
.vrf-steps li.done::before {
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F8F5EE' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
  border-color: var(--teal);
}

@keyframes vrfSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .vrf-modal-backdrop,
  .vrf-modal,
  .vrf-lightbox,
  .vrf-lightbox-fig { animation: none; }
  .vrf-spinner { animation-duration: 1.6s; }
}

.vrf-note { margin-top: 28px; font-size: 13px; line-height: 1.7; color: var(--muted); }

/* Bandeau démonstration (partagé vérificateur / espace avocat) */
.demo-banner {
  max-width: 1140px;
  margin: 18px auto 0;
  padding: 10px 18px;
  border: 1px solid #B08D3E;
  background: #FBF6EA;
  border-radius: 10px;
  font-size: 13px;
  color: #7a5f24;
  text-align: center;
}

/* ─── ESPACE AVOCAT ──────────────────────────────────────────────────────── */
.avk-wrap { max-width: 1140px; margin: 0 auto; padding: 16px 24px 72px; }
.avk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(244px, 1fr));
  gap: 20px;
  margin: 0;
}
@media (max-width: 540px) { .avk-grid { grid-template-columns: 1fr; } }

/* Sections de la page avocat (réinitialise le padding global des <section>) */
.avk-section { margin: 34px 0; padding: 0; }
.avk-h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  color: var(--nuit);
  margin-bottom: 18px;
}

/* Puces-bénéfices du héros */
.avk-hero-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
.avk-hero-points span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--profond);
  background: rgba(20, 130, 135, 0.08);
  border: 1px solid rgba(20, 130, 135, 0.25);
  border-radius: 100px;
  padding: 7px 14px;
}
.avk-hero-points svg { width: 14px; height: 14px; color: var(--teal); flex: none; }

/* Parcours en 3 étapes */
.avk-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.avk-step {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 22px 22px;
}
.avk-step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--cream);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(20, 130, 135, 0.3);
}
.avk-step h3 { font-family: var(--serif); font-weight: 400; font-size: 18px; color: var(--nuit); margin-bottom: 6px; }
.avk-step p { font-size: 13.5px; line-height: 1.6; color: var(--muted); }
@media (max-width: 760px) { .avk-steps { grid-template-columns: 1fr; } }

/* Quand utiliser Scealia */
.avk-when { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.avk-when-col {
  background: var(--cream);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.avk-when-col:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 180, 205, 0.5);
  border-left-color: var(--teal);
  box-shadow: 0 20px 40px rgba(18, 38, 62, 0.08);
}
.avk-when-col h3 { font-family: var(--serif); font-weight: 400; font-size: 18px; color: var(--nuit); margin-bottom: 8px; }
.avk-when-col p { font-size: 13.5px; line-height: 1.65; color: var(--muted); }
@media (max-width: 760px) { .avk-when { grid-template-columns: 1fr; } }

/* Icône des piliers */
.avk-card-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(20, 130, 135, 0.10);
  border: 1px solid rgba(20, 130, 135, 0.25);
  margin-bottom: 14px;
}
.avk-card-ico svg { width: 22px; height: 22px; color: var(--teal); }

/* Lead de section (sous un titre) */
.avk-lead { font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 720px; margin: -8px 0 22px; }

/* Section sur panneau teinté (rythme visuel) */
.avk-section--panel {
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px 32px 34px;
}

/* Bande CTA finale */
.avk-cta {
  margin: 34px 0 0;
  border-radius: 22px;
  padding: 46px 36px;
  text-align: center;
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(20, 130, 135, 0.4), transparent 55%),
    var(--nuit);
  color: var(--cream);
}
.avk-cta h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  color: var(--cream);
  margin-bottom: 8px;
}
.avk-cta p { font-size: 15px; color: rgba(248, 245, 238, 0.82); margin-bottom: 24px; }
.avk-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal);
  color: var(--cream);
  border-radius: 100px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(20, 130, 135, 0.45);
  transition: background 0.2s, transform 0.2s;
}
.avk-cta-btn:hover { background: #10696d; transform: translateY(-1px); }
.avk-cta-btn svg { width: 14px; height: 14px; }

/* Cas d'usage par domaine */
.avk-domaines { display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: 16px; }
.avk-domaine {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.avk-domaine h4 { font-size: 14px; font-weight: 600; color: var(--nuit); margin-bottom: 5px; }
.avk-domaine p { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.avk-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.avk-card:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 180, 205, 0.5);
  box-shadow: 0 20px 40px rgba(18, 38, 62, 0.08);
}
.avk-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  color: var(--nuit);
  margin-bottom: 8px;
}
.avk-card p { font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.avk-deonto {
  margin-top: 40px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

/* Démo cliquable : cadre applicatif */
.demo-frame {
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgba(18, 38, 62, 0.12);
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 540px;
}
@media (max-width: 860px) { .demo-frame { grid-template-columns: 1fr; } }
.demo-side {
  background: var(--nuit);
  color: var(--cream);
  padding: 22px 18px;
}
.demo-side .brand { font-family: var(--serif); font-size: 19px; margin-bottom: 4px; }
.demo-side .cab { font-size: 11.5px; color: var(--turquoise); margin-bottom: 24px; }
.demo-side nav { display: flex; flex-direction: column; gap: 4px; }
.demo-side nav button {
  text-align: left;
  background: none;
  border: none;
  color: var(--cream);
  font-family: var(--sans);
  font-size: 13.5px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  opacity: .75;
}
.demo-side nav button:hover { opacity: 1; background: rgba(255, 255, 255, 0.06); }
.demo-side nav button.active { opacity: 1; background: rgba(120, 180, 205, 0.18); }
.demo-main { padding: 26px 30px; }
.demo-main h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  color: var(--nuit);
  margin-bottom: 4px;
}
.demo-main .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 20px; }
.demo-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.demo-table th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.demo-table td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.demo-table tr.clickable { cursor: pointer; transition: background .15s; }
.demo-table tr.clickable:hover { background: var(--cream); }

/* Cellule « Pièce » : nom + bouton de renommage en ligne */
.demo-piece-cell { white-space: nowrap; }
.demo-piece-nom { font-weight: 600; color: var(--nuit); }
.demo-piece-rename {
  margin-left: 6px;
  padding: 3px;
  border: none;
  background: none;
  color: var(--muted);
  border-radius: 5px;
  cursor: pointer;
  vertical-align: middle;
  opacity: .45;
  transition: opacity .15s, color .15s, background .15s;
}
.demo-piece-rename svg { display: block; }
.demo-table tr:hover .demo-piece-rename { opacity: 1; }
.demo-piece-rename:hover { color: var(--teal); background: var(--cream-2); }
.demo-piece-rename:focus-visible { opacity: 1; outline: 2px solid var(--teal); outline-offset: 1px; }
.demo-rename-input {
  width: 140px;
  padding: 4px 8px;
  border: 1px solid var(--teal);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--nuit);
  background: #fff;
}
.demo-rename-input:focus { outline: none; }
.demo-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .4px;
}
.demo-pill--constat { background: var(--nuit); color: var(--cream); }
.demo-pill--horo { background: var(--teal); color: #fff; }
.demo-pill--attente { background: var(--cream-3); color: var(--muted); }
.demo-pill--ok { background: #E8F2EC; color: #1d5c40; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.demo-btn {
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #fff;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--nuit);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.demo-btn:hover { border-color: var(--teal); color: var(--teal); }
.demo-btn--primary { background: var(--nuit); color: var(--cream); border-color: var(--nuit); }
.demo-btn--primary:hover { background: var(--profond); color: var(--cream); }
.demo-back {
  background: none;
  border: none;
  color: var(--teal);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 14px;
}
.demo-notice {
  margin-top: 16px;
  padding: 13px 16px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}
.demo-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 38, 62, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 20px;
}
.demo-modal-backdrop.open { display: flex; }
.demo-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(18, 38, 62, 0.3);
}
.demo-modal h3 { font-family: var(--serif); font-weight: 400; font-size: 20px; color: var(--nuit); margin-bottom: 10px; }
.demo-modal p { font-size: 13.5px; line-height: 1.6; color: var(--muted); margin-bottom: 14px; }
.demo-modal label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 12px 0 4px; }
.demo-modal input, .demo-modal select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: var(--sans);
  font-size: 13.5px;
  background: var(--cream);
  color: var(--nuit);
}
.demo-modal .demo-actions { margin-bottom: 0; justify-content: flex-end; }

/* Liste éditable des pièces à faire capturer */
.demo-pieces-list { display: flex; flex-direction: column; gap: 8px; }
.demo-piece-row { display: flex; gap: 8px; align-items: center; }
.demo-modal .demo-piece-row .demo-piece-input { flex: 1 1 auto; width: auto; }
.demo-piece-remove {
  flex: 0 0 auto;
  width: 36px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--cream);
  color: var(--sub);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.demo-piece-remove:hover { background: #F9ECEC; border-color: #b85c5c; color: #7c3434; }
.demo-add-piece {
  margin-top: 8px;
  align-self: flex-start;
  background: none;
  border: 1px dashed rgba(20, 130, 135, 0.5);
  color: var(--teal);
  border-radius: 9px;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.demo-add-piece:hover { background: rgba(20, 130, 135, 0.08); border-color: var(--teal); }

/* ─── Modale d'export du dossier ──────────────────────────────────────────
   Menu sobre : sélection des pièces, contenu joint, format, destination. */
.demo-modal--xp { position: relative; max-width: 540px; }
.demo-xp-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  border-radius: 8px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.demo-xp-close:hover { background: var(--cream-2); color: var(--nuit); }
.demo-modal--xp h3 { padding-right: 32px; }

/* Toutes les cases du menu : coche teal, sobre */
.demo-modal--xp input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: none;
  margin: 0;
  accent-color: var(--teal);
  cursor: pointer;
}

/* Liste des pièces sélectionnables */
.demo-xp-pieces {
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  background: #fff;
}
.demo-modal--xp .demo-xp-all {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 14px;
  background: var(--cream-2);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .7px;
  font-weight: 700;
  color: var(--nuit);
  cursor: pointer;
}
.demo-xp-all span { flex: 1 1 auto; }
.demo-xp-all em {
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  font-size: 12px;
}
.demo-xp-list { max-height: 184px; overflow-y: auto; }
.demo-modal--xp .demo-xp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--nuit);
  cursor: pointer;
  transition: background 0.12s;
}
.demo-xp-row:last-child { border-bottom: none; }
.demo-xp-row:hover { background: var(--cream); }
.demo-xp-row-num { flex: none; color: var(--muted); font-size: 12px; font-weight: 600; }
.demo-xp-row-desc {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Contenu joint : trois options descriptives */
.demo-xp-opts { display: flex; flex-direction: column; gap: 8px; }
.demo-modal--xp .demo-xp-opt {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  transition: border-color 0.16s, background 0.16s;
}
.demo-xp-opt:hover { border-color: var(--turquoise); background: var(--cream); }
.demo-xp-opt input { margin-top: 2px !important; }
.demo-xp-opt span { display: flex; flex-direction: column; gap: 2px; }
.demo-xp-opt strong { font-size: 12.5px; font-weight: 600; color: var(--nuit); }
.demo-xp-opt em { font-style: normal; font-size: 11.5px; line-height: 1.45; color: var(--muted); }

/* Segmented control des formats */
.demo-xp-seg {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  background: var(--cream);
}
.demo-xp-seg button {
  border: none;
  border-right: 1px solid var(--border);
  background: none;
  padding: 8px 18px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.demo-xp-seg button:last-child { border-right: none; }
.demo-xp-seg button:hover { color: var(--nuit); }
/* Repère non chromatique de l'option active (en plus du fond) pour ne pas reposer
   uniquement sur la couleur (WCAG 1.4.1). */
.demo-xp-seg button.active { background: var(--nuit); color: var(--cream); font-weight: 700; }
.demo-xp-help { margin: 8px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }

/* Récapitulatif + actions */
.demo-xp-summary {
  margin-top: 18px;
  padding: 11px 14px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--nuit);
}
/* Teal légèrement assombri pour atteindre le ratio AA (4.5:1) sur fond cream à 12px. */
.demo-xp-summary strong { color: #117377; }
.demo-modal--xp .demo-xp-actions { margin-top: 18px; }
.demo-btn[disabled] { opacity: .45; cursor: not-allowed; }
.demo-btn[disabled]:hover { border-color: var(--border); color: var(--nuit); background: #fff; }
.demo-btn--primary[disabled]:hover { background: var(--nuit); color: var(--cream); }

/* Anneau de focus clavier cohérent avec la charte sur les contrôles de la modale */
.demo-modal--xp .demo-xp-close:focus-visible,
.demo-modal--xp .demo-xp-seg button:focus-visible,
.demo-modal--xp .demo-xp-row input:focus-visible,
.demo-modal--xp .demo-xp-opt input:focus-visible,
.demo-modal--xp .demo-xp-all input:focus-visible,
.demo-modal--xp select:focus-visible,
.demo-modal--xp .demo-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Mobile : les trois actions s'empilent en pleine largeur (pas d'escalier à droite) */
@media (max-width: 480px) {
  .demo-modal--xp .demo-xp-actions { flex-direction: column; align-items: stretch; }
  .demo-modal--xp .demo-xp-actions .demo-btn { width: 100%; justify-content: center; }
}

/* Repères : positionnés en relatif par rapport à leur zone */
.crt-rel { position: relative; }

/* ─── HUB v2 : carte vedette, navigation de catégories, sections ─────────── */

/* Photos de la carte vedette : remplissent toute la hauteur de la colonne, sans
   espace vide en dessous (bug 1). Le rail média est étiré à la hauteur de la
   colonne texte par la grille .case-feature ; grid-auto-rows:1fr fait remplir
   cette hauteur aux deux photos, dont l'image (position:absolute, object-fit:cover)
   occupe tout le cadre. Sur mobile (colonne unique), on repasse au ratio 4/3. */
.cuh-feature-link { display: block; text-decoration: none; }
.cuh-wrap .case-feature { margin-bottom: 8px; }
.cuh-wrap .case-feature-media { grid-auto-rows: 1fr; }
.cuh-wrap .case-shot { aspect-ratio: auto; min-height: 240px; }
@media (max-width: 768px) {
  .cuh-wrap .case-feature-media { grid-auto-rows: auto; }
  .cuh-wrap .case-shot { aspect-ratio: 4 / 3; min-height: 0; }
}

/* Navigation des catégories (pills, défilement horizontal sur mobile) */
.cuh-catnav { margin-top: 30px; }
.cuh-catnav-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.cuh-catnav a {
  flex: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--profond);
  text-decoration: none;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--cream);
  transition: border-color .2s, color .2s, background .2s;
  white-space: nowrap;
}
.cuh-catnav a:hover { border-color: var(--teal); color: var(--teal); }

/* Sections de catégorie
   NB : la règle globale `section { padding:100px 48px; max-width:1280px }` de
   style.css fuit sur ces <section>. On l'annule ici : l'espacement vertical est
   porté par margin-top, et le contenu s'aligne ainsi sur la carte vedette. */
.cuh-cat { margin-top: 52px; scroll-margin-top: 92px; padding: 0; max-width: none; }
.cuh-cat-head { max-width: 720px; margin-bottom: 20px; }
.cuh-cat-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  color: var(--nuit);
  margin-bottom: 6px;
}
.cuh-cat-head p { font-size: 14.5px; line-height: 1.6; color: var(--muted); }

/* Vignette d'attente (photo à venir) : tuile empreinte sobre */
.thumb--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cream-2) 0%, var(--cream-3) 100%);
}
.thumb--ph svg {
  width: 44px;
  height: 44px;
  color: var(--turquoise);
  opacity: .65;
}
.cuh-grid .case-card .thumb,
.cud-related .case-card .thumb { aspect-ratio: 3/2; }

/* Bandeau d'appel à l'action du hub */
.cuh-cta {
  margin-top: 64px;
  background: var(--nuit);
  border-radius: var(--r-xl);
  padding: 52px 32px;
  text-align: center;
}
.cuh-cta h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.12;
  color: var(--cream);
  margin-bottom: 12px;
}
.cuh-cta h2 em { font-style: italic; color: var(--turquoise); }
.cuh-cta p {
  font-size: 15px;
  color: rgba(248, 245, 238, 0.75);
  margin-bottom: 24px;
}
.cuh-cta .btn-primary { display: inline-flex; }

.cuh-disclaimer a { color: var(--teal); }

/* ─── FICHE v2 : encadré Bon à savoir ────────────────────────────────────── */
.cud-savoir {
  padding: 16px 20px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px !important;
  line-height: 1.7 !important;
  color: var(--text);
}

/* Défilement doux pour les ancres du hub (i18n.js absent des pages FR) */
html { scroll-behavior: smooth; }
@media (max-width: 768px) {
  .cuh-cat { scroll-margin-top: 76px; }
}

/* ─── ESPACE AVOCAT v2 : tableau de bord, panneau de pièce, export ──────── */
.demo-frame { position: relative; overflow: hidden; }
.demo-mono { font-family: 'Courier New', monospace; font-size: 11.5px; }
.demo-h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17px;
  color: var(--nuit);
  margin: 26px 0 10px;
}
.demo-side { display: flex; flex-direction: column; }
.demo-side-foot {
  margin-top: auto;
  padding-top: 18px;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(248, 245, 238, 0.45);
  line-height: 1.7;
}
.demo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 100px;
  background: var(--teal);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}

/* Indicateurs du tableau de bord */
.demo-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 6px 0 18px;
}
@media (max-width: 640px) { .demo-kpis { grid-template-columns: 1fr; } }
.demo-kpi {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.demo-kpi-n {
  font-family: var(--serif);
  font-size: 34px;
  color: var(--nuit);
  line-height: 1;
}
.demo-kpi-l { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* Activité récente */
.demo-activite { list-style: none; margin: 0; padding: 0; }
.demo-activite li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border);
}
.demo-activite li:last-child { border-bottom: none; }
.demo-act-ico {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--teal);
}
.demo-act-ico--export { background: var(--nuit); }
.demo-act-ico--invite { background: var(--turquoise); }
.demo-act-q { font-size: 13px; color: var(--nuit); font-weight: 600; }
.demo-act-d { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

/* Recherche et liste des dossiers */
.demo-search {
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--cream);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--nuit);
  margin-bottom: 14px;
}
.demo-search:focus { outline: none; border-color: var(--teal); background: #fff; }
.demo-vide { font-size: 13px; color: var(--muted); padding: 18px 2px; }
.demo-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cream-3);
  color: var(--profond);
  font-size: 11.5px;
  font-weight: 700;
}
.demo-avatar--lg { width: 42px; height: 42px; font-size: 14px; }
.demo-doshead {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}
.demo-doshead h2 { margin-bottom: 2px; }
.demo-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--teal);
  vertical-align: middle;
  animation: demo-pulse-k 1.6s ease-in-out infinite;
}
.demo-pulse { animation: demo-pulse-k 1.6s ease-in-out infinite; }
@keyframes demo-pulse-k {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

/* Panneau latéral de pièce */
.demo-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 92%);
  background: #fff;
  border-left: 1px solid var(--border);
  box-shadow: -18px 0 40px rgba(18, 38, 62, 0.14);
  padding: 24px;
  transform: translateX(105%);
  transition: transform .32s cubic-bezier(.22, .8, .3, 1);
  overflow-y: auto;
  z-index: 5;
}
.demo-drawer.open { transform: translateX(0); }
.demo-drawer-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: none;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}
.demo-drawer-head h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  color: var(--nuit);
  margin: 10px 0 4px;
}
.demo-drawer-head p { font-size: 13px; color: var(--muted); }
.demo-drawer-meta { margin: 16px 0; }
.demo-drawer-meta dt {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin-top: 10px;
}
.demo-drawer-meta dd { margin: 2px 0 0; font-size: 13px; color: var(--nuit); }
.demo-drawer-chaintitre {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 10px;
}
.demo-drawer-chain {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.demo-chain-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 7px 0;
  opacity: 0;
  animation: demo-chain-in .4s ease forwards;
}
@keyframes demo-chain-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.demo-chain-check {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.demo-chain-step strong { display: block; font-size: 12.5px; color: var(--nuit); }
.demo-chain-step span { font-size: 11px; color: var(--muted); }

/* Export simulé */
.demo-export {
  margin: 4px 0 14px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13px;
}
.demo-export-titre { font-weight: 700; color: var(--nuit); margin-bottom: 8px; font-size: 12.5px; }
.demo-export-etape {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 0;
  color: var(--muted);
  transition: color .3s;
}
.demo-export-puce {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: all .3s;
}
.demo-export-etape.fait { color: var(--nuit); }
.demo-export-etape.fait .demo-export-puce {
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: inset 0 0 0 2px #fff;
}
.demo-export--ok {
  border-color: #2c8a5e;
  background: #E8F2EC;
  color: #1d5c40;
  line-height: 1.6;
}
@media (max-width: 860px) {
  .demo-side-foot { display: none; }
  .demo-drawer { position: fixed; width: min(360px, 94%); }
}

/* ─── FICHE CATÉGORIE v3 (gabarit « une fiche par catégorie ») ────────────── */

/* Héros à deux photos (entrée / sortie), avec coins horodatés */
.cudc-hero-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 26px 0 6px;
}
.cudc-shot {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.cudc-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cudc-shot figcaption { position: absolute; inset: 0; pointer-events: none; }
.cudc-tag, .cudc-date {
  position: absolute;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
}
.cudc-tag {
  top: 10px; left: 10px;
  background: rgba(15, 32, 51, 0.74);
  color: #fff;
  text-transform: lowercase;
  letter-spacing: .02em;
}
.cudc-date {
  bottom: 10px; right: 10px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--nuit);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 600px) { .cudc-hero-duo { grid-template-columns: 1fr; } }

/* Paragraphe d'introduction discret (avant le tableau comparatif) */
.cud-block p.cud-intro { color: var(--muted); margin-bottom: 18px; }

/* Les situations couvertes : intitulé en gras suivi de sa description */
.cud-couv { list-style: none; padding: 0; margin: 6px 0 0; }
.cud-couv li {
  position: relative;
  padding: 13px 0 13px 30px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.cud-couv li:last-child { border-bottom: none; }
.cud-couv li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 19px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--turquoise);
  transform: rotate(45deg);
}
.cud-couv li strong { color: var(--nuit); font-weight: 600; }
.cud-couv li strong::after { content: " : "; color: var(--muted); font-weight: 400; }

/* Encadré « Pourquoi privilégier le Constat Scealia » (texte générique partagé) */
.constat-emphasis {
  margin: 32px 0;
  padding: 26px 28px;
  background: linear-gradient(135deg, var(--nuit) 0%, #16334f 100%);
  border-radius: var(--r-lg);
}
.constat-emphasis .ce-flag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  color: var(--cream);
}
.constat-emphasis .ce-flag svg { width: 20px; height: 20px; color: var(--turquoise); }
.constat-emphasis p {
  font-size: 14.5px;
  line-height: 1.72;
  margin: 0 0 12px;
  color: rgba(248, 245, 238, 0.82);
}
.constat-emphasis p:last-child { margin-bottom: 0; }

/* Appel à l'action contextuel de bas de fiche */
.cudc-cta {
  margin: 40px 0 8px;
  padding: 36px 32px;
  text-align: center;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}
.cudc-cta h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.15;
  color: var(--nuit);
  margin-bottom: 10px;
}
.cudc-cta p { font-size: 15px; color: var(--muted); margin-bottom: 20px; }
.cudc-cta .btn-primary { display: inline-flex; }

/* Tableau comparatif réutilisé sur la fiche : marge haute cohérente */
.cud-block .compare-table-scroll { margin-top: 4px; }
.cud-block .offers-disclaimer { margin-top: 14px; }

/* ─── HUB v3 : cartes de catégorie (gabarit homogène, variante icône) ────── */

/* L'unité visuelle est la catégorie : une image (ou une icône) par carte, jamais
   de montage. La grille .cuh-grid (3 colonnes) accueille les neuf catégories non
   vedettes ; la vedette Logement garde le diptyque .case-feature au-dessus.
   Colonne flex pour aligner « Découvrir la catégorie » en bas de chaque carte,
   quelle que soit la longueur de la description → hauteurs homogènes par ligne. */
.cuh-grid--cats { grid-auto-rows: 1fr; }
.cuh-grid--cats .case-card { display: flex; flex-direction: column; }
.cuh-grid--cats .case-card h5 { margin-top: 12px; }
.cuh-grid--cats .case-card .cuh-more { margin-top: auto; padding-top: 10px; }

/* Variante icône : même empreinte que la vignette photo (ratio 3/2, rayon, fond
   crème, overflow hérités de .case-card .thumb) ; icône sobre centrée, sans photo
   de substitution. Thèmes abstraits ou sensibles (numérique, atteintes). */
.case-card .thumb--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-2);
}
.case-card .thumb--icon svg { width: 38px; height: 38px; color: var(--teal); }

/* Bande Exclusivité avocats : pleine largeur sous la grille, une seule image,
   posée hors grille pour préserver une grille de catégories parfaitement carrée. */
.cuh-exclu-band { margin-top: 12px; }
@media (max-width: 768px) {
  .cuh-exclu-band { flex-direction: column; gap: 0; }
  .cuh-exclu-band .thumb {
    flex: none;
    width: 100%;
    aspect-ratio: 3/2;
    margin-bottom: 14px;
  }
}

/* ─── FICHE CATÉGORIE : héros icône (thèmes abstraits ou sensibles) ───────── */
/* Bandeau sobre de même hauteur que le héros photo (.cud-hero-img, ratio 5/2),
   fond crème teinté, icône centrée. Aucune image de substitution recherchée. */
.cudc-hero-icon {
  width: 100%;
  aspect-ratio: 5 / 2;
  margin: 26px 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cream-2) 0%, var(--cream-3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.cudc-hero-icon svg { width: 60px; height: 60px; color: var(--teal); opacity: .9; }
@media (max-width: 600px) {
  .cudc-hero-icon { aspect-ratio: 5 / 3; }
  .cudc-hero-icon svg { width: 48px; height: 48px; }
}

/* ─── Variante « Bientôt disponible » (visuel définitif à venir) ─────────── */
/* Traitement discret : sablier sobre en sourdine et libellé estompé sur un fond
   crème uni, sans pastille ni contraste fort. Même empreinte que les visuels photo. */
.thumb--soon, .cudc-hero-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-2) 100%);
}
.soon-ico { color: var(--muted); opacity: .32; }
.soon-label {
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Empreinte vignette (hub) */
.thumb--soon { gap: 9px; }
.thumb--soon .soon-ico { width: 21px; height: 21px; }
.thumb--soon .soon-label { font-size: 10px; }

/* Empreinte héros (fiche) */
.cudc-hero-soon {
  width: 100%;
  aspect-ratio: 5 / 2;
  margin: 26px 0 6px;
  gap: 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.cudc-hero-soon .soon-ico { width: 31px; height: 31px; }
.cudc-hero-soon .soon-label { font-size: 12px; }
@media (max-width: 600px) {
  .cudc-hero-soon { aspect-ratio: 5 / 3; }
  .cudc-hero-soon .soon-ico { width: 28px; height: 28px; }
}
