/*
 * Habillage ODS de la page Didit — v4 (26/11/2026, retours d'Al sur iPhone).
 *
 * Règle (25/11) : le design de Didit reste le sien. On ne touche qu'aux
 * COULEURS (variables `--vf-*`), et on retouche une page seulement quand elle
 * est moche ou peu pratique. Les retours du 25/11 au soir l'ont demandé :
 *   · un titre = une ligne, un paragraphe = deux lignes au plus, pas de
 *     défilement (les textes courts sont posés par le script, voir
 *     `HabillageDidit.textes`) ;
 *   · un en-tête sur UNE ligne, aligné sur le retour et la langue ;
 *   · pas de pastilles de couleurs sous l'illustration du flash ;
 *   · une seule attente, sobre ;
 *   · le thème de l'application (clair / sombre), que la page ignorait.
 *
 * ⚠️ Les conditions de l'utilisateur final et l'avis de confidentialité restent
 * AFFICHÉS (pied de page `vf-pinned-legal`) : Didit l'exige même en marque
 * blanche. Seule la note « vos données sont chiffrées », qui doublonnait, part.
 * ⚠️ La caméra du visage garde ses couleurs CLAIRES, même en sombre : son
 * pourtour blanc éclaire le visage.
 */

/* ── Couleurs ODS, clair ─────────────────────────────────────────────────── */
.vf-shell {
  --vf-accent: #C8721A !important;          /* liens, accents : orange ODS lisible */
  --vf-brand-text: #F39221 !important;
  --vf-guard-accent-light: #C8721A !important;
  --vf-guard-accent-dark: #F39221 !important;
  --vf-tile: #FEF3E7 !important;             /* fonds d'icônes : orange très pâle */
  --vf-button-fill: #F39221 !important;
  --vf-button-label: #FFFFFF !important;
  --vf-text: #402100 !important;             /* la console le mettait en orange */
}
[data-vf-screen] span[aria-hidden="true"] > svg { color: #E07F12 !important; }

/* ── Couleurs ODS, sombre — posé par l'application (`html.ods-sombre`) ───── */
html.ods-sombre, html.ods-sombre body,
html.ods-sombre [data-verification-card] { background: #09090B !important; }
html.ods-sombre .vf-shell,
html.ods-sombre [data-verification-card] {
  --vf-ground: #09090B !important;
  --vf-page: #09090B !important;
  --vf-surface: #09090B !important;
  --vf-surface-2: #18181B !important;
  --vf-surface-3: #18181B !important;
  --vf-plate: #18181B !important;
  --vf-plate-line: #27272B !important;
  --vf-heading: #E4E4E8 !important;
  --vf-text: #E4E4E8 !important;
  --vf-subtle: #9F9FA7 !important;
  --vf-text-subtle: #9F9FA7 !important;
  --vf-text-faint: #71717B !important;
  --vf-line: #3F3F46 !important;
  --vf-line-strong: #3F3F46 !important;
  --vf-field-line: #3F3F46 !important;
  --vf-field-line-hover: #52525B !important;
  --vf-tile: #2A1A08 !important;
  --vf-accent: #F6A94A !important;
  --vf-button-label: #2A1600 !important;
  --vf-neutral-bg: #18181B !important;
  --vf-info-bg: rgba(77, 139, 255, 0.16) !important;
  --vf-review-bg: rgba(243, 146, 33, 0.14) !important;
  --vf-success-bg: rgba(65, 217, 127, 0.12) !important;
  --vf-danger-bg: rgba(255, 100, 103, 0.14) !important;
  --vf-shadow-card: none !important;
  color-scheme: dark;
}
/* Les couleurs « bc » de la console, posées en ligne sur <html>. */
html.ods-sombre {
  --bc-color-primary: #E4E4E8 !important;
  --bc-color-primary-rgb: 228 228 232 !important;
  --bc-color-secondary: #9F9FA7 !important;
  --bc-color-secondary-rgb: 159 159 167 !important;
  --bc-color-background: #09090B !important;
  --bc-color-background-rgb: 9 9 11 !important;
  --bc-color-on-background: #E4E4E8 !important;
  --bc-color-on-background-rgb: 228 228 232 !important;
  --bc-color-surface-1-rgb: 24 24 27 !important;
}
html.ods-sombre [class*="bg-[#F2F2F2]"] { background-color: #2A1A08 !important; }
html.ods-sombre [data-vf-screen] span[aria-hidden="true"] > svg { color: #F6A94A !important; }
/* La caméra du visage reste claire : c'est elle qui éclaire. */
html.ods-sombre [data-testid="kyc-face-verification-face-scanning"],
html.ods-sombre [data-testid="kyc-face-verification-face-scanning"] .vf-shell,
html.ods-sombre [data-verification-card]:has([data-testid="kyc-face-verification-face-scanning"]) {
  --vf-ground: #FFFFFF !important;
  --vf-page: #FFFFFF !important;
  --vf-surface: #FFFFFF !important;
  --vf-heading: #402100 !important;
  --vf-text: #402100 !important;
  --vf-subtle: #5A5A5A !important;
  background: #FFFFFF !important;
}

/* ── Rien ne défile, rien ne rebondit ────────────────────────────────────── */
html, body, [data-vf-main] { overscroll-behavior: none !important; }

/* ── En-tête : retour · barre fine · langue, sur une seule ligne ─────────── */
[data-testid="repeat-step-label"] { display: none !important; }
[data-vf-step-bar] i {
  height: 3px !important;
  border-radius: 999px !important;
  background: var(--vf-line) !important;
}
[data-vf-step-bar] i > span { background: #F39221 !important; border-radius: 999px !important; }
[data-vf-bar-end] button {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--vf-subtle) !important;
}

/* ── Ce qui n'a pas de sens dans l'application, ou doublonne ─────────────── */
[data-testid="vf-another-device"],
[data-testid="desktop-selfie-phone-link"],
[data-testid="vf-privacy-note"],
[data-vf-scroll-cue],
[data-testid="flash-colours"],
/* Caméra de la pièce : « Recto » y figurait trois fois, plus un bouton de
   conseils. Restent le retour, le titre, le cadre, la consigne, le déclencheur. */
[data-testid="vf-camera-step"],
[data-testid="vf-camera-document"],
[data-testid="vf-camera-side"],
[data-testid="vf-camera-tips"],
/* L'import de fichier est refusé par le workflow (caméra seule) : le bouton,
   s'il apparaissait, mènerait à un refus. */
[data-testid="vf-upload-photo"] { display: none !important; }

/* ── Caméras (pièce, selfie de contrôle) : retour · titre · lampe sur UNE ligne ─
   Retours d'Al du 26/11 sur iPhone : le titre tenait deux lignes SOUS le retour,
   et la lampe (grille 44 px | titre | 44 px quand l'appareil en a une) tombait
   plus bas que le retour. Le titre remonte dans la ligne du retour (même
   hauteur que l'en-tête des autres pages : 44 px à 10 px du haut). */
[data-testid="vf-camera-title"] {
  position: absolute !important;
  top: 10px !important;
  left: 0 !important;
  right: 0 !important;
  height: 44px !important;
  padding: 0 8px !important;
  align-items: center !important;
  z-index: 21 !important;
  pointer-events: none !important;
}
[data-testid="vf-camera-title"]:not(.grid) { display: flex !important; justify-content: center !important; }
[data-testid="vf-camera-title"]:not(.grid) > div { margin: 0 52px !important; }
[data-testid="vf-camera-title"] > div { gap: 0 !important; min-width: 0 !important; justify-content: center !important; }
[data-testid="vf-camera-title"] button { pointer-events: auto !important; }
[data-testid="vf-camera-title"] h2 {
  font-size: 17px !important;
  line-height: 1.3 !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* ── Caméra du visage (« Votre visage ») : pas d'« Étape 1 sur 2 », titre
   en pastille aligné sur le retour (44 px à 10 px du haut). Lu dans le code
   de la page le 26/11 : retour `absolute start-[8px] top-[10px] size-11`,
   pastille `absolute left-1/2 top-6`, étape `face-camera-step`. */
[data-testid="face-camera-step"] { display: none !important; }
/* Toute étiquette d'étape, quelle que soit la page (2e retour du 26/11 :
   « Étape 1 sur 2 » encore visible sous la barre) : la barre fine suffit. */
.vf-step-label,
[data-testid$="step-label"] { display: none !important; }
[data-testid="kyc-face-verification-face-scanning"] .left-1\/2.top-6 {
  top: 10px !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  max-width: calc(100% - 120px) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* ── Textes : un titre = une ligne, un paragraphe = deux ─────────────────── */
[data-verification-card] h1 {
  display: -webkit-box !important;
  -webkit-line-clamp: 1 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
[data-verification-card] h1 + p {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* ── Flash : l'illustration ne doit pas pousser le bouton hors de l'écran ── */
[data-testid="how-to-loop"] {
  max-height: 34vh !important;
  aspect-ratio: auto !important;
}

/* ── Pied légal : présent, mais discret ──────────────────────────────────── */
[data-testid="vf-pinned-legal"] p { font-size: 11px !important; line-height: 1.45 !important; }

/* ── Attentes : une seule ligne d'état, celle qui tourne ─────────────────── */
[role="status"] [data-state]:not([data-state="run"]) { display: none !important; }
