/* ╔══════════════════════════════════════════════════════════════════════╗
   ║   CFA Orientation IA — Pop-up holographique                          ║
   ║   Crédits : exosteeve.fr × scroler.fr                                ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* ─── Variables ───────────────────────────────────────────────────────── */
/* 4.0.10 — `.cfaoi-pop-standalone` REJOINT CE BLOC, ET C'EST UN SÉLECTEUR DE
   PLUS, PAS UNE SECONDE DÉFINITION. L'écran d'accueil de la page dédiée vit À
   CÔTÉ de la racine, pas dedans : sans cette ligne il n'aurait AUCUN jeton et
   il aurait fallu recopier les treize valeurs ci-dessous, c'est-à-dire écrire
   V8 (§10). Sur une page où le pop-up flotte, cette classe n'existe pas — le
   pop-up ne voit rien de ce lot. */
.cfaoi-pop-root,
.cfaoi-pop-standalone {
    --pop-primary: #00d4ff;
    --pop-accent: #7c3aed;
    --pop-bg-deep: #050810;
    --pop-bg-glass: rgba(8, 12, 24, 0.82);
    --pop-text: #ecf3ff;
    --pop-text-muted: #8aa2c4;
    --pop-text-dim: #5a6f8e;
    --pop-border: rgba(0, 212, 255, 0.22);
    --pop-glow: rgba(0, 212, 255, 0.5);
    --pop-radius-xl: 28px;
    --pop-radius-lg: 18px;
    --pop-shadow:
        0 30px 90px -20px rgba(0, 0, 0, 0.8),
        0 0 80px -30px var(--pop-glow);
    --pop-z: 999999;
}

/* ─── Reset local ─────────────────────────────────────────────────────── */
.cfaoi-pop-root,
.cfaoi-pop-root * {
    box-sizing: border-box;
}

/* ─── Root toujours présent (pour le launcher permanent) ──────────────── */
.cfaoi-pop-root {
    position: fixed;
    inset: 0;
    z-index: var(--pop-z);
    pointer-events: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    color: var(--pop-text);
}

/* ─── Backdrop ────────────────────────────────────────────────────────── */
.cfaoi-pop-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 35%, rgba(8, 12, 24, 0.55) 0%, rgba(0, 0, 0, 0.78) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.5s ease;
}
.cfaoi-pop-root[data-state="open"] .cfaoi-pop-backdrop,
.cfaoi-pop-root[data-state="choice"] .cfaoi-pop-backdrop,
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-backdrop,
.cfaoi-pop-root[data-state="pro-thanks"] .cfaoi-pop-backdrop,
.cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* 4.0.4 — Tant que le voile est posé, la page derrière ne défile pas (ni en
   hauteur, ni en largeur : un site qui déborde montrait sa barre horizontale
   sous le pop-up). Classe posée par cfaoi-popup.js sur <html> dans les seuls
   états couvrants ci-dessus, retirée à la fermeture ou à la réduction. */
html.cfaoi-pop-page-lock,
html.cfaoi-pop-page-lock body {
    overflow: hidden !important;
}

/* ─── Card principale ─────────────────────────────────────────────────── */
.cfaoi-pop-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: min(460px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px); /* 2.9.1 — iOS : hauteur dynamique (barre d'adresse) */
    overflow-y: auto;
    background: var(--pop-bg-glass);
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    border: 1px solid var(--pop-border);
    border-radius: var(--pop-radius-xl);
    padding: 24px 26px 26px;
    box-shadow: var(--pop-shadow);
    opacity: 0;
    transition:
        opacity 0.5s ease,
        transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    overflow: hidden;
}
.cfaoi-pop-root[data-state="open"] .cfaoi-pop-card,
.cfaoi-pop-root[data-state="choice"] .cfaoi-pop-card,
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-card,
.cfaoi-pop-root[data-state="pro-thanks"] .cfaoi-pop-card {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}
.cfaoi-pop-root[data-state="minimized"] .cfaoi-pop-card {
    transform: translate(-50%, -50%) scale(0.55);
    opacity: 0;
    pointer-events: none;
}

/* ─── State CHATTING : card s'agrandit, chat embarqué visible ───────── */
.cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-card {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
    width: min(540px, calc(100vw - 24px));
    height: min(760px, calc(100vh - 24px));
    height: min(760px, calc(100dvh - 24px)); /* 2.9.1 — iOS : hauteur dynamique (barre d'adresse) */
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px); /* 2.9.1 — iOS : hauteur dynamique (barre d'adresse) */
    padding: 0;
    background: #f0f4f8;
    border-color: rgba(255, 255, 255, 0.4);
    overflow: hidden;
    transition:
        width 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
        height 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.4s ease,
        opacity 0.4s ease;
    display: flex;
    flex-direction: column;
}
.cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-card::before,
.cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-card::after {
    display: none;
}

/* 3.5.3 (correctif modale) — DOUBLE EN-TÊTE SUPPRIMÉ.
 *
 * Symptôme signalé : en mode conversation, les « étapes de la modale se
 * chevauchent ». Cause racine : en state chatting le fond de la card devient
 * CLAIR, mais le « pill » d'identité du pop-up (« Aria · en ligne ») garde la
 * couleur pensée pour le fond SOMBRE des écrans d'accueil (--pop-text, un blanc
 * bleuté #ECF3FF). Il devenait donc blanc sur blanc — invisible — TOUT EN
 * occupant la barre du haut, en doublon avec l'en-tête riche de l'app (avatar +
 * nom + statut) rendu juste en dessous par cfaoi-app.js. Deux en-têtes empilés,
 * l'un fantôme : c'est le « chevauchement ».
 *
 * Correctif : en chatting, on masque le pill (l'app porte déjà l'identité) et
 * l'en-tête du pop-up se réduit à sa barre de contrôles (réduire / fermer),
 * transparente et alignée à droite. Un seul en-tête visible, plus de doublon.
 * Validé sur le DOM réel de la préproduction avant écriture. */
.cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-pill { display: none; }
.cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-header {
    padding: 8px 12px;
    min-height: 0;
    background: transparent;
    border-bottom: none;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    z-index: 10;
}
.cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-icon-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #475569;
}
.cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-icon-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.3);
}

/* ─── Affichage conditionnel : choice / pro / pro-thanks / greeting / chat ─ */
/* Par défaut tout est masqué — chaque écran ne s'affiche que dans son state. */
.cfaoi-pop-choice,
.cfaoi-pop-pro,
.cfaoi-pop-pro-thanks,
.cfaoi-pop-greeting,
.cfaoi-pop-chat {
    display: none;
}

/* State CHOICE → écran de choix visible */
.cfaoi-pop-root[data-state="choice"] .cfaoi-pop-choice {
    display: flex;
    flex-direction: column;
    animation: cfaoi-pop-screen-in 0.4s ease-out;
}

/* State PRO → formulaire visible */
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro {
    display: flex;
    flex-direction: column;
    animation: cfaoi-pop-screen-in 0.4s ease-out;
}

/* ═══ 3.13.35 — « TOUT CET ESPACE VIDE NE SERT À RIEN » ═══════════════════
 *
 * SIGNALÉ EN RECETTE, mot pour mot : « le bouton continuer ne descend jamais en
 * bas du chat, tout cet espace vide ne sert à rien du coup ». MESURÉ sur devcfa,
 * à la taille exacte de la capture (1377×903) : **282 px de vide sous le
 * bouton**, sur une carte de 774 px.
 *
 * ─── LA CAUSE N'EST PAS CELLE QU'ON CROIT ────────────────────────────────
 *
 * Le réflexe est d'accuser le journal, plafonné à `max-height: 320px`. C'est
 * la moitié de l'histoire, et s'y arrêter ne corrige QUE 42 % du défaut
 * (mesuré : 282 → 163 px). Le vrai coupable est l'HÔTE DE SAISIE : il porte
 * `flex: 1 1 auto` (2.6.0), donc il RÉCLAME l'espace libre — et il le laisse
 * vide SOUS son bouton, puisque son contenu est aligné en haut. Mesuré : 345 px
 * de haut pour 107 px de contenu.
 *
 * ─── POURQUOI `0 1 auto` ET SURTOUT PAS `0 0 auto` ───────────────────────
 *
 * ⚠️ CE `flex: 1` N'EST PAS UNE ERREUR : c'est lui qui rend l'hôte défilable
 * quand une question porte une longue liste de choix (« Y a-t-il des
 * contraintes importantes du poste ? » → 7 items + Autre + Valider). La carte
 * est en `overflow: hidden` : un hôte qui ne peut pas RÉTRÉCIR ferait
 * disparaître le bouton de validation, sans le moindre message.
 *
 * `0 1 auto` retire la CROISSANCE et garde le RÉTRÉCISSEMENT. Éprouvé sur les
 * deux cas, à 1377×903 :
 *   • saisie courte : vide 282 → **44 px** (soit le seul rembourrage), hôte
 *     345 → 107, journal 176 → 414 ;
 *   • liste de 10 choix : **identique à l'octet** — hôte 371, défile, journal
 *     150. Le lot est strictement neutre sur le cas qui a motivé `flex: 1`.
 *
 * ⚠️ ET ON N'A PAS TOUCHÉ AU PAN `.cfaoi-pop-pro`. Une première version lui
 * ajoutait `flex: 1; min-height: 0` par analogie avec le chat candidat. Mesuré
 * avec et sans : rigoureusement le MÊME résultat (688 px, vide 44). Une ligne
 * qui ne change rien est une ligne qui ment sur ce qui corrige — elle n'est pas
 * écrite.
 *
 * ─── OÙ VA LE VIDE : LE CLIENT A TRANCHÉ ────────────────────────────────
 *
 * Empêcher l'hôte de grandir ne SUPPRIME pas l'espace : ça le DÉPLACE. Il n'y a
 * pas de troisième option — la carte a une hauteur fixe et le contenu est court.
 *
 * ⚠️ LA 3.13.35 AVAIT CHOISI DE TASSER LA CONVERSATION EN BAS (`margin-top:
 * auto` sur la première ligne du journal, l'idiome des messageries), pour que la
 * question reste collée au champ de réponse. LE CLIENT L'A REFUSÉ EN RECETTE,
 * mot pour mot : « les bulles de dialogue sont en bas… je veux un effet chat
 * classique, bulle de dialogue en haut et la possibilité de répondre en bas ».
 *
 * L'ancrage est donc RETIRÉ, et il ne faut pas le remettre : le vide se place
 * ENTRE la dernière bulle et le champ, c'est-à-dire au milieu — et c'est
 * exactement ce qui est demandé. Les bulles s'empilent du haut, la zone de
 * réponse reste au ras du bas. C'est aussi ce que fait le chat du parcours
 * jeune, qui est la référence explicite depuis la 3.13.28.
 *
 * ─── POURQUOI 60 % ET 0.2, ET NON `max-height: none` ─────────────────────
 *
 * ⚠️ LAISSER LE JOURNAL CROÎTRE SANS BORNE ÉCRASE LA LISTE DE CHOIX. Mesuré, en
 * fin de parcours (14 bulles + 10 choix) : l'hôte tombait de 233 à 91 px. Le
 * poids de compression d'un élément flex est proportionnel à sa taille de base ;
 * un journal de 1 400 px absorbe presque tout le rétrécissement disponible et
 * laisse la liste de choix inutilisable. Deux garde-fous, chacun MESURÉ :
 *   • `max-height: 60%` borne la croissance — la zone d'action garde 40 % ;
 *   • `flex-shrink: 0.2` sur l'hôte le protège du rétrécissement, sans le lui
 *     interdire (le §2.6.0 en a besoin pour que les listes longues défilent —
 *     `flex: 0 0 auto` couperait le bouton de validation, la carte étant en
 *     `overflow: hidden`).
 *   • `min-height: 96px` garde deux lignes de bulle visibles quoi qu'il arrive.
 *
 * MESURES, à 1377×903, vide sous le bouton — aujourd'hui → après :
 *   court + saisie (la capture) 301 → 47 ·  court + liste de 10  161 → 44
 *   long  + saisie             170 → 47 ·  long  + liste de 10    30 →  8
 * Et l'hôte ne se met JAMAIS à défiler là où il ne défilait pas.
 *
 * ⚠️ LE RÉCAP EST EXCLU, ET CE N'EST PAS UN OUBLI. Sur `data-pro-view="recap"`,
 * `proShowRecap()` remplit l'hôte avec la liste complète des réponses, les
 * disponibilités et le consentement — un contenu qui dépasse la carte. Laisser
 * le journal réclamer l'espace l'écraserait. Le récap garde son comportement. */
.cfaoi-pop-root[data-state="pro"]:not([data-pro-view="recap"]) .cfaoi-pop-pro-chat-log {
    flex: 1 1 auto;
    min-height: 96px;
    max-height: 60%;
}
/* ═══ 3.13.37 — « ON NE DOIT PAS AVOIR À SCROLLER POUR VALIDER UNE RÉPONSE » ═══
 *
 * SIGNALÉ EN RECETTE, trois captures à l'appui : sur la liste des domaines
 * (15 choix), sur les missions et sur les contraintes, le bouton « Continuer »
 * était COUPÉ par le bas de la carte. Il fallait faire défiler la zone de
 * réponse pour l'atteindre.
 *
 * CAUSE : la barre d'actions vit DANS `.cfaoi-pop-pro-chat-input-host`, qui est
 * la zone défilante — et `proRenderInputFor()` remet ce défilement à zéro à
 * chaque question (`scrollTop = 0`, 2.7.4). Le bouton, dernier enfant, part donc
 * systématiquement hors champ dès que les choix dépassent.
 *
 * ⚠️ ON NE SORT PAS LA BARRE DU CONTENEUR. Ce serait une modification du DOM
 * produit par `proRenderInputFor()`, `proRenderChoiceInput()` et
 * `proRenderTextInput()` — trois fonctions, trois écrans, et le §14 interdit de
 * réécrire un écran existant sans validation visuelle. `position: sticky` obtient
 * le même résultat sans toucher une ligne de JS : la barre se colle au bas de la
 * zone visible dès que le contenu défile, et reste à sa place naturelle quand il
 * tient.
 *
 * ⚠️ LE FOND EST OBLIGATOIRE, ET IL DOIT ÊTRE CELUI DE LA CARTE. Sans lui, les
 * choix défileraient DERRIÈRE le bouton en restant visibles au travers. D'où le
 * jeton `--pop-pane-bg`, posé une seule fois et lu par la carte ET par la barre.
 *
 * Le dégradé du haut évite la coupure nette : le dernier choix s'estompe sous
 * la barre au lieu d'être tranché. */
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-chat-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 10px 0 2px;
    margin-top: 2px;
    background: linear-gradient(
        to bottom,
        transparent 0,
        var(--pop-pane-bg, #f0f4f8) 10px,
        var(--pop-pane-bg, #f0f4f8) 100%
    );
}

.cfaoi-pop-root[data-state="pro"]:not([data-pro-view="recap"]) .cfaoi-pop-pro-chat-input-host {
    flex: 0 0.2 auto;
}

/* State PRO-THANKS → remerciement visible */
.cfaoi-pop-root[data-state="pro-thanks"] .cfaoi-pop-pro-thanks {
    display: flex;
    flex-direction: column;
    text-align: center;
    animation: cfaoi-pop-screen-in 0.4s ease-out;
}

/* State OPEN → greeting visible (Aria + voix) */
.cfaoi-pop-root[data-state="open"] .cfaoi-pop-greeting {
    display: block;
}
/* Si on minimise / réduit depuis greeting, on garde quand même le bloc présent
   pour que les transitions soient propres */
.cfaoi-pop-root[data-state="minimized"] .cfaoi-pop-greeting,
.cfaoi-pop-root[data-state="hidden"] .cfaoi-pop-greeting {
    display: block;
}

/* State CHATTING → chat visible */
.cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-chat {
    display: block;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    animation: cfaoi-pop-chat-in 0.5s ease-out;
}

@keyframes cfaoi-pop-chat-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}
@keyframes cfaoi-pop-screen-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0);   }
}

/* Le wrapper du chat embarqué doit remplir l'espace dispo */
.cfaoi-pop-chat .cfaoi-wrapper {
    height: 100% !important;
    max-height: none !important;
    width: 100%;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0;
    animation: none;
}

/* Trame holographique discrète */
.cfaoi-pop-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, transparent 0%, rgba(0, 212, 255, 0.04) 50%, transparent 100%),
        repeating-linear-gradient(0deg, transparent 0px, transparent 3px, rgba(0, 212, 255, 0.018) 3px, rgba(0, 212, 255, 0.018) 4px);
    pointer-events: none;
    z-index: 0;
}
/* Glow d'accent en haut de la card */
.cfaoi-pop-card::after {
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 240px;
    background: radial-gradient(ellipse at center, var(--pop-glow) 0%, transparent 65%);
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}
.cfaoi-pop-card > * {
    position: relative;
    z-index: 1;
}

/* ─── Header ──────────────────────────────────────────────────────────── */
.cfaoi-pop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.cfaoi-pop-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px 5px 10px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    color: var(--pop-primary);
    letter-spacing: 0.04em;
}
.cfaoi-pop-pill-dot {
    width: 7px;
    height: 7px;
    background: var(--pop-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--pop-glow);
    animation: cfaoi-pop-pulse 1.6s ease-in-out infinite;
}
@keyframes cfaoi-pop-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.85); }
}
.cfaoi-pop-actions {
    display: flex;
    gap: 6px;
}
.cfaoi-pop-icon-btn {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    color: var(--pop-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}
.cfaoi-pop-icon-btn:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: var(--pop-border);
    color: var(--pop-primary);
}

/* ─── Stage : hologramme ──────────────────────────────────────────────── */
.cfaoi-pop-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    margin: 4px 0 8px;
    position: relative;
}
.cfaoi-pop-orbit {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto; /* centrage horizontal explicite */
}
.cfaoi-pop-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform-origin: center center;
    /* on neutralise le décalage de translation que le rotate va appliquer */
    transform: translate(-50%, -50%);
}
.cfaoi-pop-ring-1 {
    animation: cfaoi-pop-rotate 18s linear infinite;
    filter: drop-shadow(0 0 8px var(--pop-glow));
}
.cfaoi-pop-ring-2 { animation: cfaoi-pop-rotate-rev 22s linear infinite; }
.cfaoi-pop-ring-3 { animation: cfaoi-pop-rotate     12s linear infinite; }
@keyframes cfaoi-pop-rotate     { from { transform: translate(-50%, -50%) rotate(0deg); }   to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes cfaoi-pop-rotate-rev { from { transform: translate(-50%, -50%) rotate(360deg); } to { transform: translate(-50%, -50%) rotate(0deg);   } }

.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-ring-1 { animation-duration: 6s; filter: drop-shadow(0 0 16px var(--pop-glow)); }
.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-ring-2 { animation-duration: 8s; }
.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-ring-3 { animation-duration: 4s; }

.cfaoi-pop-visualizer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
    pointer-events: none;
}

/* ─── 1.1.2 — Widget hologramme Aria avec avatar 3D (panneau latéral) ── */

/* On masque le widget central "stage" sur l'écran greeting puisque le
   widget hologramme est désormais dans le panneau latéral (sinon doublon).
   Le texte parlé d'Aria, son nom et les boutons restent visibles dans la
   card. */
.cfaoi-pop-root[data-state="open"] .cfaoi-pop-greeting .cfaoi-pop-stage,
.cfaoi-pop-root[data-state="open"] .cfaoi-pop-greeting .cfaoi-pop-identity {
    display: none;
}

.cfaoi-pop-avatar-side {
    position: absolute;
    /* Centré verticalement comme la card, et collé à sa gauche.
       La card desktop fait 460px → moitié = 230px. On laisse 28px de gap.
       1.1.6 — La zone avatar est désormais un rectangle vertical (portrait),
       plus un cercle. Largeur : 280px ; hauteur (stage + label) calée par
       le contenu. Le canvas 3D occupe toute la zone supérieure. */
    top: 50%;
    right: calc(50% + 230px + 28px);
    transform: translateY(-50%) translateX(50px);
    width: 280px;
    pointer-events: none;
    opacity: 0;
    transition:
        opacity 0.55s ease,
        transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: calc(var(--pop-z) + 1);
}
.cfaoi-pop-root[data-state="open"]       .cfaoi-pop-avatar-side,
.cfaoi-pop-root[data-state="choice"]     .cfaoi-pop-avatar-side,
.cfaoi-pop-root[data-state="pro"]        .cfaoi-pop-avatar-side,
.cfaoi-pop-root[data-state="pro-thanks"] .cfaoi-pop-avatar-side,
.cfaoi-pop-root[data-state="chatting"]   .cfaoi-pop-avatar-side {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* 1.1.7 — En état chatting la card s'élargit à 540px (vs 460px), donc sa
   demi-largeur passe de 230 à 270. On repousse l'avatar de 40px de plus
   pour rester complètement à gauche du chat, sans aucun chevauchement. */
/* 3.13.35 — L'AVATAR DÉBORDAIT SUR LA CARTE EMPLOYEUR.
 *
 * SIGNALÉ EN RECETTE : « l'onglet de l'avatar déborde sur le chat ». La règle
 * de base cale l'avatar sur `calc(50% + 230px + 28px)`, et son commentaire dit
 * pourquoi : « la card desktop fait 460px → moitié = 230px ». La 3.13.28 a
 * porté la carte EMPLOYEUR à 540 px pour l'aligner sur le parcours candidat —
 * demi-largeur 270 px. L'avatar, lui, est resté calé sur 258 px : il passait
 * donc 12 px SOUS la carte, et perdait au passage la respiration de 40 px que
 * le chat s'était déjà vu accorder.
 *
 * ⚠️ LA CORRECTION EXISTAIT DÉJÀ — pour l'état `chatting` seulement. On ne
 * réécrit pas un second calcul : on ÉTEND celui-ci aux deux états employeur,
 * dont la carte a exactement la même largeur (`width: min(540px, …)` les
 * déclare ensemble). Deux blocs pour une seule règle est la cause structurelle
 * de V8 (§10) — et c'est précisément ce qui a produit ce défaut : la largeur a
 * été changée à un endroit, l'offset calculé à un autre.
 *
 * `[data-pro-view="recap"]` n'est pas concerné : il masque l'avatar (2.7.10).
 * Sous 1024 px non plus : l'aside est `display: none`. */
.cfaoi-pop-root[data-state="chatting"]   .cfaoi-pop-avatar-side,
.cfaoi-pop-root[data-state="pro"]        .cfaoi-pop-avatar-side,
.cfaoi-pop-root[data-state="pro-thanks"] .cfaoi-pop-avatar-side {
    right: calc(50% + 270px + 40px);
}

/* 2.7.10 — Écran RÉCAP employeur : la card s'élargit à 620px (data-pro-view
   ="recap", 2.7.8), sa demi-largeur (310px) recouvrait alors l'avatar 3D
   latéral et son nom (calés pour 460px). À la demande, on FAIT DISPARAÎTRE
   l'avatar et son nom sur cet écran pour laisser toute la place au
   formulaire récapitulatif. Fondu doux via la transition d'opacité héritée.
   L'avatar réapparaît dès qu'on quitte le récap (édition d'une réponse) ou
   qu'on relance le parcours. */
.cfaoi-pop-root[data-state="pro"][data-pro-view="recap"] .cfaoi-pop-avatar-side {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 3.9.2 — CRÉATEUR DE CV : la card doit s'élargir pour loger DEUX colonnes
   (formulaire + aperçu A4), sinon l'aperçu est écrasé dans les 540 px du chat.
   Même parti pris que l'écran RÉCAP employeur ci-dessus (2.7.10) : on élargit la
   card ET on efface l'avatar latéral, qui sinon serait recouvert.
   Déclencheur : `:has(.cfaoi-cv-creator)` — la règle s'active tant que le
   créateur est monté dans le DOM et se REPLIE d'elle-même dès qu'on en sort
   (retour, formulaire, « passer »), sans état JS à entretenir. Navigateurs sans
   `:has()` : la card reste à 540 px (comportement actuel), rien ne casse. */
.cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-card:has(.cfaoi-cv-creator) {
    width: min(980px, calc(100vw - 24px));
}
.cfaoi-pop-root[data-state="chatting"]:has(.cfaoi-cv-creator) .cfaoi-pop-avatar-side {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ─── Stage : conteneur du canvas 3D (1.1.7 — sans halo, sans anneaux) ── */
.cfaoi-pop-avatar-side-stage {
    position: relative;
    width: 280px;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: transparent;
}
/* 1.1.7 — Anneaux "Cortana" supprimés : on garde le markup HTML pour ne
   pas casser le JS, mais on les masque entièrement. */
.cfaoi-pop-side-ring,
.cfaoi-pop-side-ring-1,
.cfaoi-pop-side-ring-2,
.cfaoi-pop-side-ring-3 {
    display: none !important;
}
.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-side-ring-1,
.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-side-ring-2,
.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-side-ring-3 {
    display: none !important;
}

/* ─── Frame portrait : c'est ici que vit le canvas 3D (1.1.6) ─────────── */
/* Plus de border-radius:50%, plus d'overflow:hidden : le canvas remplit
   tout le rectangle. Le glow et la pulsation sont conservés mais sans
   masque circulaire. */
.cfaoi-pop-avatar-side-frame {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
    background: transparent;
    animation: cfaoi-pop-avatar-breathe 3s ease-in-out infinite;
}
@keyframes cfaoi-pop-avatar-breathe {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 6px 18px rgba(0, 212, 255, 0.30));
    }
    50% {
        transform: scale(1.02);
        filter: drop-shadow(0 8px 28px rgba(0, 212, 255, 0.55));
    }
}
.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-avatar-side-frame {
    animation-duration: 0.9s;
}

/* 1.1.3 — État "thinking" : pulsation discrète plus rapide que l'idle
   mais sans le clignotement intense du talk. L'animation idle 3D
   continue de tourner dessous (pas de switch d'animation), seul le
   halo CSS s'intensifie de manière rythmée pour signifier la réflexion
   sans surcharger l'écran. */
.cfaoi-pop-avatar-side[data-aria-state="thinking"] .cfaoi-pop-avatar-side-frame {
    animation: cfaoi-pop-avatar-think 1.4s ease-in-out infinite;
}
@keyframes cfaoi-pop-avatar-think {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 6px 18px rgba(0, 212, 255, 0.40));
    }
    50% {
        transform: scale(1.015);
        filter: drop-shadow(0 8px 28px rgba(124, 58, 237, 0.60));
    }
}
/* 1.1.6 — Plus de pseudo-élément circulaire : on supprime l'effet conic
   spin qui n'a plus de sens sur un rectangle. L'animation thinking se
   limite désormais à la pulsation du drop-shadow ci-dessus. */

/* Le canvas Three.js — pleine taille du frame, 0 par défaut, fade quand prêt
   (1.1.6 — plus de border-radius : on respecte les pixels du rendu 3D) */
.cfaoi-pop-avatar3d-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 2;                  /* 1.1.4 — au-dessus du fallback img (z=1) */
}
.cfaoi-pop-avatar-side[data-avatar3d-status="ready"] .cfaoi-pop-avatar3d-canvas {
    opacity: 1;
}

/* 1.1.3 — Fallback visible si WebGL absent ou si le GLB échoue
   à charger. On NE cache PLUS le panneau : on remplace simplement le
   canvas Three.js par le portrait Aria pour conserver l'identité.
   1.1.6 — Le fallback est désormais centré dans le rectangle, taille
   fixe 200×200 cerclé pour rappeler une présence (pas pleine surface). */
.cfaoi-pop-avatar3d-fallback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pop-primary, #00d4ff);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    overflow: hidden;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    z-index: 1;                  /* 1.1.4 — sous le canvas */
}
/* 1.1.4 — Le fallback est désormais une <picture> contenant une <img>
   du portrait Aria (cohérent avec le modèle 3D). On la cadre en rond
   avec object-fit pour qu'elle remplisse exactement le cercle sans
   déformation. La pulsation discrète est conservée. */
.cfaoi-pop-avatar3d-fallback-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;    /* 1.1.6 — centrage strict */
    border-radius: 50%;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.4));
    animation: cfaoi-pop-fallback-pulse 3.6s ease-in-out infinite;
}
@keyframes cfaoi-pop-fallback-pulse {
    0%, 100% { transform: scale(1);     opacity: 0.96; }
    50%      { transform: scale(1.025); opacity: 1;    }
}
/* Visible uniquement quand le 3D a échoué (ou n'est pas encore tenté).
   Quand status="ready" on le masque, le canvas Three.js prend le relais. */
.cfaoi-pop-avatar-side[data-avatar3d-status="error"]   .cfaoi-pop-avatar3d-fallback,
.cfaoi-pop-avatar-side[data-avatar3d-status="loading"] .cfaoi-pop-avatar3d-fallback {
    opacity: 1;
}
.cfaoi-pop-avatar-side[data-avatar3d-status="ready"] .cfaoi-pop-avatar3d-fallback {
    opacity: 0;
}

/* Loader (spinner) tant que le module/GLB n'est pas chargé */
.cfaoi-pop-avatar-side-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
}
.cfaoi-pop-avatar-side[data-avatar3d-status="ready"] .cfaoi-pop-avatar-side-loader,
.cfaoi-pop-avatar-side[data-avatar3d-status="error"] .cfaoi-pop-avatar-side-loader {
    opacity: 0;
    pointer-events: none;
}
.cfaoi-pop-avatar-side-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(0, 212, 255, 0.18);
    border-top-color: var(--pop-primary);
    border-radius: 50%;
    animation: cfaoi-pop-spin-360 0.9s linear infinite;
}
@keyframes cfaoi-pop-spin-360 { to { transform: rotate(360deg); } }

/* ─── Label : eyebrow + nom + statut ──────────────────────────────────── */
.cfaoi-pop-avatar-side-label {
    margin-top: -8px;
    text-align: center;
    color: var(--pop-text);
    pointer-events: none;
}
.cfaoi-pop-avatar-side-eyebrow {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--pop-text-dim);
    margin-bottom: 6px;
}
.cfaoi-pop-avatar-side-name {
    display: block;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, var(--pop-primary), var(--pop-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: 0 2px 12px rgba(0, 212, 255, 0.3);
}
.cfaoi-pop-avatar-side-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--pop-text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.cfaoi-pop-avatar-side-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
    animation: cfaoi-pop-pulse 1.8s ease-in-out infinite;
}
.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-avatar-side-status-text::after {
    content: " · parle";
    color: var(--pop-primary);
}

/* 1.1.3 — État erreur : on garde le panneau visible (fallback SVG actif).
   Avant 1.1.3 le panneau disparaissait avec display:none, ce qui cassait
   la cohérence visuelle (la card se décalait). Désormais le canvas
   Three.js reste à opacity:0 et le SVG fallback prend le relais via
   .cfaoi-pop-avatar3d-fallback. On masque uniquement le spinner pour
   éviter qu'il continue à tourner après échec. */
.cfaoi-pop-avatar-side[data-avatar3d-status="error"] .cfaoi-pop-avatar-side-spinner {
    display: none;
}

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 980px) {
    /* 1.1.6 — Sur écrans étroits : version compacte rectangulaire en
       haut-gauche. Plus d'overflow circulaire, le canvas remplit son cadre. */
    .cfaoi-pop-avatar-side {
        top: 14px;
        right: auto;
        left: 14px;
        width: 150px;
        transform: translateX(-30px);
    }
    .cfaoi-pop-root[data-state="open"]       .cfaoi-pop-avatar-side,
    .cfaoi-pop-root[data-state="choice"]     .cfaoi-pop-avatar-side,
    .cfaoi-pop-root[data-state="pro"]        .cfaoi-pop-avatar-side,
    .cfaoi-pop-root[data-state="pro-thanks"] .cfaoi-pop-avatar-side,
    .cfaoi-pop-root[data-state="chatting"]   .cfaoi-pop-avatar-side {
        transform: translateX(0);
    }
    .cfaoi-pop-avatar-side-stage  { width: 150px; height: 220px; }
    .cfaoi-pop-avatar-side-spinner { width: 26px; height: 26px; border-width: 2px; }
    .cfaoi-pop-avatar-side-label  { margin-top: 4px; }
    .cfaoi-pop-avatar-side-eyebrow { font-size: 8.5px; letter-spacing: 0.16em; margin-bottom: 2px; }
    .cfaoi-pop-avatar-side-name  { font-size: 17px; }
    .cfaoi-pop-avatar-side-status { font-size: 9px; gap: 4px; margin-top: 3px; }
    /* Quand on est en chatting, le popup prend toute la largeur sur mobile —
       on a besoin que l'avatar reste lisible mais ne masque rien d'important */
    .cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-avatar-side {
        top: 8px;
        left: 8px;
        width: 120px;
    }
    .cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-avatar-side-stage  { width: 120px; height: 170px; }
    .cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-avatar-side-label  { display: none; }
}
@media (max-width: 480px) {
    .cfaoi-pop-avatar-side { width: 120px; top: 8px; left: 8px; }
    .cfaoi-pop-avatar-side-stage  { width: 120px; height: 175px; }
    .cfaoi-pop-avatar-side-name { font-size: 14px; }
    .cfaoi-pop-avatar-side-eyebrow { font-size: 7.5px; letter-spacing: 0.12em; }
    .cfaoi-pop-avatar-side-status { display: none; }
}

.cfaoi-pop-core {
    position: relative;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 212, 255, 0.5), rgba(124, 58, 237, 0.4) 60%, transparent 100%);
    box-shadow:
        0 0 30px rgba(0, 212, 255, 0.5),
        inset 0 0 25px rgba(0, 212, 255, 0.4);
    animation: cfaoi-pop-breathe 3s ease-in-out infinite;
    z-index: 3;
}
svg.cfaoi-pop-core-icon { width: 50px; height: 50px; }
.cfaoi-pop-core-glow {
    position: absolute;
    inset: -22px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--pop-glow) 0%, transparent 70%);
    opacity: 0.45;
    z-index: -1;
}
.cfaoi-pop-core-icon {
    color: #ffffff;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7));
    z-index: 2;
}
@keyframes cfaoi-pop-breathe {
    0%, 100% { transform: scale(1);    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5), inset 0 0 25px rgba(0, 212, 255, 0.4); }
    50%      { transform: scale(1.08); box-shadow: 0 0 50px rgba(0, 212, 255, 0.8), inset 0 0 35px rgba(0, 212, 255, 0.6); }
}
.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-core {
    animation: cfaoi-pop-breathe 0.9s ease-in-out infinite;
}

/* ─── Identité ────────────────────────────────────────────────────────── */
.cfaoi-pop-identity {
    text-align: center;
    margin: 4px 0 14px;
}
.cfaoi-pop-eyebrow {
    margin: 0 0 4px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--pop-text-dim);
}
.cfaoi-pop-name {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--pop-primary) 0%, #ffffff 50%, var(--pop-accent) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: cfaoi-pop-shimmer 6s ease-in-out infinite;
    line-height: 1.1;
}
@keyframes cfaoi-pop-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* ─── Speech : présentation conversationnelle (PAS chatbox) ───────────── */
.cfaoi-pop-speech {
    margin: 6px 0 18px;
    text-align: center;
    min-height: 88px;
}
.cfaoi-pop-line {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: -0.005em;
    color: var(--pop-text);
    /* État initial : invisible et décalé vers le bas */
    opacity: 0;
    transform: translateY(8px);
    filter: blur(2px);
    transition:
        opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.7s ease;
}
/* Quand révélée (classe ajoutée par JS) */
.cfaoi-pop-line.is-revealed {
    opacity: 0.78;
    transform: translateY(0);
    filter: blur(0);
}
/* Quand activement parlée (classe ajoutée par JS) */
.cfaoi-pop-line.is-active {
    opacity: 1;
    color: #ffffff;
    text-shadow: 0 0 24px rgba(0, 212, 255, 0.25);
}
/* Première phrase = présentation : un peu plus grosse */
.cfaoi-pop-line[data-index="0"] {
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.015em;
    color: #ffffff;
    margin-bottom: 14px;
}
/* Dernière phrase si question : italique léger */
.cfaoi-pop-line.is-question {
    font-style: italic;
    font-size: 17px;
    color: var(--pop-primary);
    margin-top: 14px;
}

/* ─── Listening (barres animées) ──────────────────────────────────────── */
.cfaoi-pop-listening {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
    height: 14px;
    margin-bottom: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-listening {
    opacity: 1;
}
.cfaoi-pop-bar {
    width: 3px;
    height: 3px;
    background: var(--pop-primary);
    border-radius: 100px;
    box-shadow: 0 0 6px var(--pop-glow);
    animation: cfaoi-pop-bar-bounce 1s ease-in-out infinite;
}
.cfaoi-pop-bar:nth-child(1) { animation-delay: 0s;    }
.cfaoi-pop-bar:nth-child(2) { animation-delay: 0.15s; }
.cfaoi-pop-bar:nth-child(3) { animation-delay: 0.3s;  }
.cfaoi-pop-bar:nth-child(4) { animation-delay: 0.45s; }
.cfaoi-pop-bar:nth-child(5) { animation-delay: 0.6s;  }
@keyframes cfaoi-pop-bar-bounce {
    0%, 100% { height: 3px;  opacity: 0.5; }
    50%      { height: 14px; opacity: 1;   }
}

/* ─── Footer (CTA principal + skip) ───────────────────────────────────── */
.cfaoi-pop-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}
.cfaoi-pop-cta {
    width: 100%;
    padding: 15px 22px;
    background: linear-gradient(135deg, var(--pop-primary), var(--pop-accent));
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 15.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    box-shadow:
        0 10px 28px -8px rgba(0, 212, 255, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}
.cfaoi-pop-cta::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.65s ease;
}
.cfaoi-pop-cta:hover::before { left: 100%; }
.cfaoi-pop-cta:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 36px -8px rgba(0, 212, 255, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}
.cfaoi-pop-cta:active { transform: translateY(0); }
.cfaoi-pop-cta svg { transition: transform 0.25s ease; }
.cfaoi-pop-cta:hover svg { transform: translateX(3px); }

.cfaoi-pop-skip {
    background: transparent;
    border: none;
    color: var(--pop-text-dim);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
    font-family: inherit;
}
.cfaoi-pop-skip:hover {
    color: var(--pop-text-muted);
}

/* ─── Crédits ─────────────────────────────────────────────────────────── */
.cfaoi-pop-credits {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--pop-text-dim);
    font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.cfaoi-pop-credits a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
    pointer-events: auto;
}
.cfaoi-pop-credits a:hover { color: var(--pop-primary); }

/* ─── Bulle minimisée (bas-droite) ────────────────────────────────────── */
.cfaoi-pop-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--pop-primary), var(--pop-accent));
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 10px 30px -8px rgba(0, 212, 255, 0.5),
        0 0 24px -4px var(--pop-glow);
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    padding: 0;
    z-index: var(--pop-z);
}
.cfaoi-pop-root[data-state="minimized"] .cfaoi-pop-bubble {
    transform: scale(1);
    pointer-events: auto;
}
.cfaoi-pop-bubble:hover { transform: scale(1.1); }
.cfaoi-pop-bubble-pulse {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--pop-primary);
    opacity: 0;
    animation: cfaoi-pop-bubble-ping 2s ease-out infinite;
}
@keyframes cfaoi-pop-bubble-ping {
    0%   { transform: scale(1);    opacity: 0.7; }
    100% { transform: scale(1.55); opacity: 0;   }
}

/* ─── Launcher permanent (bas-gauche) ─────────────────────────────────── */
/* 2.5.6 — Refonte visuelle : on passe du gros bloc sombre (rgba 8,12,24)
   à un bouton flottant clair, compact, plus discret et professionnel.
   La ré-affirmation finale est portée par cfaoi-theme-shield.css 2.5.6
   (qui doit gagner sur la cascade du shield reset des <button>). */
.cfaoi-pop-launcher {
    position: fixed;
    bottom: 24px;
    left: 24px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px 8px 8px;
    min-height: 52px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    color: #1e293b;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow:
        0 8px 24px -10px rgba(15, 23, 42, 0.22),
        0 2px 6px -2px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateY(80px);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    pointer-events: none;
    z-index: var(--pop-z);
}
.cfaoi-pop-root[data-state="hidden"]    .cfaoi-pop-launcher,
.cfaoi-pop-root[data-state="minimized"] .cfaoi-pop-launcher {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.cfaoi-pop-launcher:hover {
    background: #ffffff;
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow:
        0 12px 32px -10px rgba(15, 23, 42, 0.28),
        0 3px 8px -2px rgba(37, 99, 235, 0.18);
}
.cfaoi-pop-launcher:active { transform: translateY(2px); }

.cfaoi-pop-launcher-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--pop-primary), var(--pop-accent));
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}
.cfaoi-pop-launcher-pulse {
    position: absolute;
    top: 50%;
    /* Centré sur l'icône : padding-left (8px) + moitié de l'icône (18px) */
    left: calc(8px + 18px);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--pop-primary);
    opacity: 0;
    transform: translate(-50%, -50%);
    animation: cfaoi-pop-launcher-ping 2.4s ease-out infinite;
    pointer-events: none;
}
@keyframes cfaoi-pop-launcher-ping {
    0%   { transform: translate(-50%, -50%) scale(0.85); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(2);    opacity: 0;   }
}
.cfaoi-pop-launcher-label {
    display: inline-block;
    line-height: 1.2;
    color: #1e293b;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

/* Animation shake (pour notice URL non configurée) */
@keyframes cfaoi-pop-shake {
    0%, 100% { transform: translate(-50%, -50%) translateX(0); }
    20%      { transform: translate(-50%, -50%) translateX(-8px); }
    40%      { transform: translate(-50%, -50%) translateX(8px); }
    60%      { transform: translate(-50%, -50%) translateX(-5px); }
    80%      { transform: translate(-50%, -50%) translateX(5px); }
}

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .cfaoi-pop-card {
        width: calc(100vw - 24px);
        padding: 20px 18px 22px;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px); /* 2.9.1 — iOS : hauteur dynamique (barre d'adresse) */
    }
    .cfaoi-pop-stage { height: 190px; }
    .cfaoi-pop-orbit { width: 190px; height: 190px; }
    .cfaoi-pop-visualizer { width: 190px; height: 190px; }
    .cfaoi-pop-core { width: 84px; height: 84px; }
    svg.cfaoi-pop-core-icon { width: 44px; height: 44px; }
    .cfaoi-pop-name { font-size: 26px; }
    .cfaoi-pop-line { font-size: 15.5px; }
    .cfaoi-pop-line[data-index="0"] { font-size: 17px; }
    .cfaoi-pop-line.is-question     { font-size: 15.5px; }
    .cfaoi-pop-bubble { bottom: 16px; right: 16px; width: 54px; height: 54px; }
    .cfaoi-pop-launcher { bottom: 16px; left: 16px; padding: 7px 16px 7px 7px; min-height: 48px; font-size: 13.5px; gap: 9px; }
    .cfaoi-pop-launcher-icon { width: 34px; height: 34px; flex-basis: 34px; }
    .cfaoi-pop-launcher-icon svg { width: 18px; height: 18px; }
}

/* ─── Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .cfaoi-pop-ring-1,
    .cfaoi-pop-ring-2,
    .cfaoi-pop-ring-3 { animation-duration: 60s !important; }
    .cfaoi-pop-core,
    .cfaoi-pop-name { animation: none; }
    .cfaoi-pop-card,
    .cfaoi-pop-backdrop,
    .cfaoi-pop-line { transition: opacity 0.3s ease !important; }
    .cfaoi-pop-line { transform: none !important; filter: none !important; }
}

/* ─── Reset minimal pour thèmes WP ────────────────────────────────────── */
.cfaoi-pop-root button { font-family: inherit; }
.cfaoi-pop-root p { margin-block-start: 0; margin-block-end: 0; }

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║   1.1.0 — Écran de choix (Pro / Apprenti / Visite libre)             ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

.cfaoi-pop-choice {
    padding: 4px 2px 0;
    gap: 18px;
}

.cfaoi-pop-choice-header {
    text-align: center;
    margin: 4px 0 6px;
}
.cfaoi-pop-choice-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pop-primary);
    background:
        radial-gradient(circle at center, rgba(0, 212, 255, 0.18) 0%, transparent 70%),
        rgba(0, 212, 255, 0.04);
    border: 1px solid var(--pop-border);
    box-shadow:
        0 0 30px -8px var(--pop-glow),
        inset 0 0 16px -4px rgba(0, 212, 255, 0.2);
    animation: cfaoi-pop-pulse-soft 2.4s ease-in-out infinite;
}
/* 1.1.4 — Variante "photo" : portrait Aria à la place de l'icône SVG.
   Padding 0 + overflow hidden + ring intérieur pour conserver l'effet
   "hologramme" (cercle lumineux) tout en montrant le visage en pleine
   surface. Le ring est dessiné via box-shadow inset pour ne pas
   nécessiter de wrapper supplémentaire. */
.cfaoi-pop-choice-icon--photo {
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(0, 212, 255, 0.10) 0%, transparent 60%);
    box-shadow:
        0 0 30px -8px var(--pop-glow),
        inset 0 0 0 2px rgba(0, 212, 255, 0.55),
        inset 0 0 12px -4px rgba(0, 212, 255, 0.4);
}
.cfaoi-pop-choice-icon--photo > picture,
.cfaoi-pop-choice-icon--photo > picture > img.cfaoi-pop-choice-icon-img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}
.cfaoi-pop-choice-icon-img {
    object-fit: cover;
    object-position: center 28%;       /* visage centré dans le cercle */
}
@keyframes cfaoi-pop-pulse-soft {
    0%, 100% { box-shadow: 0 0 30px -8px var(--pop-glow), inset 0 0 16px -4px rgba(0, 212, 255, 0.2); }
    50%      { box-shadow: 0 0 44px -6px var(--pop-glow), inset 0 0 22px -4px rgba(0, 212, 255, 0.35); }
}
/* La variante photo a son propre keyframe (sans inset radial qui
   masquerait le visage). */
.cfaoi-pop-choice-icon--photo {
    animation: cfaoi-pop-pulse-photo 3s ease-in-out infinite;
}
@keyframes cfaoi-pop-pulse-photo {
    0%, 100% {
        box-shadow:
            0 0 30px -8px var(--pop-glow),
            inset 0 0 0 2px rgba(0, 212, 255, 0.55),
            inset 0 0 12px -4px rgba(0, 212, 255, 0.4);
    }
    50% {
        box-shadow:
            0 0 44px -6px var(--pop-glow),
            inset 0 0 0 2px rgba(0, 212, 255, 0.85),
            inset 0 0 18px -4px rgba(0, 212, 255, 0.55);
    }
}
.cfaoi-pop-choice-title {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--pop-text);
    line-height: 1.25;
}
.cfaoi-pop-choice-subtitle {
    font-size: 13.5px;
    color: var(--pop-text-muted);
    line-height: 1.5;
    margin: 0;
}

.cfaoi-pop-choice-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

/* Carte de choix (boutons "Pro" et "Apprenti") */
.cfaoi-pop-choice-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 14px 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    color: var(--pop-text);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}
.cfaoi-pop-choice-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 212, 255, 0.06) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.cfaoi-pop-choice-card:hover {
    border-color: var(--pop-border);
    background: rgba(0, 212, 255, 0.04);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px -8px rgba(0, 212, 255, 0.4);
}
.cfaoi-pop-choice-card:hover::before { opacity: 1; }
.cfaoi-pop-choice-card:active { transform: translateY(0); }

/* Variante "primary" (Apprenti = chemin principal, mis en avant) */
/* 1.5.1 — Suppression du dégradé violet (rgba(124,58,237,…)) à la demande
   du client. La carte primaire conserve un seul accent (cyan tenu) ;
   l'admin peut faire évoluer cette teinte via --pop-primary. */
.cfaoi-pop-choice-card-primary {
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.3);
}
.cfaoi-pop-choice-card-primary:hover {
    background: rgba(0, 212, 255, 0.14);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 8px 28px -8px var(--pop-glow);
}

.cfaoi-pop-choice-card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--pop-primary);
    border: 1px solid rgba(0, 212, 255, 0.18);
}
.cfaoi-pop-choice-card-primary .cfaoi-pop-choice-card-icon {
    background: rgba(0, 212, 255, 0.18);
    border-color: rgba(0, 212, 255, 0.35);
}

.cfaoi-pop-choice-card-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1 1 0%;
    min-width: 0;
    max-width: 100%;
    /* 2.5.7 — Sécurité retour à la ligne (cf. fix shield ci-dessous) */
    overflow: visible;
}
.cfaoi-pop-choice-card-title {
    /* 2.5.7 — display: block + word-break pour que les titres longs
       passent proprement sur 2 lignes au lieu d'être tronqués. */
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: var(--pop-text);
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}
.cfaoi-pop-choice-card-desc {
    /* 2.5.7 — Même traitement : le sous-titre "Professionnel ou
       entreprise — déposez votre besoin, on vous met en relation."
       était coupé horizontalement avant 2.5.7 car les styles
       hérités du thème WordPress imposaient white-space: nowrap
       sur les <span> dans <button>. On force le wrap explicitement. */
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-size: 12px;
    color: var(--pop-text-muted);
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}
.cfaoi-pop-choice-card-arrow {
    flex-shrink: 0;
    color: var(--pop-text-dim);
    transition: transform 0.25s ease, color 0.25s ease;
    display: inline-flex;
    align-items: center;
}
.cfaoi-pop-choice-card:hover .cfaoi-pop-choice-card-arrow {
    transform: translateX(3px);
    color: var(--pop-primary);
}

/* Skip discret en bas — "Fermer et visiter le site par moi-même" */
.cfaoi-pop-choice-skip {
    background: transparent;
    border: none;
    color: var(--pop-text-dim);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 8px 6px;
    transition: color 0.2s ease;
    text-decoration: underline;
    text-decoration-color: rgba(138, 162, 196, 0.25);
    text-underline-offset: 3px;
    align-self: center;
    font-family: inherit;
}
.cfaoi-pop-choice-skip:hover {
    color: var(--pop-text-muted);
    text-decoration-color: var(--pop-text-muted);
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║   1.1.0 — Écran Pro (formulaire de mise en relation apprenti)        ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

.cfaoi-pop-pro {
    padding: 0 2px 4px;
    gap: 16px;
}

.cfaoi-pop-pro-back {
    align-self: flex-start;
    background: transparent;
    border: none;
    color: var(--pop-text-muted);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px 4px 4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}
.cfaoi-pop-pro-back:hover {
    color: var(--pop-primary);
    background: rgba(0, 212, 255, 0.06);
}

/* Bulle d'intro façon "Aria parle" */
.cfaoi-pop-pro-intro {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 14px 14px 14px;
    background: rgba(0, 212, 255, 0.04);
    border: 1px solid var(--pop-border);
    border-radius: 14px;
    position: relative;
}
.cfaoi-pop-pro-avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pop-primary);
    background:
        radial-gradient(circle at center, rgba(0, 212, 255, 0.22) 0%, transparent 70%),
        rgba(0, 212, 255, 0.06);
    border: 1px solid var(--pop-border);
    box-shadow: 0 0 18px -6px var(--pop-glow);
}
.cfaoi-pop-pro-bubble {
    flex: 1;
    min-width: 0;
}
.cfaoi-pop-pro-name {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--pop-primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.cfaoi-pop-pro-msg {
    font-size: 13px;
    line-height: 1.55;
    color: var(--pop-text);
    margin: 0;
}

/* Form */
.cfaoi-pop-pro-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cfaoi-pop-pro-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
@media (max-width: 480px) {
    .cfaoi-pop-pro-row { grid-template-columns: 1fr; }
}
.cfaoi-pop-pro-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.cfaoi-pop-pro-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--pop-text-muted);
    letter-spacing: 0.02em;
}
.cfaoi-pop-pro-req {
    color: var(--pop-primary);
    font-weight: 700;
}
.cfaoi-pop-pro-field input[type="text"],
.cfaoi-pop-pro-field input[type="email"],
.cfaoi-pop-pro-field input[type="tel"],
.cfaoi-pop-pro-field textarea {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--pop-text);
    font-size: 13.5px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
    line-height: 1.5;
}
.cfaoi-pop-pro-field textarea {
    resize: vertical;
    min-height: 70px;
    max-height: 160px;
}
.cfaoi-pop-pro-field input::placeholder,
.cfaoi-pop-pro-field textarea::placeholder {
    color: var(--pop-text-dim);
    opacity: 0.7;
}
.cfaoi-pop-pro-field input:hover,
.cfaoi-pop-pro-field textarea:hover {
    border-color: rgba(0, 212, 255, 0.2);
    background: rgba(0, 212, 255, 0.02);
}
.cfaoi-pop-pro-field input:focus,
.cfaoi-pop-pro-field textarea:focus {
    border-color: var(--pop-primary);
    background: rgba(0, 212, 255, 0.04);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
}

.cfaoi-pop-pro-consent {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--pop-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}
.cfaoi-pop-pro-consent:hover {
    border-color: rgba(0, 212, 255, 0.18);
    background: rgba(0, 212, 255, 0.03);
}
.cfaoi-pop-pro-consent input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 1px;
    width: 14px;
    height: 14px;
    accent-color: var(--pop-primary);
    cursor: pointer;
}
.cfaoi-pop-pro-consent span {
    flex: 1;
}

.cfaoi-pop-pro-error {
    margin: 0;
    padding: 0;
    font-size: 12.5px;
    color: #ff6b6b;
    background: transparent;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.25s ease;
}
.cfaoi-pop-pro-error.is-visible {
    padding: 9px 12px;
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.25);
    border-radius: 9px;
    min-height: 32px;
    max-height: 100px;
    opacity: 1;
}

.cfaoi-pop-pro-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.cfaoi-pop-pro-submit {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--pop-primary), var(--pop-accent));
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    box-shadow:
        0 8px 24px -8px rgba(0, 212, 255, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}
.cfaoi-pop-pro-submit:hover:not([disabled]) {
    transform: translateY(-1px);
    box-shadow:
        0 12px 32px -8px rgba(0, 212, 255, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}
.cfaoi-pop-pro-submit:active:not([disabled]) { transform: translateY(0); }
.cfaoi-pop-pro-submit[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}
.cfaoi-pop-pro-submit-arrow { transition: transform 0.25s ease; }
.cfaoi-pop-pro-submit:hover:not([disabled]) .cfaoi-pop-pro-submit-arrow {
    transform: translateX(3px);
}
.cfaoi-pop-pro-submit-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: cfaoi-pop-spin 0.7s linear infinite;
}
.cfaoi-pop-pro-submit.is-loading .cfaoi-pop-pro-submit-arrow { display: none; }
.cfaoi-pop-pro-submit.is-loading .cfaoi-pop-pro-submit-spinner { display: inline-block; }
@keyframes cfaoi-pop-spin {
    to { transform: rotate(360deg); }
}

.cfaoi-pop-pro-direct {
    align-self: center;
    color: var(--pop-text-muted);
    font-size: 12px;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    pointer-events: auto;
}
.cfaoi-pop-pro-direct:hover {
    color: var(--pop-primary);
    background: rgba(0, 212, 255, 0.06);
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║   1.4.0 — Parcours conversationnel pro (Aria dialogue avec l'entreprise) ║
   ║                                                                          ║
   ║   Remplace le formulaire statique par un mini-chat dédié, intégré       ║
   ║   à la pane `[data-state="pro"]`. Reprend les conventions visuelles      ║
   ║   du popup (variables --pop-*) pour cohérence avec le greeting et       ║
   ║   l'écran de choix.                                                      ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* Topbar pro : flèche retour + toggle voix */
.cfaoi-pop-pro-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.cfaoi-pop-pro-voice-toggle {
    background: transparent;
    border: 1px solid var(--pop-border);
    color: var(--pop-text-muted);
    width: 30px;
    height: 30px;
    border-radius: 9px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}
.cfaoi-pop-pro-voice-toggle:hover {
    background: rgba(0, 212, 255, 0.08);
    color: var(--pop-primary);
    border-color: var(--pop-primary);
}
.cfaoi-pop-pro-voice-toggle[data-voice="off"] .cfaoi-pop-pro-voice-toggle-on   { display: none; }
.cfaoi-pop-pro-voice-toggle[data-voice="on"]  .cfaoi-pop-pro-voice-toggle-off  { display: none; }
.cfaoi-pop-pro-voice-toggle[data-voice="on"]  { color: var(--pop-primary); border-color: var(--pop-primary); }

/* Header conversationnel : avatar + identité Aria */
.cfaoi-pop-pro-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 212, 255, 0.04);
    border: 1px solid var(--pop-border);
    border-radius: 14px;
}
.cfaoi-pop-pro-chat-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--pop-border);
    background:
        radial-gradient(circle at center, rgba(0, 212, 255, 0.22) 0%, transparent 70%),
        rgba(0, 212, 255, 0.06);
    box-shadow: 0 0 14px -4px var(--pop-glow);
}
.cfaoi-pop-pro-chat-avatar img,
.cfaoi-pop-pro-chat-avatar picture {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.cfaoi-pop-pro-chat-id { min-width: 0; }
.cfaoi-pop-pro-chat-name {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--pop-text);
    line-height: 1.2;
}
.cfaoi-pop-pro-chat-status {
    margin: 2px 0 0;
    font-size: 11px;
    color: var(--pop-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1.3;
}
.cfaoi-pop-pro-chat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.7);
    animation: cfaoi-pop-pulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}

/* Progress bar fine */
.cfaoi-pop-pro-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}
.cfaoi-pop-pro-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--pop-primary), var(--pop-accent));
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* Journal de la conversation */
.cfaoi-pop-pro-chat-log {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 2px;
    scroll-behavior: smooth;
}
.cfaoi-pop-pro-chat-log::-webkit-scrollbar { width: 6px; }
.cfaoi-pop-pro-chat-log::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.25);
    border-radius: 3px;
}

/* Bulles */
.cfaoi-pop-pro-bubble-row {
    display: flex;
    flex-direction: column;
    max-width: 88%;
    animation: cfaoi-pop-bubble-in 0.28s ease-out;
}
.cfaoi-pop-pro-bubble-row--ai   { align-self: flex-start; }
.cfaoi-pop-pro-bubble-row--user { align-self: flex-end; align-items: flex-end; }
.cfaoi-pop-pro-bubble-author {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--pop-primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 3px;
    padding: 0 4px;
}
.cfaoi-pop-pro-bubble-msg {
    font-size: 13px;
    line-height: 1.5;
    color: var(--pop-text);
    padding: 9px 12px;
    border-radius: 14px;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid var(--pop-border);
    word-wrap: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}
.cfaoi-pop-pro-bubble-row--user .cfaoi-pop-pro-bubble-msg {
    background: linear-gradient(135deg, var(--pop-primary), var(--pop-accent));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px -4px rgba(0, 212, 255, 0.45);
}
@keyframes cfaoi-pop-bubble-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 2.7.6 — Indicateur « Je réfléchis » du parcours pro (mêmes 3 points
   animés que la branche candidat, pour un rythme de diction identique). */
.cfaoi-pop-pro-typing {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 18px;
}
.cfaoi-pop-pro-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pop-primary);
    opacity: 0.55;
    animation: cfaoi-pop-pro-typing-bounce 1.2s infinite ease-in-out;
}
.cfaoi-pop-pro-typing-dot:nth-child(2) { animation-delay: 0.18s; }
.cfaoi-pop-pro-typing-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes cfaoi-pop-pro-typing-bounce {
    0%, 80%, 100% { transform: translateY(0);   opacity: 0.45; }
    40%           { transform: translateY(-4px); opacity: 1;    }
}

/* Hôte de l'input courant */
.cfaoi-pop-pro-chat-input-host {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* 2.6.0 — Marge basse pour ne pas coller la liste de choix /
       le bouton « Valider » au bord du popup. Sans cela, sur les
       questions à listes longues (« Y a-t-il des contraintes
       importantes du poste ? » → 7 items + Autre + bouton Valider),
       le dernier élément touchait littéralement la bordure et le
       bouton de validation paraissait absent. */
    padding-bottom: 16px;
}
.cfaoi-pop-pro-chat-input {
    display: flex;
    flex-direction: column;
}
.cfaoi-pop-pro-chat-text {
    width: 100%;
    padding: 11px 13px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    color: var(--pop-text);
    font-size: 13.5px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
    line-height: 1.5;
}
.cfaoi-pop-pro-chat-text::placeholder { color: var(--pop-text-dim); opacity: 0.7; }
.cfaoi-pop-pro-chat-text:hover {
    border-color: rgba(0, 212, 255, 0.22);
    background: rgba(0, 212, 255, 0.02);
}
.cfaoi-pop-pro-chat-text:focus {
    border-color: var(--pop-primary);
    background: rgba(0, 212, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.13);
}
textarea.cfaoi-pop-pro-chat-text {
    resize: vertical;
    min-height: 72px;
    max-height: 160px;
}

/* Boutons d'action (Continuer / Passer / Valider) */
.cfaoi-pop-pro-chat-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.cfaoi-pop-pro-chat-send {
    padding: 9px 18px;
    background: linear-gradient(135deg, var(--pop-primary), var(--pop-accent));
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 6px 18px -6px rgba(0, 212, 255, 0.5);
}
.cfaoi-pop-pro-chat-send:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(0, 212, 255, 0.65); }
.cfaoi-pop-pro-chat-send:active { transform: translateY(0); }
.cfaoi-pop-pro-chat-send[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }
.cfaoi-pop-pro-chat-skip {
    padding: 9px 14px;
    background: transparent;
    color: var(--pop-text-muted);
    border: 1px solid var(--pop-border);
    border-radius: 10px;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.cfaoi-pop-pro-chat-skip:hover {
    color: var(--pop-primary);
    border-color: var(--pop-primary);
    background: rgba(0, 212, 255, 0.05);
}

/* Grille de boutons de choix (choice / multi_choice) */
.cfaoi-pop-pro-chat-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cfaoi-pop-pro-chat-choice {
    /* Couleurs verrouillées en !important pour anti-thème WP (cf. 2.4.12) */
    padding: 8px 14px !important;
    background: rgba(0, 212, 255, 0.06) !important;
    color: var(--pop-text) !important;
    border: 1px solid var(--pop-border) !important;
    border-radius: 10px !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    line-height: 1.3 !important;
    text-align: left !important;
}
.cfaoi-pop-pro-chat-choice:hover {
    background: rgba(0, 212, 255, 0.14) !important;
    border-color: var(--pop-primary) !important;
    color: var(--pop-text) !important;
    transform: translateY(-1px) !important;
}
.cfaoi-pop-pro-chat-choice:focus { outline: 2px solid var(--pop-primary); outline-offset: 2px; }
.cfaoi-pop-pro-chat-choice.is-selected {
    background: linear-gradient(135deg, var(--pop-primary), var(--pop-accent)) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px -4px rgba(0, 212, 255, 0.55) !important;
}
.cfaoi-pop-pro-chat-custom {
    margin-top: 4px;
}

/* Récapitulatif final */
.cfaoi-pop-pro-recap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 12px;
    background: rgba(0, 212, 255, 0.04);
    border: 1px solid var(--pop-border);
    border-radius: 14px;
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  2.7.4 — Écran final employeur : cadrage & scroll interne             ║
   ║                                                                        ║
   ║  Avant 2.7.4, le récapitulatif (rendu dans .cfaoi-pop-pro-chat-input- ║
   ║  host) débordait de la card (overflow:hidden) : le bas du récap et le ║
   ║  bouton « Envoyer ma demande » devenaient inaccessibles sans dézoomer.║
   ║  On borne la card en state="pro", on rend la zone d'input scrollable  ║
   ║  et on fixe (sticky) le pied récap (consentement + bouton d'envoi).   ║
   ║  Strictement additif : la branche candidat (state="chatting") et le   ║
   ║  Q&A employeur (questions une à une) restent inchangés.               ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  3.13.31 — LE PANE EMPLOYEUR PASSE EN THÈME CLAIR.                   ║
   ║  Régression de la 3.13.28, signalée en recette : « ici c'est          ║
   ║  illisible ».                                                        ║
   ╚══════════════════════════════════════════════════════════════════════╝

   CE QUE J'AI CASSÉ. La 3.13.28 a mis le fond de la card à #f0f4f8 pour
   l'aligner sur le chat du jeune — sans toucher aux couleurs de TEXTE. Or tout
   ce pane est habillé pour un fond SOMBRE : `--pop-text` vaut #ECF3FF, un blanc
   bleuté. Du blanc sur du blanc.

   ⚠️ ET CE DÉFAUT ÉTAIT DÉJÀ ÉCRIT DANS CE FICHIER. La 3.5.3 le décrit mot pour
   mot vingt lignes plus haut : « en state chatting le fond de la card devient
   CLAIR, mais le pill garde la couleur pensée pour le fond SOMBRE (--pop-text,
   un blanc bleuté #ECF3FF). Il devenait donc blanc sur blanc — invisible. » Elle
   l'avait corrigé pour `chatting` en masquant le pill ; personne n'a eu à le
   corriger pour `pro`, puisque le fond y était encore sombre. Je l'ai éclairci
   sans relire le paragraphe qui prévenait. Le §10 en une ligne : un défaut déjà
   documenté n'est pas un défaut évité.

   POURQUOI DES JETONS ET NON 82 RÈGLES. Le pane compte 82 blocs colorés ; la
   grande majorité passe par sept variables. On les redéfinit ICI, sur les états
   employeur uniquement : chaque règle suit sans être touchée, et il n'existe
   qu'un seul endroit à relire. Les surfaces écrites EN DUR — des blancs
   translucides, invisibles sur blanc — sont reprises explicitement en dessous,
   parce qu'aucune variable ne les porte.

   D'OÙ VIENNENT CES VALEURS : de `cfaoi-public.css`, la feuille du parcours
   candidat. Le client demande « les mêmes couleurs » : on les COPIE de la
   référence au lieu d'en inventer une troisième. --cfaoi-text #0f172a,
   --cfaoi-text-muted #475569, --cfaoi-border #e2e8f0, --cfaoi-primary #2563eb,
   --cfaoi-accent #7c3aed. Seul `--pop-text-dim` n'a pas d'équivalent là-bas :
   c'est le gris des textes de remplacement, pris un cran plus clair.

   ⚠️ CE CALQUE NE S'APPLIQUE QU'À `pro` ET `pro-thanks`. Les écrans d'accueil du
   pop-up (`open`, `choice`) gardent leur fond sombre et leurs couleurs — on ne
   les a pas touchés, et ils restent lisibles. */
/* ⚠️ LES JETONS NE SONT PAS ICI, ET CE N'EST PAS UN OUBLI. `class-cfaoi-popup.php`
   les redéfinit en CSS EN LIGNE sur `#cfaoi-popup-root` — spécificité
   d'IDENTIFIANT, qu'aucun sélecteur de classe de ce fichier ne peut battre. Une
   première version de ce calque les posait ici : elle était morte-née, et
   invisible à la relecture. Le calque clair des JETONS vit donc dans le PHP,
   au même endroit que les jetons sombres qu'il corrige.
   Ce fichier ne garde que ce que le PHP ne touche pas : les surfaces écrites en
   dur ci-dessous, qui ne passent par aucune variable. Deux endroits, deux
   ensembles DISJOINTS — ce n'est pas « deux blocs pour une seule règle », et il
   ne faut pas les « consolider » : l'un des deux perdrait la cascade. */

/* LE BANDEAU D'IDENTITÉ — exactement le geste de la 3.5.3, appliqué à l'état
   qui manquait. Le pane employeur rend déjà son propre en-tête (photo d'Aria,
   nom, « en ligne ») : le pill du pop-up en est le doublon, et il est invisible
   sur fond clair. On le masque, comme en `chatting`. */
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pill,
.cfaoi-pop-root[data-state="pro-thanks"] .cfaoi-pop-pill { display: none; }

/* LES SURFACES ÉCRITES EN DUR. Des blancs translucides sur fond sombre : sur
   fond clair ils ne dessinent plus rien. On leur rend un fond et une bordure
   visibles, repris du parcours candidat (bulle IA : blanc + bordure grise). */
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-field textarea,
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-field input[type="text"],
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-field input[type="email"],
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-field input[type="tel"],
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-chat-text {
    background: var(--pop-surface, #ffffff);
    border: 1px solid var(--pop-field-border, #e2e8f0);
    color: var(--pop-text, #0f172a);
}
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-chat-text:hover,
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-field textarea:hover {
    background: var(--pop-surface, #ffffff);
    border-color: #cbd5e1;
}
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-chat-text:focus,
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-field textarea:focus {
    background: var(--pop-surface, #ffffff);
    border-color: var(--pop-primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

/* La bulle d'Aria : blanc sur bordure grise, comme `.cfaoi-message-ai` du
   parcours candidat. Le fond cyan translucide d'origine virait au gris sale. */
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-bubble-msg {
    background: var(--pop-surface, #ffffff);
    border: 1px solid var(--pop-field-border, #e2e8f0);
}
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-chat-header,
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-intro,
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-recap,
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-availability {
    background: var(--pop-surface, #ffffff);
    border: 1px solid var(--pop-field-border, #e2e8f0);
}
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-consent,
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-recap-item,
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-recap-consent,
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-availability-item {
    background: var(--pop-surface, #ffffff);
    border: 1px solid var(--pop-field-border, #e2e8f0);
}
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-availability-level {
    background: var(--pop-surface-hover, #f1f5f9);
    border: 1px solid var(--pop-field-border, #e2e8f0);
}
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-progress { background: var(--pop-field-border, #e2e8f0); }

/* Les chips de choix portent `!important` à l'origine : on le reprend, sinon
   rien ne mord. Fond blanc, texte foncé, bordure grise — et l'état sélectionné
   garde le dégradé, qui reste lisible en blanc dessus. */
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-chat-choice {
    background: var(--pop-surface, #ffffff) !important;
    border: 1px solid var(--pop-field-border, #e2e8f0) !important;
    color: var(--pop-text, #0f172a) !important;
}
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-chat-choice:hover {
    background: #eff6ff !important;
    border-color: var(--pop-primary, #2563eb) !important;
    color: var(--pop-text, #0f172a) !important;
}

/* L'avatar d'Aria et son halo : le radial cyan sur fond clair faisait une tache
   grise. On le rend transparent, la photo se suffit. */
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-avatar,
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-chat-avatar {
    background: var(--pop-surface, #ffffff);
    border: 1px solid var(--pop-field-border, #e2e8f0);
    box-shadow: none;
}

/* 3.13.28 — LA FENÊTRE EMPLOYEUR ÉPOUSE CELLE DU JEUNE.
   Demande client : « la fenêtre doit être de la même largeur que celle
   présente dans le parcours "je cherche un apprentissage", les couleurs
   doivent également être les mêmes ».
   Écart mesuré avant ce lot : le Q&A employeur héritait des 460 px de la card
   d'accueil sur fond de verre dépoli (--pop-bg-glass + flou), pendant que le
   chat du jeune (state="chatting") s'affiche à 540 px sur #f0f4f8. Deux
   parcours du même produit, deux fenêtres.
   On aligne la LARGEUR et les COULEURS ; on ne touche PAS à la hauteur, qui
   est bornée ici depuis la 2.7.8 avec un pied de récap collant et une zone de
   saisie qui défile — la passer en hauteur de contenu casserait les deux.
   ⚠️ Le fond est repris À LA MAIN et non par une variable : #f0f4f8 est écrit
   en dur dans la règle du chat (state="chatting"). Le jour où l'un des deux
   change, l'autre doit suivre — il n'existe pas de token partagé pour lui. */
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-card,
.cfaoi-pop-root[data-state="pro-thanks"] .cfaoi-pop-card {
    width: min(540px, calc(100vw - 24px));
    /* 3.13.37 — passe par un jeton : la barre de validation collante doit
       porter EXACTEMENT ce fond, et deux littéraux dériveraient. */
    background: var(--pop-pane-bg, #f0f4f8);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Card bornée au viewport en parcours employeur, en colonne flex. */
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-card {
    height: min(860px, calc(100vh - 40px));
    height: min(860px, calc(100dvh - 40px)); /* 2.9.1 — iOS : hauteur dynamique (barre d'adresse) */
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px); /* 2.9.1 — iOS : hauteur dynamique (barre d'adresse) */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* 2.7.8 — Transition douce de largeur : la card peut s'élargir au
       moment du récap (voir [data-pro-view="recap"]) sans saut brusque.
       On conserve opacity/transform pour l'animation d'apparition. */
    transition:
        width 0.5s cubic-bezier(0.34, 1.4, 0.64, 1),
        opacity 0.5s ease,
        transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* 2.7.8 — Écran final employeur ÉLARGI.
   Le récapitulatif (réponses + disponibilités apprentis + consentement +
   envoi) s'affiche dans une fenêtre nettement plus large que le Q&A — au
   moins aussi confortable que l'écran final de la branche candidat
   « Je recherche un apprentissage » (540px) — afin que les résultats
   (cartes de disponibilités, formations) soient bien lisibles. Déclenché
   par le marqueur data-pro-view="recap" posé par proShowRecap(). */
.cfaoi-pop-root[data-state="pro"][data-pro-view="recap"] .cfaoi-pop-card {
    /* 3.13.28 — ramené de 620 à 540 px : le client demande la MÊME largeur que
       le parcours candidat, et 540 est cette largeur. La 2.7.8 avait élargi cet
       écran « au moins autant que les 540 px de la branche candidat » — donc en
       prenant déjà 540 pour référence. On s'y tient, sans le dépassement.
       ⚠️ Ce qu'on y perd, et il faut le savoir : les cartes de disponibilités
       apprentis et les libellés de formation du récap disposent de 80 px de
       moins. Si elles se serrent trop à la recette, c'est ici qu'on remonte. */
    width: min(540px, calc(100vw - 24px));
}
/* Le pane employeur occupe la hauteur restante et confine son scroll. */
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
/* En parcours employeur, le journal peut rétrécir pour laisser la place
   à la zone d'input / récap (qui, elle, scrolle). */
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-chat-log {
    flex: 0 1 auto;
    min-height: 0;
}
/* Zone d'input / récap : c'est ELLE qui scrolle désormais. */
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-chat-input-host {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain; /* évite que le scroll « fuie » sur la page */
    padding-bottom: 8px;
}
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-chat-input-host::-webkit-scrollbar { width: 6px; }
.cfaoi-pop-root[data-state="pro"] .cfaoi-pop-pro-chat-input-host::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.25);
    border-radius: 3px;
}
/* 2.7.9 — Au récap, on MASQUE le journal de conversation. Il est redondant
   (le récapitulatif liste déjà toutes les réponses, avec boutons d'édition)
   et son chevauchement avec le formulaire provoquait un débordement visuel
   (« Aria déborde sur le formulaire »). Le masquer supprime tout
   chevauchement ET libère toute la hauteur pour le récapitulatif. */
.cfaoi-pop-pro.is-recap .cfaoi-pop-pro-chat-log {
    display: none;
}
/* 2.7.9 — Pied de récap (consentement + bouton d'envoi) : NON COLLANT.
   À la demande : il ne doit plus suivre le visiteur. Il se place simplement
   EN BAS du formulaire (après les disponibilités) et défile avec le reste du
   récapitulatif. Un filet en haut le sépare proprement du bloc précédent. */
.cfaoi-pop-pro-recap-footer {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 18px -12px -14px;       /* compense le padding du panneau récap */
    padding: 18px 14px 16px;
    border-top: 1px solid var(--pop-border);
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}
/* Sur très petits écrans, on garde tout dans le viewport. */
@media (max-width: 480px) {
    .cfaoi-pop-root[data-state="pro"] .cfaoi-pop-card {
        width: calc(100vw - 16px) !important;
        height: calc(100vh - 16px) !important;
        height: calc(100dvh - 16px) !important; /* 2.9.1 — iOS : hauteur dynamique (barre d'adresse) */
        max-height: calc(100vh - 16px) !important;
        max-height: calc(100dvh - 16px) !important; /* 2.9.1 — iOS : hauteur dynamique (barre d'adresse) */
        padding: 16px 14px 14px;
    }
}
.cfaoi-pop-pro-recap-hint {
    margin: 0;
    font-size: 11.5px;
    color: var(--pop-text-muted);
    line-height: 1.5;
}
.cfaoi-pop-pro-recap-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cfaoi-pop-pro-recap-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "label  edit"
        "value  edit";
    gap: 2px 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 9px;
}
.cfaoi-pop-pro-recap-label {
    grid-area: label;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--pop-text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.cfaoi-pop-pro-recap-value {
    grid-area: value;
    font-size: 13px;
    color: var(--pop-text);
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.cfaoi-pop-pro-recap-edit {
    grid-area: edit;
    align-self: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border: 1px solid var(--pop-border);
    border-radius: 8px;
    color: var(--pop-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}
.cfaoi-pop-pro-recap-edit:hover {
    color: var(--pop-primary);
    border-color: var(--pop-primary);
    background: rgba(0, 212, 255, 0.08);
}

.cfaoi-pop-pro-recap-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--pop-text-muted);
    cursor: pointer;
}
.cfaoi-pop-pro-recap-consent:hover {
    border-color: rgba(0, 212, 255, 0.18);
    background: rgba(0, 212, 255, 0.03);
}
.cfaoi-pop-pro-recap-consent input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 1px;
    width: 14px;
    height: 14px;
    accent-color: var(--pop-primary);
    cursor: pointer;
}

/* 2.7.9 — CTA d'envoi RENFORCÉ : plus grand, plus gras, halo plus marqué et
   légère pulsation pour le rendre nettement plus visible en bas du récap. */
.cfaoi-pop-pro-recap-send {
    width: 100%;
    padding: 17px 24px;
    background: linear-gradient(135deg, var(--pop-primary), var(--pop-accent));
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.015em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow:
        0 10px 30px -8px rgba(0, 212, 255, 0.75),
        0 0 0 1px rgba(255, 255, 255, 0.12) inset;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    animation: cfaoi-pop-pro-send-pulse 2.6s ease-in-out infinite;
}
.cfaoi-pop-pro-recap-send:hover:not([disabled]) {
    transform: translateY(-2px);
    box-shadow:
        0 16px 40px -8px rgba(0, 212, 255, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.22) inset;
    animation-play-state: paused;
}
.cfaoi-pop-pro-recap-send:active:not([disabled]) { transform: translateY(0); }
.cfaoi-pop-pro-recap-send[disabled] { opacity: 0.7; cursor: not-allowed; animation: none; }
.cfaoi-pop-pro-recap-send-label { font-size: 16px; font-weight: 700; }
@keyframes cfaoi-pop-pro-send-pulse {
    0%, 100% { box-shadow: 0 10px 30px -8px rgba(0, 212, 255, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.12) inset; }
    50%      { box-shadow: 0 12px 36px -6px rgba(0, 212, 255, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.18) inset; }
}
@media (prefers-reduced-motion: reduce) {
    .cfaoi-pop-pro-recap-send { animation: none; }
}
.cfaoi-pop-pro-recap-send-arrow { transition: transform 0.25s ease; }
.cfaoi-pop-pro-recap-send:hover:not([disabled]) .cfaoi-pop-pro-recap-send-arrow {
    transform: translateX(3px);
}
.cfaoi-pop-pro-recap-send-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: cfaoi-pop-spin 0.7s linear infinite;
}
.cfaoi-pop-pro-recap-send.is-loading .cfaoi-pop-pro-recap-send-arrow   { display: none; }
.cfaoi-pop-pro-recap-send.is-loading .cfaoi-pop-pro-recap-send-spinner { display: inline-block; }

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║   1.1.0 — Écran Pro-Thanks (remerciement après envoi)                ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

.cfaoi-pop-pro-thanks {
    padding: 12px 8px 4px;
    gap: 14px;
    align-items: center;
}
.cfaoi-pop-pro-thanks-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #34d399;
    background:
        radial-gradient(circle at center, rgba(52, 211, 153, 0.22) 0%, transparent 70%),
        rgba(52, 211, 153, 0.06);
    border: 1px solid rgba(52, 211, 153, 0.3);
    box-shadow: 0 0 36px -8px rgba(52, 211, 153, 0.5);
    animation: cfaoi-pop-thanks-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cfaoi-pop-thanks-pop {
    from { opacity: 0; transform: scale(0.6); }
    to   { opacity: 1; transform: scale(1);   }
}
.cfaoi-pop-pro-thanks-title {
    margin: 4px 0 2px;
    font-size: 22px;
    font-weight: 700;
    color: var(--pop-text);
    letter-spacing: -0.01em;
}
.cfaoi-pop-pro-thanks-msg {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--pop-text-muted);
    max-width: 340px;
    margin: 0;
}

.cfaoi-pop-pro-thanks-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    width: 100%;
    margin-top: 8px;
}
.cfaoi-pop-pro-thanks-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--pop-primary), var(--pop-accent));
    color: #ffffff;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 8px 24px -8px rgba(0, 212, 255, 0.55);
    pointer-events: auto;
}
.cfaoi-pop-pro-thanks-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px -8px rgba(0, 212, 255, 0.7);
    color: #ffffff;
}
.cfaoi-pop-pro-thanks-cta svg { transition: transform 0.25s ease; }
.cfaoi-pop-pro-thanks-cta:hover svg { transform: translateX(3px); }

.cfaoi-pop-pro-thanks-close {
    background: transparent;
    border: none;
    color: var(--pop-text-dim);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
    font-family: inherit;
}
.cfaoi-pop-pro-thanks-close:hover {
    color: var(--pop-text-muted);
}

/* ─── Mobile : ajustements de taille pour les nouveaux écrans ───────── */
@media (max-width: 540px) {
    .cfaoi-pop-choice-icon { width: 60px; height: 60px; }
    .cfaoi-pop-choice-icon svg { width: 36px; height: 36px; }
    .cfaoi-pop-choice-title { font-size: 17px; }
    .cfaoi-pop-choice-card { padding: 12px; gap: 11px; }
    .cfaoi-pop-choice-card-icon { width: 38px; height: 38px; }
    .cfaoi-pop-choice-card-icon svg { width: 22px; height: 22px; }
    .cfaoi-pop-choice-card-title { font-size: 13.5px; }
    .cfaoi-pop-choice-card-desc { font-size: 11.5px; }

    .cfaoi-pop-pro-thanks-title { font-size: 19px; }
    .cfaoi-pop-pro-thanks-icon { width: 72px; height: 72px; }
    .cfaoi-pop-pro-thanks-icon svg { width: 44px; height: 44px; }
}

/* ─── Reduced motion : neutraliser les animations spectaculaires ─────── */
@media (prefers-reduced-motion: reduce) {
    .cfaoi-pop-choice-icon,
    .cfaoi-pop-choice-icon--photo,
    .cfaoi-pop-pro-thanks-icon { animation: none; }
    .cfaoi-pop-avatar3d-fallback-img { animation: none; }
    .cfaoi-pop-choice-card,
    .cfaoi-pop-choice-card-arrow,
    .cfaoi-pop-pro-submit-arrow,
    .cfaoi-pop-pro-thanks-cta svg { transition: none !important; transform: none !important; }
}

/* ──────────────────────────────────────────────────────────────────────
   1.1.4 — Variantes "photo" : remplacement des anciennes icônes robot
   par le portrait Aria (image cohérente avec l'avatar 3D).
   Toutes les variantes utilisent <picture> avec <source webp> + <img png>.
   On force display:flex/grid sur les conteneurs pour garantir le centrage.
   ────────────────────────────────────────────────────────────────────── */

/* Greeting : avatar central (44px circle) ─────────────────────────────── */
.cfaoi-pop-core-icon--photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow:
        0 0 0 2px rgba(0, 212, 255, 0.7),
        0 0 24px rgba(0, 212, 255, 0.55);
    filter: none;                            /* annule le drop-shadow blanc du SVG */
}
.cfaoi-pop-core-icon--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;          /* 1.1.6 — centrage strict */
    display: block;
}

/* Pro intro : petit avatar à gauche du message d'intro ────────────────── */
.cfaoi-pop-pro-avatar--photo {
    overflow: hidden;
    padding: 0 !important;                   /* annule l'ancien padding éventuel */
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;                      /* masque toute icône hérité */
}
.cfaoi-pop-pro-avatar--photo > picture,
.cfaoi-pop-pro-avatar--photo > picture > img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}
.cfaoi-pop-pro-avatar--photo img {
    object-fit: cover;
    object-position: center center;          /* 1.1.6 — centrage strict */
}

/* Bulle minimisée (en bas à droite) ───────────────────────────────────── */
.cfaoi-pop-bubble--photo {
    overflow: hidden;
    padding: 0;
}
.cfaoi-pop-bubble-img-wrap,
.cfaoi-pop-bubble-img-wrap > img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}
.cfaoi-pop-bubble-img-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;                              /* sur le pulse, sous le focus ring */
}
.cfaoi-pop-bubble-img-wrap > img {
    object-fit: cover;
    object-position: center center;          /* 1.1.6 — centrage strict */
}

/* Launcher permanent (bouton "Parler à Aria") ─────────────────────────── */
.cfaoi-pop-launcher--photo .cfaoi-pop-launcher-icon {
    overflow: hidden;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cfaoi-pop-launcher--photo .cfaoi-pop-launcher-icon > picture,
.cfaoi-pop-launcher--photo .cfaoi-pop-launcher-icon > picture > img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}
.cfaoi-pop-launcher--photo .cfaoi-pop-launcher-icon img {
    object-fit: cover;
    object-position: center center;          /* 1.1.6 — centrage strict */
}
/* 1.1.6 — Le pulse du launcher était positionné à left:21px (legacy
   alignement du SVG robot 24×24). En 2.5.6 on centre exactement
   sur l'icône photo : padding-left du launcher (8px) + moitié
   de l'icône (36/2 = 18px) = 26px. */
.cfaoi-pop-launcher--photo .cfaoi-pop-launcher-pulse {
    left: calc(8px + 18px);
}

/* 1.1.6 — Variante "tile" : choice-icon photo cadrée strictement
   (object-position center center). On garde la pastille ronde mais
   on ne décale plus la photo verticalement. */
.cfaoi-pop-choice-icon--photo .cfaoi-pop-choice-icon-img {
    object-position: center center;
}

/* Reduced motion : pas d'animation supplémentaire pour les variantes
   photo (déjà couvert plus haut pour les éléments concernés). */

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║   2.4.10 — UX LISIBILITÉ POPUP — refonte de la refonte               ║
   ║                                                                      ║
   ║   • Cadre cyan double-anneau sur l'avatar core → SUPPRIMÉ.           ║
   ║   • Carte primaire choice : on retire le double-dégradé cyan/violet  ║
   ║     qui jurait, on passe sur une teinte cyan tenue.                  ║
   ║   • Violet (--pop-accent) toujours respecté (option admin) mais on   ║
   ║     ne l'empile plus avec le cyan partout — un seul accent visible.  ║
   ║   • État chatting : la card laisse passer le chat tel quel (fond     ║
   ║     gris-bleu du wrapper, surfaces blanches).                        ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* ─── Backdrop plus marqué pour bien isoler la card ──────────────────── */
.cfaoi-pop-backdrop {
    background: radial-gradient(circle at 50% 35%, rgba(15, 23, 42, 0.58) 0%, rgba(2, 6, 23, 0.88) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* ─── Card : bordure sobre, ombre profonde, palette tenue ────────────── */
.cfaoi-pop-card {
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 30px 80px -20px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

/* ─── État chatting : card transparente, le chat occupe ──────────────── */
.cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-card {
    padding: 0;
}
.cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-chat .cfaoi-wrapper {
    /* Hérite du fond gris-bleu doux défini dans cfaoi-public.css */
    background: #f3f4f6;
}

/* ─── Header card : pill et boutons icon sobres ──────────────────────── */
.cfaoi-pop-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 13px;
    border-radius: 100px;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--pop-text);
    text-transform: uppercase;
    font-weight: 600;
}
.cfaoi-pop-pill-dot {
    background: #34d399;
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25);
}
.cfaoi-pop-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.cfaoi-pop-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

/* ─── Écran choice : cartes claires, palette TENUE (pas violet+cyan) ── */
.cfaoi-pop-choice-title {
    font-size: 22px;
    color: var(--pop-text);
    letter-spacing: -0.02em;
    line-height: 1.25;
}
.cfaoi-pop-choice-subtitle {
    color: var(--pop-text-muted);
    font-size: 14px;
    line-height: 1.5;
}
.cfaoi-pop-choice-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--pop-text);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-align: left;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
}
.cfaoi-pop-choice-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

/* Carte PRIMAIRE : un seul accent (cyan tenu), pas de mix violet/cyan.
   On laisse l'admin choisir sa couleur via --pop-primary. */
.cfaoi-pop-choice-card-primary {
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.35);
    box-shadow: 0 6px 22px -10px rgba(0, 212, 255, 0.4);
}
.cfaoi-pop-choice-card-primary:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.55);
    box-shadow: 0 10px 28px -10px rgba(0, 212, 255, 0.55);
}
.cfaoi-pop-choice-card-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: var(--pop-text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.cfaoi-pop-choice-card-primary .cfaoi-pop-choice-card-icon {
    background: var(--pop-primary);
    color: #0f172a;
    border-color: transparent;
}
.cfaoi-pop-choice-card-content {
    flex: 1 1 0%;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: visible;
}
.cfaoi-pop-choice-card-title {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-weight: 700;
    font-size: 15px;
    color: var(--pop-text);
    letter-spacing: -0.005em;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}
.cfaoi-pop-choice-card-desc {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-size: 12.5px;
    color: var(--pop-text-muted);
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}
.cfaoi-pop-choice-card-arrow {
    flex: 0 0 auto;
    color: var(--pop-text-dim);
    transition: transform 0.18s ease, color 0.18s ease;
}
.cfaoi-pop-choice-card:hover .cfaoi-pop-choice-card-arrow {
    transform: translateX(3px);
    color: var(--pop-primary);
}
.cfaoi-pop-choice-skip {
    margin-top: 14px;
    background: transparent;
    border: none;
    color: var(--pop-text-dim);
    font-size: 12.5px;
    cursor: pointer;
    padding: 8px;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-family: inherit;
    transition: color 0.18s ease;
}
.cfaoi-pop-choice-skip:hover { color: var(--pop-text-muted); }

/* ─── Core hologramme : RETRAIT DU CADRE CYAN autour de l'avatar ─────── */
/* En 2.4.9, l'avatar header chat avait reçu un double-anneau cyan. La
   même logique avait fuité côté .cfaoi-pop-core (icône Aria du greeting).
   On revient à un fond/anneau plus discret. */
.cfaoi-pop-core {
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}
.cfaoi-pop-core-glow {
    /* Glow plus discret, plus marine que cyan */
    background: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.22) 0%, transparent 70%);
    opacity: 0.65;
}

/* ─── Avatar latéral (panneau aside) : pas de halo coloré au repos ──── */
.cfaoi-pop-avatar-side-frame {
    box-shadow: none;
}
/* Halo discret uniquement quand Aria parle (cohérence chat is-speaking) */
.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-avatar-side-frame {
    box-shadow: 0 0 24px -4px var(--pop-glow);
}

/* ─── Greeting : CTA pill propre ─────────────────────────────────────── */
.cfaoi-pop-cta {
    padding: 14px 22px;
    border-radius: 100px;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.005em;
}
.cfaoi-pop-skip {
    padding: 8px 12px;
    font-size: 12.5px;
    color: var(--pop-text-dim);
}

/* ─── Bulle minimisée et launcher : shadow sobres ────────────────────── */
.cfaoi-pop-bubble {
    box-shadow:
        0 10px 28px -8px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}
.cfaoi-pop-bubble:hover {
    box-shadow:
        0 14px 36px -8px rgba(0, 0, 0, 0.6),
        0 0 0 2px rgba(0, 212, 255, 0.35);
}
.cfaoi-pop-launcher {
    box-shadow:
        0 8px 24px -10px rgba(15, 23, 42, 0.22),
        0 2px 6px -2px rgba(15, 23, 42, 0.08);
}
.cfaoi-pop-launcher:hover {
    box-shadow:
        0 12px 32px -10px rgba(15, 23, 42, 0.28),
        0 3px 8px -2px rgba(37, 99, 235, 0.18);
}
.cfaoi-pop-launcher-label {
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ─── Mobile (≤540px) ────────────────────────────────────────────────── */
@media (max-width: 540px) {
    .cfaoi-pop-card {
        width: calc(100vw - 16px);
        padding: 18px 18px 20px;
    }
    .cfaoi-pop-root[data-state="chatting"] .cfaoi-pop-card { padding: 0; }
    .cfaoi-pop-choice-title { font-size: 19px; }
    .cfaoi-pop-choice-card { padding: 13px 14px; gap: 12px; }
    .cfaoi-pop-choice-card-icon { width: 40px; height: 40px; flex-basis: 40px; }
    .cfaoi-pop-choice-card-title { font-size: 14.5px; }
    .cfaoi-pop-choice-card-desc { font-size: 12px; }
    .cfaoi-pop-bubble { width: 56px; height: 56px; }
    .cfaoi-pop-launcher {
        bottom: 16px;
        left: 16px;
        right: auto;
        max-width: calc(100vw - 32px);
        padding: 7px 16px 7px 7px;
        min-height: 48px;
        gap: 9px;
    }
    .cfaoi-pop-launcher-label { font-size: 13.5px; }
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║   2.4.11 — REFONTE PREMIUM ASIDE AVATAR                              ║
   ║                                                                      ║
   ║   Retour utilisateur (capture) : un cadre cyan rectangulaire reste   ║
   ║   visible autour de l'avatar 3D malgré la 2.4.10. Diagnostic :       ║
   ║   ce n'est pas un box-shadow mais le `filter: drop-shadow(...)`      ║
   ║   de l'animation `@keyframes cfaoi-pop-avatar-breathe` qui pulse     ║
   ║   un halo cyan autour des pixels rendus du canvas Three.js.          ║
   ║                                                                      ║
   ║   Refonte :                                                           ║
   ║   • drop-shadow rectangulaire → SUPPRIMÉ                              ║
   ║   • Flash violet du state `thinking` → SUPPRIMÉ                       ║
   ║   • Ombre au sol elliptique (effet "podium") sous l'avatar           ║
   ║   • Halo ambient circulaire UNIQUEMENT quand Aria parle              ║
   ║   • Badge identité épuré : glass panel, typo hiérarchisée            ║
   ║   • Aside positionné plus haut, plus de respiration                   ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* ─── KILL le halo rectangulaire (drop-shadow breathe) ─────────────────── */
.cfaoi-pop-avatar-side-frame {
    animation: none !important;
    filter: none !important;
    box-shadow: none !important;
}
.cfaoi-pop-avatar-side[data-aria-state="thinking"] .cfaoi-pop-avatar-side-frame {
    animation: none !important;
    filter: none !important;
}
.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-avatar-side-frame {
    animation: none !important;
    filter: none !important;
    box-shadow: none !important;
}

/* ─── Stage : ombre au sol elliptique (effet podium) ───────────────────── */
.cfaoi-pop-avatar-side-stage {
    position: relative;
    overflow: visible;
}
.cfaoi-pop-avatar-side-stage::after {
    /* Ombre au sol – elliptique, sobre, ne touche pas l'avatar */
    content: '';
    position: absolute;
    bottom: 6%;
    left: 50%;
    width: 65%;
    height: 22px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    opacity: 0.85;
}

/* ─── Halo ambient (uniquement quand Aria parle) ───────────────────────── */
.cfaoi-pop-avatar-side-stage::before {
    /* Halo circulaire derrière l'avatar – visible que speaking */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 75%;
    height: 75%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at center, rgba(0, 212, 255, 0.18) 0%, transparent 65%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-avatar-side-stage::before {
    opacity: 1;
    animation: cfaoiAriaAmbient 2.2s ease-in-out infinite;
}
@keyframes cfaoiAriaAmbient {
    0%, 100% { opacity: 0.75; transform: translate(-50%, -50%) scale(1);    }
    50%      { opacity: 1.00; transform: translate(-50%, -50%) scale(1.05); }
}

/* Le canvas 3D reste devant les effets ambient */
.cfaoi-pop-avatar3d-canvas,
.cfaoi-pop-avatar3d-fallback {
    z-index: 2;
}
.cfaoi-pop-avatar-side-loader {
    z-index: 3;
}

/* ─── Badge identité : glass panel épuré sous l'avatar ─────────────────── */
.cfaoi-pop-avatar-side-label {
    margin-top: 8px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    text-align: left;
}
.cfaoi-pop-avatar-side-eyebrow {
    font-size: 9.5px;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.48);
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1;
}
.cfaoi-pop-avatar-side-name {
    font-size: 24px;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    text-shadow: none;
    margin: 2px 0 0;
}
.cfaoi-pop-avatar-side-status {
    margin-top: 2px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.62);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 500;
}
.cfaoi-pop-avatar-side-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
    position: relative;
}
.cfaoi-pop-avatar-side-dot::after {
    /* Pulse subtil sur le dot quand Aria est en ligne */
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid rgba(16, 185, 129, 0.4);
    animation: cfaoiSideDotPulse 2.2s ease-out infinite;
}
@keyframes cfaoiSideDotPulse {
    0%   { transform: scale(0.8); opacity: 0.9; }
    100% { transform: scale(2.0); opacity: 0;   }
}

/* Quand Aria parle, le dot devient cyan pour signaler "talk" */
.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-avatar-side-dot {
    background: var(--pop-primary, #00d4ff);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.22);
}
.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-avatar-side-dot::after {
    border-color: rgba(0, 212, 255, 0.45);
}
.cfaoi-pop-root[data-speaking="true"] .cfaoi-pop-avatar-side-status-text::after {
    /* On surcharge l'éventuel suffixe "…" */
    content: " — j'écris…";
    color: rgba(0, 212, 255, 0.85);
    margin-left: 2px;
    font-style: italic;
}

/* ─── Aside : un peu plus de respiration sur le côté ───────────────────── */
.cfaoi-pop-avatar-side {
    /* Stage = 280×420 + label en dessous. On centre verticalement. */
    top: 50%;
    transform: translateY(-50%) translateX(50px);
}
.cfaoi-pop-root[data-state="open"]       .cfaoi-pop-avatar-side,
.cfaoi-pop-root[data-state="choice"]     .cfaoi-pop-avatar-side,
.cfaoi-pop-root[data-state="pro"]        .cfaoi-pop-avatar-side,
.cfaoi-pop-root[data-state="pro-thanks"] .cfaoi-pop-avatar-side,
.cfaoi-pop-root[data-state="chatting"]   .cfaoi-pop-avatar-side {
    transform: translateY(-50%) translateX(0);
}

/* ─── Mobile : aside masqué, l'avatar 3D n'a pas la place ──────────────── */
@media (max-width: 1024px) {
    .cfaoi-pop-avatar-side {
        display: none !important;
    }
}

/* ════════════════════════════════════════════════════════════════════
   2.7.0 — Bloc « apprentis disponibles » (écran final parcours employeur)
   S'intègre au design existant du récap : carte vitrée sombre, accents
   --pop-primary / --pop-accent, coins arrondis. Strictement additif.
   ════════════════════════════════════════════════════════════════════ */

/* 3.13.38 — LA PILE DES DISPONIBILITÉS, UN BLOC PAR BESOIN.
 *
 * Signalé en recette : deux apprentis demandés dans deux métiers, un seul bloc
 * affiché. Le conteneur du récapitulatif ÉTAIT la carte ; il devient une pile,
 * et les cartes sont ses enfants.
 *
 * ⚠️ AUCUNE COULEUR N'EST ÉCRITE ICI, et c'est délibéré. Le contrôle du calque
 * clair (`popup-qa.php`, section M) ne scrute que `cfaoi-theme-shield.css` :
 * une couleur en dur y passerait sans rougir et ressortirait illisible sur le
 * fond clair de l'écran employeur — le défaut exact de la 3.13.31. */
.cfaoi-pop-pro-availability-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* La phrase qui annonce un manque de niveau. Elle PRÉCÈDE le nombre : c'est une
   correction de ce que le badge affirme, pas une note de bas de page. */
.cfaoi-pop-pro-availability-notice {
    margin: 0 0 8px;
    font-weight: 600;
    line-height: 1.45;
}
/* Le message « pas de disponibilité affichée pour ce métier » — écrit côté
   serveur depuis la 2.7.0, et sans destinataire jusqu'ici. */
.cfaoi-pop-pro-availability-empty {
    margin: 6px 0 0;
    line-height: 1.45;
}

.cfaoi-pop-pro-availability {
    margin: 4px 0 2px;
    padding: 14px 14px 12px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(0, 212, 255, 0.18);
    border-radius: 12px;
    animation: cfaoiAvailFadeIn 0.35s ease both;
}
@keyframes cfaoiAvailFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cfaoi-pop-pro-availability.is-loading {
    border-style: dashed;
}
.cfaoi-pop-pro-availability-loading {
    font-size: 12px;
    color: var(--pop-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.cfaoi-pop-pro-availability-loading::before {
    content: "";
    width: 13px;
    height: 13px;
    border: 2px solid var(--pop-border);
    border-top-color: var(--pop-primary);
    border-radius: 50%;
    animation: cfaoiAvailSpin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes cfaoiAvailSpin { to { transform: rotate(360deg); } }

.cfaoi-pop-pro-availability-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.cfaoi-pop-pro-availability-badge {
    flex-shrink: 0;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--pop-primary), var(--pop-accent));
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px -6px var(--pop-glow);
}
.cfaoi-pop-pro-availability-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--pop-text);
    line-height: 1.3;
}
.cfaoi-pop-pro-availability-intro {
    margin: 0 0 9px;
    font-size: 12px;
    color: var(--pop-text-muted);
    line-height: 1.5;
}
.cfaoi-pop-pro-availability-list {
    list-style: none;
    margin: 0 0 9px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cfaoi-pop-pro-availability-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}
.cfaoi-pop-pro-availability-count {
    flex-shrink: 0;
    min-width: 26px;
    text-align: center;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--pop-primary);
}
.cfaoi-pop-pro-availability-label {
    font-size: 12.5px;
    color: var(--pop-text);
    line-height: 1.35;
}
.cfaoi-pop-pro-availability-level {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--pop-text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    vertical-align: middle;
}
.cfaoi-pop-pro-availability-reassure {
    margin: 0 0 6px;
    font-size: 11.5px;
    color: var(--pop-text-dim);
    line-height: 1.5;
}
.cfaoi-pop-pro-availability-note {
    margin: 0;
    font-size: 10.5px;
    color: var(--pop-text-muted);
    font-style: italic;
    opacity: 0.85;
}

/* ════════════════════════════════════════════════════════════════════
   Demande 6 (réunion CFA du 25/08/2026) — DEUX GROUPES DE NIVEAU

   « on leur demande le niveau qu'ils souhaitent, mais qu'on leur propose
   quand même tous […] parce qu'on ne sait jamais » (CORINNE).

   ⚠️ LA DEMANDE EST VIVANTE, LES RÈGLES QUI VIVAIENT ICI NE L'ÉTAIENT PLUS.
   Le rendu est bien en service — `proPaintAvailability()` dans
   `cfaoi-popup.js` peint la liste du niveau demandé, puis « Autres niveaux
   disponibles dans ce métier » et sa seconde liste. Mais il le fait avec
   `-availability-intro` + `-availability-list`, SANS jamais émettre le
   conteneur `.cfaoi-pop-pro-availability-group` : les onze règles écrites
   ici pour lui (filet d'accent, intertitre, atténuation, media query) ne
   matchaient donc plus AUCUN élément. Mesuré le 07/09/2026 : zéro émetteur
   de `-group` dans tout le dépôt, PHP et JS confondus.

   Elles sont retirées ; la décision du CFA, elle, reste écrite ici — c'est
   elle qui compte, et c'est `cfaoi-popup.js` qui l'applique.
   ════════════════════════════════════════════════════════════════════ */

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  3.3.1 (reprise 3) — Le CTA de l'intention « entreprise », enfin VISIBLE         ║
   ║          (tâche 0.8)                                                 ║
   ╚══════════════════════════════════════════════════════════════════════╝

   « Je dépose mon besoin » est le libellé d'action que le CFA valide sur la
   page « 🧭 Cadrage & wireframes » pour le parcours employeur. Il ne s'affichait
   nulle part en configuration par défaut : sur cette carte il n'était porté que
   par l'aria-label du bouton (invisible à l'œil), et le seul autre endroit qui
   le rendait en texte — la 4ᵉ porte de l'écran d'aiguillage — est conditionné à
   la présence du pop-up sur la page ou à cfaoi_employer_entry_url, vide par
   défaut. Un libellé validé que personne ne lit est exactement le référentiel
   décoratif que la tâche 0.8 supprime.

   Traité en puce discrète et non en second bouton : la carte ENTIÈRE est déjà
   le bouton (<button data-choice="pro">), un contrôle imbriqué serait invalide
   en HTML et ferait deux cibles pour une seule action.

   Palette reprise de .cfaoi-pop-pill (l. 2453) : blanc translucide sur le fond
   sombre du panneau, comme la carte qui la porte (l. 2501). On n'introduit pas
   une teinte de plus — l'écran de choix a été explicitement ramené à UN seul
   accent en 2.4.10, et l'accent cyan est réservé à la carte primaire. */
.cfaoi-pop-choice-card-cta {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    max-width: 100%;
    margin-top: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--pop-text);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}
.cfaoi-pop-choice-card:hover .cfaoi-pop-choice-card-cta {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}
@media (max-width: 480px) {
    .cfaoi-pop-choice-card-cta { font-size: 11px; padding: 2px 8px; }
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  Demande 7 (réunion CFA du 25/08/2026) — PAGE DÉDIÉE AUX EMPLOYEURS  ║
   ║  [cfa_espace_entreprise]                                             ║
   ╚══════════════════════════════════════════════════════════════════════╝

   Verbatim du CFA : « on peut faire une page avec un lien qu'on vous donne,
   que vous pouvez envoyer par mail, avec juste la partie professionnelle ».

   Le markup rendu est EXACTEMENT celui du pop-up flottant — un seul parcours
   employeur, jamais deux (CLAUDE.md §10). Ce bloc ne fait donc qu'une chose :
   défaire la géométrie de MODALE (fixée au viewport, centrée, au-dessus d'un
   fond assombri) pour que la carte coule dans la page, et masquer les
   commandes qui n'ont plus d'objet quand le parcours EST la page.

   ⚠️ AUCUNE RÈGLE EXISTANTE N'EST MODIFIÉE : tout ce qui suit est préfixé de
   `.cfaoi-pop-standalone`, la classe que CFAOI_Popup::render_employer_standalone()
   pose autour du bloc. Le pop-up flottant ne voit pas une seule de ces lignes.

   ⚠️ POURQUOI DES `!important` ICI, ALORS QUE LE PROJET LES ÉVITE : les
   surcharges d'apparence du back-office (CFAOI_Popup::print_appearance_css)
   sont écrites avec l'IDENTIFIANT `#cfaoi-popup-root` et, pour le plein écran
   mobile, avec `!important`. Elles battent donc n'importe quel sélecteur de
   classe. Sans ces marqueurs, un site ayant personnalisé son apparence
   retrouverait sur sa page « Espace entreprise » une carte de 460 px collée au
   centre de l'écran, par-dessus le contenu de la page. Ils sont limités à la
   GÉOMÉTRIE, jamais aux couleurs ni à la typographie. */

/* Conteneur posé par le code court (CFAOI_Shortcode::render_employer_shortcode).
   Seule `max-width` est en style inline — cf. le docblock de cette méthode ;
   le centrage appartient à la feuille de style, comme pour
   `.cfaoi-test-page-wrapper`. */
.cfaoi-employer-page-wrapper {
    width: 100%;
    margin: 0 auto;
}

.cfaoi-pop-standalone {
    width: 100%;
}

/* La racine n'est plus une couche plein écran : elle redevient un bloc de la
   page, sans z-index à elle et cliquable (le `pointer-events: none` d'origine
   sert au launcher flottant, qui n'existe pas ici). */
.cfaoi-pop-standalone .cfaoi-pop-root {
    position: relative !important;
    inset: auto !important;
    z-index: auto !important;
    pointer-events: auto !important;
}

/* La carte : dans le flux, pleine largeur du conteneur, hauteur naturelle.
   On neutralise `top/left/transform` (centrage sur le viewport), l'opacité et
   `pointer-events` du repos, et la transition d'apparition — un fondu
   d'entrée de modale n'a aucun sens sur le contenu principal d'une page. */
.cfaoi-pop-standalone #cfaoi-popup-root .cfaoi-pop-card {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 auto !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: none !important;
}

/* État `pro` (et son écran de remerciement) : la règle d'origine borne la
   carte au viewport (`height: min(860px, 100vh - 40px)`) et confine le
   défilement à l'intérieur. Dans une page, cela produirait la « double zone de
   défilement imbriquée » que les règles UX du projet interdisent sur mobile :
   on rend la hauteur au contenu et le défilement à la page. */
.cfaoi-pop-standalone #cfaoi-popup-root[data-state="pro"] .cfaoi-pop-card,
.cfaoi-pop-standalone #cfaoi-popup-root[data-state="pro-thanks"] .cfaoi-pop-card,
.cfaoi-pop-standalone #cfaoi-popup-root[data-state="pro"][data-pro-view="recap"] .cfaoi-pop-card {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
}
.cfaoi-pop-standalone #cfaoi-popup-root[data-state="pro"] .cfaoi-pop-pro,
.cfaoi-pop-standalone #cfaoi-popup-root[data-state="pro"] .cfaoi-pop-pro-chat-input-host {
    overflow: visible;
    min-height: 0;
}

/* Rien à réduire, rien à fermer, rien vers quoi revenir : sur une page dédiée,
   ces commandes mèneraient à un écran vide dont on ne pourrait plus sortir
   (la bulle et le launcher, qui servent à rouvrir, n'existent pas ici).
   ⚠️ CE PARAGRAPHE AFFIRMAIT que `cfaoi-popup.js` garde « en plus » close() et
   minimize() côté script, « l'une visuelle, l'autre fonctionnelle ». **C'est
   faux, et c'était mesurable en une commande** : `standalone` apparaît ZÉRO fois
   dans `cfaoi-popup.js`, et ni close() ni minimize() ne portent la moindre
   garde. La seconde protection annoncée n'existait pas ; seul le masquage
   ci-dessus tenait, et il perdait justement contre le bouclier (voir la règle
   qui suit). Deux protections annoncées, une seule écrite, et celle-là
   inopérante : c'est le §10 dans sa forme la plus coûteuse — un lecteur se
   fiait au filet qui n'existait pas.
   La protection FONCTIONNELLE existe désormais, mais elle vit dans le démarreur
   posé par `CFAOI_Popup::render_employer_standalone()`, pas dans ce fichier ni
   dans `cfaoi-popup.js`. Sa place naturelle est un attribut de balisage lu par
   `init()` : à déplacer EN UNE FOIS le jour où l'on touchera au JavaScript,
   jamais en laissant les deux.

   L'écran d'accueil vocal, l'écran de choix et le chat du jeune sont masqués
   pour la même raison : ils n'appartiennent pas à ce parcours. Le chat, en
   particulier, n'a même pas son JavaScript chargé (cf. enqueue_standalone_assets).

   L'avatar 3D latéral est masqué parce que sa position est calculée à partir
   du centre du VIEWPORT (`right: calc(50% + 230px + 28px)`) : dans une colonne
   de page, il viendrait se poser par-dessus le formulaire. Aria reste présente
   en haut du parcours, par son portrait (.cfaoi-pop-pro-chat-avatar). */
.cfaoi-pop-standalone .cfaoi-pop-backdrop,
.cfaoi-pop-standalone .cfaoi-pop-bubble,
.cfaoi-pop-standalone .cfaoi-pop-choice,
.cfaoi-pop-standalone .cfaoi-pop-greeting,
.cfaoi-pop-standalone .cfaoi-pop-chat,
.cfaoi-pop-standalone .cfaoi-pop-pro-thanks-close,
.cfaoi-pop-standalone .cfaoi-pop-avatar-side {
    display: none !important;
}

/* ⚠⚠ 3.13.89 — CES TROIS-LÀ EXIGENT L'IDENTIFIANT, ET C'EST MESURÉ.
   Ils vivaient dans la liste ci-dessus, en (0,2,0), et `cfaoi-theme-shield.css`
   les rallumait — de DEUX façons différentes, qu'il faut distinguer pour ne pas
   croire le problème réglé par une seule :

     • `.cfaoi-pop-root .cfaoi-pop-close` et `… .cfaoi-pop-minimize` sont
       (0,2,0) eux aussi, avec `!important` des deux côtés : À SPÉCIFICITÉ ÉGALE,
       C'EST L'ORDRE DE CHARGEMENT QUI TRANCHE, et le bouclier est imprimé après
       cette feuille. Les boutons − et × s'affichaient donc en haut de la page
       dédiée aux employeurs ;
     • `.cfaoi-pop-launcher` est pire : le bouclier porte AUSSI
       `#cfaoi-popup-root .cfaoi-pop-launcher`, soit (1,1,0). Celui-là gagnait
       même en réordonnant les feuilles.

   (1,2,0) bat les deux, dans les deux sens, sans dépendre de l'ordre. C'est la
   leçon de la 3.13.34 reprise à l'identique : `cfaoi-theme-shield.css` est
   l'AUTORITÉ sur les couleurs et se défend avec ses propres `!important` ; on ne
   gagne pas contre lui en ajoutant un second bloc, on gagne en écrivant un
   sélecteur qui porte l'identifiant — l'identifiant et la classe sont sur la
   MÊME div, l'ensemble ciblé est donc identique, seul le poids change.

   ⚠️ Le calque de masquage reste la SEULE description de ce qui disparaît en
   page dédiée : on déplace trois sélecteurs, on n'en ajoute pas une seconde
   liste ailleurs (ce serait V8, et le docbloc de ce calque l'interdit). */
.cfaoi-pop-standalone #cfaoi-popup-root .cfaoi-pop-launcher,
.cfaoi-pop-standalone #cfaoi-popup-root .cfaoi-pop-minimize,
.cfaoi-pop-standalone #cfaoi-popup-root .cfaoi-pop-close {
    display: none !important;
}

/* La barre d'en-tête ne porte plus que l'identité d'Aria : on retire son
   alignement « pilule à gauche / boutons à droite », devenu sans objet. */
.cfaoi-pop-standalone .cfaoi-pop-header {
    justify-content: flex-start;
}

/* Mobile-first : sous 480 px, la règle de plein écran des surcharges
   d'apparence force `width: calc(100vw - 16px)` et une hauteur bornée au
   viewport, avec `!important`. On la reprend ici pour rester dans la colonne
   de la page — la marge latérale appartient au thème, pas à nous. */
@media (max-width: 480px) {
    .cfaoi-pop-standalone #cfaoi-popup-root .cfaoi-pop-card {
        width: 100% !important;
        max-height: none !important;
        padding: 18px 16px 20px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   ⭐ 4.0.10 — L'ÉCRAN D'ACCUEIL, ET LA PLACE QUE LA PAGE DÉDIÉE OCCUPE
   ═══════════════════════════════════════════════════════════════════════

   SIGNALÉ EN RECETTE sur /espace-professionnel/, trois captures à l'appui :
   « on a l'impression en arrivant qu'on ne peut rien faire » et « au niveau du
   format d'affichage, dès les premières secondes, ça ne va pas non plus ; il
   faut que cela prenne un peu plus de place sur la page ».

   LES DEUX REMARQUES ONT LA MÊME CAUSE, ET ELLE EST DANS CE CALQUE. Il DÉFAIT
   la géométrie de modale — `height: auto`, `max-height: none` — sans rien
   mettre à la place. La carte prenait donc exactement la hauteur de son
   contenu : à l'arrivée, un entête et une bulle d'introduction, soit ~330 px
   perdus au milieu d'une page vide, puis un saut brutal quand la première
   question s'ajoutait. Et pendant ce temps il n'y avait rien à cliquer, le
   démarreur entrant SEUL dans la conversation — 900 ms d'attente sans voix,
   la durée entière de l'intro parlée avec elle (plus de quinze secondes).

   DEUX GESTES, DONC : un écran d'accueil qui rend l'entrée au visiteur, et une
   hauteur minimale qui donne au parcours la place d'une page.

   ⚠️ TOUT CE QUI SUIT EST PRÉFIXÉ DE `.cfaoi-pop-standalone`. Le pop-up
   flottant ne voit pas une seule de ces lignes — c'est la règle du calque
   ci-dessus, et ce lot ne la desserre pas d'un cran.

   ⚠️ POURQUOI DES `!important` SUR DES COULEURS ICI, ALORS QUE LE CALQUE
   CI-DESSUS SE LES INTERDIT HORS GÉOMÉTRIE. L'écran d'accueil vit À CÔTÉ de
   `#cfaoi-popup-root`, pas dedans : `cfaoi-theme-shield.css`, qui est ancré sur
   la racine, ne le couvre donc pas — et le thème du site impose
   `*, ::before, ::after { color: #000 !important }`, ce qui est la raison
   d'être même du bouclier. Sans ces marqueurs, le titre, l'encadré de citation
   et le bouton retomberaient au noir du thème sur un fond que nous peignons.
   Ils sont bornés aux propriétés que le thème écrase : couleur, fond, bordure,
   et la géométrie du bouton.

   ⚠️ LES VALEURS, ELLES, NE SONT RECOPIÉES NULLE PART. `.cfaoi-pop-standalone`
   a rejoint le bloc de variables en tête de ce fichier ET la liste de
   `print_appearance_css()` ; `.cfaoi-pop-entree` a rejoint le calque clair du
   bouclier. Trois listes de sélecteurs allongées d'une entrée, zéro couleur
   dupliquée : un CFA qui change sa palette voit son écran d'accueil suivre. */

/* Tant que le visiteur n'a pas dit « je commence », la carte n'existe pas pour
   lui : elle n'aurait à montrer qu'un entête et une bulle. */
.cfaoi-pop-standalone #cfaoi-popup-root {
    display: none !important;
}
.cfaoi-pop-standalone--parcours #cfaoi-popup-root {
    display: block !important;
}
.cfaoi-pop-standalone--parcours .cfaoi-pop-entree {
    display: none !important;
}

/* Le bouclier ne l'atteint pas (cf. ci-dessus) : il porte son propre reset. */
.cfaoi-pop-entree,
.cfaoi-pop-entree * {
    box-sizing: border-box;
}

.cfaoi-pop-entree {
    display: flex;
    flex-direction: column;
    /* MESURÉ à 1400 px : aligné à gauche, l'écran laissait 40 % de la carte
       vides à droite — la page paraissait inachevée, exactement ce qu'on
       venait de corriger en hauteur. Centré, il occupe la largeur demandée. */
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
    /* Une page dédiée n'est pas une modale : l'accueil OCCUPE son espace au
       lieu de flotter dedans. C'est la moitié « un peu plus de place » de la
       demande ; l'autre moitié est la hauteur du parcours, plus bas. */
    min-height: min(560px, calc(100vh - 200px));
    min-height: min(560px, calc(100dvh - 200px));
    padding: 44px 46px;
    border-radius: var(--pop-radius-xl, 28px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    background:
        radial-gradient(75% 95% at 50% -18%, var(--pop-glow, rgba(37, 99, 235, 0.35)) 0%, rgba(255, 255, 255, 0) 62%),
        var(--pop-pane-bg, #f0f4f8) !important;
    border: 1px solid var(--pop-border, #e2e8f0) !important;
    color: var(--pop-text, #0f172a) !important;
    box-shadow: 0 26px 64px -34px rgba(15, 23, 42, 0.5);
}

.cfaoi-pop-entree-portrait {
    margin: 0;
}
.cfaoi-pop-entree-portrait img {
    display: block;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 3px solid var(--pop-surface, #ffffff) !important;
    box-shadow: 0 10px 26px -12px rgba(15, 23, 42, 0.55);
}

.cfaoi-pop-entree-titre {
    margin: 0;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.16;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--pop-text, #0f172a) !important;
}

.cfaoi-pop-entree-sous {
    margin: 0;
    /* 72ch : le sous-titre du référentiel fait 76 caractères et tenait sur
       deux lignes, la seconde ne portant qu'un mot. Une veuve sur la phrase
       qui explique la page se remarque. */
    max-width: 72ch;
    font-size: clamp(15px, 1.4vw, 17.5px);
    line-height: 1.55;
    color: var(--pop-text-muted, #475569) !important;
}

/* La phrase d'Aria — la MÊME qu'elle affichera au premier tour, lue dans
   `get_pro_intro_text()`. Elle n'est pas décorative : elle dit au visiteur qui
   lui parle et ce qui va se passer, avant qu'il n'engage quoi que ce soit. */
.cfaoi-pop-entree-intro {
    margin: 4px 0 0;
    max-width: 64ch;
    padding: 16px 24px;
    font-size: 15.5px;
    line-height: 1.6;
    border: 1px solid var(--pop-border, #e2e8f0) !important;
    border-radius: 14px;
    background: var(--pop-surface, #ffffff) !important;
    color: var(--pop-text, #0f172a) !important;
    box-shadow: 0 10px 24px -20px rgba(15, 23, 42, 0.8);
}

.cfaoi-pop-entree-points {
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 26px;
}
.cfaoi-pop-entree-points li {
    position: relative;
    margin: 0;
    padding-left: 20px;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--pop-text-muted, #475569) !important;
}
.cfaoi-pop-entree-points li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.5em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pop-primary, #2563eb) !important;
}

/* Le SEUL geste de l'écran. 48 px de haut : la cible tactile du projet — et
   c'est bien la hauteur RENDUE, pas celle d'une classe voisine (leçon 3.13.90,
   où un commentaire attribuait la cible à la mauvaise règle). */
.cfaoi-pop-entree-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    min-height: 48px;
    padding: 14px 28px !important;
    font-family: inherit;
    font-size: 16px !important;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
    border: none !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, var(--pop-primary, #2563eb), var(--pop-accent, #7c3aed)) !important;
    box-shadow: 0 14px 30px -12px var(--pop-glow, rgba(37, 99, 235, 0.35));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* ⚠️ LA COULEUR EST POSÉE SUR LE BOUTON **ET SUR SES ENFANTS**, ET C'EST LA
   MESURE QUI L'A DIT. Le thème du site impose `* { color: #000 !important }` :
   ce sélecteur atteint le `<span>` du libellé et le `<svg>` de la flèche, que
   notre règle sur le bouton seul ne couvrait pas — l'héritage ne s'applique
   qu'à défaut de déclaration, et il y en avait une, en `!important`. Rendu
   dans un navigateur avec le reset du thème : le libellé sortait NOIR sur le
   dégradé (3,98:1, sous le seuil), là où le blanc donne 5,27:1. C'est la leçon
   3.13.34 — un correctif de couleur se MESURE au navigateur, il ne se relit
   pas — et la raison pour laquelle cet écran a été rendu avant d'être livré.
   ⚠️ ET LE DESCENDANT UNIVERSEL N'EST PAS UNE FACILITÉ D'ÉCRITURE. La première
   correction nommait `span` et `svg` : le libellé est passé au blanc, et LA
   FLÈCHE EST RESTÉE NOIRE. Son trait vaut `currentColor`, et `currentColor` se
   résout SUR CHAQUE ÉLÉMENT — les `<line>` et `<polyline>` du chevron
   portaient donc, eux aussi, le noir du thème. Il a fallu DEUX rendus pour le
   voir ; relire le sélecteur ne l'aurait pas dit. */
.cfaoi-pop-entree-cta,
.cfaoi-pop-entree-cta * {
    color: var(--pop-on-primary, #ffffff) !important;
}
.cfaoi-pop-entree-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 38px -14px var(--pop-glow, rgba(37, 99, 235, 0.35));
}
.cfaoi-pop-entree-cta:active {
    transform: translateY(0);
}
.cfaoi-pop-entree-cta:focus-visible {
    outline: 3px solid var(--pop-primary, #2563eb);
    outline-offset: 3px;
}
.cfaoi-pop-entree-cta svg {
    flex: 0 0 auto;
}

/* ─── LA CARTE DU PARCOURS PREND UNE HAUTEUR DE PAGE ───────────────────── */
.cfaoi-pop-standalone #cfaoi-popup-root[data-state="pro"] .cfaoi-pop-card,
.cfaoi-pop-standalone #cfaoi-popup-root[data-state="pro-thanks"] .cfaoi-pop-card {
    min-height: min(620px, calc(100vh - 160px));
    min-height: min(620px, calc(100dvh - 160px));
}

/* ⚠️ ET L'ESPACE EN TROP VA AU JOURNAL, JAMAIS À LA ZONE DE SAISIE — c'est la
   leçon 3.13.35, mesurée dans le pop-up : figer l'hôte de saisie DÉPLACE le
   vide, il ne le supprime pas, et le laisser CROÎTRE rouvre les 282 px de blanc
   sous le bouton « Continuer ». L'hôte garde sa capacité à RÉTRÉCIR
   (`flex-shrink` reste à 1), que `popup-qa` O.5 exige : la carte est en
   `overflow: hidden`, un hôte figé couperait le bouton de validation.
   ⚠️ `max-height: none` n'est pas décoratif : la règle d'origine borne le
   journal à `60%` de la hauteur du pane. Tant que la carte était en hauteur de
   contenu, ce pourcentage ne résolvait pas ; la hauteur minimale ci-dessus la
   rend DÉFINIE, et sans cette ligne les 40 % restants redeviendraient du vide. */
.cfaoi-pop-standalone #cfaoi-popup-root[data-state="pro"]:not([data-pro-view="recap"]) .cfaoi-pop-pro-chat-log {
    flex: 1 1 auto;
    max-height: none;
}
.cfaoi-pop-standalone #cfaoi-popup-root[data-state="pro"] .cfaoi-pop-pro-chat-input-host {
    flex: 0 1 auto;
}

@media (max-width: 600px) {
    .cfaoi-pop-entree {
        min-height: 0;
        gap: 14px;
        padding: 28px 20px 30px;
    }
    .cfaoi-pop-entree-cta {
        width: 100%;
        justify-content: center;
    }
    /* En colonne, des puces centrees se decalent les unes des autres : la
       liste devient une suite d'items de largeurs differentes. On la garde
       alignee a gauche, et c'est le BLOC qui est centre. */
    .cfaoi-pop-entree-points {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 8px;
    }
}
@media (max-width: 480px) {
    .cfaoi-pop-standalone #cfaoi-popup-root[data-state="pro"] .cfaoi-pop-card,
    .cfaoi-pop-standalone #cfaoi-popup-root[data-state="pro-thanks"] .cfaoi-pop-card {
        min-height: min(520px, calc(100dvh - 72px));
    }
}
