:root{
    --primary:#667eea; --primary-dark:#5568d3; --primary-light:#eef0ff;
    --secondary:#764ba2; --success:#10b981; --warning:#f59e0b; --danger:#ef4444; --info:#3b82f6;
    --bg:#f5f7fb; --surface:#fff; --text:#1f2937; --text-muted:#6b7280;
    --border:#e5e7eb; --border-light:#f3f4f6;
    --shadow-sm:0 1px 2px rgba(0,0,0,.05);
    --shadow:0 4px 6px -1px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.04);
    --shadow-lg:0 10px 25px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);
    --radius:10px; --radius-sm:6px; --radius-lg:16px;
    --sidebar-w:260px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px;color:var(--text);background:var(--bg);line-height:1.55}
a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4{margin:0 0 12px;font-weight:600;color:#0f172a}
h1{font-size:24px}h2{font-size:20px}h3{font-size:17px}h4{font-size:15px}
.muted{color:var(--text-muted)}.small{font-size:12px}.bold{font-weight:600}
img{max-width:100%}

/* Layout */
.layout{display:flex;min-height:100vh}
.sidebar{width:var(--sidebar-w);background:linear-gradient(180deg,#1e293b 0%,#0f172a 100%);color:#cbd5e1;
    display:flex;flex-direction:column;position:sticky;top:0;height:100vh;overflow-y:auto;flex-shrink:0;
    transition:transform .25s}
.brand{padding:22px 20px;display:flex;gap:12px;align-items:center;border-bottom:1px solid rgba(255,255,255,.07)}
.brand-mark{width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,var(--primary),var(--secondary));
    display:flex;align-items:center;justify-content:center;color:#fff;font-size:18px;box-shadow:0 4px 12px rgba(102,126,234,.4)}
.brand-name{font-size:18px;font-weight:700;color:#fff}
.brand-name span{color:var(--primary);margin-left:2px}
.nav{flex:1;padding:14px 12px}
.nav-section{font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:#64748b;padding:18px 12px 6px;font-weight:600}
.nav-item{display:flex;align-items:center;gap:12px;padding:10px 12px;color:#cbd5e1;border-radius:8px;font-weight:500;
    transition:all .15s;margin-bottom:2px}
.nav-item:hover{background:rgba(255,255,255,.05);color:#fff;text-decoration:none}
.nav-item.active{background:linear-gradient(135deg,var(--primary),var(--secondary));color:#fff;
    box-shadow:0 4px 10px rgba(102,126,234,.3)}
.nav-item i{width:18px;font-size:14px}
.sidebar-foot{padding:16px 20px;color:#475569;border-top:1px solid rgba(255,255,255,.07)}

.main{flex:1;display:flex;flex-direction:column;min-width:0}
.topbar{height:64px;background:var(--surface);border-bottom:1px solid var(--border);
    display:flex;align-items:center;padding:0 24px;gap:18px;position:sticky;top:0;z-index:10;box-shadow:var(--shadow-sm)}
.topbar-title{flex:1;font-size:16px;font-weight:600;color:#0f172a}
.topbar-clock{color:var(--text-muted);font-size:13px;font-variant-numeric:tabular-nums}
.menu-toggle{display:none;border:0;background:transparent;font-size:18px;cursor:pointer;color:var(--text)}
.user-chip{display:flex;align-items:center;gap:10px;padding:6px 12px;border-radius:24px;cursor:pointer;
    border:1px solid var(--border);position:relative;background:var(--bg)}
.user-chip:hover{border-color:var(--primary)}
.user-chip img{width:30px;height:30px;border-radius:50%;object-fit:cover}
.user-chip span{font-weight:500;font-size:13px}
.user-menu{display:none;position:absolute;right:0;top:calc(100% + 8px);background:#fff;border-radius:var(--radius);
    min-width:200px;box-shadow:var(--shadow-lg);overflow:hidden;z-index:50;border:1px solid var(--border)}
.user-menu.open{display:block}
.user-menu a,.user-menu .link-btn{display:flex;align-items:center;gap:10px;padding:12px 16px;color:var(--text);
    width:100%;border:0;background:transparent;text-align:left;cursor:pointer;font:inherit}
.user-menu a:hover,.user-menu .link-btn:hover{background:var(--primary-light);color:var(--primary);text-decoration:none}
.inline{display:inline}

.content{padding:24px;flex:1;max-width:100%}

/* Cards / panels */
.card{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow-sm);
    border:1px solid var(--border-light);margin-bottom:20px;overflow:hidden}
.card-head{padding:18px 22px;border-bottom:1px solid var(--border-light);display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.card-head h3{margin:0;flex:1}
.card-body{padding:22px}
.card-foot{padding:14px 22px;border-top:1px solid var(--border-light);background:var(--bg)}

/* Stats grid */
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:18px;margin-bottom:24px}
.stat-card{background:var(--surface);padding:22px;border-radius:var(--radius);box-shadow:var(--shadow-sm);
    border:1px solid var(--border-light);position:relative;overflow:hidden;transition:transform .2s}
.stat-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.stat-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--primary)}
.stat-card.success::before{background:var(--success)}
.stat-card.warning::before{background:var(--warning)}
.stat-card.danger::before{background:var(--danger)}
.stat-card.info::before{background:var(--info)}
.stat-icon{width:46px;height:46px;border-radius:12px;background:var(--primary-light);color:var(--primary);
    display:flex;align-items:center;justify-content:center;font-size:18px;margin-bottom:12px}
.stat-card.success .stat-icon{background:#d1fae5;color:var(--success)}
.stat-card.warning .stat-icon{background:#fef3c7;color:var(--warning)}
.stat-card.danger .stat-icon{background:#fee2e2;color:var(--danger)}
.stat-card.info .stat-icon{background:#dbeafe;color:var(--info)}
.stat-value{font-size:28px;font-weight:800;color:#0f172a;line-height:1}
.stat-label{color:var(--text-muted);margin-top:6px;font-size:13px}

/* Buttons */
.btn{display:inline-flex;align-items:center;gap:8px;padding:9px 16px;border-radius:var(--radius-sm);
    border:1px solid var(--border);background:var(--surface);color:var(--text);
    cursor:pointer;font:500 13px Inter,sans-serif;transition:all .15s;text-decoration:none}
.btn:hover{background:var(--bg);text-decoration:none}
.btn-primary{background:linear-gradient(135deg,var(--primary),var(--secondary));color:#fff;border-color:transparent;
    box-shadow:0 4px 10px rgba(102,126,234,.25)}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 6px 14px rgba(102,126,234,.35);color:#fff}
.btn-success{background:var(--success);color:#fff;border-color:transparent}
.btn-danger{background:var(--danger);color:#fff;border-color:transparent}
.btn-outline{background:transparent;border-color:var(--border)}
.btn-sm{padding:5px 10px;font-size:12px}
.btn-lg{padding:12px 22px;font-size:14px}
.btn-block{width:100%;justify-content:center}
.btn-icon{padding:7px 9px}
.link-btn{background:transparent;border:0;color:var(--primary);cursor:pointer}

/* Forms */
.form{display:flex;flex-direction:column;gap:14px}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-weight:500;color:#0f172a;font-size:13px}
.field input,.field select,.field textarea{
    padding:10px 14px;border:1px solid var(--border);border-radius:var(--radius-sm);font:14px Inter,sans-serif;
    background:var(--surface);transition:border-color .15s,box-shadow .15s;color:var(--text)}
.field input:focus,.field select:focus,.field textarea:focus{outline:0;border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(102,126,234,.1)}
.field textarea{resize:vertical;min-height:90px;font-family:inherit}
.field .hint{color:var(--text-muted);font-size:12px}
.input-icon{position:relative}
.input-icon i:first-child{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--text-muted)}
.input-icon input{padding-left:42px;width:100%}
.btn-eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);background:transparent;border:0;
    color:var(--text-muted);cursor:pointer;padding:6px}
.field-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px}
.checkbox{display:flex;align-items:center;gap:8px;cursor:pointer}
.checkbox input{width:16px;height:16px}

/* Tables */
.table-wrap{overflow-x:auto;border-radius:var(--radius)}
.table{width:100%;border-collapse:collapse;font-size:13px;background:var(--surface)}
.table th{background:var(--bg);text-align:left;padding:12px 14px;font-weight:600;
    border-bottom:1px solid var(--border);color:#475569;font-size:12px;text-transform:uppercase;letter-spacing:.3px}
.table td{padding:12px 14px;border-bottom:1px solid var(--border-light);vertical-align:middle}
.table tr:hover td{background:#fafbff}
.table .actions{display:flex;gap:6px;justify-content:flex-end}
.table-empty{text-align:center;padding:60px 20px;color:var(--text-muted)}
.table-empty i{font-size:42px;margin-bottom:12px;color:#cbd5e1}

/* Filters */
.filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:16px;
    padding:16px;background:var(--surface);border-radius:var(--radius);border:1px solid var(--border-light)}
.filters .field{margin:0}
.filters-actions{display:flex;gap:8px;align-items:flex-end}

/* Badges */
.badge{display:inline-flex;align-items:center;gap:4px;padding:3px 9px;border-radius:12px;font-size:11px;
    font-weight:600;text-transform:uppercase;letter-spacing:.3px}
.badge-success{background:#d1fae5;color:#065f46}
.badge-warning{background:#fef3c7;color:#92400e}
.badge-danger{background:#fee2e2;color:#991b1b}
.badge-info{background:#dbeafe;color:#1e40af}
.badge-muted{background:#f3f4f6;color:#4b5563}
.badge-primary{background:var(--primary-light);color:var(--primary-dark)}

/* Toasts */
.toast{display:flex;align-items:center;gap:12px;padding:14px 20px;margin-bottom:14px;border-radius:var(--radius);
    background:var(--surface);box-shadow:var(--shadow);border-left:4px solid var(--primary);animation:slideDown .25s}
.toast i{font-size:18px}
.toast-success{border-left-color:var(--success)}.toast-success i{color:var(--success)}
.toast-error{border-left-color:var(--danger)}.toast-error i{color:var(--danger)}
.toast-info{border-left-color:var(--info)}.toast-info i{color:var(--info)}
@keyframes slideDown{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}

/* Modal */
.modal-back{position:fixed;inset:0;background:rgba(15,23,42,.55);backdrop-filter:blur(4px);z-index:100;
    display:flex;align-items:center;justify-content:center;animation:fadeIn .2s;padding:20px}
.modal{background:var(--surface);border-radius:var(--radius-lg);max-width:500px;width:100%;
    box-shadow:0 24px 60px rgba(0,0,0,.25);animation:zoomIn .2s;overflow:hidden}
.modal-head{padding:20px 26px;border-bottom:1px solid var(--border-light);display:flex;align-items:center;gap:14px}
.modal-head .modal-icon{width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;
    background:var(--primary-light);color:var(--primary);font-size:18px}
.modal-head h3{margin:0;flex:1;font-size:16px}
.modal-close{background:transparent;border:0;font-size:18px;cursor:pointer;color:var(--text-muted)}
.modal-body{padding:22px 26px;color:#475569}
.modal-foot{padding:16px 26px;background:var(--bg);display:flex;justify-content:flex-end;gap:8px}
.modal.danger .modal-icon{background:#fee2e2;color:var(--danger)}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes zoomIn{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}

/* Pagination */
.pagination{display:flex;gap:4px;justify-content:center;margin:20px 0}
.pagination a,.pagination span{padding:8px 12px;border-radius:var(--radius-sm);border:1px solid var(--border);
    color:var(--text);text-decoration:none;background:var(--surface);font-weight:500;font-size:13px}
.pagination .current{background:var(--primary);color:#fff;border-color:var(--primary)}
.pagination .disabled{opacity:.5;pointer-events:none}

/* Status pills */
.status{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:14px;
    font-size:11px;font-weight:600;text-transform:uppercase}
.status::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.status-ouvert{background:#dbeafe;color:#1e40af}
.status-en_cours{background:#fef3c7;color:#92400e}
.status-soumis{background:#e0e7ff;color:#3730a3}
.status-attribue{background:#d1fae5;color:#065f46}
.status-perdu{background:#fee2e2;color:#991b1b}
.status-annule{background:#f3f4f6;color:#4b5563}

.status-pending{background:#fef3c7;color:#92400e}
.status-processing{background:#dbeafe;color:#1e40af}
.status-done{background:#d1fae5;color:#065f46}
.status-error{background:#fee2e2;color:#991b1b}

/* Avatars list */
.avatar{width:36px;height:36px;border-radius:50%;object-fit:cover;border:2px solid var(--surface);
    box-shadow:var(--shadow-sm)}
.avatar-lg{width:96px;height:96px}
.avatar-cell{display:flex;align-items:center;gap:10px}
.avatar-cell strong{display:block}
.avatar-cell small{color:var(--text-muted)}

/* Empty/loading */
.spinner{width:18px;height:18px;border:2px solid #e5e7eb;border-top-color:var(--primary);
    border-radius:50%;animation:spin .7s linear infinite;display:inline-block}
@keyframes spin{to{transform:rotate(360deg)}}

/* Page header */
.page-head{display:flex;align-items:center;gap:16px;margin-bottom:18px;flex-wrap:wrap}
.page-head h1{flex:1;margin:0}
.page-head .actions{display:flex;gap:8px;flex-wrap:wrap}

/* Rows / utility */
.row-between{display:flex;justify-content:space-between;align-items:center;gap:12px}
.row-center{display:flex;justify-content:center;margin-top:14px}
.flex{display:flex;gap:10px}.flex-1{flex:1}
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.text-right{text-align:right}.text-center{text-align:center}
.no-wrap{white-space:nowrap}
.hidden{display:none !important}

/* AI panel */
.ai-panel{display:flex;flex-direction:column;height:60vh;background:#fff;border-radius:var(--radius)}
.ai-messages{flex:1;overflow-y:auto;padding:16px;background:var(--bg)}
.ai-msg{margin-bottom:14px;display:flex;gap:10px;animation:slideDown .2s}
.ai-msg.user{justify-content:flex-end}
.ai-msg .bubble{max-width:78%;padding:10px 14px;border-radius:14px;line-height:1.5;white-space:pre-wrap}
.ai-msg.user .bubble{background:linear-gradient(135deg,var(--primary),var(--secondary));color:#fff}
.ai-msg.bot .bubble{background:#fff;border:1px solid var(--border-light)}
.ai-input{display:flex;gap:8px;padding:12px;border-top:1px solid var(--border-light);background:#fff}
.ai-input textarea{flex:1;border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 12px;
    font-family:inherit;resize:none;height:42px;max-height:120px}

/* Document viewer */
.doc-text{background:#fafbff;border:1px solid var(--border-light);border-radius:var(--radius);
    padding:18px;max-height:500px;overflow-y:auto;white-space:pre-wrap;font-family:'JetBrains Mono',monospace;
    font-size:13px;line-height:1.6}

/* Settings tiles */
.settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}
.settings-tile{background:var(--surface);padding:22px;border-radius:var(--radius);border:1px solid var(--border-light);
    text-align:center;transition:all .2s;text-decoration:none;color:var(--text)}
.settings-tile:hover{transform:translateY(-3px);box-shadow:var(--shadow);text-decoration:none;border-color:var(--primary)}
.settings-tile .ic{width:54px;height:54px;border-radius:14px;background:var(--primary-light);color:var(--primary);
    display:flex;align-items:center;justify-content:center;font-size:22px;margin:0 auto 10px}
.settings-tile h4{margin:8px 0 4px}
.settings-tile .count{color:var(--text-muted);font-size:12px}

/* Mobile */
@media (max-width: 1024px){
    .sidebar{position:fixed;left:0;top:0;z-index:90;transform:translateX(-100%);box-shadow:0 0 30px rgba(0,0,0,.2)}
    .sidebar.open{transform:translateX(0)}
    .menu-toggle{display:inline-flex}
    .content{padding:16px}
}


/* ============================================================
 * Animation d'attente unifiee pour toutes les actions IA
 * Utiliser via window.AppAi.run(btn, asyncFn) defini dans app.js
 * ============================================================ */
.ai-loader{
    margin-top:12px;
    border:1px solid rgba(99,102,241,.25);
    border-radius:10px;
    background:linear-gradient(135deg,#f5f3ff 0%,#ecfeff 100%);
    overflow:hidden;
    animation:ailoader-in .25s ease-out;
}
@keyframes ailoader-in{
    from{opacity:0;transform:translateY(-4px)}
    to{opacity:1;transform:translateY(0)}
}
.ai-loader-row{
    display:flex;align-items:center;gap:14px;
    padding:12px 16px;
}
.ai-loader-icon{
    width:38px;height:38px;border-radius:50%;
    background:linear-gradient(135deg,#6366f1,#8b5cf6,#ec4899);
    color:#fff;display:flex;align-items:center;justify-content:center;
    font-size:1rem;flex-shrink:0;
    animation:aifloat 2.4s ease-in-out infinite;
}
@keyframes aifloat{
    0%,100%{transform:translateY(0) rotate(-6deg);box-shadow:0 0 0 0 rgba(139,92,246,.45)}
    50%   {transform:translateY(-3px) rotate(6deg);box-shadow:0 0 0 9px rgba(139,92,246,0)}
}
.ai-loader-text{flex:1;min-width:0}
.ai-loader-title{font-weight:600;color:#1f2937;font-size:.92rem;margin-bottom:2px}
.ai-loader-step{font-size:.82rem;color:#6b7280;transition:opacity .35s ease;min-height:1.05em}
.ai-loader-step.fading{opacity:0}
.ai-loader-bar{height:3px;background:rgba(99,102,241,.12);position:relative;overflow:hidden}
.ai-loader-bar::before{
    content:"";position:absolute;left:0;top:0;height:100%;width:33%;
    background:linear-gradient(90deg,transparent,#6366f1 30%,#ec4899 70%,transparent);
    animation:aiprogress 1.4s linear infinite;
}
@keyframes aiprogress{
    from{transform:translateX(-100%)}
    to  {transform:translateX(400%)}
}

/* Bouton en mode "IA en cours" : on garde le label original visible mais grise */
.btn[data-ai-busy="1"]{cursor:wait;opacity:.78}
.btn[data-ai-busy="1"] .ai-btn-spin{
    display:inline-block;width:13px;height:13px;margin-right:6px;
    border:2px solid currentColor;border-top-color:transparent;
    border-radius:50%;animation:spin .7s linear infinite;
    vertical-align:-2px;
}

/* ============================================================
 * Avancement de l'offre : table sections (responsable + progression)
 * ============================================================ */
.sections-table td{vertical-align:middle;padding:10px 12px}
.sections-table th{font-weight:600;color:var(--text-muted);background:#fafbff}

/* Dropdown responsable */
.resp-pick{
    width:100%;
    padding:6px 28px 6px 10px;
    font-size:13px;
    border:1px solid var(--border);
    border-radius:6px;
    background:#fff;
    cursor:pointer;
    transition:border-color .15s, box-shadow .15s;
}
.resp-pick:hover{border-color:#a5b4fc}
.resp-pick:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(99,102,241,.15)}

/* Slider de progression (fond mis a jour par JS pour effet "fill") */
.prog-cell{display:flex;align-items:center;gap:10px}
.prog-slider{
    flex:1;
    -webkit-appearance:none;appearance:none;
    height:6px;border-radius:3px;
    background:#e5e7eb;
    outline:none;cursor:pointer;
}
/* WebKit thumb */
.prog-slider::-webkit-slider-thumb{
    -webkit-appearance:none;appearance:none;
    width:16px;height:16px;border-radius:50%;
    background:#fff;border:2px solid var(--primary);
    cursor:pointer;
    box-shadow:0 1px 4px rgba(99,102,241,.4);
    transition:transform .15s;
}
.prog-slider::-webkit-slider-thumb:hover{transform:scale(1.2)}
/* Firefox thumb */
.prog-slider::-moz-range-thumb{
    width:16px;height:16px;border-radius:50%;
    background:#fff;border:2px solid var(--primary);
    cursor:pointer;
    box-shadow:0 1px 4px rgba(99,102,241,.4);
}
.prog-slider::-moz-range-track{height:6px;border-radius:3px;background:#e5e7eb}
.prog-val{
    font-size:12px;font-weight:600;color:var(--primary);
    min-width:38px;text-align:right;
    font-variant-numeric:tabular-nums;
}

/* ============================================================
 * Info tiles (page detail AO) : grille de mini-cartes alignees
 * remplace le print-meta a l'ecran (le print-meta reste pour l'impression)
 * ============================================================ */
.info-tiles{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
    gap:12px;
    margin:4px 0 6px;
}
.info-tile{
    position:relative;
    padding:14px 16px;
    background:#fafbff;
    border:1px solid var(--border-light);
    border-radius:10px;
    transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.info-tile:hover{
    transform:translateY(-1px);
    border-color:#c7d2fe;
    box-shadow:0 2px 10px rgba(99,102,241,.08);
}
.info-tile-icon{
    width:32px;height:32px;border-radius:8px;
    background:var(--primary-light);
    color:var(--primary);
    display:inline-flex;align-items:center;justify-content:center;
    font-size:14px;
    margin-bottom:8px;
}
.info-tile-label{
    font-size:10px;font-weight:700;
    text-transform:uppercase;
    letter-spacing:.7px;
    color:var(--text-muted);
    margin-bottom:3px;
}
.info-tile-value{
    font-size:14px;font-weight:600;
    color:var(--text);
    line-height:1.35;
    word-break:break-word;
}
.info-tile-value a{color:var(--primary);text-decoration:none}
.info-tile-value a:hover{text-decoration:underline}

/* Petit point indicateur sur les badges pour meilleure lisibilite */
.badge::before{
    content:"";
    width:5px;height:5px;border-radius:50%;
    background:currentColor;
    flex-shrink:0;
    opacity:.85;
}

/* ============================================================
 * Section status pills - statuts d'avancement de section
 * Utilises dans la table "Avancement de l'offre" (page detail AO).
 * Plus lisibles et plus marques que les anciens badges.
 * Statuts : vide / brouillon / genere / valide
 * ============================================================ */
.status-pill{
    display:inline-flex;align-items:center;gap:6px;
    padding:5px 11px;border-radius:14px;
    font-size:11px;font-weight:700;
    text-transform:uppercase;letter-spacing:.4px;
    line-height:1;
    white-space:nowrap;
    border:1px solid transparent;
}
.status-pill::before{
    content:"";width:6px;height:6px;border-radius:50%;
    background:currentColor;flex-shrink:0;
}
.status-pill.status-vide,
.status-pill.status-brouillon,
.status-pill.status-genere,
.status-pill.status-valide{
    /* surcharge volontaire : on neutralise les regles .status- generiques */
    text-transform:uppercase;
}
.status-pill.status-vide{background:#f3f4f6;color:#64748b;border-color:#e5e7eb}
.status-pill.status-brouillon{background:#fef3c7;color:#92400e;border-color:#fde68a}
.status-pill.status-genere{background:#dbeafe;color:#1e40af;border-color:#bfdbfe}
.status-pill.status-valide{background:#d1fae5;color:#065f46;border-color:#a7f3d0}

/* ============================================================
 * Cards "Avancement" : 4 cartes alignees
 * Validees / Generees / Brouillons / Vides
 * Remplace l'ancien rendu print-meta a l'ecran.
 * ============================================================ */
.section-stats{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:12px;
    margin-bottom:20px;
}
.ss-card{
    display:flex;align-items:center;gap:14px;
    padding:14px 16px;
    border-radius:10px;
    background:#fafbff;
    border:1px solid var(--border-light);
    border-left:4px solid #94a3b8;
    transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.ss-card:hover{transform:translateY(-1px);box-shadow:0 2px 10px rgba(0,0,0,.06)}
.ss-icon{
    width:42px;height:42px;border-radius:10px;
    display:flex;align-items:center;justify-content:center;
    font-size:16px;flex-shrink:0;
    background:#f3f4f6;color:#64748b;
}
.ss-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:5px}
.ss-count{
    font-size:24px;font-weight:800;line-height:1;
    color:#0f172a;
    font-variant-numeric:tabular-nums;
}
.ss-label{
    font-size:11px;font-weight:600;
    text-transform:uppercase;letter-spacing:.5px;
    color:var(--text-muted);
    line-height:1;
}

/* Variants par statut */
.ss-valide{border-left-color:var(--success)}
.ss-valide .ss-icon{background:#d1fae5;color:var(--success)}
.ss-genere{border-left-color:var(--info)}
.ss-genere .ss-icon{background:#dbeafe;color:var(--info)}
.ss-brouillon{border-left-color:var(--warning)}
.ss-brouillon .ss-icon{background:#fef3c7;color:var(--warning)}
.ss-vide{border-left-color:#94a3b8}
.ss-vide .ss-icon{background:#f3f4f6;color:#64748b}

/* Responsive : passe de 4 -> 2 -> 1 colonnes */
@media (max-width:1100px){
    .section-stats{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:520px){
    .section-stats{grid-template-columns:1fr}
    .ss-count{font-size:22px}
}

/* ============================================================
 * Statut "perimee" - cascade d'invalidation
 * Quand une section amont change, les sections aval sont marquees.
 * ============================================================ */
.status-pill.status-stale{
    background:#fed7aa;
    color:#9a3412;
    border-color:#fb923c;
    margin-left:6px;
    cursor:help;
}
.status-pill.status-stale::before{
    background:#ea580c;
}

/* ============================================================
 * Editeur de section "textuel" (lettre, comprehension, methodo, ...)
 * Toolbar Markdown + switch Edition/Apercu + zone d'apercu stylee
 * ============================================================ */

.editor-card{position:relative}
.editor-head{
    display:flex;align-items:center;gap:14px;
}
.editor-head h3{margin:0;display:flex;align-items:center;gap:8px}
.editor-head h3 i{color:var(--primary)}

/* ============ Switch Edition / Apercu ============ */
.editor-toggle{
    display:inline-flex;
    background:var(--bg);
    border:1px solid var(--border-light);
    border-radius:8px;
    padding:3px;
    gap:2px;
}
.editor-toggle .et-btn{
    border:0;background:transparent;
    padding:6px 14px;border-radius:6px;
    font:600 12.5px Inter,sans-serif;
    color:var(--text-muted);cursor:pointer;
    display:inline-flex;align-items:center;gap:6px;
    transition:all .15s ease;
    line-height:1;
}
.editor-toggle .et-btn:hover{color:var(--text)}
.editor-toggle .et-btn.active{
    background:#fff;
    color:var(--primary);
    box-shadow:0 1px 3px rgba(0,0,0,.08);
}
.editor-toggle .et-btn i{font-size:11px}

/* ============ Toolbar Markdown ============ */
.editor-toolbar{
    display:flex;align-items:center;gap:6px;flex-wrap:wrap;
    padding:8px 16px;
    background:#f8fafc;
    border-top:1px solid var(--border-light);
    border-bottom:1px solid var(--border-light);
}
.editor-toolbar .tb-group{display:inline-flex;gap:2px}
.editor-toolbar .tb-sep{
    width:1px;height:20px;background:var(--border);margin:0 4px;
}
.editor-toolbar .tb-spacer{flex:1}
.editor-toolbar .tb-btn{
    width:34px;height:30px;
    border:1px solid transparent;
    background:transparent;
    color:var(--text);
    border-radius:6px;
    cursor:pointer;
    display:inline-flex;align-items:center;justify-content:center;
    font-size:13px;
    transition:all .12s ease;
}
.editor-toolbar .tb-btn:hover{
    background:#fff;
    border-color:var(--border-light);
    color:var(--primary);
}
.editor-toolbar .tb-btn:active{transform:translateY(1px)}
.editor-toolbar .tb-btn small{font-size:9px;font-weight:600;margin-left:1px}
.editor-toolbar .tb-hint{
    color:var(--text-muted);
    font-size:11.5px;
    line-height:1.2;
}
.editor-toolbar .tb-hint code{
    background:#fff;
    border:1px solid var(--border-light);
    padding:1px 5px;
    border-radius:4px;
    font-size:10.5px;
    font-family:'JetBrains Mono','Menlo','Consolas',monospace;
    color:var(--text);
    margin:0 1px;
}

/* ============ Body de l'editeur ============ */
.editor-body{padding:0 !important}
.editor-pane{padding:0}

/* ============ Textarea (mode edition) ============ */
.editor-textarea{
    width:100% !important;
    border:0 !important;
    border-radius:0 !important;
    padding:24px 28px !important;
    min-height:480px;
    font-family:'Charter','Georgia','Times New Roman',serif !important;
    font-size:15.5px !important;
    line-height:1.75 !important;
    color:#1f2937 !important;
    background:#fff !important;
    resize:vertical;
    box-shadow:none !important;
    outline:none;
    letter-spacing:.005em;
}
.editor-textarea:focus{
    box-shadow:inset 0 0 0 2px rgba(99,102,241,.15) !important;
    background:#fffefb !important;
}
.editor-textarea::placeholder{
    color:#94a3b8;
    font-style:italic;
}

/* ============ Apercu (mode preview) ============ */
.preview-pane{
    padding:32px 40px;
    background:#fff;
    min-height:480px;
}
.editor-preview{
    font-family:'Charter','Georgia','Times New Roman',serif;
    font-size:15.5px;
    line-height:1.75;
    color:#1f2937;
    max-width:760px;
}
.editor-preview h1,.editor-preview h2,.editor-preview h3,.editor-preview h4{
    color:#0f172a;
    font-family:'Inter','Segoe UI',sans-serif;
    line-height:1.3;
    margin:1.6em 0 .6em;
    font-weight:700;
}
.editor-preview h1{font-size:1.75em;border-bottom:2px solid var(--primary-light);padding-bottom:.3em}
.editor-preview h2{
    font-size:1.4em;
    color:var(--primary);
    margin-top:1.8em;
    padding-bottom:.25em;
    border-bottom:1px solid var(--border-light);
}
.editor-preview h3{font-size:1.15em;color:#334155}
.editor-preview h4{font-size:1em;color:#475569}
.editor-preview h2:first-child,.editor-preview h3:first-child,.editor-preview h1:first-child{margin-top:0}

.editor-preview p{margin:0 0 1em}
.editor-preview p:last-child{margin-bottom:0}
.editor-preview strong{color:#0f172a;font-weight:700}
.editor-preview em{color:#334155}

.editor-preview ul,.editor-preview ol{margin:0 0 1em;padding-left:1.6em}
.editor-preview li{margin-bottom:.4em}
.editor-preview li::marker{color:var(--primary)}

.editor-preview blockquote{
    margin:1em 0;
    padding:.6em 1.2em;
    border-left:3px solid var(--primary);
    background:#f5f3ff;
    color:#4c1d95;
    border-radius:0 6px 6px 0;
    font-style:italic;
}
.editor-preview blockquote p{margin:0}
.editor-preview blockquote p + p{margin-top:.4em}

.editor-preview hr{
    border:0;
    border-top:1px solid var(--border-light);
    margin:1.8em 0;
}
.editor-preview code{
    background:#f1f5f9;
    color:#9333ea;
    padding:1px 6px;
    border-radius:4px;
    font-family:'JetBrains Mono','Menlo','Consolas',monospace;
    font-size:.88em;
}

/* ============ Stats sous l'editeur ============ */
.editor-stats{
    display:flex;align-items:center;gap:10px;flex-wrap:wrap;
    padding:10px 28px;
    border-top:1px solid var(--border-light);
    background:#fafbff;
    color:var(--text-muted);
    font-size:12px;
    line-height:1.4;
}
.editor-stats > span{display:inline-flex;align-items:center;gap:5px}
.editor-stats .dot{color:#cbd5e1;margin:0 2px}
.editor-stats i{font-size:11px;color:#94a3b8}
.editor-stats code{
    background:#fff;
    border:1px solid var(--border-light);
    padding:1px 5px;
    border-radius:4px;
    font-size:10.5px;
    font-family:'JetBrains Mono','Menlo','Consolas',monospace;
    margin:0 1px;
}

/* ============ Statut select dans editeur ============ */
.editor-card .editor-status{max-width:240px}
.editor-card .field{padding:0 28px 18px}

/* ============ Footer du formulaire ============ */
.editor-card .card-foot{
    border-top:1px solid var(--border-light);
    padding:14px 28px;
    background:#fafbff;
}

/* ============ Responsive ============ */
@media (max-width:720px){
    .editor-textarea{padding:18px 16px !important;font-size:14.5px !important}
    .preview-pane{padding:20px 16px}
    .editor-toolbar{padding:8px 12px}
    .editor-toolbar .tb-hint{display:none}
    .editor-stats{padding:10px 16px}
    .editor-card .field{padding:0 16px 16px}
    .editor-card .card-foot{padding:12px 16px}
}

/* ============================================================
 * Avatar du responsable dans la table d'avancement
 * ============================================================ */
.resp-cell{
    display:flex;align-items:center;gap:8px;
}
.resp-avatar{
    width:30px;height:30px;border-radius:50%;
    object-fit:cover;
    border:2px solid #fff;
    box-shadow:0 1px 3px rgba(0,0,0,.12);
    flex-shrink:0;
    background:#e0e7ff;
    transition:transform .12s ease;
}
.resp-avatar:hover{transform:scale(1.08)}
.resp-cell .resp-pick{flex:1;min-width:0}

/* ============================================================
 * Cellule echeance (date limite par section)
 * - en retard       : rouge
 * - aujourd'hui/J-1 : orange foncé
 * - <= J-3          : orange clair
 * - sinon           : neutre
 * ============================================================ */
.ech-cell{
    display:flex;align-items:center;gap:6px;
}
.ech-input{
    flex:1;min-width:0;
    border:1px solid var(--border);
    border-radius:6px;
    padding:5px 8px;
    font-size:12.5px;
    font-family:Inter,sans-serif;
    color:var(--text);
    background:#fff;
    transition:border-color .12s ease, background .12s ease;
}
.ech-input:hover{border-color:var(--primary)}
.ech-input:focus{outline:0;border-color:var(--primary);box-shadow:0 0 0 2px rgba(99,102,241,.15)}
.ech-days{
    font-size:11px;font-weight:600;
    padding:2px 7px;border-radius:10px;
    background:var(--bg);color:var(--text-muted);
    white-space:nowrap;
    flex-shrink:0;
}
.ech-cell.ech-overdue .ech-input{border-color:#dc2626;background:#fef2f2;color:#991b1b}
.ech-cell.ech-overdue .ech-days{background:#dc2626;color:#fff}
.ech-cell.ech-urgent  .ech-input{border-color:#ea580c;background:#fff7ed;color:#9a3412}
.ech-cell.ech-urgent  .ech-days{background:#ea580c;color:#fff}
.ech-cell.ech-soon    .ech-input{border-color:#f59e0b;background:#fffbeb}
.ech-cell.ech-soon    .ech-days{background:#fef3c7;color:#92400e}

/* ============================================================
 * Nouveau statut "soumis" (entre Genere et Valide)
 * Couleur violette pastel, distincte de tous les autres statuts
 * ============================================================ */
.status-pill.status-soumis{
    background:#ede9fe;
    color:#5b21b6;
    border-color:#a78bfa;
}
.status-pill.status-soumis::before{background:#7c3aed}

.badge-purple{
    background:#ede9fe;
    color:#5b21b6;
    border-color:#a78bfa;
}

/* Card "Soumises" dans la grille de stats */
.section-stats .ss-soumis{
    border-color:#c4b5fd;
    background:linear-gradient(135deg,#f5f3ff 0%,#ede9fe 100%);
}
.section-stats .ss-soumis .ss-icon{
    background:#7c3aed;
    color:#fff;
}

/* Adapter la grille a 5 cards (au lieu de 4) */
.section-stats{
    display:grid;
    grid-template-columns:repeat(5, 1fr);
    gap:12px;
}
@media (max-width:980px){
    .section-stats{grid-template-columns:repeat(2, 1fr)}
}

/* Bordure laterale dans la liste des sections (mode index) */
.section-status-soumis{border-left:4px solid #7c3aed}

/* ============================================================
 * Dashboard professionnel - Welcome card + stats animees
 * (output8) Cards plus stylees, effets au chargement, avatar
 * dans l'entete et menu utilisateur enrichi.
 * ============================================================ */

/* ---------- Topbar : avatar, role, menu enrichi ---------- */
.topbar-actions{display:flex;align-items:center;gap:14px;margin-left:auto}
.user-chip{padding:5px 8px 5px 5px;gap:10px;background:var(--surface);border-color:var(--border-light)}
.user-chip:hover{box-shadow:0 4px 12px rgba(102,126,234,.18);border-color:var(--primary-light)}
.user-chip-avatar{width:34px;height:34px;border-radius:50%;object-fit:cover;
    box-shadow:0 2px 6px rgba(0,0,0,.12);border:2px solid #fff;flex-shrink:0}
.user-chip-info{display:flex;flex-direction:column;line-height:1.15;min-width:0}
.user-chip-name{font-size:13px;font-weight:600;color:#0f172a;max-width:160px;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.user-chip-role{font-size:11px;color:var(--text-muted);font-weight:500}
.user-chip-caret{font-size:10px;color:var(--text-muted);margin-left:2px}
@media (max-width:760px){
    .user-chip-info{display:none}
    .topbar-clock{display:none}
}

.user-menu{min-width:240px;border:1px solid var(--border-light);
    box-shadow:0 16px 40px -8px rgba(15,23,42,.18);border-radius:12px;
    animation:userMenuIn .18s ease-out}
@keyframes userMenuIn{from{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
.user-menu-head{display:flex;gap:12px;align-items:center;padding:14px 16px;
    background:linear-gradient(135deg,var(--primary-light),#fff);border-bottom:1px solid var(--border-light)}
.user-menu-head img{width:42px;height:42px;border-radius:50%;object-fit:cover;
    box-shadow:0 2px 6px rgba(0,0,0,.1)}
.user-menu-name{font-weight:600;font-size:13px;color:#0f172a;line-height:1.2}
.user-menu-mail{font-size:11px;color:var(--text-muted);margin-top:2px;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:170px}

/* ---------- Welcome card ---------- */
.welcome-card{
    position:relative;
    background:linear-gradient(135deg,#667eea 0%,#764ba2 60%,#5b21b6 100%);
    border-radius:18px;padding:28px 32px;color:#fff;margin-bottom:24px;
    overflow:hidden;
    box-shadow:0 14px 36px -10px rgba(102,126,234,.45);
    animation:dashFadeUp .5s cubic-bezier(.4,0,.2,1) both;
}
.welcome-decor{position:absolute;border-radius:50%;background:rgba(255,255,255,.08);
    pointer-events:none;animation:floatY 8s ease-in-out infinite}
.welcome-decor.decor-1{width:280px;height:280px;right:-90px;top:-110px}
.welcome-decor.decor-2{width:180px;height:180px;right:80px;bottom:-110px;
    background:rgba(255,255,255,.05);animation-delay:-3s}
.welcome-decor.decor-3{width:90px;height:90px;right:280px;top:30px;
    background:rgba(255,255,255,.06);animation-delay:-1.5s}
@keyframes floatY{0%,100%{transform:translateY(0)}50%{transform:translateY(-12px)}}

.welcome-content{position:relative;z-index:1;display:flex;gap:24px;align-items:center;flex-wrap:wrap}
.welcome-avatar{width:84px;height:84px;border-radius:50%;object-fit:cover;
    border:3px solid rgba(255,255,255,.45);box-shadow:0 10px 24px rgba(0,0,0,.22);
    flex-shrink:0;background:#fff}
.welcome-text{flex:1;min-width:240px}
.welcome-text h2{color:#fff;font-size:24px;margin:0 0 6px;font-weight:700;
    text-shadow:0 2px 6px rgba(0,0,0,.12)}
.welcome-text h2 i{margin-right:8px;opacity:.92}
.welcome-text p{margin:0;color:rgba(255,255,255,.88);font-size:14px}
.welcome-text strong{color:#fff;font-weight:700}
.welcome-meta{display:flex;gap:18px;margin-top:14px;font-size:12.5px;flex-wrap:wrap}
.welcome-meta-item{display:flex;align-items:center;gap:8px;color:rgba(255,255,255,.92);
    background:rgba(255,255,255,.12);padding:6px 12px;border-radius:20px;backdrop-filter:blur(6px)}
.welcome-meta-item i{font-size:11px}
.welcome-actions{display:flex;gap:10px;flex-wrap:wrap}
.welcome-btn{background:rgba(255,255,255,.18);color:#fff;border:1px solid rgba(255,255,255,.32);
    padding:10px 18px;border-radius:10px;backdrop-filter:blur(6px);transition:all .2s;
    text-decoration:none;display:inline-flex;gap:8px;align-items:center;font-weight:600;font-size:13px}
.welcome-btn:hover{background:rgba(255,255,255,.3);transform:translateY(-2px);
    text-decoration:none;color:#fff;box-shadow:0 8px 20px rgba(0,0,0,.18)}
.welcome-btn-primary{background:#fff;color:var(--primary-dark);border-color:#fff}
.welcome-btn-primary:hover{background:#fff;color:var(--primary-dark);box-shadow:0 10px 24px rgba(0,0,0,.22)}

@media (max-width:780px){
    .welcome-card{padding:22px 22px}
    .welcome-text h2{font-size:20px}
    .welcome-actions{margin-top:12px;width:100%}
    .welcome-btn{flex:1;justify-content:center}
}

/* ---------- Stats grid pro ---------- */
.stats-grid-pro{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
.stat-pro{padding:22px 22px;border-radius:14px;border:1px solid var(--border-light);
    background:var(--surface);box-shadow:0 1px 2px rgba(0,0,0,.04);
    position:relative;overflow:hidden;
    animation:dashFadeUp .55s cubic-bezier(.4,0,.2,1) both;
    transition:transform .25s cubic-bezier(.4,0,.2,1),box-shadow .25s}
.stat-pro::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;
    background:linear-gradient(180deg,var(--primary),var(--secondary))}
.stat-pro.success::before{background:linear-gradient(180deg,#34d399,#10b981)}
.stat-pro.warning::before{background:linear-gradient(180deg,#fbbf24,#f59e0b)}
.stat-pro.info::before{background:linear-gradient(180deg,#60a5fa,#3b82f6)}
.stat-pro.purple::before{background:linear-gradient(180deg,#a78bfa,#7c3aed)}
.stat-pro.teal::before{background:linear-gradient(180deg,#5eead4,#14b8a6)}
.stat-pro::after{content:"";position:absolute;right:-30px;top:-30px;width:140px;height:140px;
    border-radius:50%;background:radial-gradient(circle,rgba(102,126,234,.08) 0%,transparent 70%);
    transition:transform .4s;pointer-events:none}
.stat-pro.success::after{background:radial-gradient(circle,rgba(16,185,129,.1) 0%,transparent 70%)}
.stat-pro.warning::after{background:radial-gradient(circle,rgba(245,158,11,.12) 0%,transparent 70%)}
.stat-pro.info::after{background:radial-gradient(circle,rgba(59,130,246,.1) 0%,transparent 70%)}
.stat-pro.purple::after{background:radial-gradient(circle,rgba(124,58,237,.12) 0%,transparent 70%)}
.stat-pro.teal::after{background:radial-gradient(circle,rgba(20,184,166,.1) 0%,transparent 70%)}

.stat-pro:hover{transform:translateY(-4px);box-shadow:0 14px 30px -8px rgba(15,23,42,.18)}
.stat-pro:hover::after{transform:scale(1.4)}
.stat-pro:hover .stat-icon{transform:scale(1.08) rotate(-6deg)}

.stat-pro:nth-child(1){animation-delay:.05s}
.stat-pro:nth-child(2){animation-delay:.12s}
.stat-pro:nth-child(3){animation-delay:.19s}
.stat-pro:nth-child(4){animation-delay:.26s}
.stat-pro:nth-child(5){animation-delay:.33s}
.stat-pro:nth-child(6){animation-delay:.4s}

.stat-pro .stat-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.stat-pro .stat-icon{width:48px;height:48px;border-radius:14px;font-size:19px;
    background:var(--primary-light);color:var(--primary);
    display:flex;align-items:center;justify-content:center;margin:0;
    transition:transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow:0 4px 10px rgba(102,126,234,.18)}
.stat-pro.success .stat-icon{background:#d1fae5;color:#059669;box-shadow:0 4px 10px rgba(16,185,129,.18)}
.stat-pro.warning .stat-icon{background:#fef3c7;color:#d97706;box-shadow:0 4px 10px rgba(245,158,11,.2)}
.stat-pro.info .stat-icon{background:#dbeafe;color:#2563eb;box-shadow:0 4px 10px rgba(59,130,246,.18)}
.stat-pro.purple .stat-icon{background:#ede9fe;color:#7c3aed;box-shadow:0 4px 10px rgba(124,58,237,.2)}
.stat-pro.teal .stat-icon{background:#ccfbf1;color:#0d9488;box-shadow:0 4px 10px rgba(20,184,166,.18)}

.stat-pro .stat-value{font-size:30px;font-weight:800;color:#0f172a;line-height:1;
    font-variant-numeric:tabular-nums}
.stat-pro .stat-label{font-size:12.5px;color:var(--text-muted);margin-top:6px;font-weight:500}

.stat-trend{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:600;
    padding:4px 9px;border-radius:12px;background:var(--bg);color:var(--text-muted)}
.stat-trend i{font-size:9px}
.stat-trend.up{background:#d1fae5;color:#065f46}
.stat-trend.down{background:#fee2e2;color:#991b1b}
.stat-trend.neutral{background:#e0e7ff;color:#3730a3}

/* ---------- Dashboard 2-column grid ---------- */
.dash-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:20px;
    animation:dashFadeUp .65s ease-out .2s both}
@media (max-width:1100px){.dash-grid{grid-template-columns:1fr}}

.dash-card{margin:0}

.cell-truncate{max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cell-author{display:flex;align-items:center;gap:8px}
.cell-author img{width:26px;height:26px;border-radius:50%;object-fit:cover;
    box-shadow:0 1px 3px rgba(0,0,0,.1);flex-shrink:0}
.cell-author span{font-size:12.5px}

.link-strong{font-weight:600}

.echeance-pill{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;
    border-radius:11px;font-size:11.5px;font-weight:600}
.echeance-pill.urgent{background:#fef3c7;color:#92400e}
.echeance-pill.urgent i{font-size:9px}

/* ---------- Activity feed ---------- */
.activity-list{padding:6px 0;max-height:520px;overflow-y:auto}
.activity-list::-webkit-scrollbar{width:6px}
.activity-list::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}
.activity-list::-webkit-scrollbar-track{background:transparent}

.activity-item{display:flex;gap:12px;padding:13px 22px;
    border-bottom:1px solid var(--border-light);transition:background .15s;
    animation:dashFadeIn .5s ease-out both}
.activity-item:hover{background:#fafbff}
.activity-item:last-child{border-bottom:0}
.activity-icon{width:34px;height:34px;border-radius:50%;
    background:var(--primary-light);color:var(--primary);
    display:flex;align-items:center;justify-content:center;
    flex-shrink:0;font-size:13px}
.activity-icon.success{background:#d1fae5;color:#059669}
.activity-icon.warning{background:#fef3c7;color:#d97706}
.activity-icon.danger{background:#fee2e2;color:#dc2626}
.activity-icon.info{background:#dbeafe;color:#2563eb}
.activity-body{flex:1;min-width:0}
.activity-title{font-size:12.5px;font-weight:600;color:#0f172a;margin-bottom:2px;
    letter-spacing:.2px}
.activity-desc{font-size:12px;color:var(--text-muted);word-break:break-word;line-height:1.4}
.activity-meta{font-size:11px;color:#94a3b8;margin-top:5px;display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.activity-meta i{font-size:10px}
.activity-meta .dot-sep{color:#cbd5e1}
.activity-empty{text-align:center;padding:60px 20px;color:var(--text-muted)}
.activity-empty i{font-size:36px;margin-bottom:10px;color:#cbd5e1;display:block}

/* ---------- Animations ---------- */
@keyframes dashFadeUp{
    from{opacity:0;transform:translateY(18px)}
    to{opacity:1;transform:translateY(0)}
}
@keyframes dashFadeIn{
    from{opacity:0}
    to{opacity:1}
}

/* ============================================================
   OUTPUT9 - Vues professionnelles (listes, filtres, tables)
   ============================================================ */

/* Page head - version pro avec icone et sous-titre */
.page-head-pro{
    background:linear-gradient(135deg,#fff,#f8fafc);
    border:1px solid var(--border-light);
    border-radius:14px;
    padding:18px 22px;
    margin-bottom:18px;
    box-shadow:0 1px 2px rgba(15,23,42,.04);
    display:flex;align-items:center;gap:18px;flex-wrap:wrap;
}
.page-head-pro h1{font-size:22px;margin:0;line-height:1.2;color:#1e293b}
.page-head-title{display:flex;align-items:center;gap:14px;flex:1;min-width:200px}
.page-head-icon{
    width:46px;height:46px;border-radius:12px;flex:none;
    background:linear-gradient(135deg,var(--primary-light),#e0e7ff);
    color:var(--primary);
    display:flex;align-items:center;justify-content:center;
    font-size:20px;
    box-shadow:inset 0 0 0 1px rgba(102,126,234,.12);
}
.page-head-sub{
    font-size:12.5px;color:var(--text-muted);margin-top:2px;
    display:flex;align-items:center;gap:6px;
}
.page-head-pro .actions{display:flex;gap:8px;flex-wrap:wrap}

/* Filters pro - en-tete + grille + actions sur ligne dediee */
.filters-pro{
    background:var(--surface);
    border:1px solid var(--border-light);
    border-radius:14px;
    padding:0;
    margin-bottom:18px;
    box-shadow:0 1px 2px rgba(15,23,42,.04);
    display:block;
}
.filters-head{
    display:flex;align-items:center;gap:8px;
    padding:12px 18px;
    background:linear-gradient(135deg,#fafbff,#f4f6fb);
    border-bottom:1px solid var(--border-light);
    color:#475569;font-size:12px;font-weight:600;
    text-transform:uppercase;letter-spacing:.4px;
    border-radius:14px 14px 0 0;
}
.filters-head i{color:var(--primary)}
.filters-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:14px;
    padding:18px;
}
.filters-pro .field{margin:0}
.filters-pro .field label{font-size:11.5px;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.3px}
.filters-pro .filters-actions{
    display:flex;gap:8px;
    padding:14px 18px;
    border-top:1px solid var(--border-light);
    background:#fcfdff;
    border-radius:0 0 14px 14px;
}

/* Input avec icone integree */
.input-with-icon{position:relative;width:100%}
.input-with-icon i{
    position:absolute;left:12px;top:50%;transform:translateY(-50%);
    color:#94a3b8;font-size:13px;pointer-events:none;
}
.input-with-icon input{padding-left:36px !important;width:100%}

/* Card pro - bord arrondi plus net */
.card-pro{
    border-radius:14px;
    border:1px solid var(--border-light);
    box-shadow:0 1px 2px rgba(15,23,42,.04);
    overflow:hidden;
}
.card-pro .table-wrap{border-radius:0;overflow-x:auto;position:relative}

/* ============================================================
   Table pro - layout, colonnes prioritaires, actions sticky
   ============================================================ */
.table-pro{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    font-size:13px;
    background:var(--surface);
    table-layout:fixed;
    min-width:920px;
}
.table-pro thead th{
    background:linear-gradient(180deg,#fafbff,#f5f7fb);
    color:#475569;
    font-size:11px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.5px;
    text-align:left;
    padding:12px 14px;
    border-bottom:2px solid var(--border);
    white-space:nowrap;
    position:sticky;top:0;z-index:2;
}
.table-pro tbody td{
    padding:14px;
    border-bottom:1px solid var(--border-light);
    vertical-align:middle;
    background:var(--surface);
    transition:background-color .12s;
}
.table-pro tbody tr{position:relative}
.table-pro tbody tr:hover td{background:#f9fbff}
.table-pro tbody tr:last-child td{border-bottom:0}

/* Largeurs de colonnes - priorisation */
.table-pro .col-ref      {width:140px}
.table-pro .col-title    {width:auto}
.table-pro .col-meta     {width:170px}
.table-pro .col-status   {width:110px}
.table-pro .col-deadline {width:130px}
.table-pro .col-docs     {width:60px}
.table-pro .col-author   {width:160px}
.table-pro .col-actions  {width:120px}

/* Reference monospace, badge-like */
.ref-code{
    display:inline-block;
    font-family:'JetBrains Mono',ui-monospace,SFMono-Regular,Consolas,monospace;
    font-size:11.5px;font-weight:600;
    color:var(--primary-dark);
    background:var(--primary-light);
    padding:4px 8px;border-radius:6px;
    border:1px solid rgba(102,126,234,.15);
    max-width:100%;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    transition:all .15s;
}
.ref-code:hover{
    background:var(--primary);color:#fff;
    text-decoration:none;
    border-color:var(--primary);
}

/* Title cell - 2 lignes max + ellipsis */
.cell-title{
    color:#1e293b;
    font-weight:600;
    line-height:1.4;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    word-break:break-word;
    transition:color .15s;
}
.cell-title:hover{color:var(--primary);text-decoration:none}

/* Meta cell - bailleur + secteur empiles */
.cell-meta{display:flex;flex-direction:column;gap:2px;min-width:0}
.cell-meta-main{
    color:#1e293b;font-size:13px;font-weight:500;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.cell-meta-sub{
    color:var(--text-muted);font-size:11.5px;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

/* Echeance cell - date + pill empiles si urgent */
.cell-deadline{display:flex;flex-direction:column;gap:4px;align-items:flex-start}
.cell-deadline .deadline-date{
    font-size:13px;color:#1e293b;font-weight:500;font-variant-numeric:tabular-nums;
}
.cell-deadline.is-expired .deadline-date{color:var(--text-muted);text-decoration:line-through}
.deadline-pill{
    display:inline-flex;align-items:center;gap:4px;
    padding:2px 8px;border-radius:10px;
    font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;
}
.deadline-pill.warn{background:#fef3c7;color:#92400e}
.deadline-pill.danger{background:#fee2e2;color:#991b1b}
.deadline-pill.warn::before,.deadline-pill.danger::before{
    content:"";width:5px;height:5px;border-radius:50%;background:currentColor;
}

/* Docs pill - badge compact */
.docs-pill{
    display:inline-flex;align-items:center;gap:5px;
    padding:4px 9px;border-radius:10px;
    background:#dbeafe;color:#1e40af;
    font-size:11.5px;font-weight:600;
    font-variant-numeric:tabular-nums;
}
.docs-pill i{font-size:10px;opacity:.85}
.docs-pill.empty{background:#f3f4f6;color:#94a3b8;padding:4px 10px}
.docs-pill.empty i{display:none}

/* Auteur compact - mini avatar + nom */
.cell-author-mini{display:flex;align-items:center;gap:8px;min-width:0}
.author-avatar{
    width:26px;height:26px;border-radius:50%;flex:none;
    background:linear-gradient(135deg,var(--primary),var(--secondary));
    color:#fff;font-size:11px;font-weight:700;
    display:flex;align-items:center;justify-content:center;
    box-shadow:0 1px 2px rgba(102,126,234,.3);
}
.author-name{
    font-size:12.5px;color:#475569;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;
}

/* Actions sticky a droite - toujours visibles */
.table-pro .col-actions{
    position:sticky;right:0;
    background:var(--surface);
    box-shadow:-8px 0 12px -8px rgba(15,23,42,.08);
    z-index:1;
}
.table-pro tbody tr:hover .col-actions{background:#f9fbff}
.table-pro thead .col-actions{
    background:linear-gradient(180deg,#fafbff,#f5f7fb);
    box-shadow:-8px 0 12px -8px rgba(15,23,42,.08);
}
.row-actions{display:flex;gap:4px;justify-content:flex-end;align-items:center}
.row-actions form.inline{margin:0;padding:0;display:inline-flex}
.row-act{
    width:32px;height:32px;border-radius:8px;
    display:inline-flex;align-items:center;justify-content:center;
    color:#64748b;background:#f8fafc;
    border:1px solid var(--border-light);
    cursor:pointer;font-size:12px;
    transition:all .15s;
    text-decoration:none;
    padding:0;
}
.row-act:hover{
    background:var(--primary-light);color:var(--primary);
    border-color:rgba(102,126,234,.3);text-decoration:none;
    transform:translateY(-1px);
}
.row-act.danger:hover{
    background:#fee2e2;color:#dc2626;border-color:#fecaca;
}

/* Responsive - cacher colonnes secondaires sur petits ecrans */
@media (max-width:1280px){
    .table-pro .col-author{display:none}
    .table-pro{min-width:760px}
}
@media (max-width:980px){
    .table-pro .col-meta{display:none}
    .table-pro{min-width:600px}
    .page-head-pro{padding:14px 16px}
    .page-head-pro h1{font-size:18px}
}
@media (max-width:760px){
    .table-pro .col-docs{display:none}
    .table-pro{min-width:480px}
    .filters-grid{padding:14px;gap:10px}
    .row-act{width:28px;height:28px;font-size:11px}
}

/* Empty state - plus expressif */
.table-pro .table-empty{padding:80px 20px}
.table-pro .table-empty i{font-size:52px;color:#cbd5e1;margin-bottom:14px;display:block}
.table-pro .table-empty div{color:var(--text-muted);font-size:14px}

/* Pagination - plus elegante */
.pagination{
    display:flex;justify-content:center;gap:6px;
    margin-top:20px;flex-wrap:wrap;
}
.pagination a{
    min-width:38px;height:38px;
    display:inline-flex;align-items:center;justify-content:center;
    padding:0 12px;
    border-radius:10px;
    background:var(--surface);
    border:1px solid var(--border-light);
    color:#475569;font-size:13px;font-weight:600;
    text-decoration:none;
    transition:all .15s;
}
.pagination a:hover{
    background:var(--primary-light);color:var(--primary);
    border-color:rgba(102,126,234,.25);
    transform:translateY(-1px);
}
.pagination a.current{
    background:linear-gradient(135deg,var(--primary),var(--secondary));
    color:#fff;border-color:transparent;
    box-shadow:0 4px 10px -2px rgba(102,126,234,.4);
}


/* ============================================================
   OUTPUT11 - Composition equipe : profile cards + multi-CV
   ============================================================ */

/* Card de generation IA des profils */
.team-genai-card{
    background:linear-gradient(135deg,#fff,#fafbff);
    border:1px solid var(--border-light);
    border-radius:14px;
    overflow:hidden;
}
.team-genai-head{
    border-bottom:1px solid var(--border-light);
    background:linear-gradient(135deg,#f5f7ff,#fff);
    display:flex;align-items:center;gap:14px;padding:16px 20px;
}
.team-genai-icon{
    width:42px;height:42px;border-radius:12px;flex:none;
    background:linear-gradient(135deg,var(--primary),var(--secondary));
    color:#fff;font-size:18px;
    display:flex;align-items:center;justify-content:center;
    box-shadow:0 4px 10px -2px rgba(102,126,234,.4);
}

/* Header des profils */
.profiles-header{
    display:flex;align-items:center;justify-content:space-between;
    padding:14px 18px;margin:18px 0 12px;
    background:linear-gradient(135deg,#fff,#f8fafc);
    border:1px solid var(--border-light);border-radius:14px;
    box-shadow:0 1px 2px rgba(15,23,42,.04);
    flex-wrap:wrap;gap:12px;
}
.profiles-header-title{
    display:flex;align-items:center;gap:10px;
    font-size:15px;font-weight:600;color:#1e293b;
}
.profiles-header-title i{color:var(--primary);font-size:16px}

/* Stack de profil cards */
.profile-stack{display:flex;flex-direction:column;gap:18px;margin-bottom:24px}

.profile-card{
    background:var(--surface);
    border:1px solid var(--border-light);
    border-radius:14px;
    overflow:hidden;
    box-shadow:0 1px 2px rgba(15,23,42,.04);
    transition:box-shadow .2s,transform .2s;
}
.profile-card:hover{box-shadow:0 4px 14px -4px rgba(15,23,42,.1)}

/* Head du profil card */
.profile-card-head{
    display:flex;align-items:center;gap:14px;
    padding:16px 20px;
    background:linear-gradient(180deg,#fafbff,#fff);
    border-bottom:1px solid var(--border-light);
    flex-wrap:wrap;
}
.profile-num{
    width:36px;height:36px;border-radius:10px;flex:none;
    background:var(--primary-light);color:var(--primary);
    font-weight:700;font-size:14px;
    display:flex;align-items:center;justify-content:center;
}
.profile-titles{flex:1;min-width:200px}
.profile-poste{margin:0;font-size:16px;font-weight:700;color:#1e293b;line-height:1.3}
.profile-exp{
    font-size:12.5px;color:var(--text-muted);margin-top:3px;
    display:inline-flex;align-items:center;gap:6px;
}
.profile-exp i{color:#94a3b8;font-size:11px}
.profile-meta-pills{display:flex;gap:6px;flex-wrap:wrap}
.meta-pill{
    display:inline-flex;align-items:center;gap:5px;
    padding:4px 10px;border-radius:10px;
    background:#f1f5f9;color:#475569;
    font-size:11.5px;font-weight:600;
}
.meta-pill i{font-size:10px;opacity:.8}
.meta-pill.cv-counter{background:#dbeafe;color:#1e40af}
.meta-pill.cv-counter.empty{background:#fef3c7;color:#92400e}
.profile-actions{display:flex;gap:6px;align-items:center}
.profile-actions form.inline{margin:0;padding:0;display:inline-flex}

/* Body du profil card */
.profile-card-body{padding:12px 20px;border-bottom:1px solid var(--border-light);background:#fcfdff}
.profile-respo{font-size:13px;color:#475569;line-height:1.55}

/* Section CV */
.cv-section{padding:16px 20px}
.cv-section-head{
    display:flex;justify-content:space-between;align-items:center;
    margin-bottom:14px;flex-wrap:wrap;gap:10px;
}
.cv-section-title{
    display:flex;align-items:center;gap:10px;flex-wrap:wrap;
    font-weight:600;color:#334155;font-size:13.5px;
}
.cv-section-title i{color:var(--primary)}
.badge-selected{
    display:inline-flex;align-items:center;gap:5px;
    padding:3px 10px;border-radius:10px;
    background:#d1fae5;color:#065f46;
    font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.3px;
}

/* Verdict global */
.cv-verdict{
    display:flex;align-items:flex-start;gap:12px;
    padding:12px 16px;border-radius:10px;margin-bottom:14px;
    font-size:13px;line-height:1.55;
}
.cv-verdict i{font-size:18px;flex:none;margin-top:1px}
.cv-verdict.no-match{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}
.cv-verdict.no-match i{color:#dc2626}
.cv-verdict.weak{background:#fffbeb;color:#92400e;border:1px solid #fde68a}
.cv-verdict.weak i{color:#d97706}

/* Grid des CV cards */
.cv-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
    gap:12px;margin-bottom:14px;
}

.cv-card{
    background:var(--surface);
    border:1.5px solid var(--border);
    border-radius:12px;
    padding:14px;
    position:relative;
    transition:all .2s;
}
.cv-card:hover{border-color:#cbd5e1;box-shadow:0 4px 12px -4px rgba(15,23,42,.12)}
.cv-card.is-selected{border-color:#059669;background:linear-gradient(180deg,#f0fdf4,#fff);box-shadow:0 0 0 3px rgba(5,150,105,.1)}
.cv-card.is-recommended:not(.is-selected){border-color:#f59e0b;background:linear-gradient(180deg,#fffbeb,#fff)}
.cv-card.verdict-insuffisant{opacity:.85}

.cv-card-ribbon{
    position:absolute;top:-1px;right:-1px;
    background:linear-gradient(135deg,#f59e0b,#d97706);
    color:#fff;font-size:10px;font-weight:700;
    padding:4px 10px;border-radius:0 11px 0 11px;
    text-transform:uppercase;letter-spacing:.4px;
    display:inline-flex;align-items:center;gap:5px;
}
.cv-card-ribbon i{font-size:9px}

.cv-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:10px}
.cv-card-name{flex:1;min-width:0}
.cv-card-name strong{font-size:14px;color:#1e293b;display:block}
.cv-card-name strong.muted{font-style:italic;font-weight:500}
.cv-card-filename{font-size:11.5px;color:var(--text-muted);margin-top:2px;display:inline-flex;align-items:center;gap:5px}
.cv-card-filename i{font-size:10px;opacity:.7}
.cv-selected-pill{
    background:#d1fae5;color:#065f46;
    font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.3px;
    padding:3px 8px;border-radius:8px;
    display:inline-flex;align-items:center;gap:4px;
    flex:none;
}

/* Score gauge */
.cv-score-block{margin:10px 0}
.cv-score-row{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.cv-score-gauge{
    flex:1;height:8px;border-radius:4px;
    background:#f1f5f9;overflow:hidden;position:relative;
}
.cv-score-fill{
    height:100%;border-radius:4px;
    background:linear-gradient(90deg,#94a3b8,#64748b);
    transition:width .8s ease-out;
}
.cv-score-gauge.verdict-bon .cv-score-fill{background:linear-gradient(90deg,#10b981,#059669)}
.cv-score-gauge.verdict-moyen .cv-score-fill{background:linear-gradient(90deg,#f59e0b,#d97706)}
.cv-score-gauge.verdict-insuffisant .cv-score-fill{background:linear-gradient(90deg,#ef4444,#dc2626)}
.cv-score-num{
    font-size:15px;font-weight:700;color:#1e293b;
    font-variant-numeric:tabular-nums;flex:none;
}
.cv-score-num span{font-size:11px;font-weight:500;color:var(--text-muted)}
.cv-verdict-label{
    font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;
    display:inline-flex;align-items:center;gap:5px;
}
.cv-verdict-label.verdict-bon{color:#059669}
.cv-verdict-label.verdict-moyen{color:#d97706}
.cv-verdict-label.verdict-insuffisant{color:#dc2626}

/* Resume IA */
.cv-summary{
    font-size:12.5px;color:#475569;line-height:1.55;
    background:#fafbff;padding:8px 10px;border-radius:8px;
    border:1px solid var(--border-light);margin:8px 0;
}

/* Points forts / faibles */
.cv-points{display:flex;flex-direction:column;gap:4px;margin:8px 0}
.cv-point{
    font-size:11.5px;line-height:1.45;
    display:flex;align-items:flex-start;gap:6px;
}
.cv-point i{
    font-size:9px;flex:none;margin-top:5px;
    width:14px;height:14px;border-radius:50%;
    display:inline-flex;align-items:center;justify-content:center;
}
.cv-point.pt-pos i{background:#d1fae5;color:#059669}
.cv-point.pt-neg i{background:#fee2e2;color:#dc2626}

/* Pas encore analyse */
.cv-no-analysis{
    font-size:12px;color:var(--text-muted);font-style:italic;
    padding:8px 0;display:flex;align-items:center;gap:6px;
}
.cv-extract-error{
    font-size:11.5px;color:#991b1b;background:#fef2f2;
    padding:6px 10px;border-radius:6px;margin-top:6px;
    display:flex;align-items:center;gap:6px;
}

/* Foot du CV card : actions */
.cv-card-foot{
    display:flex;gap:6px;justify-content:flex-end;align-items:center;
    margin-top:12px;padding-top:10px;border-top:1px solid var(--border-light);
    flex-wrap:wrap;
}
.cv-card-foot form.inline{margin:0;padding:0;display:inline-flex}
.cv-card-foot .btn-sm{padding:5px 10px;font-size:11.5px;height:auto;line-height:1.3}
.cv-del:hover{background:#fee2e2 !important;color:#dc2626 !important;border-color:#fecaca !important}

/* Empty state CV */
.cv-empty{
    text-align:center;padding:30px 20px;
    color:var(--text-muted);font-size:13px;
    background:#fafbff;border:1.5px dashed #cbd5e1;border-radius:10px;
    margin-bottom:14px;
}
.cv-empty i{font-size:32px;color:#cbd5e1;display:block;margin-bottom:8px}

/* Upload zone (drop label) */
.cv-upload-form{margin-top:8px}
.cv-drop-label{
    display:flex;align-items:center;justify-content:center;gap:10px;
    padding:14px 20px;
    background:linear-gradient(135deg,#fafbff,#f0f4ff);
    border:1.5px dashed var(--primary);border-radius:10px;
    cursor:pointer;transition:all .2s;
    color:var(--primary);font-size:13px;font-weight:600;
}
.cv-drop-label:hover{
    background:linear-gradient(135deg,#eef0ff,#dde2ff);
    border-color:var(--primary-dark);
    transform:translateY(-1px);
}
.cv-drop-label i{font-size:18px}

/* Responsive */
@media (max-width:760px){
    .profile-card-head{padding:12px 14px;gap:10px}
    .profile-poste{font-size:14px}
    .profile-num{width:30px;height:30px;font-size:12px}
    .cv-section{padding:12px 14px}
    .cv-grid{grid-template-columns:1fr;gap:10px}
}


/* ============================================================
   OUTPUT12 - CV deplaces dans le panneau d'edition
   ============================================================ */

/* Pills de verdict sur la liste des profils */
.meta-pill-success{background:#d1fae5;color:#065f46}
.meta-pill-warn{background:#fef3c7;color:#92400e}
.meta-pill-danger{background:#fee2e2;color:#991b1b}
.meta-pill-candidate{background:#e0e7ff;color:#3730a3}
.meta-pill-candidate i{color:#6366f1}

/* Panneau d'edition profil (anciennement modal) */
.edit-panel{
    margin-top:18px;
    border:1px solid var(--border);
    border-radius:14px;
    overflow:hidden;
    box-shadow:0 4px 14px -4px rgba(15,23,42,.1);
    background:var(--surface);
    animation:fadeInUp .25s ease-out;
}
@keyframes fadeInUp{
    from{opacity:0;transform:translateY(8px)}
    to{opacity:1;transform:translateY(0)}
}
.edit-panel-head{
    padding:14px 20px;
    background:linear-gradient(135deg,#fafbff,#f4f6fb);
    border-bottom:1px solid var(--border-light);
    display:flex;align-items:center;gap:14px;
}
.edit-panel-head h3{font-size:15px;color:#1e293b}

.edit-panel-form{margin:0;padding:0;border:0;border-radius:0;box-shadow:none}
.edit-panel-form .card-foot{
    border-top:1px solid var(--border-light);
    background:#fcfdff;
}

/* Hote de la section CV dans le panneau d'edition */
.edit-cv-host{
    border-top:1px solid var(--border);
    padding:0 20px 20px;
    background:#fafbff;
}
.cv-host-head{
    padding:18px 0 14px;
    border-bottom:1px solid var(--border-light);
    margin-bottom:16px;
}
.cv-host-title{
    margin:0 0 6px;font-size:14px;color:#334155;
    display:flex;align-items:center;gap:8px;
}
.cv-host-title i{color:var(--primary)}

/* Hint affiche en mode "creation" (pas encore d'ID) */
.cv-edit-hint{
    padding:14px 18px;border-radius:10px;
    background:#eef2ff;color:#3730a3;
    font-size:13px;line-height:1.5;
    border:1px solid #c7d2fe;
    display:flex;align-items:center;gap:10px;
}
.cv-edit-hint i{font-size:16px;color:#6366f1}


/* ============================================================
   OUTPUT13 - Slider de progression sur la vue traitement
   ============================================================ */
.section-meta-card{padding:14px 22px}
.section-meta-prog{
    display:flex;align-items:center;gap:14px;
    margin-top:12px;padding-top:12px;
    border-top:1px solid var(--border-light);
    flex-wrap:wrap;
}
.section-meta-prog-label{
    font-size:12px;font-weight:600;color:#475569;
    text-transform:uppercase;letter-spacing:.4px;
    display:inline-flex;align-items:center;gap:6px;
    flex:none;min-width:180px;
}
.section-meta-prog-label i{color:var(--primary);font-size:13px}
.section-meta-prog .prog-cell{min-width:240px}

