/* ==========================================================================
   CV Matching — Interface V3
   Traduction CSS des maquettes V3 (dashboard, annuaire, analyse & matching).

   Chargée UNIQUEMENT quand la V3 est active (includes/ui_version.php l'injecte
   APRÈS v2.css, avec <html data-ui="v2" data-v3="1">). La V3 s'appuie sur la
   structure V2 (menu vertical, DOM, JS) : on ne redéfinit ici que le langage
   visuel. Préfixe commun : html[data-v3][data-ui] (spécificité supérieure aux
   règles V2 « html[data-ui="v2"] … »). V1/V2 ne sont jamais modifiées ; retirer
   cette feuille (réglage admin) suffit à revenir à la V2.

   Sommaire
     1. Jetons et police
     2. Base
     3. Barre latérale (espace, navigation, crédits, compte)
     4. Fil d'Ariane
     5. Titres
     6. Boutons
     7. Cartes, formulaires, tableaux, badges
     8. Analyse & matching (étapes, dépôt de fichier)
     9. Annuaire candidats
    10. Tableau de bord (.dv3-*)
    11. Modales, menus
    12. Mobile
   ========================================================================== */

/* 1. Jetons et police ------------------------------------------------------
   Police : Google Sans (fichiers locaux déjà livrés dans assets/fonts/google-sans,
   la CSP interdit les polices distantes). Une seule variable à changer pour
   en essayer une autre : --v3-font. */
@font-face { font-family: "CVM Sans"; src: url("fonts/google-sans/GoogleSans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "CVM Sans"; src: url("fonts/google-sans/GoogleSans-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "CVM Sans"; src: url("fonts/google-sans/GoogleSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "CVM Sans"; src: url("fonts/google-sans/GoogleSans-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

html[data-v3][data-ui] {
  --v3-font: "CVM Sans", "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --v3-orange: #fb5300;        /* décor : pastilles, barres, icônes */
  --v3-btn: #fb5300;           /* fond des boutons (orange de marque) */
  --v3-btn-hover: #B83F05;
  --v3-orange-text: #fb5300;   /* petit texte orange sur blanc (5,2:1) */
  --v3-peach: #FFF3EA;
  --v3-peach-2: #FDE6D5;

  --v3-ink: #1A1A1A;
  --v3-ink-2: #2B2B2B;
  --v3-muted: #666666;
  --v3-faint: #737373;         /* plus clair que cela échoue au contraste AA */

  --v3-bg: #F7F7F5;
  --v3-surface: #FFFFFF;
  --v3-line: #E8E8E5;
  --v3-line-soft: #F0F0ED;
  --v3-hover: #F3F3F0;

  --v3-good: #15803D; --v3-good-bg: #E8F7EE;
  --v3-mid:  #B45309; --v3-mid-bg:  #FFF4DB;
  --v3-low:  #B91C1C; --v3-low-bg:  #FDECEC;

  --v3-r-sm: 8px; --v3-r-md: 10px; --v3-r-lg: 14px;

  /* On re-pointe les jetons V1/V2 : toute la V2 (et ses pages non retouchées
     ici) prend automatiquement les nouvelles couleurs. */
  --v2-ink: var(--v3-ink); --v2-ink-2: var(--v3-ink-2);
  --v2-hover: var(--v3-hover); --v2-active: var(--v3-peach);
  --navy: var(--v3-ink); --navy-2: #000; --navy-soft: var(--v3-muted);
  --orange: var(--v3-orange); --orange-dark: var(--v3-btn-hover);
  --orange-tint: var(--v3-peach); --orange-pale: var(--v3-peach);
  --bg: var(--v3-bg); --surface: var(--v3-surface);
  --border: var(--v3-line); --border-soft: var(--v3-line-soft);
  --text: var(--v3-ink); --text-muted: var(--v3-muted); --text-faint: var(--v3-faint);
  --good: var(--v3-good); --good-bg: var(--v3-good-bg);
  --mid: var(--v3-mid);   --mid-bg: var(--v3-mid-bg);
  --low: var(--v3-low);   --low-bg: var(--v3-low-bg);
  --radius-sm: var(--v3-r-sm); --radius-md: var(--v3-r-md); --radius-lg: var(--v3-r-lg);
  --font-sans: var(--v3-font); --font-display: var(--v3-font);
}

/* 2. Base ----------------------------------------------------------------- */
html[data-v3][data-ui] body {
  color: var(--v3-ink);
  font-family: var(--v3-font);
  font-size: 11.5px;
  -webkit-font-smoothing: antialiased;
}
html[data-v3][data-ui] button,
html[data-v3][data-ui] input,
html[data-v3][data-ui] select,
html[data-v3][data-ui] textarea { font-family: var(--v3-font); }
html[data-v3][data-ui] :focus-visible { outline: 2px solid var(--v3-orange); outline-offset: 2px; }
html[data-v3][data-ui] ::selection { background: var(--v3-peach-2); color: var(--v3-ink); }
html[data-v3][data-ui] .title-dot { color: var(--v3-orange); }

/* 3. Barre latérale ------------------------------------------------------- */
@media (min-width: 901px) {
  html[data-v3][data-ui] { --v2-sidebar-w: 285px; }
  html[data-v3][data-ui] .app-header {
    background: #fff;
    border-right: 1px solid var(--v3-line);
  }
  html[data-v3][data-ui] .app-header .header-content { padding: 22px 14px 14px; }
  html[data-v3][data-ui] .app-header .brand { padding: 2px 10px 18px; }
  html[data-v3][data-ui] .app-header .brand-logo-img { width: 100%; max-width: 150px; max-height: none; }
}

/* Espace de travail */
html[data-v3][data-ui] .v3-workspace {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 22px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--v3-line); border-radius: var(--v3-r-md);
}
html[data-v3][data-ui] .v3-workspace__ic {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; background: var(--v3-hover); color: var(--v3-ink); font-weight: 600; font-size: 13.5px;
}
html[data-v3][data-ui] .v3-workspace__t { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
html[data-v3][data-ui] .v3-workspace__t b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-v3][data-ui] .v3-workspace__t small { font-size: 11.5px; color: var(--v3-muted); }

/* Navigation */
html[data-v3][data-ui] .v3-nav-label {
  margin: 14px 12px 6px; font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--v3-faint);
}
html[data-v3][data-ui] .v3-nav-label:first-child { margin-top: 0; }
html[data-v3][data-ui] .app-header .header-nav { gap: 3px; }
html[data-v3][data-ui] .app-header .header-nav-item {
  position: relative; padding: 10px 12px; gap: 12px; border-radius: var(--v3-r-md);
  font-size: 13.5px; font-weight: 500; color: var(--v3-ink-2);
}
html[data-v3][data-ui] .app-header .header-nav-item svg { width: 18px; height: 18px; color: var(--v3-muted); }
html[data-v3][data-ui] .app-header .header-nav-item:hover { background: var(--v3-hover); color: var(--v3-ink); }
html[data-v3][data-ui] .app-header .header-nav-item.is-active { background: var(--v3-peach); color: var(--v3-orange-text); font-weight: 600; }
html[data-v3][data-ui] .app-header .header-nav-item.is-active svg { color: var(--v3-orange); }
html[data-v3][data-ui] .v3-nav-count {
  margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px;
  background: var(--v3-hover); color: var(--v3-muted); font-style: normal; font-size: 11.5px; font-weight: 500; text-align: center;
}
html[data-v3][data-ui] .header-nav-item.is-active .v3-nav-count { background: #fff; color: var(--v3-orange-text); }

/* Crédits */
html[data-v3][data-ui] .v2-credits {
  grid-template-columns: 1fr auto auto; gap: 4px 6px; padding: 14px;
  background: #fff; border: 1px solid var(--v3-line); border-radius: var(--v3-r-md);
}
html[data-v3][data-ui] a.v2-credits:hover { border-color: #D6D6D2; }
html[data-v3][data-ui] .v2-credits__icon { display: block; grid-row: 1; grid-column: 1; width: 16px; height: 16px; color: var(--v3-orange); }
html[data-v3][data-ui] .v2-credits__label { grid-row: 1; grid-column: 1; margin-left: 22px; font-size: 12.5px; color: var(--v3-ink-2); font-weight: 500; }
html[data-v3][data-ui] .v2-credits__value { grid-row: 1; grid-column: 2; justify-self: end; align-self: center; color: var(--v3-ink); }
html[data-v3][data-ui] .v2-credits__value b { font-size: 15.5px; font-weight: 600; color: var(--v3-ink); }
html[data-v3][data-ui] .v2-credits__unit { display: none; }
html[data-v3][data-ui] .v3-credits__of { grid-row: 1; grid-column: 3; align-self: baseline; font-size: 12px; color: var(--v3-faint); }
html[data-v3][data-ui] .v2-credits__bar { grid-row: 2; grid-column: 1 / -1; height: 5px; margin-top: 4px; background: var(--v3-line-soft); }
html[data-v3][data-ui] .v2-credits__bar i { background: var(--v3-orange); }
html[data-v3][data-ui] .v3-credits__link {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--v3-line-soft);
  font-size: 12px; font-weight: 600; color: var(--v3-ink);
}
html[data-v3][data-ui] .v3-credits__link svg { width: 14px; height: 14px; }

/* Aide / Paramètres */
html[data-v3][data-ui] .v3-footlinks { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
html[data-v3][data-ui] .v3-footlinks a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--v3-r-md);
  font-size: 13.5px; font-weight: 500; color: var(--v3-ink-2); text-decoration: none;
}
html[data-v3][data-ui] .v3-footlinks a svg { width: 18px; height: 18px; color: var(--v3-muted); }
html[data-v3][data-ui] .v3-footlinks a:hover { background: var(--v3-hover); }

/* Compte */
html[data-v3][data-ui] .app-header .header-actions { border-top: 1px solid var(--v3-line); margin-top: 12px; padding-top: 12px; }
html[data-v3][data-ui] .app-header .header-divider { display: none; }
html[data-v3][data-ui] .app-header .user-menu-trigger { gap: 10px; padding: 6px 8px; background: transparent; border-radius: var(--v3-r-md); }
html[data-v3][data-ui] .app-header .user-menu-trigger:hover { background: var(--v3-hover); }
html[data-v3][data-ui] .v3-user__av {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--v3-peach); color: var(--v3-orange-text); font-size: 12px; font-weight: 600;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--v3-peach-2);
}
html[data-v3][data-ui] .v3-user__t { display: flex !important; flex-direction: column; min-width: 0; line-height: 1.25; }
html[data-v3][data-ui] .v3-user__t b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-v3][data-ui] .v3-user__t small { font-size: 11.5px; color: var(--v3-muted); }

/* 4. Fil d'Ariane --------------------------------------------------------- */
html[data-v3][data-ui] .page-topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 32px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--v3-line);
}
html[data-v3][data-ui] .page-topbar--v3 .page-topbar-back { display: none; }
html[data-v3][data-ui] .page-topbar-crumbs { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--v3-muted); }
html[data-v3][data-ui] .page-topbar-parent { color: var(--v3-muted); text-decoration: none; }
html[data-v3][data-ui] a.page-topbar-parent:hover { color: var(--v3-ink); text-decoration: underline; }
html[data-v3][data-ui] .page-topbar-sep { color: var(--v3-faint); }
html[data-v3][data-ui] .page-topbar-current { font-weight: 500; color: var(--v3-ink); }

html[data-v3][data-ui] .page-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
html[data-v3][data-ui] .page-topbar-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; font-size: 11.5px; font-weight: 500;
  color: var(--v3-muted); background: var(--v3-hover); border: 1px solid var(--v3-line); border-radius: var(--v3-r-sm);
}
html[data-v3][data-ui] .page-topbar-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--v3-good); }
html[data-v3][data-ui] .page-topbar-avatar {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; text-decoration: none;
  background: var(--v3-peach); color: var(--v3-orange-text); border: 1px solid var(--v3-peach-2); font-size: 11.5px; font-weight: 600;
}
html[data-v3][data-ui] .page-topbar-avatar:hover { background: var(--v3-peach-2); }

/* 5. Titres --------------------------------------------------------------- */
html[data-v3][data-ui] .hub-intro h1,
html[data-v3][data-ui] .workspace-header h1,
html[data-v3][data-ui] .directory-header h1,
html[data-v3][data-ui] .dv3 h1 {
  font-size: clamp(27.5px, 3.2vw, 35.5px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; color: var(--v3-ink);
}
html[data-v3][data-ui] h1 span[style*="color"] { color: inherit !important; }
html[data-v3][data-ui] .subtitle,
html[data-v3][data-ui] .module-purpose { font-size: 14px; line-height: 1.6; color: var(--v3-muted); max-width: 62ch; }

/* 6. Boutons -------------------------------------------------------------- */
html[data-v3][data-ui] .btn-primary,
html[data-v3][data-ui] .btn-analyze:not(.btn-analyze--secondary):not(.btn-analyze--outline),
html[data-v3][data-ui] .dv3-btn,
html[data-v3][data-ui] .directory-new-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border: 0; border-radius: var(--v3-r-md);
  background: var(--v3-btn); color: #fff; font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer;
  box-shadow: none; transition: background .15s ease;
}
html[data-v3][data-ui] .btn-primary:hover:not(:disabled),
html[data-v3][data-ui] .btn-analyze:not(.btn-analyze--secondary):not(.btn-analyze--outline):hover:not(:disabled),
html[data-v3][data-ui] .dv3-btn:hover,
html[data-v3][data-ui] .directory-new-btn:hover { background: var(--v3-btn-hover); color: #fff; }
html[data-v3][data-ui] .btn-primary:disabled,
html[data-v3][data-ui] .btn-analyze:disabled { background: var(--v3-btn); opacity: .5; cursor: not-allowed; }
html[data-v3][data-ui] .dv3-btn svg,
html[data-v3][data-ui] .directory-new-btn svg { width: 16px; height: 16px; }
html[data-v3][data-ui] .dv3-btn--dark { background: var(--v3-ink); }
html[data-v3][data-ui] .dv3-btn--dark:hover { background: #000; }
html[data-v3][data-ui] .btn-reset,
html[data-v3][data-ui] .btn-analyze--secondary,
html[data-v3][data-ui] .btn-analyze--outline {
  min-height: 40px; padding: 0 16px; border: 1px solid var(--v3-line); border-radius: var(--v3-r-md);
  background: #fff; color: var(--v3-ink); font-size: 13.5px; font-weight: 500; box-shadow: none;
}
html[data-v3][data-ui] .btn-reset:hover,
html[data-v3][data-ui] .btn-analyze--secondary:hover,
html[data-v3][data-ui] .btn-analyze--outline:hover { background: var(--v3-hover); border-color: #D6D6D2; color: var(--v3-ink); }

/* 7. Cartes, formulaires, tableaux, badges -------------------------------- */
html[data-v3][data-ui] .card,
html[data-v3][data-ui] .directory-list-card,
html[data-v3][data-ui] .directory-preview-card,
html[data-v3][data-ui] .dv3-card {
  background: #fff; border: 1px solid var(--v3-line); border-radius: var(--v3-r-lg); box-shadow: none;    margin-bottom: 1%;
}
html[data-v3][data-ui] .field-label label,
html[data-v3][data-ui] .profile-picker-label,
html[data-v3][data-ui] label.field-label { font-size: 13.5px; font-weight: 500; color: var(--v3-ink); }
html[data-v3][data-ui] input[type="text"],
html[data-v3][data-ui] input[type="email"],
html[data-v3][data-ui] input[type="search"],
html[data-v3][data-ui] input[type="password"],
html[data-v3][data-ui] input[type="number"],
html[data-v3][data-ui] input[type="tel"],
html[data-v3][data-ui] select,
html[data-v3][data-ui] textarea,
html[data-v3][data-ui] .audit-select-trigger {
  border: 1px solid var(--v3-line); border-radius: var(--v3-r-md); background: #fff; color: var(--v3-ink);
  min-height: 44px; font-size: 13.5px; box-shadow: none;
}
html[data-v3][data-ui] textarea { padding: 12px 14px; line-height: 1.55;font-size:11.5px;font-weight:300 }
html[data-v3][data-ui] input::placeholder,
html[data-v3][data-ui] textarea::placeholder { color: var(--v3-faint); }
html[data-v3][data-ui] input:focus,
html[data-v3][data-ui] select:focus,
html[data-v3][data-ui] textarea:focus,
html[data-v3][data-ui] .audit-select-trigger:focus-visible {
  outline: 0; border-color: var(--v3-orange); box-shadow: 0 0 0 3px rgba(232, 89, 12, .15);
}
html[data-v3][data-ui] table th {
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--v3-faint);
}
html[data-v3][data-ui] .link-btn { color: var(--v3-orange-text); font-weight: 500; }

/* 8. Analyse & matching ---------------------------------------------------- */
html[data-v3][data-ui] body.page-analyse .workspace-header { display: block; margin-bottom: 28px; }
html[data-v3][data-ui] body.page-analyse .workspace-header .header-titles { margin-bottom: 26px; }

/* Stepper : pastilles + traits qui occupent toute la largeur */
html[data-v3][data-ui] .wizard-stepper { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
html[data-v3][data-ui] .wizard-stepper-item { gap: 10px; color: var(--v3-faint); font-weight: 500; }
html[data-v3][data-ui] .wizard-stepper-dot {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: #fff; border: 1px solid var(--v3-line); color: var(--v3-faint); font-size: 12px; font-weight: 600;
}
html[data-v3][data-ui] .wizard-stepper-item.is-active { color: var(--v3-orange-text); font-weight: 600; }
html[data-v3][data-ui] .wizard-stepper-item.is-active .wizard-stepper-dot,
html[data-v3][data-ui] .wizard-stepper-item.is-done .wizard-stepper-dot { background: var(--v3-btn); border-color: var(--v3-btn); color: #fff; }
html[data-v3][data-ui] .wizard-stepper-item.is-done { color: var(--v3-orange-text); }
/* Étape terminée : coche à la place du chiffre (le chiffre reste dans le DOM) */
html[data-v3][data-ui] .wizard-stepper-item.is-done .wizard-stepper-dot { font-size: 0; position: relative; }
html[data-v3][data-ui] .wizard-stepper-item.is-done .wizard-stepper-dot::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translate(-50%, -65%) rotate(-45deg);
}
html[data-v3][data-ui] .wizard-stepper-line { flex: 1 1 24px; width: auto; height: 1px; background: var(--v3-line); }
html[data-v3][data-ui] .wizard-stepper-line.is-done { background: var(--v3-btn); }

/* Cartes d'étape : surtitre « ÉTAPE 01 » + titre */
html[data-v3][data-ui] .analyse-wizard-step { padding: 28px 30px; }
html[data-v3][data-ui] .analyse-section-title { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 20px; }
html[data-v3][data-ui] .analyse-section-title .step-chip {
  order: -1; width: auto; height: auto; padding: 0; border: 0; background: transparent; border-radius: 0;
  font-family: var(--v3-font); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--v3-orange-text);
}
html[data-v3][data-ui] .analyse-section-title .step-chip::before { content: "Étape 0"; }
html[data-v3][data-ui] .analyse-section-title h2 { margin: 0; font-size: 23.5px; font-weight: 600; letter-spacing: -.025em; color: var(--v3-ink); }

/* Zone de dépôt */
html[data-v3][data-ui] .dropzone {
  border: 1.5px dashed #F0C9AE; border-radius: var(--v3-r-lg); background: #fff; transition: background .15s, border-color .15s;
}
html[data-v3][data-ui] .dropzone:hover,
html[data-v3][data-ui] .dropzone.is-dragover,
html[data-v3][data-ui] .dropzone.dragover { background: var(--v3-peach); border-color: var(--v3-orange); }
html[data-v3][data-ui] .dropzone-icon { color: var(--v3-orange); }
html[data-v3][data-ui] .dropzone-text { font-weight: 500; color: var(--v3-ink); }
html[data-v3][data-ui] .dropzone-hint,
html[data-v3][data-ui] .dropzone--compact .dropzone-hint { color: var(--v3-faint); font-size: 12px; letter-spacing: 0; word-spacing: normal; }
html[data-v3][data-ui] .dropzone-text,
html[data-v3][data-ui] .dropzone--compact .dropzone-text { letter-spacing: 0; font-size: 13.5px; }

/* Barre d'action : bouton principal pleine largeur de la carte */
html[data-v3][data-ui] body.page-analyse .btn-analyze--full { min-height: 46px; }
html[data-v3][data-ui] .wizard-cv-reminder { border: 1px solid var(--v3-line); border-radius: var(--v3-r-md); background: #fff; }

/* Onglets (Édition / Matching / CV-Synthèse) */
html[data-v3][data-ui] .ws-tab { border-radius: var(--v3-r-md); color: var(--v3-muted); font-weight: 500; }
html[data-v3][data-ui] .ws-tab.active { background: var(--v3-peach); color: var(--v3-orange-text); }

/* 8b. Analyse : étapes 1 et 2 + panneau « Le bon éclairage » ---------------- */
html[data-v3][data-ui] .analyse-step-sub { margin: 0; font-size: 13.5px; color: var(--v3-muted); }

/* Étape 1 : candidat de l'annuaire d'abord, dépôt de fichier ensuite */
html[data-v3][data-ui] .analyse-candidat-card .field--fill { display: flex; flex-direction: column; gap: 14px; }
html[data-v3][data-ui] .analyse-candidat-card .field--fill > * { order: 5; }
html[data-v3][data-ui] .analyse-candidat-card .field--fill > .profile-picker { order: 1; }
html[data-v3][data-ui] .analyse-candidat-card .field--fill > .v3-or { order: 2; }
html[data-v3][data-ui] .analyse-candidat-card .field--fill > .dropzone { order: 3; }
html[data-v3][data-ui] .analyse-candidat-card .field--fill > .profile-picker-alt:not(#existingCvSelectedInfo) { display: none; }
html[data-v3][data-ui] .analyse-candidat-card .field--fill > .field-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
html[data-v3][data-ui] #existingCvPanel { display: flex; flex-direction: column; gap: 10px; margin: 0; }
html[data-v3][data-ui] #existingCvPanel[hidden] { display: none; }
html[data-v3][data-ui] #useExistingCvCancelBtn { display: none; }
html[data-v3][data-ui] #existingCvPanel .profile-picker-row { display: block; }
html[data-v3][data-ui] #existingCvSelectedInfo:not([hidden]) {
  display: block; margin: 0; padding: 14px 16px; border: 1px solid var(--v3-line); border-radius: var(--v3-r-md);
  background: #FBFBF9; font-size: 13.5px; font-weight: 500; color: var(--v3-ink);
}

/* Séparateur « ou déposer un fichier » */
html[data-v3][data-ui] .v3-or {
  display: flex; align-items: center; gap: 14px; margin: 4px 0; font-size: 11.5px; color: var(--v3-faint); text-align: center;
}
html[data-v3][data-ui] .v3-or::before,
html[data-v3][data-ui] .v3-or::after { content: ""; flex: 1; height: 1px; background: var(--v3-line); }

/* Étape 2 : intitulé + description */
html[data-v3][data-ui] .v3-offer-fields { display: flex; flex-direction: column; gap: 18px; margin-bottom: 8px; }
html[data-v3][data-ui] .v3-offer-fields .field { display: flex; flex-direction: column; gap: 8px; }
html[data-v3][data-ui] .v3-offer-fields label { font-size: 13.5px; font-weight: 500; color: var(--v3-ink); }
html[data-v3][data-ui] .v3-offer-fields input[type="text"] { width: 100%; padding: 0 14px; }
html[data-v3][data-ui] body.page-analyse .v3-offer-fields #offerText { width: 100%; min-height: 170px; max-height: 46vh; resize: vertical; }
html[data-v3][data-ui] .v3-demo-offer { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; }


/* 8c. Analyse : alignement fin sur la maquette (étapes 1 et 2) ---------------
   Colonnes 2/3 – 1/3, stepper compact, boutons dans le pied de carte
   (« Continuer » / « Retour » + « Lancer le matching »), carte candidat,
   zone de dépôt illustrée. Les ids des boutons (wizardNextBtn, wizardBackBtn,
   analyzeBtn) sont inchangés : toute la logique reste dans assets/script.js. */
@media (min-width: 900px) {
  /* style.css fixe la colonne de gauche à 460px : on la remplace par 2fr / 1fr. */
  html[data-v3][data-ui] body.page-analyse .content-area {
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 0 24px;
  }
}
html[data-v3][data-ui] body.page-analyse #draftView .directory-preview-card { align-self: start; }
html[data-v3][data-ui] body.page-analyse .directory-preview-card { min-height: 0; padding: 26px 26px 28px; }
html[data-v3][data-ui] body.page-analyse .directory-preview-empty { max-width: none; margin: 0; padding: 0; align-items: flex-start; text-align: left; }

/* Fiche résultat (#draftPreviewFilled) : en v3 la colonne de droite ne fait que 1/3 de la largeur.
   v2.css met photo + identité + « Enregistrer » + « Nouveau matching » + « ⋯ » sur UNE seule ligne
   avec l'identité en flex: 1 1 0 : elle se retrouve écrasée (nom/e-mail/téléphone coupés lettre par lettre).
   Ici l'identité garde toute la largeur à côté de la photo, et les boutons passent sur la ligne suivante. */
@media (min-width: 900px) {
  html[data-v3][data-ui] body.page-analyse .directory-preview-identity {
    flex: 1 1 calc(100% - 78px);
    min-width: 0;
  }
  html[data-v3][data-ui] body.page-analyse #dpvDocNav .directory-document-nav-new-matching,
  html[data-v3][data-ui] body.page-analyse #draftPreviewFilled .preview-more {
    margin-top: .85rem;
  }
}
html[data-v3][data-ui] body.page-analyse .directory-preview-name { overflow-wrap: break-word; word-break: normal; }

/* Résultats affichés (.analyse-layout.is-result, posé par setResultSidebar() dans script.js) :
   le récap du candidat / de l'offre à gauche se réduit et la fiche résultat prend ~60 % de la largeur,
   comme sur « Conversion en lot ». Avant les résultats, la grille 2fr / 1fr du formulaire est inchangée. */
@media (min-width: 900px) {
  html[data-v3][data-ui] body.page-analyse .content-area:has(.analyse-layout.is-result) {
    grid-template-columns: minmax(340px, .6fr) minmax(0, 1fr);
  }
}
/* Arrivée depuis « Modifier / Réanalyser » de la Recherche multi-critères (body.analyse-from-multi,
   posé par autoLoadProfileFromUrl() dans script.js) : à l'étape 2 « Votre offre » (avant les résultats),
   formulaire et fiche candidat à égalité (1 / 1). Les autres entrées gardent 2fr / 1fr.
   !important : mobile-shell.css impose d'autres colonnes entre 900 et 1199 px. */
@media (min-width: 900px) {
  html[data-v3][data-ui] body.page-analyse.analyse-from-multi .content-area:has([data-wizard-step="2"]:not([hidden])):not(:has(.analyse-layout.is-result)) {
    grid-template-columns: minmax(250px, 0.5fr) minmax(0, 1fr) !important;
  }
}
html[data-v3][data-ui] body.page-analyse .directory-preview-contacts { min-width: 0; overflow-wrap: anywhere; }

/* Stepper compact : pastilles + traits courts, calés à gauche */
html[data-v3][data-ui] .wizard-stepper { display: flex; width: auto; gap: 16px; }
html[data-v3][data-ui] .wizard-stepper-line { flex: none; width: 120px; }

/* Barre latérale : libellés sur une ligne, légende des crédits */
html[data-v3][data-ui] .app-header .header-nav-item { gap: 10px; font-size: 13px; }
html[data-v3][data-ui] .app-header .header-nav-item span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-v3][data-ui] .v3-credits__cap { grid-column: 1 / -1; margin-top: 2px; font-size: 11px; color: var(--v3-faint); }

/* En-tête d'étape : pas de filet sous le sous-titre */
html[data-v3][data-ui] body.page-analyse .analyse-section-title { border-bottom: 0; padding-bottom: 0; }

/* Étape 1 : sélecteur + carte candidat */
html[data-v3][data-ui] .analyse-candidat-card .profile-picker { padding: 0; border: 0; background: transparent; box-shadow: none; }
html[data-v3][data-ui] .analyse-candidat-card .profile-picker-label { margin: 0; }
html[data-v3][data-ui] .analyse-candidat-card .audit-select-trigger { min-height: 46px; padding: 0 14px; }
html[data-v3][data-ui] #existingCvSelectedInfo:not([hidden]) { display: none; }
html[data-v3][data-ui] .v3-cand {
  display: flex; align-items: center; gap: 12px; margin-top: 2px; padding: 14px 16px;
  border: 1px solid var(--v3-line); border-radius: var(--v3-r-md); background: #FBFBF9;
}
html[data-v3][data-ui] .v3-cand[hidden] { display: none; }
html[data-v3][data-ui] .v3-cand__av {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: #EEEAF8; color: #5B4B9A; font-size: 11.5px; font-weight: 600;
}
html[data-v3][data-ui] .v3-cand__t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
html[data-v3][data-ui] .v3-cand__t b { font-size: 13.5px; font-weight: 600; color: var(--v3-ink); }
html[data-v3][data-ui] .v3-cand__t small { font-size: 11.5px; color: var(--v3-muted); }
html[data-v3][data-ui] .v3-cand__ok { flex: none; width: 18px; height: 18px; margin-left: auto; color: var(--v3-good); }

/* Zone de dépôt : icône sur fond pêche, titre, sous-titre, formats */
html[data-v3][data-ui] body.page-analyse .analyse-candidat-card .dropzone { min-height: 180px; }
html[data-v3][data-ui] .dropzone .dropzone-content { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
html[data-v3][data-ui] .v3-drop-ic {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 10px;
  border-radius: var(--v3-r-md); background: var(--v3-peach); color: var(--v3-orange);
}
html[data-v3][data-ui] .v3-drop-ic svg { width: 22px; height: 22px; }
html[data-v3][data-ui] .dropzone .dropzone-text { font-size: 14.5px; font-weight: 500; }
html[data-v3][data-ui] .dropzone .dropzone-sub { font-size: 12.5px; color: var(--v3-muted); }
html[data-v3][data-ui] .dropzone .dropzone-hint { margin-top: 8px; font-size: 11.5px; }

/* « Autres informations » : discret, sous la zone de dépôt */
html[data-v3][data-ui] body.page-analyse .analyse-optional-toggle { font-size: 13px; font-weight: 500; color: var(--v3-ink-2); }
html[data-v3][data-ui] body.page-analyse .analyse-optional-toggle .field-optional {
  font-size: 11.5px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--v3-faint);
}
html[data-v3][data-ui] p.analyse-below-hint {
  margin: 12px 2px 0; padding: 0; border: 0; background: none; font-size: 12px; line-height: 1.5; color: var(--v3-faint);
}

/* Pied de carte : filet, puis boutons alignés à droite (Retour à gauche en étape 2) */
html[data-v3][data-ui] .v3-step-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px;
  margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--v3-line);
}
html[data-v3][data-ui] .v3-step-foot--split { justify-content: space-between; }
html[data-v3][data-ui] body.page-analyse .v3-step-foot .btn-analyze,
html[data-v3][data-ui] body.page-analyse .v3-step-foot #wizardBackBtn {
  width: auto; min-width: 0; min-height: 42px; padding: 0 18px; border-radius: var(--v3-r-md);
}
html[data-v3][data-ui] body.page-analyse .v3-step-foot #wizardBackBtn { display: inline-flex; font-size: 13.5px; }
html[data-v3][data-ui] .v3-step-foot .btn-icon { width: 16px; height: 16px; }
html[data-v3][data-ui] .v3-step-foot .credit-shortfall-hint { flex-basis: 100%; margin: 0; text-align: right; }
/* Le rappel « CV ajouté » (barre sombre) n'existe plus : « Retour » est dans le pied de carte */
html[data-v3][data-ui] body.page-analyse .wizard-cv-reminder { display: none !important; }

/* Étape 2 : zone de dépôt d'annonce plus compacte, lien de démonstration discret */
html[data-v3][data-ui] body.page-analyse .analyse-offer-card .dropzone { min-height: 96px; }
html[data-v3][data-ui] body.page-analyse .analyse-offer-card .dropzone .dropzone-text { font-size: 13.5px; }
html[data-v3][data-ui] .v3-demo-offer { text-decoration: none; }
html[data-v3][data-ui] .v3-demo-offer:hover { text-decoration: underline; }

/* 8d. Analyse : mobile ------------------------------------------------------ */
@media (max-width: 900px) {
  html[data-v3][data-ui] .v3-credits__cap { display: none; }
  html[data-v3][data-ui] .wizard-stepper { width: 100%; gap: 8px; }
  html[data-v3][data-ui] .wizard-stepper-item { gap: 6px; font-size: 12px; }
  html[data-v3][data-ui] .wizard-stepper-dot { width: 24px; height: 24px; }
  html[data-v3][data-ui] .wizard-stepper-line { flex: 1 1 12px; width: auto; min-width: 12px; }
  html[data-v3][data-ui] .v3-step-foot--split { flex-wrap: nowrap; }
  html[data-v3][data-ui] body.page-analyse .v3-step-foot--split #analyzeBtn { flex: 1 1 auto; }
  html[data-v3][data-ui] body.page-analyse .v3-step-foot:not(.v3-step-foot--split) .btn-analyze { flex: 1 1 auto; }
}

/* 9. Annuaire candidats ----------------------------------------------------- */
html[data-v3][data-ui] body.page-annuaire .directory-page { padding: 32px 32px 48px; }
html[data-v3][data-ui] body.page-annuaire .directory-header { align-items: flex-start; gap: 24px; margin-bottom: 24px; }
html[data-v3][data-ui] .directory-header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
html[data-v3][data-ui] .directory-new-btn { order: 99; }
html[data-v3][data-ui] .directory-new-btn.is-locked { opacity: .5; pointer-events: none; }
/* Seul bouton de l'en-tête (forfait sans recherche multi-critères ni matching inversé) :
   il garde sa taille naturelle au lieu de s'étirer sur toute la largeur. */
html[data-v3][data-ui] .directory-header-actions:has(> .directory-new-btn:only-child) { justify-content: flex-start; }
html[data-v3][data-ui] .directory-header-actions > .directory-new-btn:only-child { flex: 0 0 auto; width: auto; min-width: 180px; }

html[data-v3][data-ui] .directory-list-card { overflow: hidden; padding: 0; }
html[data-v3][data-ui] .directory-toolbar-row { gap: 10px; }
html[data-v3][data-ui] .directory-search {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  background: #fff; border: 1px solid var(--v3-line); border-radius: var(--v3-r-md); color: var(--v3-faint);
}
html[data-v3][data-ui] .directory-search:focus-within { border-color: var(--v3-orange); box-shadow: 0 0 0 3px rgba(232,89,12,.15); }
html[data-v3][data-ui] .directory-search input { border: 0; box-shadow: none; min-height: 0; padding: 0; background: transparent; }
html[data-v3][data-ui] .directory-search input:focus { box-shadow: none; }
html[data-v3][data-ui] .directory-export-btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--v3-ink); }

/* Liste : lignes à plat séparées par un filet (comme le tableau de la maquette) */
html[data-v3][data-ui] body.page-annuaire .candidate-item {
  border: 0; border-bottom: 1px solid var(--v3-line-soft); border-radius: 0; background: #fff; padding: 14px 18px;
}
html[data-v3][data-ui] body.page-annuaire .candidate-item:hover { background: #FBFBF9; }
html[data-v3][data-ui] body.page-annuaire .candidate-item.active {
  background: var(--v3-peach); border-left: 3px solid var(--v3-orange); box-shadow: none;
}
html[data-v3][data-ui] body.page-annuaire .candidate-item-name { font-size: 13.5px; font-weight: 600; color: var(--v3-ink); }
html[data-v3][data-ui] body.page-annuaire .candidate-item-poste,
html[data-v3][data-ui] body.page-annuaire .candidate-item-ville { color: var(--v3-muted); font-size: 12px; }
html[data-v3][data-ui] .candidate-avatar,
html[data-v3][data-ui] .directory-preview-photo { background: var(--v3-peach); color: var(--v3-orange-text); }
html[data-v3][data-ui] body.page-annuaire .directory-preview-tag { background: var(--v3-hover); }
html[data-v3][data-ui] :is(body.page-annuaire, body.page-analyse, body.page-matching-inverse) .directory-document-nav-btn.is-active { border-bottom-color: var(--v3-orange); }
html[data-v3][data-ui] :is(body.page-annuaire, body.page-analyse, body.page-matching-inverse) .directory-preview-edit-btn { color: var(--v3-orange-text); }
html[data-v3][data-ui] :is(body.page-annuaire, body.page-analyse, body.page-matching-inverse) .directory-preview-name { letter-spacing: -.03em; }

/* 9b. Annuaire en tableau : stats, onglets, colonnes, favoris, tiroir de fiche - */
html[data-v3][data-ui] body.page-annuaire [hidden] { display: none !important; }
html[data-v3][data-ui] body.page-annuaire .directory-layout { display: block; }
html[data-v3][data-ui] body.page-annuaire .directory-sidebar { max-width: none; width: 100%; flex: none; gap: 20px; }

/* Statistiques */
html[data-v3][data-ui] .v3-stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 0 0 20px; color: var(--v3-muted); font-size: 13.5px; }
html[data-v3][data-ui] .v3-stats span { display: inline-flex; align-items: center; gap: 8px; }
html[data-v3][data-ui] .v3-stats svg { width: 20px; height: 20px; color: var(--v3-faint); }
html[data-v3][data-ui] .v3-stats b { font-size: 19.5px; font-weight: 600; color: var(--v3-ink); letter-spacing: -.02em; }

/* Onglets */
html[data-v3][data-ui] .v3-tabs { display: flex; flex: none; gap: 28px; padding: 0 24px; border-bottom: 1px solid var(--v3-line); overflow-x: auto; overflow-y: hidden; }
html[data-v3][data-ui] .v3-tabs button {
  display: inline-flex; align-items: center; gap: 8px; padding: 18px 0 16px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 500; color: var(--v3-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
html[data-v3][data-ui] .v3-tabs button:hover { color: var(--v3-ink); }
html[data-v3][data-ui] .v3-tabs button.is-active { color: var(--v3-orange-text); border-bottom-color: var(--v3-orange); font-weight: 600; }
html[data-v3][data-ui] .v3-tabs__n { font-style: normal; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--v3-peach); color: var(--v3-orange-text); }

/* Barre de recherche / filtres dans la carte */
/* La carte n'est plus plafonnée à la hauteur de l'écran (style.css : max-height + sticky) :
   la page défile, et ni les onglets ni la barre de recherche ne sont écrasés. */
html[data-v3][data-ui] body.page-annuaire .directory-list-card { position: static; max-height: none; overflow: hidden; overflow: clip; }
html[data-v3][data-ui] body.page-annuaire .directory-list-card > * { flex-shrink: 0; }
html[data-v3][data-ui] body.page-annuaire .directory-list-card .directory-toolbar-row { padding: 20px 24px 8px; align-items: stretch; gap: 12px; }
html[data-v3][data-ui] body.page-annuaire .directory-list-card .directory-search { flex: 1 1 auto; }
html[data-v3][data-ui] body.page-annuaire .directory-list-card .df-toggle {
  min-height: 44px; padding: 0 16px; border-radius: var(--v3-r-md); border: 1px solid var(--v3-line); background: #fff; font-weight: 500; color: var(--v3-ink);
}
html[data-v3][data-ui] body.page-annuaire .directory-list-card .directory-filters-bar { margin: 8px 24px 0; }
html[data-v3][data-ui] body.page-annuaire .directory-list-card .directory-list-meta { padding: 10px 24px; display: flex; align-items: center; gap: 12px; }
html[data-v3][data-ui] body.page-annuaire .directory-list-card .directory-count { margin: 0; font-size: 12px; color: var(--v3-faint); }

/* En-tête de colonnes + lignes : même grille */
html[data-v3][data-ui] .v3-thead,
html[data-v3][data-ui] body.page-annuaire .directory-list .candidate-item[data-v3] {
  display: grid; grid-template-columns: 44px minmax(170px, 1.3fr) minmax(170px, 1.5fr) 96px 150px 36px 20px; align-items: center; column-gap: 16px;
}
html[data-v3][data-ui] .v3-thead { padding: 12px 24px; background: #FAFAF8; border-top: 1px solid var(--v3-line-soft); }
html[data-v3][data-ui] .v3-thead span { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--v3-faint); }
html[data-v3][data-ui] .v3-thead span:first-child { grid-column: 1 / 3; }

html[data-v3][data-ui] body.page-annuaire .directory-list { max-height: none !important; overflow: visible !important; gap: 0; padding: 0; }
html[data-v3][data-ui] body.page-annuaire .directory-list .candidate-item[data-v3] {
  width: 100%; padding: 16px 24px; border: 0; border-bottom: 1px solid var(--v3-line-soft); border-radius: 0; background: #fff; text-align: left;
}
html[data-v3][data-ui] body.page-annuaire .directory-list .candidate-item[data-v3]:hover { background: #FBFBF9; }
html[data-v3][data-ui] body.page-annuaire .directory-list .candidate-item[data-v3].active { background: var(--v3-peach); border-left: 0; box-shadow: inset 3px 0 0 var(--v3-orange); }
html[data-v3][data-ui] body.page-annuaire .candidate-item[data-v3] .candidate-item-main { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
html[data-v3][data-ui] body.page-annuaire .candidate-item[data-v3] .candidate-item-ville { display: none; }
html[data-v3][data-ui] body.page-annuaire .candidate-item[data-v3] .candidate-item-poste { font-size: 11.5px; color: var(--v3-faint); }

html[data-v3][data-ui] .v3-av {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--v3-peach); color: var(--v3-orange-text); font-size: 12px; font-weight: 600;
}
html[data-v3][data-ui] .v3-cell { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
html[data-v3][data-ui] .v3-chip { padding: 3px 9px; font-size: 11.5px; color: var(--v3-muted); background: #fff; border: 1px solid var(--v3-line); border-radius: 6px; white-space: nowrap; }
html[data-v3][data-ui] .v3-muted { color: var(--v3-faint); }
html[data-v3][data-ui] .v3-sc { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; font-size: 12px; font-weight: 600; border-radius: 6px; }
html[data-v3][data-ui] .v3-sc::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
html[data-v3][data-ui] .v3-sc.g { color: var(--v3-good); background: var(--v3-good-bg); }
html[data-v3][data-ui] .v3-sc.m { color: var(--v3-mid); background: var(--v3-mid-bg); }
html[data-v3][data-ui] .v3-sc.r { color: var(--v3-low); background: var(--v3-low-bg); }
html[data-v3][data-ui] .v3-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; padding: 3px 9px; font-size: 12px; font-weight: 600; color: var(--v3-ink); background: var(--v3-hover); border: 1px solid var(--v3-line); border-radius: 6px; }
html[data-v3][data-ui] .v3-count.is-zero { color: var(--v3-faint); font-weight: 500; }
html[data-v3][data-ui] .v3-dispo { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--v3-muted); }
html[data-v3][data-ui] .v3-dispo i { width: 6px; height: 6px; border-radius: 50%; background: var(--v3-faint); }
html[data-v3][data-ui] .v3-dispo--ok { color: var(--v3-good); }
html[data-v3][data-ui] .v3-dispo--ok i { background: var(--v3-good); }
html[data-v3][data-ui] .v3-dispo--ko i { background: var(--v3-low); }
html[data-v3][data-ui] .v3-dispo--wait i { background: var(--v3-mid); }
html[data-v3][data-ui] .v3-star { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--v3-faint); cursor: pointer; }
html[data-v3][data-ui] .v3-star:hover { background: var(--v3-hover); color: var(--v3-ink); }
html[data-v3][data-ui] .v3-star svg { width: 20px; height: 20px; }
html[data-v3][data-ui] .v3-star.is-on { color: var(--v3-orange); }
html[data-v3][data-ui] .v3-star.is-on svg { fill: currentColor; }
html[data-v3][data-ui] .v3-go { color: var(--v3-faint); display: grid; place-items: center; }
html[data-v3][data-ui] .v3-go svg { width: 18px; height: 18px; }

/* Tiroir : la fiche du candidat s'ouvre à droite */
html[data-v3][data-ui] body.page-annuaire .directory-preview-card {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(910px, 94vw); min-height: 0; max-height: 100vh;
  overflow-y: auto; border-radius: var(--v3-r-lg) 0 0 var(--v3-r-lg); box-shadow: -18px 0 48px rgba(26,26,26,.14);
  transform: translateX(105%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s;
}
html[data-v3][data-ui] body.page-annuaire.v3-drawer-open .directory-preview-card { transform: none; visibility: visible; transition: transform .22s ease; }
html[data-v3][data-ui] .v3-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(26,26,26,.28); }
html[data-v3][data-ui] .v3-drawer-close {
  position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--v3-line); border-radius: 50%; background: #fff; color: var(--v3-muted); cursor: pointer;
}
html[data-v3][data-ui] .v3-drawer-close:hover { color: var(--v3-ink); background: var(--v3-hover); }
html[data-v3][data-ui] .v3-drawer-close svg { width: 16px; height: 16px; }

/* Petits écrans : le tableau devient une liste de cartes */
@media (max-width: 900px) {
  html[data-v3][data-ui] .v3-thead { display: none; }
  html[data-v3][data-ui] body.page-annuaire .directory-list .candidate-item[data-v3] { grid-template-columns: 44px 1fr 36px; row-gap: 8px; padding: 14px 16px; }
  html[data-v3][data-ui] body.page-annuaire .candidate-item[data-v3] .v3-cell { grid-column: 2 / 4; }
  html[data-v3][data-ui] body.page-annuaire .candidate-item[data-v3] .v3-go { display: none; }
  html[data-v3][data-ui] body.page-annuaire .candidate-item[data-v3] .v3-star { grid-column: 3; grid-row: 1; }
  html[data-v3][data-ui] .v3-tabs, html[data-v3][data-ui] body.page-annuaire .directory-list-card .directory-toolbar-row { padding-left: 16px; padding-right: 16px; }
}

/* 10. Tableau de bord ------------------------------------------------------- */
/* Coque : barre du haut + contenu. Fond très légèrement teinté pour faire ressortir les cartes. */
html[data-v3][data-ui] .dv3-shell { min-height: 100vh;  }
html[data-v3][data-ui] .dv3-topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; min-height: 62px; padding: 0 32px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--v3-line);
}
html[data-v3][data-ui] .dv3-crumbs { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--v3-muted); }
html[data-v3][data-ui] .dv3-crumbs b { font-weight: 500; color: var(--v3-ink); }
html[data-v3][data-ui] .dv3-crumbs__sep { color: var(--v3-faint); }
html[data-v3][data-ui] .dv3-topbar__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
html[data-v3][data-ui] .dv3-search {
  display: inline-flex; align-items: center; gap: 10px; min-width: 260px; min-height: 36px; padding: 0 8px 0 10px;
  border: 1px solid transparent; border-radius: var(--v3-r-md); background: transparent; color: var(--v3-faint); font-size: 12px; cursor: pointer;
}
html[data-v3][data-ui] .dv3-search:hover { background: var(--v3-hover); border-color: var(--v3-line); }
html[data-v3][data-ui] .dv3-search svg { width: 16px; height: 16px; flex: none; }
html[data-v3][data-ui] .dv3-search span { flex: 1; text-align: left; }
html[data-v3][data-ui] .dv3-search kbd { display: grid; place-items: center; width: 22px; height: 20px; border: 1px solid var(--v3-line); border-radius: 5px; background: #fff; font: 500 10.5px var(--v3-font); color: var(--v3-faint); }
html[data-v3][data-ui] .dv3-iconbtn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--v3-ink-2); text-decoration: none; }
html[data-v3][data-ui] .dv3-iconbtn:hover { background: var(--v3-hover); }
html[data-v3][data-ui] .dv3-iconbtn svg { width: 18px; height: 18px; }
html[data-v3][data-ui] .dv3-avatar {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; text-decoration: none;
  background: var(--v3-peach); color: var(--v3-orange-text); border: 1px solid var(--v3-peach-2); font-size: 11px; font-weight: 600;
}
html[data-v3][data-ui] .dv3-avatar:hover { background: var(--v3-peach-2); }

html[data-v3][data-ui] .hub-main.dv3 { max-width: 1280px; margin: 0 auto; padding: 34px 32px 40px; min-height: 0; }
html[data-v3][data-ui] .dv3 .hub-quota-banner { margin: 0 0 18px; border-radius: var(--v3-r-md); }
html[data-v3][data-ui] .dv3-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
html[data-v3][data-ui] .dv3-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--v3-muted); }
html[data-v3][data-ui] .dv3-eyebrow i { width: 5px; height: 5px; border-radius: 50%; background: var(--v3-orange); }
html[data-v3][data-ui] .dv3 h1 { margin: 0; }
html[data-v3][data-ui] .dv3-sub { margin: 10px 0 0; font-size: 13px; color: var(--v3-muted); }

/* Carte générique du tableau de bord */
html[data-v3][data-ui] .dv3-card { background: #fff; border: 1px solid var(--v3-line); border-radius: var(--v3-r-lg); box-shadow: none; }

/* Hero */
html[data-v3][data-ui] .dv3-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 24px;
  min-height: 256px; padding: 38px 40px; margin-bottom: 20px; overflow: hidden;
  background: #FDEBDD; border: 1px solid #F8DCC8; border-radius: 16px;
}
html[data-v3][data-ui] .dv3-hero__copy { position: relative; z-index: 2; }
html[data-v3][data-ui] .dv3-tag { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--v3-orange-text); }
html[data-v3][data-ui] .dv3-tag svg { width: 13px; height: 13px; }
html[data-v3][data-ui] .dv3-hero h2 { margin: 0 0 14px; font-size: clamp(25.5px, 2.6vw, 31.5px); font-weight: 600; letter-spacing: -.03em; line-height: 1.16; color: var(--v3-ink); }
html[data-v3][data-ui] .dv3-hero__text { max-width: 44ch; margin: 0 0 22px; font-size: 12.5px; line-height: 1.65; color: var(--v3-ink-2); opacity: .8; }
html[data-v3][data-ui] .dv3-hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
html[data-v3][data-ui] .dv3-hero__note { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 10.5px; color: var(--v3-muted); }
html[data-v3][data-ui] .dv3-hero__note svg { width: 13px; height: 13px; }

/* Illustration : cercles, carte candidat, pastille de score, carte offre */
html[data-v3][data-ui] .dv3-hero__art { position: relative; z-index: 1; height: 256px; margin: -38px -40px -38px 0; }
html[data-v3][data-ui] .dv3-orbit { position: absolute; left: 50%; top: 50%; border: 1px solid #F5D2BA; border-radius: 50%; transform: translate(-50%, -50%); }
html[data-v3][data-ui] .dv3-orbit--1 { width: 250px; height: 250px; background: rgba(255,255,255,.22); }
html[data-v3][data-ui] .dv3-orbit--2 { width: 370px; height: 370px; }
html[data-v3][data-ui] .dv3-plus { position: absolute; right: 9%; top: 24%; font-size: 21.5px; font-weight: 300; line-height: 1; color: #E9B995; }
html[data-v3][data-ui] .dv3-pill {
  position: absolute; left: 33%; top: 5%; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; transform: rotate(-4deg);
  background: #fff; border-radius: 8px; box-shadow: 0 8px 20px rgba(120,60,20,.1); font-size: 10px; color: var(--v3-ink-2); white-space: nowrap;
}
html[data-v3][data-ui] .dv3-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--v3-orange); }
html[data-v3][data-ui] .dv3-doc { position: absolute; background: #fff; border-radius: 14px; box-shadow: 0 18px 40px rgba(120,60,20,.14); }
html[data-v3][data-ui] .dv3-doc--front {
  left: 12%; top: 21%; width: 47%; padding: 16px 18px 18px; transform: rotate(-8deg);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 10px;
}
html[data-v3][data-ui] .dv3-doc__av { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--v3-peach); color: var(--v3-orange-text); font-size: 10.5px; font-weight: 600; }
html[data-v3][data-ui] .dv3-doc__id { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
html[data-v3][data-ui] .dv3-doc__id b { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-v3][data-ui] .dv3-doc__id small { font-size: 10px; color: var(--v3-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-v3][data-ui] .dv3-doc__ok { color: var(--v3-orange); }
html[data-v3][data-ui] .dv3-doc__ok svg { width: 18px; height: 18px; }
html[data-v3][data-ui] .dv3-doc__lines { grid-column: 1 / -1; margin: 14px 0 10px; }
html[data-v3][data-ui] .dv3-doc__lines i { display: block; height: 5px; margin-bottom: 7px; border-radius: 4px; background: var(--v3-line-soft); }
html[data-v3][data-ui] .dv3-doc__lines i + i { width: 70%; }
html[data-v3][data-ui] .dv3-doc__tags { grid-column: 1 / -1; display: flex; gap: 6px; margin-bottom: 14px; }
html[data-v3][data-ui] .dv3-doc__tags span { padding: 2px 8px; border: 1px solid var(--v3-line); border-radius: 5px; font-size: 9px; color: var(--v3-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48%; }
html[data-v3][data-ui] .dv3-doc__skills { grid-column: 1 / -1; display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 9px; color: var(--v3-faint); }
html[data-v3][data-ui] .dv3-doc__skills em { font-style: normal; color: var(--v3-good); font-weight: 600; }
html[data-v3][data-ui] .dv3-doc__bar { grid-column: 1 / -1; height: 4px; border-radius: 99px; background: var(--v3-line-soft); overflow: hidden; }
html[data-v3][data-ui] .dv3-doc__bar i { display: block; height: 100%; background: var(--v3-good); border-radius: 99px; }
html[data-v3][data-ui] .dv3-badge {
  position: absolute; left: 49%; top: 36%; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  width: 78px; height: 78px; border-radius: 50%; background: var(--v3-orange); color: #fff;
  box-shadow: 0 0 0 5px rgba(232,89,12,.14), 0 12px 24px rgba(232,89,12,.3);
}
html[data-v3][data-ui] .dv3-badge svg { width: 11px; height: 11px; }
html[data-v3][data-ui] .dv3-badge strong { font-size: 23.5px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
html[data-v3][data-ui] .dv3-badge small { font-size: 10.5px; font-weight: 500; }
html[data-v3][data-ui] .dv3-badge span { font-size: 8px; opacity: .9; }
html[data-v3][data-ui] .dv3-doc--offer { left: 62%; top: 69%; width: 36%; padding: 12px 14px; transform: rotate(6deg); display: flex; align-items: center; gap: 10px; }
html[data-v3][data-ui] .dv3-doc__job { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--v3-hover); color: var(--v3-muted); flex: none; }
html[data-v3][data-ui] .dv3-doc__job svg { width: 15px; height: 15px; }

/* KPI */
html[data-v3][data-ui] .dv3-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
html[data-v3][data-ui] .dv3-kpi { padding: 18px 20px 16px; }
html[data-v3][data-ui] .dv3-kpi__l { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--v3-muted); }
html[data-v3][data-ui] .dv3-kpi__l svg { width: 17px; height: 17px; color: var(--v3-faint); }
html[data-v3][data-ui] .dv3-kpi__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 12px 0 12px; }
html[data-v3][data-ui] .dv3-kpi__v { font-size: 31.5px; font-weight: 600; letter-spacing: -.04em; line-height: 1; color: var(--v3-ink); }
html[data-v3][data-ui] .dv3-kpi__v small { font-size: 16.5px; font-weight: 400; color: var(--v3-faint); margin-left: 2px; letter-spacing: 0; }
html[data-v3][data-ui] .dv3-spark { flex: none; width: 92px; height: 30px; color: #C9C7BC; }
html[data-v3][data-ui] .dv3-kpi__f { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; font-size: 11px; color: var(--v3-faint); }
html[data-v3][data-ui] .dv3-delta { white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 4px; font-size: 10.5px; font-weight: 600; }
html[data-v3][data-ui] .dv3-delta svg { width: 11px; height: 11px; }
html[data-v3][data-ui] .dv3-delta.is-up { color: var(--v3-good); background: var(--v3-good-bg); }
html[data-v3][data-ui] .dv3-delta.is-down { color: var(--v3-low); background: var(--v3-low-bg); }
html[data-v3][data-ui] .dv3-delta.is-down svg { transform: rotate(90deg); }

/* Grille : activité + « À vous de jouer » */
html[data-v3][data-ui] .dv3-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
html[data-v3][data-ui] .dv3-grid > .dv3-play:only-child { grid-column: 1 / -1; }
html[data-v3][data-ui] .dv3-panel { padding: 22px 0 0; }
html[data-v3][data-ui] .dv3-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 0 24px 14px; }
html[data-v3][data-ui] .dv3-panel__head h2 { margin: 0; font-size: 15.5px; font-weight: 600; letter-spacing: -.02em; }
html[data-v3][data-ui] .dv3-panel__head p { margin: 5px 0 0; font-size: 11.5px; color: var(--v3-muted); }
html[data-v3][data-ui] .dv3-panel__head--row { align-items: center; justify-content: flex-start; gap: 10px; padding-bottom: 16px; }
html[data-v3][data-ui] .dv3-count { padding: 1px 7px; border-radius: 5px; background: var(--v3-hover); font-style: normal; font-size: 10px; color: var(--v3-faint); }
html[data-v3][data-ui] .dv3-range { -webkit-appearance: none; appearance: none; font-family: inherit; line-height: 1.4; cursor: pointer; padding: 6px 28px 6px 10px; border: 1px solid var(--v3-line); border-radius: 7px; font-size: 10.5px; color: var(--v3-muted); background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 13px; white-space: nowrap; }

/* Activité */
html[data-v3][data-ui] .dv3-activity { display: flex; flex-direction: column; padding-bottom: 20px; }
html[data-v3][data-ui] .dv3-activity__top { display: flex; align-items: center; gap: 10px; padding: 4px 24px 0; font-size: 10.5px; color: var(--v3-faint); }
html[data-v3][data-ui] .dv3-activity__top strong { font-size: 29.5px; font-weight: 600; letter-spacing: -.04em; line-height: 1; color: var(--v3-ink); }
html[data-v3][data-ui] .dv3-chart { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; margin: 22px 24px 0; }
html[data-v3][data-ui] .dv3-chart__y { position: relative; height: 186px; }
html[data-v3][data-ui] .dv3-chart__y span { position: absolute; right: 0; transform: translateY(50%); font-size: 9px; color: var(--v3-faint); }
html[data-v3][data-ui] .dv3-chart__plot { position: relative; min-width: 0; }
html[data-v3][data-ui] .dv3-chart__grid { position: absolute; inset: 0 0 auto 0; height: 186px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
html[data-v3][data-ui] .dv3-chart__grid i { display: block; height: 0; border-top: 1px dashed var(--v3-line); }
html[data-v3][data-ui] .dv3-chart__grid i:last-child { border-top-style: solid; }
html[data-v3][data-ui] .dv3-chart__bars { position: relative; display: grid; grid-template-columns: repeat(14, 1fr); align-items: end; gap: 8px; height: 186px; padding: 0 3px; }
html[data-v3][data-ui] .dv3-chart__bars i { display: block; width: 100%; border-radius: 3px 3px 0 0; background: #ECEADF; }
html[data-v3][data-ui] .dv3-chart__bars i.today { background: #fb5300; }
html[data-v3][data-ui] .dv3-chart__x { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 10px; }
html[data-v3][data-ui] .dv3-chart__x span { font-size: 9.5px; color: var(--v3-faint); text-align: center; white-space: nowrap; }
html[data-v3][data-ui] .dv3-legend { display: flex; align-items: center; gap: 7px; margin: 16px 24px 0; font-size: 10px; color: var(--v3-faint); }
html[data-v3][data-ui] .dv3-legend i { width: 6px; height: 6px; border-radius: 50%; background: #fb5300; }

/* À vous de jouer */
html[data-v3][data-ui] .dv3-play { padding-bottom: 20px; }
html[data-v3][data-ui] .dv3-play__spark svg { width: 18px; height: 18px; color: var(--v3-orange); }
html[data-v3][data-ui] .dv3-quick { display: flex; flex-direction: column; margin: 0 24px; }
html[data-v3][data-ui] .dv3-q { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--v3-line-soft); color: inherit; text-decoration: none; }
html[data-v3][data-ui] .dv3-q:first-child { border-top: 0; padding-top: 4px; }
html[data-v3][data-ui] a.dv3-q:hover .dv3-q__t b { color: var(--v3-orange-text); }
html[data-v3][data-ui] a.dv3-q:hover .dv3-q__go svg { color: var(--v3-ink); }
html[data-v3][data-ui] .dv3-q.is-locked { opacity: .55; cursor: not-allowed; }
html[data-v3][data-ui] .dv3-q__ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--v3-peach); color: var(--v3-orange); }
html[data-v3][data-ui] .dv3-q__ic svg { width: 19px; height: 19px; }
html[data-v3][data-ui] .dv3-q__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
html[data-v3][data-ui] .dv3-q__t b { font-size: 12.5px; font-weight: 600; transition: color .15s; }
html[data-v3][data-ui] .dv3-q__t small { font-size: 11px; color: var(--v3-muted); }
html[data-v3][data-ui] .dv3-q__go svg { width: 15px; height: 15px; color: var(--v3-faint); }
html[data-v3][data-ui] .dv3-tip { display: flex; gap: 12px; margin: 14px 24px 0; padding: 14px 16px; background: #F7F6EE; border: 1px solid #ECEADC; border-radius: var(--v3-r-md); }
html[data-v3][data-ui] .dv3-tip > svg { flex: none; width: 15px; height: 15px; margin-top: 1px; color: var(--v3-faint); }
html[data-v3][data-ui] .dv3-tip b { font-size: 11px; font-weight: 600; }
html[data-v3][data-ui] .dv3-tip p { margin: 5px 0 0; font-size: 11px; line-height: 1.55; color: var(--v3-muted); }

/* Dernières analyses */
html[data-v3][data-ui] .dv3-last { margin-bottom: 24px; padding-bottom: 0; overflow: hidden; }
html[data-v3][data-ui] .dv3-last .dv3-panel__head h2 { font-size: 15.5px; }
html[data-v3][data-ui] .dv3-tw { overflow-x: auto; }
html[data-v3][data-ui] .dv3-tw table { width: 100%; border-collapse: collapse; }
html[data-v3][data-ui] .dv3-tw thead th { padding: 11px 24px; text-align: left; background: #FAFAF8; border-top: 1px solid var(--v3-line); font-size: 9px; letter-spacing: .1em; }
html[data-v3][data-ui] .dv3-tw th:nth-child(1) { width: 31%; } html[data-v3][data-ui] .dv3-tw th:nth-child(2) { width: 28%; } html[data-v3][data-ui] .dv3-tw th:nth-child(3) { width: 18%; } html[data-v3][data-ui] .dv3-tw th:nth-child(5) { width: 6%; }
html[data-v3][data-ui] .dv3-tw td { padding: 11px 24px; border-top: 1px solid var(--v3-line-soft); font-size: 12px; color: var(--v3-ink-2); vertical-align: middle; }
html[data-v3][data-ui] .dv3-tw tbody tr:hover { background: #FBFBF9; }
html[data-v3][data-ui] .dv3-who { display: flex; align-items: center; gap: 12px; }
html[data-v3][data-ui] .dv3-who b { display: block; font-size: 12.5px; font-weight: 600; color: var(--v3-ink); }
html[data-v3][data-ui] .dv3-who small { display: block; margin-top: 1px; font-size: 9.5px; color: var(--v3-faint); }
html[data-v3][data-ui] .dv3-dispo { display: flex !important; align-items: center; gap: 5px; }
html[data-v3][data-ui] .dv3-dispo i { width: 4px; height: 4px; border-radius: 50%; background: var(--v3-faint); }
html[data-v3][data-ui] .dv3-dispo--ok i { background: var(--v3-good); }
html[data-v3][data-ui] .dv3-dispo--ko i { background: var(--v3-low); }
html[data-v3][data-ui] .dv3-dispo--wait i { background: var(--v3-mid); }
html[data-v3][data-ui] .dv3-av { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--v3-peach); color: var(--v3-orange-text); font-size: 10px; font-weight: 600; }
html[data-v3][data-ui] .dv3-sc { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 5px; font-size: 11px; font-weight: 600; }
html[data-v3][data-ui] .dv3-sc::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
html[data-v3][data-ui] .dv3-sc.g { background: var(--v3-good-bg); color: var(--v3-good); }
html[data-v3][data-ui] .dv3-sc.m { background: var(--v3-mid-bg); color: var(--v3-mid); }
html[data-v3][data-ui] .dv3-sc.r { background: var(--v3-low-bg); color: var(--v3-low); }
html[data-v3][data-ui] .dv3-when { color: var(--v3-muted); white-space: nowrap; }
html[data-v3][data-ui] .dv3-go { text-align: right; }
html[data-v3][data-ui] .dv3-go a { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; color: var(--v3-faint); }
html[data-v3][data-ui] .dv3-go a:hover { background: var(--v3-hover); color: var(--v3-ink); }
html[data-v3][data-ui] .dv3-go svg { width: 15px; height: 15px; }
html[data-v3][data-ui] .dv3-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html[data-v3][data-ui] .dv3-last__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-top: 1px solid var(--v3-line-soft); font-size: 10.5px; color: var(--v3-faint); }
html[data-v3][data-ui] .dv3-last__foot span { display: inline-flex; align-items: center; gap: 7px; }
html[data-v3][data-ui] .dv3-last__foot svg { width: 13px; height: 13px; }
html[data-v3][data-ui] .dv3-empty { margin: 0; padding: 18px 24px 24px; font-size: 12.5px; color: var(--v3-muted); }

html[data-v3][data-ui] .dv3-foot { margin: 0; padding: 0; border: 0; }
html[data-v3][data-ui] .dv3-foot p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; font-size: 11.5px; color: var(--v3-faint); }
html[data-v3][data-ui] .dv3-foot svg { width: 14px; height: 14px; }
html[data-v3][data-ui] .dv3-foot a { color: inherit; }
html[data-v3][data-ui] .dv3-foot span { margin-left: auto; }

/* Barre latérale : détails de la maquette (menu d'espace, lien externe) */
html[data-v3][data-ui] .v3-workspace { position: relative; padding-right: 36px; }
html[data-v3][data-ui] .v3-workspace::after { content: ""; position: absolute; right: 12px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; }
html[data-v3][data-ui] .v3-footlinks a .v3-ext { width: 14px; height: 14px; margin-left: auto; color: var(--v3-faint); }

/* 11. Modales, menus -------------------------------------------------------- */
html[data-v3][data-ui] .modal-card,
html[data-v3][data-ui] .modal-content,
html[data-v3][data-ui] .user-menu-dropdown { border: 1px solid var(--v3-line); border-radius: var(--v3-r-lg); box-shadow: 0 16px 40px rgba(0,0,0,.12); }
html[data-v3][data-ui] .user-menu-item:hover { background: var(--v3-hover); }
html[data-v3][data-ui] .hub-footer { color: var(--v3-faint); }

/* 12. Mobile ---------------------------------------------------------------- */
@media (max-width: 1100px) {
  html[data-v3][data-ui] .dv3-grid { grid-template-columns: 1fr; }
  html[data-v3][data-ui] .dv3-hero { grid-template-columns: 1fr; padding: 32px 28px; }
  html[data-v3][data-ui] .dv3-hero__art { display: none; }
}
@media (max-width: 900px) {
  /* Barre du haut : blanche, sans espace de travail ni liens du bas (la V2 gère le reste). */
  html[data-v3][data-ui] .app-header { background: #fff; border-bottom: 1px solid var(--v3-line); }
  html[data-v3][data-ui] .v3-workspace,
  html[data-v3][data-ui] .v3-nav-label,
  html[data-v3][data-ui] .v3-footlinks,
  html[data-v3][data-ui] .v3-nav-count,
  html[data-v3][data-ui] .v3-credits__link,
  html[data-v3][data-ui] .v3-credits__of,
  html[data-v3][data-ui] .v3-user__t { display: none !important; }
  html[data-v3][data-ui] .page-topbar { padding: 0 16px; position: static; }
  html[data-v3][data-ui] .dv3-topbar { padding: 0 16px; position: static; }
  html[data-v3][data-ui] .dv3-search { min-width: 0; }
  html[data-v3][data-ui] .dv3-search span, html[data-v3][data-ui] .dv3-search kbd { display: none; }
  html[data-v3][data-ui] .v2-credits__value b { color: var(--v3-orange-text); }
}
@media (max-width: 640px) {
  html[data-v3][data-ui] .hub-main.dv3 { padding: 24px 16px 32px; }
  html[data-v3][data-ui] .dv3-top { flex-direction: column; align-items: stretch; }
  html[data-v3][data-ui] .dv3-btn { width: 100%; }
  html[data-v3][data-ui] .dv3-hero { padding: 26px 20px; border-radius: 16px; }
  html[data-v3][data-ui] .dv3-kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
  html[data-v3][data-ui] .dv3-kpi { padding: 16px; }
  html[data-v3][data-ui] .dv3-kpi__v { font-size: 25.5px; }
  html[data-v3][data-ui] .dv3-kpi__row { margin: 10px 0 8px; }
  html[data-v3][data-ui] .dv3-spark { width: 56px; }
  html[data-v3][data-ui] .dv3-crumbs { font-size: 11.5px; }
  html[data-v3][data-ui] .dv3-crumbs > span { display: none; }
  html[data-v3][data-ui] .dv3-tw th:nth-child(4), html[data-v3][data-ui] .dv3-tw td:nth-child(4) { display: none; }
    html[data-v3][data-ui] .dv3-panel__head,
  html[data-v3][data-ui] .dv3-activity__top { padding-left: 18px; padding-right: 18px; }
  html[data-v3][data-ui] .dv3-chart, html[data-v3][data-ui] .dv3-legend, html[data-v3][data-ui] .dv3-quick, html[data-v3][data-ui] .dv3-tip { margin-left: 18px; margin-right: 18px; }
  html[data-v3][data-ui] .dv3-chart__x span:nth-child(even) { visibility: hidden; }
  html[data-v3][data-ui] .dv3-tw th:nth-child(2),
  html[data-v3][data-ui] .dv3-tw td:nth-child(2) { display: none; }
  html[data-v3][data-ui] .dv3-tw td, html[data-v3][data-ui] .dv3-tw th { padding-left: 18px; padding-right: 18px; }
  html[data-v3][data-ui] .dv3-foot span { margin-left: 0; }
  html[data-v3][data-ui] .analyse-wizard-step { padding: 20px 18px; }
  html[data-v3][data-ui] body.page-annuaire .directory-page { padding: 20px 16px 32px; }
  html[data-v3][data-ui] .wizard-stepper { gap: 8px; font-size: 12px; }
  html[data-v3][data-ui] .wizard-stepper-item { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-v3][data-ui] * { transition: none !important; }
}

/* ================================================================
   Matching inversé — parcours V3 (maquette 1 → 2)
   ================================================================ */
html[data-v3][data-ui] body.page-matching-inverse .directory-page {
  max-width: none;
  padding: 26px 38px 48px 28px;font-family: poppins;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-match-intro {
  margin: 0 0 20px;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-match-intro .directory-header {
  margin: 0;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-match-intro .directory-header h1 {
  margin: 0 0 2px;
  font-size: 31.5px;
  line-height: 1.15;
  color: var(--v3-ink);
  letter-spacing: -.025em;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-match-intro .subtitle {
  margin: 0;
  max-width: none;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--v3-muted);
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(390px, 100%);
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--v3-faint);
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-stepper > li:not(.step-line) {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  font-weight: 500;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-stepper .step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid #d6d8dc;
  border-radius: 50%;
  background: #e7e8eb;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-stepper > li.is-active,
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-stepper > li.is-done {
  color: var(--v3-orange-text);
  font-weight: 600;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-stepper > li.is-active .step-dot,
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-stepper > li.is-done .step-dot {
  background: var(--v3-btn);
  border-color: var(--v3-btn);
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-stepper .step-line {
  flex: 1 1 44px;
  min-width: 36px;
  height: 1px;
  background: var(--v3-line);
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-stepper .step-line.is-done {
  background: var(--v3-btn);
}
html[data-v3][data-ui] body.page-matching-inverse .directory-layout {
  display: grid;
  grid-template-columns: minmax(0, 630px) minmax(360px, 1fr);
  gap: 12px;
  align-items: stretch;
}
html[data-v3][data-ui] body.page-matching-inverse .directory-sidebar {
  min-width: 0;
  max-width: 100%;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card,
html[data-v3][data-ui] body.page-matching-inverse #search-results-card,
html[data-v3][data-ui] body.page-matching-inverse .directory-preview-card {
  border: 1px solid #e2e3e6;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(25, 30, 40, .035);
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card {
  margin: 0;
  padding: 20px 24px 20px;
  min-height: 472px;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-tabs {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 38px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--v3-line);
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-tabs button {
  position: relative;
  height: 38px;
  padding: 0 0 11px;
  border: 0;
  background: transparent;
  color: var(--v3-muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-tabs button.is-active {
  color: var(--v3-orange-text);
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-tabs button.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--v3-orange);
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-source[hidden] { display: none !important; }
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 176px;
  border: 1.5px dashed #ff9a69;
  border-radius: 8px;
  background: #fffaf7;
  color: var(--v3-muted);
  text-align: center;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-dropzone:hover {
  background: #fff6f0;
  border-color: var(--v3-orange);
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #ffe9dc;
  color: var(--v3-orange);
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-upload-icon svg { width: 25px; height: 25px; }
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-dropzone strong {
  color: var(--v3-ink);
  font-size: 13.5px;
  font-weight: 700;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-dropzone span:not(.reverse-v3-upload-icon) {
  margin-top: 3px;
  font-size: 11.5px;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-dropzone small {
  margin-top: 12px;
  font-size: 10.5px;
  color: #8b8e95;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-file-status {
  display: block;
  min-height: 0;
  margin-top: 8px;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card .reverse-match-actions {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--v3-line-soft);
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card .reverse-match-hint { color: var(--v3-muted); }
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card .btn-analyze {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card .btn-analyze > span[aria-hidden="true"] {
  margin-left: 4px;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-match-textarea {
  min-height: 205px;
  padding: 12px 13px;
  border: 1px solid #d9dadd;
  border-radius: 7px;
  font-size: 12.5px;
  line-height: 1.55;
}
html[data-v3][data-ui] body.page-matching-inverse .saved-offer-select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d9dadd;
  border-radius: 7px;
  padding: 0 12px;
  background: #fff;
  color: var(--v3-ink);
  font-size: 12.5px;
}
html[data-v3][data-ui] body.page-matching-inverse .directory-preview-card {
  min-height: 472px;
  overflow: hidden;
}
html[data-v3][data-ui] body.page-matching-inverse .directory-preview-empty {
  min-height: 472px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card + #search-results-card { margin-top: 12px; }
html[data-v3][data-ui] body.page-matching-inverse #search-results-card {
  margin-top: 12px;
  padding: 18px 20px;
}
html[data-v3][data-ui] body.page-matching-inverse #searchResultsCount {
  display: block;
  margin-bottom: 12px;
  color: var(--v3-muted);
  font-size: 11.5px;
}
html[data-v3][data-ui] body.page-matching-inverse #searchResultsList {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #e5e6e9;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-match-item:hover,
html[data-v3][data-ui] body.page-matching-inverse .reverse-match-item.active {
  border-color: #f3b08e;
  background: #fffaf7;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-match-item-info { min-width: 0; }
html[data-v3][data-ui] body.page-matching-inverse .candidate-item-main { display: flex; align-items: center; gap: 9px; }
html[data-v3][data-ui] body.page-matching-inverse .candidate-item-main::before {
  content: "";
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: #f0f1f3;
  border: 1px solid #e1e2e5;
}
html[data-v3][data-ui] body.page-matching-inverse .candidate-item-name {
  display: block;
  overflow: hidden;
  color: var(--v3-ink);
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-match-audit-btn,
html[data-v3][data-ui] body.page-matching-inverse .reverse-match-audit-badge {
  flex: 0 0 auto;
  margin-left: 10px;
  font-size: 10.5px;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-match-audit-btn {
  padding: 6px 9px;
  border: 1px solid #e2e3e6;
  border-radius: 5px;
  background: #fff;
  color: var(--v3-orange-text);
  cursor: pointer;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-match-audit-btn:hover { border-color: #f0b394; background: #fff7f2; }
html[data-v3][data-ui] body.page-matching-inverse .reverse-match-audit-badge { color: #5e8a66; }
html[data-v3][data-ui] body.page-matching-inverse .directory-preview-content { background: #fff; }
html[data-v3][data-ui] body.page-matching-inverse .directory-preview-header {
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--v3-line-soft);
}
html[data-v3][data-ui] body.page-matching-inverse .directory-preview-name { font-size: 18.5px; }
html[data-v3][data-ui] body.page-matching-inverse .directory-preview-actions { padding: 10px 20px; }
html[data-v3][data-ui] body.page-matching-inverse .cv-preview-frame { min-height: 520px; }
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results .reverse-v3-offer-card { display: none; }
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results #search-results-card { margin-top: 0; }
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results .directory-preview-card { min-height: 600px; }
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results .directory-preview-empty { min-height: 600px; }

@media (max-width: 1050px) {
  html[data-v3][data-ui] body.page-matching-inverse .directory-layout { grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); }
}
@media (max-width: 900px) {
  html[data-v3][data-ui] body.page-matching-inverse .directory-page { padding: 22px 16px 34px; }
  html[data-v3][data-ui] body.page-matching-inverse .directory-layout { grid-template-columns: 1fr; }
  html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card { min-height: 0; }
  html[data-v3][data-ui] body.page-matching-inverse .directory-preview-card { min-height: 380px; }
  html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-stepper { width: 100%; }
}

/* Matching inversé — calage fidèle à la maquette fournie (1354 × 808) */
@media (min-width: 901px) {
  html[data-v3][data-ui] body.page-matching-inverse { --v2-sidebar-w: 285px; }
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-heading {
  margin: 0 0 18px;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-heading > span {
  display: block;
  margin-bottom: 4px;
  color: var(--v3-orange-text);
  font-size: 9.5px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .04em;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-heading h2 {
  margin: 0 0 3px;
  color: var(--v3-ink);
  font-size: 20.5px;
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 700;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-heading p {
  margin: 0;
  color: var(--v3-muted);
  font-size: 11.5px;
  line-height: 1.45;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card {
  min-height: 474px;
  padding: 20px 24px 0;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-tabs {
  margin-bottom: 19px;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-dropzone {
  min-height: 178px;
  background: #fffdfb;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-saved-row {
  height: 54px;
  margin-top: 7px;
  border-bottom: 1px solid var(--v3-line-soft);
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-saved-trigger {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--v3-muted);
  text-align: left;
  font-size: 11.5px;
  cursor: pointer;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-saved-trigger:hover { color: var(--v3-ink); }
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-saved-book {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  color: #68717a;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-saved-book svg { width: 21px; height: 21px; }
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-saved-chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: #7c838a;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card .reverse-match-actions {
  margin-top: 0;
  min-height: 75px;
  padding-top: 19px;
  border-top: 0;
  align-items: flex-start;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card .reverse-match-actions::before {
  display: none;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card .reverse-match-hint {
  padding-top: 8px;
  font-size: 10.5px;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card .btn-analyze {
  min-width: 168px;
  height: 36px;
  min-height: 36px;
  border-radius: 6px;
  background: #ffb08d;
  color: #fff;
  opacity: 1;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card .btn-analyze:disabled {
  background: #ffb08d;
  color: #fff;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card .btn-analyze .credit-action-cost { display: none; }

@media (max-width: 900px) {
  html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-offer-card { padding: 18px 18px 0; }
  html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-saved-row { height: 50px; }
}

/* Étape 2 — structure de résultat cohérente avec l'étape 1 */
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-results-heading {
  margin: 0 0 15px;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-results-heading > span {
  display: block;
  margin-bottom: 4px;
  color: var(--v3-orange-text);
  font-size: 9.5px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .04em;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-results-heading h2 {
  margin: 0 0 3px;
  color: var(--v3-ink);
  font-size: 20.5px;
  line-height: 1.25;
  letter-spacing: -.02em;
}
html[data-v3][data-ui] body.page-matching-inverse .reverse-v3-results-heading p {
  margin: 0;
  color: var(--v3-muted);
  font-size: 11.5px;
}
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results #search-results-card {
  min-height: 474px;
  padding: 20px 24px 22px;
}
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results #searchResultsCount {
  margin: 0 0 12px;
  color: var(--v3-muted);
  font-size: 10.5px;
}
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results #searchResultsList {
  gap: 8px;
}

/* Maquette matching inversé : la zone de dépôt doit dominer le panneau info.
   Cette règle finale neutralise les proportions plus équilibrées définies
   plus haut, tout en conservant l'empilement prévu sous 900px. */
@media (min-width: 901px) {
  html[data-v3][data-ui] body.page-matching-inverse .directory-layout {
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
  }
}

/* Étape 2 : la fiche sélectionnée commence en haut du panneau droit.
   Les règles V2 utilisent un flex-wrap compact partagé avec l’annuaire ;
   sur le matching inversé cela créait un grand vide au-dessus de la fiche. */
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results .directory-preview-card {
  align-self: start;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
}
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results #directoryPreviewContent:not([hidden]) {
  display: block;
  width: 100%;
}
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results .directory-preview-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 14px;
}
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results .directory-preview-actions,
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results .directory-document-nav,
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results .directory-preview-frame-card {
  display: block;
  width: 100%;
}
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results .directory-preview-actions {
  padding: 12px 20px;
  border-top: 1px solid var(--v3-line-soft);
  border-bottom: 1px solid var(--v3-line-soft);
}
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results .directory-document-nav {
  padding: 0 20px;
}
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results .directory-preview-frame-card {
  margin: 14px 20px 20px;
  width: calc(100% - 40px);
}


/* ================================================================
   Rédaction d'une offre — parcours V3 (maquettes « Votre contenu » → « Votre offre »)
   Balisage : redaction.php (variante V3). Les identifiants lus par
   assets/redaction.js sont inchangés ; seuls l'habillage et la mise en
   page changent. Ne s'applique qu'en V3 (préfixe html[data-v3]).
   ================================================================ */
@media (min-width: 901px) {
  html[data-v3][data-ui] body.page-redaction { --v2-sidebar-w: 285px; }
}
html[data-v3][data-ui] body.page-redaction .ro-main {
  max-width: none;
  padding: 26px 32px 44px 28px;
  background: transparent;
}
html[data-v3][data-ui] body.page-redaction .ro-container { max-width: none; }

/* En-tête : titre + bouton « Annonces enregistrées » */
html[data-v3][data-ui] body.page-redaction .ro-v3-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 22px;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-head h1 {
  margin: 0 0 4px;
  font-size: 31.5px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--v3-ink);
}
html[data-v3][data-ui] body.page-redaction .ro-v3-head .subtitle { margin: 0; max-width: none; font-size: 13.5px; line-height: 1.5; color: var(--v3-muted); }
html[data-v3][data-ui] body.page-redaction .ro-v3-saved-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #f0b394;
  border-radius: 6px;
  background: #fff;
  color: var(--v3-orange-text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-saved-btn svg { width: 15px; height: 15px; }
html[data-v3][data-ui] body.page-redaction .ro-v3-saved-btn:hover { background: #fff7f2; border-color: var(--v3-orange); }

/* Étapes */
html[data-v3][data-ui] body.page-redaction .ro-v3-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(390px, 100%);
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--v3-faint);
}
html[data-v3][data-ui] body.page-redaction .ro-v3-stepper > li:not(.step-line) { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; font-weight: 500; }
html[data-v3][data-ui] body.page-redaction .ro-v3-stepper .step-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #e7e8eb; color: #fff; font-size: 11.5px; font-weight: 700;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-stepper > li.is-active,
html[data-v3][data-ui] body.page-redaction .ro-v3-stepper > li.is-done { color: var(--v3-orange-text); font-weight: 600; }
html[data-v3][data-ui] body.page-redaction .ro-v3-stepper > li.is-active .step-dot,
html[data-v3][data-ui] body.page-redaction .ro-v3-stepper > li.is-done .step-dot { background: var(--v3-btn); }
/* Étape terminée : coche à la place du chiffre */
html[data-v3][data-ui] body.page-redaction .ro-v3-stepper > li.is-done .step-dot { font-size: 0; position: relative; }
html[data-v3][data-ui] body.page-redaction .ro-v3-stepper > li.is-done .step-dot::after {
  content: ""; width: 9px; height: 5px; margin-top: -2px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg);
}
html[data-v3][data-ui] body.page-redaction .ro-v3-stepper .step-line { flex: 1 1 44px; min-width: 36px; height: 1px; background: var(--v3-line); }
html[data-v3][data-ui] body.page-redaction .ro-v3-stepper .step-line.is-done { background: var(--v3-btn); }

/* Grille : étape 1 = formulaire large + panneau d'info ; étape 2 = formulaire + offre */
@media (min-width: 1100px) {
  html[data-v3][data-ui] body.page-redaction .ro-layout {
    grid-template-columns: minmax(0, 1.53fr) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }
  html[data-v3][data-ui] body.page-redaction.ro-v3-has-offer .ro-layout { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); }
}
html[data-v3][data-ui] body.page-redaction .ro-form { gap: 12px; }

/* Carte principale : .ro-flip-outer devient la carte, les deux « faces » sont à plat */
html[data-v3][data-ui] body.page-redaction .ro-flip-outer {
  padding: 20px 24px 20px;
  border: 1px solid #e2e3e6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(25, 30, 40, .035);
  perspective: none;
}
html[data-v3][data-ui] body.page-redaction .ro-flip-card { transform: none !important; transition: none; }
html[data-v3][data-ui] body.page-redaction .ro-flip-card.is-flipping { opacity: 1; }
html[data-v3][data-ui] body.page-redaction .ro-flip-face,
html[data-v3][data-ui] body.page-redaction .ro-import-card,
html[data-v3][data-ui] body.page-redaction .ro-form-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
html[data-v3][data-ui] body.page-redaction .ro-flip-face[hidden] { display: none !important; }
html[data-v3][data-ui] body.page-redaction .ro-form-card-head,
html[data-v3][data-ui] body.page-redaction .ro-import-back,
html[data-v3][data-ui] body.page-redaction .ro-import-or,
html[data-v3][data-ui] body.page-redaction .ro-v3-hidden-legacy { display: none !important; }

html[data-v3][data-ui] body.page-redaction .ro-v3-card-head { margin: 0 0 16px; }
html[data-v3][data-ui] body.page-redaction .ro-v3-eyebrow {
  margin: 0 0 4px;
  color: var(--v3-orange-text);
  font-size: 9.5px; line-height: 1.2; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-card-head h2 {
  margin: 0 0 3px;
  color: var(--v3-ink);
  font-size: 20.5px; line-height: 1.25; letter-spacing: -.02em; font-weight: 700;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-sub { margin: 0; color: var(--v3-muted); font-size: 12px; line-height: 1.45; }
html[data-v3][data-ui] body.page-redaction .ro-v3-when-offer { display: none; }
html[data-v3][data-ui] body.page-redaction.ro-v3-has-offer .ro-v3-when-offer { display: inline; }
html[data-v3][data-ui] body.page-redaction.ro-v3-has-offer .ro-v3-when-start { display: none; }

/* Onglets */
html[data-v3][data-ui] body.page-redaction .ro-v3-tabs {
  display: flex; align-items: center; gap: 26px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--v3-line);
}
html[data-v3][data-ui] body.page-redaction .ro-v3-tabs button {
  position: relative;
  height: 38px; padding: 0 0 11px;
  border: 0; background: transparent;
  color: var(--v3-muted);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-tabs button:hover { color: var(--v3-ink); }
html[data-v3][data-ui] body.page-redaction .ro-v3-tabs button.is-active { color: var(--v3-orange-text); }
html[data-v3][data-ui] body.page-redaction .ro-v3-tabs button.is-active::after {
  content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--v3-orange);
}

/* Zone de dépôt */
html[data-v3][data-ui] body.page-redaction .ro-import-card .dropzone {
  min-height: 172px;
  margin: 0;
  border: 1.5px dashed #ff9a69;
  border-radius: 8px;
  background: #fffaf7;
}
html[data-v3][data-ui] body.page-redaction .ro-import-card .dropzone:hover,
html[data-v3][data-ui] body.page-redaction .ro-import-card .dropzone.is-dragover { background: #fff6f0; border-color: var(--v3-orange); }
html[data-v3][data-ui] body.page-redaction .ro-import-card .dropzone .dropzone-content { padding: 22px 12px; gap: 3px; }
html[data-v3][data-ui] body.page-redaction .ro-v3-drop-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-bottom: 8px;
  border-radius: 10px; background: #ffe9dc; color: var(--v3-orange);
}
html[data-v3][data-ui] body.page-redaction .ro-v3-drop-ic svg { width: 25px; height: 25px; }
html[data-v3][data-ui] body.page-redaction .ro-import-card .dropzone .dropzone-text { font-size: 13.5px; font-weight: 700; color: var(--v3-ink); }
html[data-v3][data-ui] body.page-redaction .ro-import-card .dropzone .dropzone-sub { font-size: 12px; color: var(--v3-muted); }
html[data-v3][data-ui] body.page-redaction .ro-import-card .dropzone .dropzone-hint { margin-top: 12px; font-size: 11px; color: #8b8e95; }
html[data-v3][data-ui] body.page-redaction .ro-import-card .file-status { margin: 0; }
html[data-v3][data-ui] body.page-redaction .ro-import-card .file-status:not(:empty) { margin-top: 10px; }

/* « + Informations complémentaires — Facultatif » */
html[data-v3][data-ui] body.page-redaction .ro-notes-toggle-wrap { margin-top: 14px; border-top: 1px solid var(--v3-line-soft); }
html[data-v3][data-ui] body.page-redaction .ro-notes-toggle {
  min-height: 44px; padding: 0; gap: 10px;
  font-size: 12.5px; font-weight: 500; color: var(--v3-ink-2);
}
html[data-v3][data-ui] body.page-redaction .ro-notes-toggle:hover { color: var(--v3-ink); }
html[data-v3][data-ui] body.page-redaction .ro-notes-toggle-icon { width: 15px; height: 15px; color: var(--v3-muted); }
html[data-v3][data-ui] body.page-redaction .ro-notes-toggle-opt { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--v3-faint); }
html[data-v3][data-ui] body.page-redaction .ro-notes-toggle-chevron { margin-left: 0; transform: rotate(-90deg); color: var(--v3-muted); }
html[data-v3][data-ui] body.page-redaction .ro-notes-toggle[aria-expanded="true"] .ro-notes-toggle-chevron { transform: rotate(0deg); }
html[data-v3][data-ui] body.page-redaction .ro-notes-panel { margin: 0 0 12px; }
html[data-v3][data-ui] body.page-redaction .ro-notes-panel textarea {
  border: 1px solid #e3e4e6; border-radius: 7px; background: #fafaf9; font-size: 12.5px;
}
html[data-v3][data-ui] body.page-redaction .ro-notes-panel textarea:focus { background: #fff; border-color: var(--v3-orange); outline: none; }

/* Cases à cocher */
html[data-v3][data-ui] body.page-redaction .ro-import-settings { margin-top: 0; padding-top: 0; border-top: 1px solid var(--v3-line-soft); }
html[data-v3][data-ui] body.page-redaction .ro-import-settings .ro-check { margin: 0; min-height: 44px; align-items: center; }
html[data-v3][data-ui] body.page-redaction .ro-check-box { width: 17px; height: 17px; border: 1px solid #c9cbd0; border-radius: 4px; }
html[data-v3][data-ui] body.page-redaction .ro-check input:checked + .ro-check-box { background: var(--v3-btn); border-color: var(--v3-btn); }
html[data-v3][data-ui] body.page-redaction .ro-check-text { font-size: 12.5px; color: var(--v3-ink-2); }

/* Pied de carte : indication à gauche, bouton à droite */
html[data-v3][data-ui] body.page-redaction .ro-v3-foot,
html[data-v3][data-ui] body.page-redaction .ro-form-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 6px; padding-top: 14px;
  border-top: 1px solid var(--v3-line-soft);
}
html[data-v3][data-ui] body.page-redaction .ro-form-card-foot { margin-top: 14px; }
html[data-v3][data-ui] body.page-redaction .ro-v3-foot__hint { margin: 0; color: var(--v3-faint); font-size: 11.5px; line-height: 1.4; }
html[data-v3][data-ui] body.page-redaction .ro-v3-foot__hint.is-ready { color: var(--v3-muted); }
html[data-v3][data-ui] body.page-redaction .ro-import-card .ro-import-btn,
html[data-v3][data-ui] body.page-redaction .ro-form-card .ro-generate-btn {
  width: auto; min-width: 0; margin: 0;
  min-height: 40px; padding: 0 16px;
  border-radius: 6px; font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap;
}
html[data-v3][data-ui] body.page-redaction .ro-import-btn:disabled { background: #f3b999; border-color: #f3b999; color: #fff; opacity: 1; cursor: not-allowed; }
html[data-v3][data-ui] body.page-redaction .ro-import-btn .btn-icon { width: 15px; height: 15px; }
html[data-v3][data-ui] body.page-redaction .ro-generate-btn .btn-icon { display: none; }
/* Après génération : « Régénérer l'offre » en bouton contour, avec son icône */
html[data-v3][data-ui] body.page-redaction.ro-v3-has-offer .ro-form-card .ro-generate-btn:not(:disabled) {
  background: #fff; color: var(--v3-orange-text); border: 1px solid #f0b394;
}
html[data-v3][data-ui] body.page-redaction.ro-v3-has-offer .ro-form-card .ro-generate-btn:not(:disabled):hover { background: #fff7f2; border-color: var(--v3-orange); }
html[data-v3][data-ui] body.page-redaction.ro-v3-has-offer .ro-generate-btn .ro-v3-regen-ic { display: inline-block; width: 15px; height: 15px; }
html[data-v3][data-ui] body.page-redaction .btn-credit-cost { margin-left: 2px; }

/* Formulaire « Décrire le poste » */
html[data-v3][data-ui] body.page-redaction .ro-form-card-body { padding: 0; }
html[data-v3][data-ui] body.page-redaction .ro-field { margin-bottom: 12px; }
html[data-v3][data-ui] body.page-redaction .ro-field-label { margin-bottom: 5px; color: var(--v3-muted); font-size: 11px; font-weight: 500; }
html[data-v3][data-ui] body.page-redaction .ro-form-card-body input[type="text"],
html[data-v3][data-ui] body.page-redaction .ro-form-card-body textarea,
html[data-v3][data-ui] body.page-redaction .ro-select {
  width: 100%;
  border: 1px solid #e6e7e9; border-radius: 6px;
  background: #fafaf9; color: var(--v3-ink);
  font-size: 12.5px; line-height: 1.5;
}
html[data-v3][data-ui] body.page-redaction .ro-form-card-body input[type="text"] { height: 36px; padding: 0 12px; }
html[data-v3][data-ui] body.page-redaction .ro-form-card-body textarea { min-height: 84px; padding: 9px 12px; resize: vertical; }
html[data-v3][data-ui] body.page-redaction .ro-form-card-body input[type="text"]:focus,
html[data-v3][data-ui] body.page-redaction .ro-form-card-body textarea:focus,
html[data-v3][data-ui] body.page-redaction .ro-select:focus { outline: none; background: #fff; border-color: var(--v3-orange); }
html[data-v3][data-ui] body.page-redaction .ro-select { height: 36px; padding: 0 10px; }

html[data-v3][data-ui] body.page-redaction .ro-options { margin: 4px 0 12px; border: 0; background: transparent; border-radius: 0; }
html[data-v3][data-ui] body.page-redaction .ro-options-summary { padding: 4px 0 8px; gap: 8px; font-size: 12px; }
html[data-v3][data-ui] body.page-redaction .ro-options-title { color: var(--v3-ink-2); font-weight: 600; }
html[data-v3][data-ui] body.page-redaction .ro-options-hint { display: none; }
html[data-v3][data-ui] body.page-redaction .ro-options-chevron { width: 14px; height: 14px; margin-left: 0; color: var(--v3-muted); }
html[data-v3][data-ui] body.page-redaction .ro-options-body { padding: 4px 0 0; }
html[data-v3][data-ui] body.page-redaction .ro-options-grid { gap: 0 12px; }
html[data-v3][data-ui] body.page-redaction .ro-options-grid > .ro-field:nth-child(3) { order: 4; } /* Statut après Rémunération */
html[data-v3][data-ui] body.page-redaction .ro-options .ro-field input[type="text"] { height: 36px; border-radius: 6px; background: #fafaf9; font-size: 12.5px; }
html[data-v3][data-ui] body.page-redaction .ro-tones { gap: 8px; margin-bottom: 14px; }
html[data-v3][data-ui] body.page-redaction .ro-tone {
  height: 28px; padding: 0 14px;
  border: 1px solid #e6e7e9; border-radius: 999px; background: #fff; color: var(--v3-ink-2);
  font-size: 11.5px; font-weight: 500;
}
html[data-v3][data-ui] body.page-redaction .ro-tone:hover { border-color: #f0b394; color: var(--v3-orange-text); }
html[data-v3][data-ui] body.page-redaction .ro-tone[aria-pressed="true"] { background: var(--v3-peach); border-color: #f3b08e; color: var(--v3-orange-text); font-weight: 600; }
html[data-v3][data-ui] body.page-redaction .ro-options .ro-check { margin: 4px 0 0; }
html[data-v3][data-ui] body.page-redaction .ro-error { margin: 8px 0 0; font-size: 11.5px; }

/* Panneau de droite — état de départ « Une offre à votre image » */
html[data-v3][data-ui] body.page-redaction .ro-v3-info {
  min-height: 0;
  padding: 22px 24px 22px;
  border: 1px solid #e2e3e6; border-radius: 10px; background: #fff;
  box-shadow: 0 1px 3px rgba(25, 30, 40, .035);
  text-align: left; align-items: stretch;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-info h2 { margin: 0 0 4px; font-size: 16.5px; line-height: 1.25; letter-spacing: -.015em; color: var(--v3-ink); }
html[data-v3][data-ui] body.page-redaction .ro-placeholder-card[hidden] { display: none; }

/* Panneau de droite — « Votre offre » */
html[data-v3][data-ui] body.page-redaction .ro-v3-panel {
  min-height: 0; padding: 0;
  border: 1px solid #e2e3e6; border-radius: 10px; background: #fff;
  box-shadow: 0 1px 3px rgba(25, 30, 40, .035);
  display: flex; flex-direction: column; overflow: hidden;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-panel[hidden] { display: none; }
html[data-v3][data-ui] body.page-redaction .ro-v3-panel__head {
  display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 14px 18px 10px;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-panel__head[hidden] { display: none; }
html[data-v3][data-ui] body.page-redaction .ro-v3-panel__ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 7px; background: #ffe9dc; color: var(--v3-orange);
}
html[data-v3][data-ui] body.page-redaction .ro-v3-panel__ic svg { width: 17px; height: 17px; }
html[data-v3][data-ui] body.page-redaction .ro-v3-panel__head h2 { margin: 0; font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; color: var(--v3-ink); }
html[data-v3][data-ui] body.page-redaction .ro-v3-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 10px;
  border-radius: 999px; background: var(--v3-good-bg); color: var(--v3-good);
  font-size: 11px; font-weight: 600;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-panel__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
html[data-v3][data-ui] body.page-redaction .ro-v3-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px;
  border: 1px solid #e2e3e6; border-radius: 6px; background: #fff; color: var(--v3-ink-2);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background .14s ease, border-color .14s ease;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-btn svg { width: 15px; height: 15px; }
html[data-v3][data-ui] body.page-redaction .ro-v3-btn--ghost { border-color: #f0b394; color: var(--v3-orange-text); }
html[data-v3][data-ui] body.page-redaction .ro-v3-btn--ghost:hover { background: #fff7f2; border-color: var(--v3-orange); }
html[data-v3][data-ui] body.page-redaction .ro-v3-btn--icon { width: 34px; padding: 0; color: var(--v3-muted); }
html[data-v3][data-ui] body.page-redaction .ro-v3-btn--icon:hover { background: var(--v3-hover); }
html[data-v3][data-ui] body.page-redaction .ro-v3-btn--primary { background: var(--v3-btn); border-color: var(--v3-btn); color: #fff; }
html[data-v3][data-ui] body.page-redaction .ro-v3-btn--primary:hover:not(:disabled) { background: var(--v3-btn-hover); border-color: var(--v3-btn-hover); }
html[data-v3][data-ui] body.page-redaction .ro-v3-btn:disabled { opacity: .5; cursor: not-allowed; }

html[data-v3][data-ui] body.page-redaction .ro-v3-toolbar {
  display: flex; align-items: center; gap: 2px;
  margin: 0 18px; padding: 0 0 8px;
  border-bottom: 1px solid var(--v3-line-soft);
}
html[data-v3][data-ui] body.page-redaction .ro-v3-toolbar button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 5px; background: transparent; color: var(--v3-ink-2);
  font-size: 12.5px; cursor: pointer;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-toolbar button svg { width: 15px; height: 15px; }
html[data-v3][data-ui] body.page-redaction .ro-v3-toolbar button:hover { background: var(--v3-hover); }
html[data-v3][data-ui] body.page-redaction .ro-v3-toolbar__sep { width: 1px; height: 16px; margin: 0 6px; background: var(--v3-line); }
html[data-v3][data-ui] body.page-redaction .ro-v3-panel .cv-preview-frame {
  flex: 1 1 auto; width: 100%; min-height: 560px; border: 0; background: #fff;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-panel.is-updating .cv-preview-frame { opacity: .55; transition: opacity .15s ease; }
html[data-v3][data-ui] body.page-redaction .ro-v3-panel__foot {
  display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 11px 18px;
  border-top: 1px solid var(--v3-line-soft);
  color: var(--v3-faint); font-size: 11.5px;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-panel__foot svg { width: 14px; height: 14px; flex: none; }

/* Note de bas de page */
html[data-v3][data-ui] body.page-redaction .ro-v3-note {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 2px 0; color: var(--v3-faint); font-size: 11.5px;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-note svg { width: 14px; height: 14px; flex: none; }

/* Cartes de l'assistant / analyse sous le formulaire */
html[data-v3][data-ui] body.page-redaction .ro-assistant-card,
html[data-v3][data-ui] body.page-redaction .ro-analysis-card {
  border: 1px solid #e2e3e6; border-radius: 10px; background: #fff; box-shadow: 0 1px 3px rgba(25, 30, 40, .035);
}

/* « Reprendre une annonce » sous le panneau de droite */
html[data-v3][data-ui] body.page-redaction .ro-recent-card { border-radius: 10px; border-color: #e2e3e6; }

@media (max-width: 1099px) {
  html[data-v3][data-ui] body.page-redaction .ro-result { position: static; }
}
@media (max-width: 900px) {
  html[data-v3][data-ui] body.page-redaction .ro-main { padding: 22px 16px 34px; }
  html[data-v3][data-ui] body.page-redaction .ro-v3-head { flex-direction: column; gap: 14px; }
  html[data-v3][data-ui] body.page-redaction .ro-v3-head h1 { font-size: 27.5px; margin-top: 5%;}
  html[data-v3][data-ui] body.page-redaction .ro-flip-outer { padding: 18px 16px; }
  html[data-v3][data-ui] body.page-redaction .ro-v3-panel__head { flex-wrap: wrap; }
  html[data-v3][data-ui] body.page-redaction .ro-v3-panel__actions { margin-left: 0; width: 100%; }
  html[data-v3][data-ui] body.page-redaction .ro-v3-panel .cv-preview-frame { min-height: 480px; }
}
@media (max-width: 560px) {
  html[data-v3][data-ui] body.page-redaction .ro-options-grid { grid-template-columns: 1fr; }
  html[data-v3][data-ui] body.page-redaction .ro-v3-foot, html[data-v3][data-ui] body.page-redaction .ro-form-card-foot { flex-direction: column; align-items: stretch; }
  html[data-v3][data-ui] body.page-redaction .ro-import-card .ro-import-btn, html[data-v3][data-ui] body.page-redaction .ro-form-card .ro-generate-btn { width: 100%; }
}

/* Correctifs de calage (rendu navigateur) */
html[data-v3][data-ui] body.page-redaction::before,
html[data-v3][data-ui] body.page-redaction::after { display: none; }
html[data-v3][data-ui] body.page-redaction .ro-v3-info::before { display: none; }
html[data-v3][data-ui] body.page-redaction .ro-v3-info { justify-content: flex-start; }
html[data-v3][data-ui] body.page-redaction .ro-v3-info > * { position: relative; }
html[data-v3][data-ui] body.page-redaction .ro-v3-info h2 { text-align: left; font-family: var(--v3-font); font-weight: 700; }
/* La zone de dépôt « compacte » du reste de l'appli est en ligne : on la recentre en colonne */
html[data-v3][data-ui] body.page-redaction .ro-import-card .dropzone .dropzone-content {
  flex-direction: column; flex-wrap: nowrap; align-items: center; justify-content: center;
  height: 100%; min-height: 126px; text-align: center;
}
html[data-v3][data-ui] body.page-redaction .ro-import-card .dropzone .dropzone-text,
html[data-v3][data-ui] body.page-redaction .ro-import-card .dropzone .dropzone-sub,
html[data-v3][data-ui] body.page-redaction .ro-import-card .dropzone .dropzone-hint { flex: 0 0 auto; width: auto; max-width: 100%; text-align: center; }

/* ============================================================================
   Panneau latéral « contexte » — composant unique (Analyse, Rédaction,
   Matching inversé). Rendu par includes/v3_side_panel.inc.php, rendu vivant
   par assets/v3-side-panel.js. Remplace .v3-light, .reverse-v3-benefit-*
   et .ro-v3-info__*.
   ============================================================================ */
/* En-tête du panneau : icône et titre sur une seule ligne (grille 2 colonnes) ; tous les autres
   éléments (texte d'intro, blocs, pied) occupent toute la largeur en dessous. */
html[data-v3][data-ui] .v3-side { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; align-content: start; width: 100%; max-width: 420px; text-align: left; color: var(--v3-ink); }
html[data-v3][data-ui] .v3-side > * { grid-column: 1 / -1; }
html[data-v3][data-ui] .v3-side__ic {
  grid-column: 1; grid-row: 1; display: grid; place-items: center; width: 40px; height: 40px; margin: 0;
  border-radius: var(--v3-r-md); background: var(--v3-peach); color: var(--v3-orange);
}
html[data-v3][data-ui] .v3-side__ic svg { width: 21px; height: 21px; }
html[data-v3][data-ui] .v3-side > .v3-side__title { grid-column: 2; grid-row: 1; margin: 0; font-size: 17.5px; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; color: var(--v3-ink); }
html[data-v3][data-ui] .v3-side__lead { margin: 14px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--v3-muted); }

html[data-v3][data-ui] .v3-side__block { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--v3-line-soft); }
html[data-v3][data-ui] .v3-side__label {
  margin: 0 0 12px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--v3-faint);
}

/* Checklist */
html[data-v3][data-ui] .v3-side__checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
html[data-v3][data-ui] .v3-side__check { display: flex; align-items: flex-start; gap: 12px; }
html[data-v3][data-ui] .v3-side__mark {
  position: relative; flex: none; width: 18px; height: 18px; margin-top: 1px; box-sizing: border-box;
  border: 1.5px solid #CFCFCB; border-radius: 50%; background: #fff;
  transition: background-color .18s ease, border-color .18s ease;
}
html[data-v3][data-ui] .v3-side__check[data-optional] .v3-side__mark { border-style: dashed; }
html[data-v3][data-ui] .v3-side__check[data-state="done"] .v3-side__mark { border: 0; background: var(--v3-good); }
html[data-v3][data-ui] .v3-side__check[data-state="done"] .v3-side__mark::after {
  content: ""; position: absolute; left: 6px; top: 3px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
html[data-v3][data-ui] .v3-side__txt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
html[data-v3][data-ui] .v3-side__txt strong { font-size: 12.5px; font-weight: 500; color: var(--v3-ink); }
html[data-v3][data-ui] .v3-side__opt { font-style: normal; font-size: 10.5px; color: var(--v3-faint); }
html[data-v3][data-ui] .v3-side__detail { flex-basis: 100%; min-width: 0; font-size: 11.5px; line-height: 1.45; color: var(--v3-muted); overflow-wrap: anywhere; }
html[data-v3][data-ui] .v3-side__check[data-state="done"] .v3-side__detail { color: var(--v3-good); font-weight: 500; }
html[data-v3][data-ui] .v3-side__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

html[data-v3][data-ui] .v3-side__ready {
  margin: 14px 0 0; padding: 8px 12px; border-radius: var(--v3-r-sm); font-size: 11.5px; line-height: 1.4;
  background: var(--v3-hover); color: var(--v3-muted);
}
html[data-v3][data-ui] .v3-side__ready:empty { display: none; }
html[data-v3][data-ui] .v3-side__ready[data-state="ready"] { background: var(--v3-good-bg); color: var(--v3-good); font-weight: 500; }

/* Faits propres à l'écran */
html[data-v3][data-ui] .v3-side__facts { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
html[data-v3][data-ui] .v3-side__fact { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; line-height: 1.45; color: var(--v3-ink); }
html[data-v3][data-ui] .v3-side__fact-mark { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--v3-good); }
html[data-v3][data-ui] .v3-side__fact[data-state="warn"] { padding: 10px 12px; border-radius: var(--v3-r-sm); background: var(--v3-mid-bg); color: var(--v3-mid); }
html[data-v3][data-ui] .v3-side__fact[data-state="warn"] .v3-side__fact-mark { margin-top: 5px; background: var(--v3-mid); }

/* Bénéfices */
html[data-v3][data-ui] .v3-side__benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
html[data-v3][data-ui] .v3-side__benefits li { display: flex; align-items: flex-start; gap: 12px; }
html[data-v3][data-ui] .v3-side__bic { flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; color: var(--v3-faint); }
html[data-v3][data-ui] .v3-side__bic svg { width: 18px; height: 18px; }
html[data-v3][data-ui] .v3-side__benefits strong { display: block; font-size: 12.5px; font-weight: 500; color: var(--v3-ink); }
html[data-v3][data-ui] .v3-side__bsub { display: block; margin-top: 1px; font-size: 11.5px; line-height: 1.45; color: var(--v3-muted); }

/* Pied : coût, solde, lien */
html[data-v3][data-ui] .v3-side__foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--v3-line-soft); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
html[data-v3][data-ui] .v3-side__cost { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 11.5px; color: var(--v3-muted); }
html[data-v3][data-ui] .v3-side__cost strong { font-weight: 600; color: var(--v3-ink); }
html[data-v3][data-ui] .v3-side__cost[data-state="warn"] strong { color: var(--v3-low); }
html[data-v3][data-ui] .v3-side__sep { color: var(--v3-faint); }
html[data-v3][data-ui] .v3-side__warn { margin: 0; padding: 8px 12px; border-radius: var(--v3-r-sm); background: var(--v3-low-bg); color: var(--v3-low); font-size: 11.5px; line-height: 1.45; }
html[data-v3][data-ui] .v3-side__note { margin: 0; font-size: 11.5px; color: var(--v3-faint); }
html[data-v3][data-ui] .v3-side__link,
html[data-v3][data-ui] .v3-side__inline-link { color: var(--v3-orange-text); font-weight: 600; text-decoration: none; }
html[data-v3][data-ui] .v3-side__link { display: inline-flex; gap: 7px; padding: 0; border: 0; background: transparent; font-size: 12px; cursor: pointer; }
html[data-v3][data-ui] .v3-side__inline-link { font-size: inherit; }
html[data-v3][data-ui] .v3-side__link:hover,
html[data-v3][data-ui] .v3-side__inline-link:hover { text-decoration: underline; }
html[data-v3][data-ui] .v3-side__warn .v3-side__inline-link { color: inherit; text-decoration: underline; }
html[data-v3][data-ui] .v3-side__link:focus-visible,
html[data-v3][data-ui] .v3-side__inline-link:focus-visible { outline: 2px solid var(--v3-orange); outline-offset: 2px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  html[data-v3][data-ui] .v3-side__mark { transition: none; }
}

/* Intégration dans chaque écran : un seul gabarit de marges. */
html[data-v3][data-ui] body.page-analyse .directory-preview-empty .v3-side { max-width: none; }
html[data-v3][data-ui] body.page-matching-inverse .directory-preview-empty .v3-side { padding: 24px; max-width: none; }
html[data-v3][data-ui] body.page-redaction .ro-v3-info { padding: 24px; }
html[data-v3][data-ui] body.page-redaction .ro-v3-info .v3-side { max-width: none; }
html[data-v3][data-ui] body.page-matching-inverse .directory-preview-card:has(#directoryPreviewContent:not([hidden])) .v3-side { display: none; }

/* Un bloc « état vide » masqué par l'attribut hidden doit vraiment disparaître :
   les règles display:flex / min-height ci-dessus sont plus spécifiques que
   .directory-preview-empty[hidden] de style.css et laissaient un vide de 600px
   au-dessus de la fiche candidat. */
html[data-v3][data-ui] .directory-preview-empty[hidden],
html[data-v3][data-ui] body.page-matching-inverse .directory-preview-empty[hidden],
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results .directory-preview-empty[hidden] { display: none; min-height: 0; }

/* Matching inversé, étape « Profils compatibles » : la liste devient la colonne
   étroite et la fiche candidat (matching, CV, synthèse) prend la largeur.
   Étape « Votre offre » : proportions inchangées (dépôt large, panneau info étroit). */
@media (min-width: 901px) {
  html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results .directory-layout {
    grid-template-columns: minmax(380px, .6fr) minmax(0, 1fr);
    gap: 16px;
  }
}

/* ============================================================================
   Conversion CV en lot — habillage V3 (même langage que Analyse et Matching
   inversé : bandeau d'info sobre, zone de dépôt orange, panneau « contexte »).
   ============================================================================ */
html[data-v3][data-ui] body.page-lot .lot-info-banner {
  align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 12px 14px;
  border: 1px solid var(--v3-line); border-radius: var(--v3-r-md); background: var(--v3-bg);
  color: var(--v3-muted); font-size: 12px; line-height: 1.55;
}
html[data-v3][data-ui] body.page-lot .lot-info-banner svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--v3-faint); }
html[data-v3][data-ui] body.page-lot .lot-list-card { padding: 15px; gap: 14px; border-radius: var(--v3-r-lg); }

html[data-v3][data-ui] body.page-lot .lot-dropzone {
  padding: 28px 16px; border: 1.5px dashed #F0C9AE; border-radius: var(--v3-r-lg); background: #fff;
  transition: background .15s, border-color .15s;
}
html[data-v3][data-ui] body.page-lot .lot-dropzone:hover,
html[data-v3][data-ui] body.page-lot .lot-dropzone.is-dragover { background: var(--v3-peach); border-color: var(--v3-orange); }
html[data-v3][data-ui] body.page-lot .lot-dropzone .dropzone-icon { width: 26px; height: 26px; color: var(--v3-orange); }
html[data-v3][data-ui] body.page-lot .lot-dropzone .dropzone-text { font-size: 13.5px; font-weight: 500; color: var(--v3-ink); }
html[data-v3][data-ui] body.page-lot .lot-dropzone .dropzone-hint { max-width: 340px; font-size: 11.5px; line-height: 1.5; color: var(--v3-muted); }

html[data-v3][data-ui] body.page-lot .lot-default-mode { padding: 0; font-size: 12.5px; color: var(--v3-ink); }
html[data-v3][data-ui] body.page-lot .lot-batch-actions { gap: 8px; }
html[data-v3][data-ui] body.page-lot .lot-queue .directory-empty {
  padding: 22px 12px; border: 1px dashed var(--v3-line); border-radius: var(--v3-r-md);
  background: var(--v3-bg); color: var(--v3-faint); font-size: 12px; text-align: center;
}

/* Colonne de droite : même gabarit que les autres écrans */
html[data-v3][data-ui] body.page-lot .directory-preview-card { padding: 26px 28px; border-radius: var(--v3-r-lg); }
html[data-v3][data-ui] body.page-lot .directory-preview-card:has(#lotPreviewContent:not([hidden])) { padding: 20px; }
html[data-v3][data-ui] body.page-lot .directory-preview-empty { max-width: none; margin: 0; padding: 0; align-items: flex-start; text-align: left; }
html[data-v3][data-ui] body.page-lot .directory-preview-empty .v3-side { max-width: 460px; }

/* Conversion en lot : mêmes proportions que Matching inversé.
   Avant sélection : dépôt large, panneau « contexte » étroit.
   Dès qu'une fiche convertie est affichée : liste étroite, aperçu du CV large. */
@media (min-width: 901px) {
  /* .directory-layout est un flex dans style.css : sans display:grid, les
     grid-template-columns ci-dessous restaient sans effet et la colonne de
     gauche gardait sa largeur fixe de 460px. */
  html[data-v3][data-ui] body.page-lot .lot-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
    gap: 12px;
    align-items: stretch;
  }
  html[data-v3][data-ui] body.page-lot .lot-shell > .directory-sidebar { flex: none; width: auto; min-width: 0; max-width: 100%; }
  html[data-v3][data-ui] body.page-lot .lot-shell > .directory-preview-card { flex: none; width: auto; min-width: 0; max-width: 100%; }
  html[data-v3][data-ui] body.page-lot .lot-shell:has(#lotPreviewContent:not([hidden])) {
    grid-template-columns: minmax(380px, .6fr) minmax(0, 1fr);
  }
}
@media (min-width: 901px) and (max-width: 1050px) {
  html[data-v3][data-ui] body.page-lot .lot-shell:not(:has(#lotPreviewContent:not([hidden]))) { grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); }
}
html[data-v3][data-ui] body.page-lot .directory-preview-empty .v3-side { max-width: none; }

/* Matching inversé (résultats) : le menu « ⋯ » est aligné à droite, sur la ligne
   du nom du candidat, au lieu de tomber sous l'en-tête. */
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results #directoryPreviewContent:not([hidden]) { position: relative; }
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results .directory-preview-header { padding-right: 68px; }
html[data-v3][data-ui] body.page-matching-inverse.reverse-v3-stage-results #previewMore {
  position: absolute; top: 18px; right: 20px; z-index: 5; margin: 0;
}

/* Analyse & matching : la colonne de droite démarre en haut de page, à la hauteur
   du titre, comme sur Matching inversé et Rédaction ; le titre et le stepper
   restent dans la colonne de gauche. */
@media (min-width: 900px) {
  html[data-v3][data-ui] body.page-analyse .workspace-header { grid-area: auto; grid-column: 1; grid-row: 1; }
  html[data-v3][data-ui] body.page-analyse #draftView .directory-sidebar { grid-area: auto; grid-column: 1; grid-row: 2; }
  html[data-v3][data-ui] body.page-analyse #draftView .directory-preview-card { grid-area: auto; grid-column: 2; grid-row: 1 / span 2; align-self: start; }
  html[data-v3][data-ui] body.page-analyse #documentView.active,
  html[data-v3][data-ui] body.page-analyse #analysisView.active { grid-column: 1 / -1; grid-row: 2; }
}
html[data-v3][data-ui] .dv3-range:hover { border-color: #D6D6D2; }
html[data-v3][data-ui] .dv3-range:focus-visible { outline: 0; border-color: var(--v3-orange); box-shadow: 0 0 0 3px rgba(232, 89, 12, .15); }
html[data-v3][data-ui] .dv3-delta[hidden] { display: none; }

/* ==========================================================================
   Onglet « Résumé » (page Analyse & matching) — assets/script.js, dpvResumeRender()
   Mise en page responsive pilotée par la largeur du panneau (container query).
   ========================================================================== */
html[data-v3][data-ui] body.page-analyse #dpvLayout { order: 14; flex: 0 0 100%; min-width: 0; margin: .9rem 0 0; container-type: inline-size; }
html[data-v3][data-ui] body.page-analyse #dpvLayout .dpv-layout-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
html[data-v3][data-ui] body.page-analyse #dpvLayout .dpv-layout-grid:has(> #dpvSide:not([hidden])) { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); }
html[data-v3][data-ui] body.page-analyse #dpvSide[hidden] { display: none; }
html[data-v3][data-ui] body.page-analyse #dpvSide { min-width: 0; }
html[data-v3][data-ui] body.page-analyse #dpvContent { min-width: 0; }
html[data-v3][data-ui] body.page-analyse #dpvContent > #draftPreviewBody { order: 0; flex: none; margin: 0; }
html[data-v3][data-ui] body.page-analyse #dpvResume { min-width: 0; margin: 0; container-type: inline-size; }
@container (max-width: 760px) {
  html[data-v3][data-ui] body.page-analyse #dpvLayout .dpv-layout-grid:has(> #dpvSide:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
}
html[data-v3][data-ui] body.page-analyse #dpvResume[hidden] { display: none; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-resume-empty { margin: 0; padding: 28px 0; text-align: center; color: var(--v3-muted); font-size: 14px; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-grid { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-card { background: var(--v3-surface); border: 1px solid var(--v3-line); border-radius: var(--v3-r-lg); padding: 18px 20px; min-width: 0; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-muted { color: var(--v3-muted); font-size: 13px; line-height: 1.45; margin: 0; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-pad { padding: 14px 16px; }

/* Colonne gauche : jauge + points forts / vigilance */
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-kicker { margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--v3-muted); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-gauge { position: relative; width: 150px; height: 150px; margin: 0 auto 10px; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-gauge svg { width: 100%; height: 100%; display: block; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-gauge-track { fill: none; stroke: var(--v3-peach-2); stroke-width: 10; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-gauge-arc { fill: none; stroke: var(--v3-orange); stroke-width: 10; stroke-linecap: round; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-gauge--good .dpv-gauge-arc { stroke: var(--v3-good); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-gauge--good .dpv-gauge-track { stroke: var(--v3-good-bg); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-gauge--low .dpv-gauge-arc { stroke: var(--v3-low); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-gauge--low .dpv-gauge-track { stroke: var(--v3-low-bg); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-gauge-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-gauge-label strong { font-size: 30px; line-height: 1; font-weight: 600; letter-spacing: -.02em; color: var(--v3-orange-text); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-gauge--good .dpv-gauge-label strong { color: var(--v3-good); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-gauge--low .dpv-gauge-label strong { color: var(--v3-low); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-gauge-label span { margin-top: 4px; font-size: 12px; color: var(--v3-muted); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-appr-wrap { margin: 0 0 14px; text-align: center; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-offer { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--v3-ink); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-verdict { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--v3-muted); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-sub { margin: 14px 0 8px; padding-top: 12px; border-top: 1px solid var(--v3-line-soft); font-size: 13.5px; font-weight: 600; color: var(--v3-ink); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.4; color: var(--v3-ink-2); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-ico { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-ico--ok circle { fill: var(--v3-good); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-ico--warn circle { fill: #F5B50A; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-foot { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--v3-line-soft); font-size: 12px; color: var(--v3-muted); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-main .dpv-foot { border-top: 0; padding-top: 0; margin: 10px 0 14px; }

/* Pastilles / étiquettes */
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-chip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.3; background: var(--v3-peach); color: var(--v3-orange-text); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-chip--good { background: var(--v3-good-bg); color: var(--v3-good); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-chip--mid { background: var(--v3-mid-bg); color: var(--v3-mid); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-chip--low { background: var(--v3-low-bg); color: var(--v3-low); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-tag { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 6px; background: var(--v3-hover); color: var(--v3-muted); font-size: 11px; font-weight: 500; }

/* Colonne droite : critères */
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-main-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-main-head h3 { margin: 0 0 3px; font-size: 17px; font-weight: 600; color: var(--v3-ink); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-btn { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid var(--v3-orange); border-radius: var(--v3-r-md); background: var(--v3-surface); color: var(--v3-orange-text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-btn svg { width: 15px; height: 15px; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-btn:hover:not(:disabled) { background: var(--v3-peach); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-btn:disabled { opacity: .55; cursor: progress; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-link { padding: 0; border: 0; background: none; font: inherit; font-size: 12px; color: var(--v3-orange-text); text-decoration: underline; cursor: pointer; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-alert { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 11px 14px; border-radius: var(--v3-r-md); font-size: 13.5px; line-height: 1.45; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-alert svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-alert--warn { background: var(--v3-mid-bg); color: var(--v3-mid); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-alert--error { background: var(--v3-low-bg); color: var(--v3-low); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-alert--ask { background: var(--v3-peach); color: var(--v3-ink-2); margin: 14px 0 0; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-alert--ask svg { color: var(--v3-orange); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-alert--ask strong { display: block; margin-bottom: 3px; color: var(--v3-orange-text); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-questions { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }

html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-table { border: 1px solid var(--v3-line); border-radius: var(--v3-r-md); overflow: hidden; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(96px, .8fr); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-row + .dpv-row { border-top: 1px solid var(--v3-line); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-row--head { background: var(--v3-hover); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-row--head .dpv-cell { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--v3-muted); padding-top: 9px; padding-bottom: 9px; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-cell { padding: 12px 14px; font-size: 13.5px; line-height: 1.4; color: var(--v3-ink-2); min-width: 0; overflow-wrap: anywhere; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-cell + .dpv-cell { border-left: 1px solid var(--v3-line-soft); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-cell--crit strong { display: block; font-weight: 600; color: var(--v3-ink); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-cell--ade { display: flex; align-items: center; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-bar { width: 100%; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-bar-val { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 700; color: var(--v3-orange-text); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-bar-val--low { color: var(--v3-low); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-bar-track { display: block; height: 6px; border-radius: 999px; background: var(--v3-line-soft); overflow: hidden; }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--v3-orange); }
html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-bar-fill--low { background: var(--v3-low); }

/* Panneau étroit : une colonne, et chaque critère devient une fiche empilée */
@container (max-width: 760px) {
  html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-grid { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 560px) {
  html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-main-head { flex-direction: column; }
  html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-row--head { display: none; }
  html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-row { grid-template-columns: minmax(0, 1fr); }
  html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-cell + .dpv-cell { border-left: 0; border-top: 1px solid var(--v3-line-soft); }
  html[data-v3][data-ui] body.page-analyse :is(#dpvResume, #dpvSide) .dpv-cell[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--v3-faint); }
}

/* Résultats affichés (un seul CV) : la fiche résultat occupe toute la largeur du contenu,
   sous le titre et le stepper ; le récap CV / offre de gauche est masqué (déjà visible dans la fiche). */
@media (min-width: 900px) {
  html[data-v3][data-ui] body.page-analyse .content-area:has(.analyse-layout.is-result) { grid-template-columns: minmax(0, 1fr); }
  html[data-v3][data-ui] body.page-analyse .content-area:has(.analyse-layout.is-result) #draftView .directory-sidebar { display: none; }
  html[data-v3][data-ui] body.page-analyse .content-area:has(.analyse-layout.is-result) #draftView .directory-preview-card { grid-column: 1 / -1; grid-row: 2; width: 100%; max-width: none; }
}

/* Résultats affichés : le stepper (fil d'étapes) passe à droite, à la hauteur du titre,
   ce qui fait remonter la fiche candidat. */
@media (min-width: 900px) {
  html[data-v3][data-ui] body.page-analyse .content-area:has(.analyse-layout.is-result) .workspace-header {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 24px; margin-bottom: 16px;
  }
  html[data-v3][data-ui] body.page-analyse .content-area:has(.analyse-layout.is-result) .workspace-header .header-titles { margin-bottom: 0; flex: 1 1 auto; min-width: 0; }
  html[data-v3][data-ui] body.page-analyse .content-area:has(.analyse-layout.is-result) .workspace-header .wizard-stepper { flex: 0 0 auto; width: auto; margin-left: auto; }
  html[data-v3][data-ui] body.page-analyse .content-area:has(.analyse-layout.is-result) .workspace-header > :not(.header-titles):not(.wizard-stepper) { flex: 0 0 100%; }
}

/* Étape 2 (offre) : dépôt d'annonce / offre enregistrée d'abord, saisie manuelle ensuite */
html[data-v3][data-ui] body.page-analyse .analyse-offer-card .v3-offer-fields { margin-top: 26px; margin-bottom: 0; }
html[data-v3][data-ui] body.page-analyse .v3-offer-fields[hidden] { display: none; }
html[data-v3][data-ui] body.page-analyse #dpvResume .dpv-bar-val--good { color: var(--v3-good); }
html[data-v3][data-ui] body.page-analyse #dpvResume .dpv-bar-fill--good { background: var(--v3-good); }

/* Fiche résultat pleine largeur : en-tête sur une ligne (photo + identité à gauche,
   « Enregistrer », « Nouveau matching » et « ⋯ » à droite), puis disponibilité, tags et onglets.
   Score et verdict sont dans la carte « Adéquation au poste » : la ligne de synthèse est masquée. */
@media (min-width: 900px) {
  html[data-v3][data-ui] body.page-analyse .content-area:has(.analyse-layout.is-result) #draftPreviewFilled .directory-preview-identity { flex: 1 1 0; min-width: 0; }
  html[data-v3][data-ui] body.page-analyse .content-area:has(.analyse-layout.is-result) #dpvDocNav .directory-document-nav-new-matching,
  html[data-v3][data-ui] body.page-analyse .content-area:has(.analyse-layout.is-result) #draftPreviewFilled .preview-more { margin-top: 0; }
  html[data-v3][data-ui] body.page-analyse .content-area:has(.analyse-layout.is-result) #draftPreviewFilled #dpvSummary { display: none !important; }
}

/* Rédaction : carte « Informations du poste » en accordéon une fois l'offre générée */
html[data-v3][data-ui] body.page-redaction .ro-flip-outer { position: relative; }
html[data-v3][data-ui] body.page-redaction .ro-v3-collapse-btn {
  position: absolute; top: 18px; right: 20px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--v3-line); border-radius: 8px; background: #fff;
  color: var(--v3-ink-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-collapse-btn[hidden] { display: none; }
html[data-v3][data-ui] body.page-redaction .ro-v3-collapse-btn:hover { background: var(--v3-hover); }
html[data-v3][data-ui] body.page-redaction .ro-v3-collapse-btn svg { width: 15px; height: 15px; transition: transform .18s ease; }
html[data-v3][data-ui] body.page-redaction .ro-flip-outer.is-collapsed .ro-v3-collapse-btn svg { transform: rotate(-90deg); }
html[data-v3][data-ui] body.page-redaction .ro-v3-card-head { padding-right: 96px; }
html[data-v3][data-ui] body.page-redaction .ro-v3-collapse-sum {
  margin: 2px 0 0; color: var(--v3-muted); font-size: 13px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
html[data-v3][data-ui] body.page-redaction .ro-v3-collapse-sum[hidden] { display: none; }
html[data-v3][data-ui] body.page-redaction .ro-flip-outer.is-collapsed { padding-top: 14px; padding-bottom: 14px; }
html[data-v3][data-ui] body.page-redaction .ro-flip-outer.is-collapsed .ro-v3-card-head { margin-bottom: 0; }
html[data-v3][data-ui] body.page-redaction .ro-flip-outer.is-collapsed .ro-v3-card-head h2 { font-size: 16px; margin-bottom: 0; }
html[data-v3][data-ui] body.page-redaction .ro-flip-outer.is-collapsed .ro-v3-tabs,
html[data-v3][data-ui] body.page-redaction .ro-flip-outer.is-collapsed .ro-flip-card { display: none; }

/* Compte invité : Résumé et carte « Adéquation au poste » visibles, mais le bas s'estompe en dégradé blanc
   (même principe que les aperçus de documents, voir includes/user_menu.inc.php). Pas de sélection ni de clic.
   Régler --gv-resume-h (hauteur visible) et le pourcentage de départ du dégradé pour ajuster la coupure. */
html[data-v3][data-ui] body[data-guest="1"].page-analyse { --gv-resume-h: 460px; }
html[data-v3][data-ui] body[data-guest="1"].page-analyse #dpvSide .dpv-card,
html[data-v3][data-ui] body[data-guest="1"].page-analyse #dpvResume .dpv-main {
  max-height: var(--gv-resume-h); overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 55%, transparent 100%);
  pointer-events: none; -webkit-user-select: none; user-select: none;
}
html[data-v3][data-ui] body[data-guest="1"].page-analyse #dpvResume { position: relative; }
html[data-v3][data-ui] body[data-guest="1"].page-analyse #dpvResume .gv-cta { z-index: 5; }
@media print {
  html[data-v3][data-ui] body[data-guest="1"].page-analyse :is(#dpvSide, #dpvResume) { display: none !important; }
}

/* Illustration « Analyse & matching » en haut de la colonne de droite (étapes de saisie).
   Elle est posée en ligne 1 / colonne 2, un peu sous le haut du titre ; la carte « Le bon
   éclairage » (qui garde sa place : colonne 2, lignes 1-2) est décalée visuellement sous
   l'image avec `top` (sans modifier la hauteur des lignes de la grille, donc sans pousser la
   carte de gauche). Le PNG est recadré sur le dessin (zone 240 x 162) et son blanc est fondu
   dans le fond de page (multiply). Masquée sur mobile et dès que les résultats sont affichés. */
html[data-v3][data-ui] body.page-analyse .analyse-hero { display: none; margin: 0; }
@media (min-width: 900px) {
  html[data-v3][data-ui] body.page-analyse .content-area:not(:has(.analyse-layout.is-result)) {
        --hero-top: 26px;
        --hero-w: 350px;
        --hero-h: 209px;
        --hero-gap: 33px;
  }
  html[data-v3][data-ui] body.page-analyse .content-area:not(:has(.analyse-layout.is-result)) .analyse-hero {
    display: block;
    position: relative;
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    justify-self: center;
    width: min(var(--hero-w), 100%);
    height: var(--hero-h);
    margin: var(--hero-top) 0 0;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
  }
  html[data-v3][data-ui] body.page-analyse .content-area:not(:has(.analyse-layout.is-result)) #draftView .directory-preview-card {
    position: relative;
    top: calc(var(--hero-top) + var(--hero-h) + var(--hero-gap));
  }
  html[data-v3][data-ui] body.page-analyse .analyse-hero img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 150%;
    max-width: none;
    height: auto;
    transform: translate(-49.7%, -50.8%);
    mix-blend-mode: multiply;
  }
}

/* ============================================================================
   Illustrations d'en-tête (haut à droite) — Rédaction, Matching inversé,
   Conversion en lot, Recherche multi-critères. Même principe que .analyse-hero :
   le PNG (transparent) est recadré sur le dessin dans une zone de 350 x 209 px, posée
   en haut de la colonne de droite ; le panneau d'info (colonne de droite) est décalé sous
   l'image avec margin-top. Visible uniquement à la première étape (avant résultats) et
   sur grand écran ; masquée sinon. Réglages par image : --hero-img-w (largeur du PNG
   en % de la zone) et --hero-cx / --hero-cy (centre du dessin dans le PNG).
   ============================================================================ */
html[data-v3][data-ui] { --hero-w: 350px; --hero-h: 209px; --hero-gap: 33px; }
html[data-v3][data-ui] .v3-hero { display: none; margin: 0; }
html[data-v3][data-ui] .v3-hero img {
  position: absolute; left: 50%; top: 50%;
  width: var(--hero-img-w, 140%); max-width: none; height: auto;
  transform: translate(calc(var(--hero-cx, 50%) * -1), calc(var(--hero-cy, 50%) * -1));
  mix-blend-mode: multiply;
}
html[data-v3][data-ui] .v3-hero--redaction       { --hero-img-w: 139%; --hero-cx: 49.9%; --hero-cy: 50.8%; }
html[data-v3][data-ui] .v3-hero--matching-inverse { --hero-img-w: 130%; --hero-cx: 49.8%; --hero-cy: 49.9%; }
html[data-v3][data-ui] .v3-hero--conversion-lot   { --hero-img-w: 110%; --hero-cx: 49.9%; --hero-cy: 48.8%; }
html[data-v3][data-ui] .v3-hero--multirecherche   { --hero-img-w: 132%; --hero-cx: 50%;   --hero-cy: 50%; }
html[data-v3][data-ui] .v3-hero--annuaire         { --hero-img-w: 125%; --hero-cx: 49.3%; --hero-cy: 51%; }

@media (min-width: 901px) {
  /* Matching inversé / Recherche multi-critères / Conversion en lot : grille à 2 colonnes
     (sidebar | carte). On place explicitement les 3 éléments dans la même ligne. */
  html[data-v3][data-ui] body.page-matching-inverse:not(.reverse-v3-stage-results) .directory-layout > .v3-hero,
  html[data-v3][data-ui] body.page-recherche-multi:not(.multi-v3-stage-results) .directory-layout > .v3-hero,
  html[data-v3][data-ui] body.page-lot .lot-shell:not(:has(#lotPreviewContent:not([hidden]))) > .v3-hero {
    display: block; position: relative;
    grid-column: 2; grid-row: 1;
    align-self: start; justify-self: center;
    width: min(var(--hero-w), 100%); height: var(--hero-h);
    overflow: hidden; pointer-events: none; user-select: none;
  }
  html[data-v3][data-ui] body.page-matching-inverse:not(.reverse-v3-stage-results) .directory-layout > .directory-sidebar,
  html[data-v3][data-ui] body.page-recherche-multi:not(.multi-v3-stage-results) .directory-layout > .directory-sidebar,
  html[data-v3][data-ui] body.page-lot .lot-shell:not(:has(#lotPreviewContent:not([hidden]))) > .directory-sidebar {
    grid-column: 1; grid-row: 1;
  }
  html[data-v3][data-ui] body.page-matching-inverse:not(.reverse-v3-stage-results) .directory-layout > .directory-preview-card,
  html[data-v3][data-ui] body.page-recherche-multi:not(.multi-v3-stage-results) .directory-layout > .directory-preview-card,
  html[data-v3][data-ui] body.page-lot .lot-shell:not(:has(#lotPreviewContent:not([hidden]))) > .directory-preview-card {
    grid-column: 2; grid-row: 1;
    margin-top: calc(var(--hero-h) + var(--hero-gap));
    /* La carte s'arrête à la hauteur de son contenu (pas d'étirement sur la colonne de gauche) :
       plus de grand blanc sous « Voir mon annuaire ». */
    align-self: start;
    min-height: 0;
    height: auto;
  }
  html[data-v3][data-ui] body.page-matching-inverse:not(.reverse-v3-stage-results) .directory-preview-empty,
  html[data-v3][data-ui] body.page-recherche-multi:not(.multi-v3-stage-results) .directory-preview-empty,
  html[data-v3][data-ui] body.page-lot .lot-shell:not(:has(#lotPreviewContent:not([hidden]))) .directory-preview-empty {
    min-height: 0;
    height: auto;
  }
}
@media (min-width: 1000px) {
  /* Annuaire : l'en-tête devient une grille à 2 colonnes. Titre + description puis les 3 boutons
     à gauche ; l'illustration occupe la colonne de droite, en haut à droite comme sur les autres
     pages. Le tableau reste pleine largeur en dessous. Sous 1000 px l'image est masquée. */
  html[data-v3][data-ui] body.page-annuaire .directory-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--hero-w);
    column-gap: 24px; row-gap: 20px;
    align-items: start;
  }
  html[data-v3][data-ui] body.page-annuaire .directory-header > div:first-child { grid-column: 1; grid-row: 1; }
  html[data-v3][data-ui] body.page-annuaire .directory-header > .directory-header-actions { grid-column: 1; grid-row: 2; }
  html[data-v3][data-ui] body.page-annuaire .directory-header > .v3-hero {
    display: block; position: relative;
    grid-column: 2; grid-row: 1 / span 2;
    align-self: start; justify-self: center;
    width: min(var(--hero-w), 100%); height: var(--hero-h);
    margin: -12px 0 -28px;
    overflow: hidden; pointer-events: none; user-select: none;
  }
}
@media (min-width: 1100px) {
  /* Rédaction (étape 1) : l'illustration est en haut à droite, à la hauteur du titre.
     .ro-container devient une grille à 2 colonnes (comme .ro-layout) : titre / étapes /
     formulaire à gauche ; à droite, l'image puis le panneau d'info. .ro-layout passe en
     display: contents pour que .ro-left et .ro-result soient des éléments de cette grille.
     Le panneau est descendu sous l'image avec `top` (sans effet sur la hauteur des lignes). */
  html[data-v3][data-ui] body.page-redaction:not(.ro-v3-has-offer) .ro-container {
    display: grid;
    grid-template-columns: minmax(0, 1.53fr) minmax(0, 1fr);
    column-gap: 14px;
    align-items: start;
  }
  html[data-v3][data-ui] body.page-redaction:not(.ro-v3-has-offer) .ro-container > .ro-v3-head { grid-column: 1; grid-row: 1; }
  html[data-v3][data-ui] body.page-redaction:not(.ro-v3-has-offer) .ro-container > .ro-v3-stepper { grid-column: 1; grid-row: 2; justify-self: start; }
  html[data-v3][data-ui] body.page-redaction:not(.ro-v3-has-offer) .ro-layout { display: contents; }
  html[data-v3][data-ui] body.page-redaction:not(.ro-v3-has-offer) .ro-layout > .ro-left { grid-column: 1; grid-row: 3; min-width: 0; }
  html[data-v3][data-ui] body.page-redaction:not(.ro-v3-has-offer) .ro-layout > .v3-hero {
    display: block; position: relative;
    grid-column: 2; grid-row: 1 / span 3;
    align-self: start; justify-self: center;
    width: min(var(--hero-w), 100%); height: var(--hero-h);
    overflow: hidden; pointer-events: none; user-select: none;
  }
  html[data-v3][data-ui] body.page-redaction:not(.ro-v3-has-offer) .ro-layout > .ro-result {
    grid-column: 2; grid-row: 1 / span 3;
    min-width: 0;
    position: relative;
    top: calc(var(--hero-h) + var(--hero-gap));
  }
}

section#directoryPreviewCard {

}

div#roPlaceholder {
    max-width: 400px;
}

section#lotPreviewCard {

}

section#draftPreviewCard{

}

/* Annuaire — fiche candidat en tiroir sur mobile : v2.css aligne photo · identité · « Nouveau matching » · ⋯
   sur UNE ligne ; dans un tiroir de ~370 px l'identité tombait à ~60 px (nom, e-mail, téléphone coupés lettre
   par lettre) et « ⋯ » passait sous le bouton de fermeture. Ici : photo + identité sur la 1re ligne (en laissant
   la place du bouton ✕), puis « Nouveau matching » et « ⋯ » sur la ligne suivante. */
@media (max-width: 700px) {
  html[data-v3][data-ui] body.page-annuaire #directoryPreviewContent:not([hidden]) { align-items: flex-start; }
  html[data-v3][data-ui] body.page-annuaire .directory-preview-identity {
    flex: 0 1 calc(100% - 60px - 44px - 1.5rem); min-width: 0; overflow-wrap: break-word; word-break: normal;
  }
  html[data-v3][data-ui] body.page-annuaire .directory-preview-contacts { min-width: 0; overflow-wrap: anywhere; }
  html[data-v3][data-ui] body.page-annuaire #previewDocumentNav .directory-document-nav-new-matching,
  html[data-v3][data-ui] body.page-annuaire .preview-more { margin-top: .85rem; align-self: center; }
}

/* Annuaire — tiroir de la fiche candidat sur grand écran : la règle générique `section#directoryPreviewCard
   { max-width: 400px }` (pensée pour la colonne de droite des autres pages) bridait le tiroir à ~400 px au lieu
   de min(780px, 94vw) : identité écrasée, nom coupé lettre par lettre. On la neutralise ici, et on laisse la
   place du bouton ✕ à droite du menu « ⋯ ». */
html[data-v3][data-ui] body.page-annuaire #directoryPreviewCard { max-width: none; }
@media (min-width: 701px) {
  html[data-v3][data-ui] body.page-annuaire .preview-more { margin-right: 46px; }
}

/* ================================================================
   Popup « Tout est prêt » — arrivée depuis une alerte (index.php)
   Même langage que la V3 : carte sobre à filet fin, pastille pêche,
   récapitulatif façon carte candidat, bouton orange plat.
   ================================================================ */
html[data-v3][data-ui] .shortcut-ready .credits-alert-backdrop { background: rgba(26, 26, 26, .42); backdrop-filter: none; }
html[data-v3][data-ui] .shortcut-ready__card {
  width: min(100%, 420px); padding: 32px 28px 20px; text-align: center;
  border: 1px solid var(--v3-line); border-radius: 16px; background: var(--v3-surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .12); font-family: var(--v3-font);
}
html[data-v3][data-ui] .shortcut-ready .credits-alert-dismiss-x { top: 14px; right: 14px; width: 30px; height: 30px; border-radius: var(--v3-r-sm); color: var(--v3-faint); }
html[data-v3][data-ui] .shortcut-ready .credits-alert-dismiss-x:hover { background: var(--v3-hover); color: var(--v3-ink); }
html[data-v3][data-ui] .shortcut-ready__badge {
  width: 52px; height: 52px; margin-bottom: 16px; border-radius: 50%;
  background: var(--v3-peach); color: var(--v3-orange-text); border: 1px solid var(--v3-peach-2); box-shadow: none;
}
html[data-v3][data-ui] .shortcut-ready__badge svg { width: 24px; height: 24px; }
html[data-v3][data-ui] .shortcut-ready__title { margin: 0 0 6px; font-family: var(--v3-font); font-size: 21px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; color: var(--v3-ink); }
html[data-v3][data-ui] .shortcut-ready__lead { margin: 0 0 20px; font-size: 13.5px; line-height: 1.5; color: var(--v3-muted); }
html[data-v3][data-ui] .shortcut-ready__summary {
  margin-bottom: 20px; border: 1px solid var(--v3-line); border-radius: var(--v3-r-md); background: #FBFBF9;
}
html[data-v3][data-ui] .shortcut-ready__row { gap: 12px; padding: 13px 16px; }
html[data-v3][data-ui] .shortcut-ready__row + .shortcut-ready__row { border-top: 1px solid var(--v3-line-soft); }
html[data-v3][data-ui] .shortcut-ready__ico { width: 36px; height: 36px; border-radius: var(--v3-r-md); background: #fff; border: 1px solid var(--v3-line); color: var(--v3-muted); }
html[data-v3][data-ui] .shortcut-ready__ico svg { width: 18px; height: 18px; }
html[data-v3][data-ui] .shortcut-ready__ico--av { border: 0; border-radius: 50%; background: var(--v3-peach); color: var(--v3-orange-text); font-size: 11.5px; font-weight: 600; }
html[data-v3][data-ui] .shortcut-ready__txt { gap: 1px; line-height: 1.3; }
html[data-v3][data-ui] .shortcut-ready__txt small { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; color: var(--v3-faint); }
html[data-v3][data-ui] .shortcut-ready__txt strong { font-size: 13.5px; font-weight: 600; color: var(--v3-ink); }
html[data-v3][data-ui] .shortcut-ready__go { width: 100%; min-height: 46px; gap: 10px; }
html[data-v3][data-ui] .shortcut-ready__go:focus-visible { outline: 2px solid var(--v3-ink); outline-offset: 2px; }
html[data-v3][data-ui] .shortcut-ready__cost { padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-size: 11.5px; font-weight: 600; }
html[data-v3][data-ui] .shortcut-ready__later { margin-top: 6px; padding: 8px 14px; border-radius: var(--v3-r-sm); font-family: var(--v3-font); font-size: 13px; font-weight: 500; color: var(--v3-muted); }
html[data-v3][data-ui] .shortcut-ready__later:hover { background: var(--v3-hover); color: var(--v3-ink); }
html[data-v3][data-ui] .shortcut-ready__warn {
  gap: 10px; margin: 0 0 16px; padding: 11px 14px; border: 1px solid var(--v3-line); border-radius: var(--v3-r-md);
  background: var(--v3-peach); font-size: 12.5px; line-height: 1.5; color: var(--v3-orange-text);
}
html[data-v3][data-ui] .shortcut-ready__warn svg { width: 16px; height: 16px; }
@media (max-width: 480px) {
  html[data-v3][data-ui] .shortcut-ready__card { padding: 28px 18px 16px; }
}

/* ================================================================
   Onglet « Questions » (page Analyse & matching) — assets/script.js, dpvQuestionsRender()
   Même carte que le Résumé ; une liste numérotée par thème.
   ================================================================ */
html[data-v3][data-ui] body.page-analyse #dpvQuestions { min-width: 0; margin: 0; container-type: inline-size; }
html[data-v3][data-ui] body.page-analyse #dpvQuestions[hidden] { display: none; }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-resume-empty { margin: 0; padding: 28px 0; text-align: center; color: var(--v3-muted); font-size: 14px; }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-card { background: var(--v3-surface); border: 1px solid var(--v3-line); border-radius: var(--v3-r-lg); padding: 18px 20px; min-width: 0; }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-muted { margin: 0; color: var(--v3-muted); font-size: 13px; line-height: 1.45; }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-main-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-main-head h3 { margin: 0 0 3px; font-size: 17px; font-weight: 600; color: var(--v3-ink); }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-btn { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid var(--v3-orange); border-radius: var(--v3-r-md); background: var(--v3-surface); color: var(--v3-orange-text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-btn svg { width: 15px; height: 15px; }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-btn:hover { background: var(--v3-peach); }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 6px; background: var(--v3-peach); color: var(--v3-orange-text); font-size: 11px; font-weight: 600; vertical-align: 1px; white-space: nowrap; }

html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-q-group { padding-top: 18px; }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-q-group + .dpv-q-group { margin-top: 18px; border-top: 1px solid var(--v3-line-soft); }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-q-title { margin: 0 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--v3-muted); }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-q-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-q-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--v3-line); border-radius: var(--v3-r-md); background: #FBFBF9; }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-q-num { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--v3-peach); color: var(--v3-orange-text); font-size: 12px; font-weight: 600; }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-q-body { min-width: 0; }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-q-text { margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: var(--v3-ink); overflow-wrap: anywhere; }
html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-q-note { margin: 4px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--v3-muted); }
@container (max-width: 560px) {
  html[data-v3][data-ui] body.page-analyse #dpvQuestions .dpv-main-head { flex-direction: column; }
}

/* Mention d'équivalence (ex. diplôme étranger) sous « Éléments du CV » */
html[data-v3][data-ui] body.page-analyse #dpvResume .dpv-equiv { display: block; margin-top: 6px; padding: 4px 8px; border-radius: 6px; background: #fbf4dc; color: #6b5a1e; font-size: 12px; line-height: 1.4; }

/* Colonne « Attendu » modifiable dans le tableau du Résumé */
html[data-v3][data-ui] body.page-analyse #dpvResume .dpv-edit { min-height: 1.4em; padding: 2px 6px; margin: -2px -6px; border-radius: 6px; border: 1px dashed transparent; outline: none; cursor: text; overflow-wrap: anywhere; }
html[data-v3][data-ui] body.page-analyse #dpvResume .dpv-edit:hover { border-color: var(--v3-border, #cfd8d2); }
html[data-v3][data-ui] body.page-analyse #dpvResume .dpv-edit:focus { border-color: #14513C; background: #fff; box-shadow: 0 0 0 2px rgba(20, 81, 60, .15); }
html[data-v3][data-ui] body.page-analyse #dpvResume .dpv-edit:empty::before { content: attr(data-ph); color: var(--v3-muted, #7a857e); font-style: italic; }
html[data-v3][data-ui] body.page-analyse #dpvResume .dpv-edited-tag { display: inline-block; margin-top: 6px; padding: 1px 8px; border-radius: 999px; background: #fbf4dc; color: #6b5a1e; font-size: 11px; font-weight: 600; }
html[data-v3][data-ui] body.page-analyse #dpvResume .dpv-btn--pending { box-shadow: 0 0 0 2px rgba(20, 81, 60, .25); }

p.mr-src {
    font-style: italic;
    font-size: 11px;
    padding-top: 5px;
}

span.mr-ed {
    font-size: 12.5px;
}