/**
 * ZONEMPLOI - BANDEAU DE PRE-REMPLISSAGE PAR IA
 * =============================================
 * Bandeau pose au-dessus des formulaires de creation de CV et de publication
 * d'offre, plus le surlignage des champs remplis automatiquement.
 */

.zp-bandeau {
    /* Rendu cote serveur, dans l'enveloppe .zu-app : les variables de couleur
       sont donc disponibles. Les valeurs de repli couvrent le cas ou
       zonemploi-ui.css ne serait pas charge. */
    font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    position: relative;
    margin: 0 0 26px;
    padding: 0;
    border-radius: var(--zu-rayon, 14px);
    background: linear-gradient(120deg, #EFF6FF 0%, #F5F3FF 55%, #FFFFFF 100%);
    border: 1px solid var(--zu-primaire-bordure, #DBEAFE);
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.zp-bandeau::after {
    content: '';
    position: absolute;
    top: -70px; right: -50px;
    width: 230px; height: 230px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(91, 33, 182, .10), transparent 70%);
    pointer-events: none;
}

.zp-bandeau.zp-survol {
    border-color: var(--zu-primaire, #2563EB);
    border-style: dashed;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.zp-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    padding: 22px 24px;
}

.zp-texte { flex: 1; min-width: 260px; }

.zp-titre {
    margin: 0 0 5px;
    font-size: 18px;
    font-weight: 600;
    color: var(--zu-noir, #272727);
    display: flex;
    align-items: center;
    gap: 9px;
}

/* Pastille « IA » discrete devant le titre */
.zp-titre::before {
    content: 'IA';
    flex: 0 0 auto;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    padding: 3px 9px;
    border-radius: 100px;
    background: #5B21B6;
    color: #fff;
}

.zp-aide {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--zu-texte, #54595F);
    max-width: 62ch;
}

.zp-actions { flex: 0 0 auto; }

.zp-etat {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 4px;
    padding: 13px 16px;
    border-radius: var(--zu-rayon-sm, 9px);
    font-size: 14px;
    line-height: 1.55;
}

.zp-etat--info    { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }
.zp-etat--attente { background: #F5F3FF; border: 1px solid #DDD6FE; color: #5B21B6; }
.zp-etat--succes  { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.zp-etat--erreur  { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }

.zp-etat .zu-spinner {
    flex: 0 0 auto;
    width: 20px; height: 20px;
    border-width: 2px;
    border-color: #DDD6FE;
    border-top-color: #5B21B6;
}

.zp-annuler {
    margin-left: 6px;
    padding: 5px 14px;
    border: 1px solid currentColor;
    border-radius: 100px;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.zp-annuler:hover { background: #065F46; color: #fff; border-color: #065F46; }

/* ============================================================
   SURLIGNAGE DES CHAMPS PRE-REMPLIS
   ============================================================ */

.zp-rempli {
    position: relative;
    border-radius: 10px;
    /* Halo visible immediatement apres le remplissage */
    box-shadow: 0 0 0 3px rgba(91, 33, 182, .22);
    animation: zp-pulsation 1.1s ease-out 2;
}

/* Passe une fois l'attention captee : reste identifiable, sans crier */
.zp-rempli.zp-rempli-calme {
    box-shadow: 0 0 0 2px rgba(91, 33, 182, .13);
    animation: none;
}

.zp-rempli::after {
    content: 'pré-rempli';
    position: absolute;
    top: -9px; right: 10px;
    padding: 1px 9px;
    border-radius: 100px;
    background: #5B21B6;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    pointer-events: none;
}

@keyframes zp-pulsation {
    0%   { box-shadow: 0 0 0 3px rgba(91, 33, 182, .30); }
    50%  { box-shadow: 0 0 0 7px rgba(91, 33, 182, .10); }
    100% { box-shadow: 0 0 0 3px rgba(91, 33, 182, .22); }
}

@media (max-width: 720px) {
    .zp-inner { padding: 18px; gap: 16px; }
    .zp-actions, .zp-actions .zu-btn { width: 100%; }
    .zp-titre { font-size: 16.5px; }
    .zp-rempli::after { right: 6px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .zp-rempli { animation: none; }
}

/* Un champ REDIGE par l'IA n'a pas le meme statut qu'un champ EXTRAIT du
   document : le premier est une proposition a relire, le second une recopie.
   La teinte ambree les distingue, et persiste apres l'apaisement du
   surlignage normal — le temps que l'utilisateur y revienne. */
.zp-redige,
.zp-redige.zp-rempli-calme {
    background: #FFFBEB;
    box-shadow: inset 3px 0 0 #F59E0B;
    border-radius: 8px;
    padding-left: 12px;
    transition: background-color .4s ease;
}
.zp-redige::after {
    content: 'Rédigé par l\'IA — à relire';
    display: block;
    margin-top: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: #92400E;
}
