/* Charte « Bleu de travail » (CHARTE-002) : mêmes polices que serviceproi.fr, servies depuis cet outil. */
@font-face{font-family:"Archivo";font-style:normal;font-weight:100 900;font-stretch:62% 125%;font-display:swap;src:url(assets/fonts/archivo-latin-wdth-normal.woff2) format("woff2")}
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:400;font-display:swap;src:url(assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:700;font-display:swap;src:url(assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2")}
@font-face{font-family:"Atkinson Hyperlegible";font-style:italic;font-weight:400;font-display:swap;src:url(assets/fonts/atkinson-hyperlegible-latin-400-italic.woff2) format("woff2")}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:400 700;font-display:swap;src:url(assets/fonts/jetbrains-mono-latin.woff2) format("woff2")}

/* Charte graphique ServiceProi appliquée à l'outil de prospection.
   Tokens repris de partials/base-style.css (serviceproi-portail), adaptés
   à une interface dense (tableaux, formulaires) plutôt qu'à une page vitrine. */
:root {
    --sp-text: #14213D;
    --sp-primary: #1F3C74;
    --sp-primary-dark: #16305F;
    --sp-paper: #FBF8F2;
    --sp-section: #F2EDE2;
    --sp-border: #DDD4C2;
    --sp-muted: #5A6272;
    --sp-fil: #E07B24;
    --sp-radius: 6px;
    --sp-shadow: 0 1px 2px rgba(60, 48, 20, .06);
    --sp-display: "Archivo", "Atkinson Hyperlegible", system-ui, sans-serif;
    --sp-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --pf-success: #15803D;
    --pf-success-bg: #ECFDF3;
    --pf-warning: #9A4B10;
    --pf-warning-bg: #FDF3E4;
    --pf-danger: #B91C1C;
    --pf-danger-bg: #FEF2F2;
    --pf-info-bg: #E9EDF6;
}

* { box-sizing: border-box; }

body {
    font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
    margin: 0;
    background: var(--sp-paper);
    color: var(--sp-text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--sp-primary); }
a:hover { color: var(--sp-primary-dark); }

h1, h2, h3, .pf-stat strong { font-family: var(--sp-display); font-stretch: 108%; }
h1 { font-size: 1.75em; letter-spacing: -.02em; margin: 0 0 4px; font-weight: 600; }
h2 { font-size: 1.2em; margin: 1.6em 0 .6em; letter-spacing: -.012em; font-weight: 600; }
h3 { font-size: 1em; margin: 1.2em 0 .5em; }

.hint { color: var(--sp-muted); font-size: .92em; }

/* ---- Bandeau + navigation ---- */
.pf-header {
    background: #fff;
    border-bottom: 1px solid var(--sp-border);
    position: sticky;
    top: 0;
    z-index: 20;
}
.pf-header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.pf-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.pf-brand img { display: block; }
.pf-brand-sep { color: var(--sp-border); }
.pf-brand-app { font-weight: 700; color: var(--sp-text); font-size: .95em; }
.pf-suite-nav { display: flex; gap: 18px; font-size: .88em; font-weight: 600; }
.pf-suite-nav a { text-decoration: none; color: var(--sp-muted); }
.pf-suite-nav a:hover { color: var(--sp-primary); }

.pf-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 20px 64px;
}

.pf-breadcrumb { font-size: .85em; color: var(--sp-muted); margin-bottom: 14px; }
.pf-breadcrumb a { color: var(--sp-muted); text-decoration: none; }
.pf-breadcrumb a:hover { color: var(--sp-primary); text-decoration: underline; }
.pf-breadcrumb-sep { margin: 0 6px; }
.pf-breadcrumb span[aria-current] { color: var(--sp-text); font-weight: 600; }

.pf-footer { text-align: center; padding: 24px 20px 40px; color: var(--sp-muted); font-size: .85em; }
.pf-footer a { color: var(--sp-muted); }

/* ---- Cartes ---- */
.pf-card, table.detail, table.candidates, fieldset {
    background: #fff;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
}
.pf-card { padding: 20px 22px; margin-bottom: 18px; }

/* ---- Boutons (styles génériques : couvre <button> et a.button sans avoir
   à toucher chaque template — voir la logique PHP existante) ---- */
button, .button, a.button, input[type="submit"] {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: .92em;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid var(--sp-border);
    background: #fff;
    color: var(--sp-text);
    text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
button:hover, .button:hover, a.button:hover, input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 23, 48, .12);
}

/* Actions principales, reconnues par leur value= sans modifier le PHP */
a.button,
button[name="action"][value="run_step"],
button[name="action"][value="create_lead"],
button[type="submit"]:not([name="action"]),
button[name="action"][value="generate_message"],
button[name="action"][value="validate_message"],
button[name="action"][value="send_email"],
button[name="action"][value="update_subject"],
button[name="action"][value="update_offer"],
button[name="action"][value="set_website"],
button[name="action"][value="discover_website"],
button[name="action"][value="collect"] {
    background: var(--sp-primary);
    border-color: var(--sp-primary);
    color: #fff;
}
a.button:hover,
button[name="action"][value="run_step"]:hover,
button[name="action"][value="create_lead"]:hover,
button[type="submit"]:not([name="action"]):hover,
button[name="action"][value="generate_message"]:hover,
button[name="action"][value="validate_message"]:hover,
button[name="action"][value="send_email"]:hover,
button[name="action"][value="update_subject"]:hover,
button[name="action"][value="update_offer"]:hover,
button[name="action"][value="set_website"]:hover,
button[name="action"][value="discover_website"]:hover,
button[name="action"][value="collect"]:hover {
    background: var(--sp-primary-dark);
    border-color: var(--sp-primary-dark);
}

/* Actions destructives / de retrait */
button[name="action"][value="reject"],
button[name="action"][value="annuler"],
button[name="action"][value="bulk_reject"],
button[name="action"][value="mark_opposition"],
button[name="action"][value="reject_message"] {
    background: var(--pf-danger-bg);
    border-color: #F5B5B5;
    color: var(--pf-danger);
}
button[name="action"][value="reject"]:hover,
button[name="action"][value="annuler"]:hover,
button[name="action"][value="bulk_reject"]:hover,
button[name="action"][value="mark_opposition"]:hover,
button[name="action"][value="reject_message"]:hover {
    background: #FEE2E2;
}

button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---- Bannières de statut ---- */
.notice, .error {
    padding: 12px 16px;
    border-radius: var(--sp-radius);
    margin: 0 0 16px;
    font-size: .95em;
}
.notice { background: var(--pf-success-bg); border: 1px solid #BBF0D2; color: var(--pf-success); }
.error { background: var(--pf-danger-bg); border: 1px solid #F5B5B5; color: var(--pf-danger); }

/* ---- Tableaux ---- */
.table-wrap { overflow-x: auto; margin: 0 0 18px; border-radius: var(--sp-radius); }
table { border-collapse: collapse; width: 100%; }
table.detail, table.candidates { border-spacing: 0; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--sp-border); }
table.detail th { width: 260px; color: var(--sp-muted); font-weight: 600; background: var(--sp-section); }
table.candidates thead th {
    background: var(--sp-section);
    color: var(--sp-muted);
    font-size: .78em;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
    border-bottom: 1px solid var(--sp-border);
}
table.candidates tbody tr:last-child td { border-bottom: none; }
table.candidates tbody tr:hover { background: var(--sp-section); }
table.progress th, table.progress td { text-align: center; }
table.progress { table-layout: fixed; }
table.progress td { font-size: 1.3em; font-weight: 800; }
table.progress th { font-size: .78em; text-transform: uppercase; letter-spacing: .03em; }

/* ---- Jauge de progression (collecte par lot, SP-025) ---- */
.pf-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.pf-progress[hidden] { display: none; }
.pf-progress-bar {
    width: 160px;
    height: 8px;
    border-radius: 999px;
    background: var(--sp-border);
    overflow: hidden;
}
.pf-progress-bar-fill {
    width: 40%;
    height: 100%;
    border-radius: 999px;
    background: var(--sp-primary);
    animation: pf-progress-indeterminate 1.4s ease-in-out infinite;
}
@keyframes pf-progress-indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}
#pf-run-step-timer { color: var(--sp-muted); font-size: .9em; }

/* ---- Statuts / badges ---- */
.status-Prequalifie, .status-Confirme { color: var(--pf-success); font-weight: 700; }
.status-A_verifier, .status-Probable { color: var(--pf-warning); font-weight: 700; }
.status-Rejete { color: var(--pf-danger); font-weight: 700; }
.status-Non_trouve { color: var(--sp-muted); }

.badge-status-BROUILLON, .badge-status-CONFIGUREE { background: var(--sp-section); color: var(--sp-muted); padding: .2em .65em; border-radius: 20px; font-size: .72em; font-weight: 700; letter-spacing: .02em; }
.badge-status-EN_COURS { background: var(--pf-info-bg); color: var(--sp-primary-dark); padding: .2em .65em; border-radius: 20px; font-size: .72em; font-weight: 700; letter-spacing: .02em; }
.badge-status-TERMINEE { background: var(--pf-success-bg); color: var(--pf-success); padding: .2em .65em; border-radius: 20px; font-size: .72em; font-weight: 700; letter-spacing: .02em; }
.badge-status-PAUSEE { background: var(--pf-warning-bg); color: var(--pf-warning); padding: .2em .65em; border-radius: 20px; font-size: .72em; font-weight: 700; letter-spacing: .02em; }
.badge-status-ANNULEE { background: var(--pf-danger-bg); color: var(--pf-danger); padding: .2em .65em; border-radius: 20px; font-size: .72em; font-weight: 700; letter-spacing: .02em; }

/* ---- Formulaires ---- */
.search-form label, .campaign-form label { display: block; margin-bottom: .6em; font-weight: 600; font-size: .92em; }
fieldset { margin-bottom: 16px; padding: 18px 20px; }
fieldset legend { font-weight: 700; font-size: .95em; padding: 0 6px; color: var(--sp-text); }
fieldset .hint { font-weight: 400; margin: .3em 0 .8em; }
fieldset label { font-weight: 500; }
input[type="text"], input[type="url"], input[type="search"], input[type="number"], input[type="email"],
input[type="password"],
textarea, select {
    font-family: inherit;
    font-size: .95em;
    padding: 8px 10px;
    border: 1px solid var(--sp-border);
    border-radius: 7px;
    background: #fff;
    color: var(--sp-text);
    width: 100%;
    max-width: 32em;
}
textarea { max-width: 100%; }
input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--sp-primary);
    outline-offset: 1px;
    border-color: var(--sp-primary);
}
.checkbox-inline { display: inline-flex !important; align-items: center; gap: .3em; margin: 0 1.2em .5em 0; font-weight: 400 !important; width: auto; }
.checkbox-inline input { width: auto; }

/* Sections repliables (formulaire de campagne) */
.pf-section {
    background: #fff;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
    margin-bottom: 14px;
    overflow: hidden;
}
.pf-section > summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.pf-section > summary::-webkit-details-marker { display: none; }
.pf-section > summary::after {
    content: "＋";
    color: var(--sp-muted);
    font-weight: 400;
    font-size: 1.1em;
    transition: transform .15s ease;
}
.pf-section[open] > summary::after { content: "－"; }
.pf-section > summary .pf-section-tag {
    font-weight: 600;
    font-size: .72em;
    color: var(--sp-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-left: auto;
    margin-right: 8px;
}
.pf-section-body { padding: 4px 20px 20px; border-top: 1px solid var(--sp-border); }
.pf-section-body fieldset { border: none; box-shadow: none; padding: 14px 0 0; margin: 0; }

/* ---- Barre de filtres ---- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .7em;
    align-items: center;
    background: #fff;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
    padding: 14px 16px;
    margin: 0 0 18px;
}
.filter-bar label { display: inline-flex; align-items: center; gap: .35em; font-size: .9em; font-weight: 600; }
.filter-bar select, .filter-bar input { width: auto; max-width: none; }

/* SP-027 — actions en lot dupliquées en haut ET en bas du tableau de résultats */
.pf-bulk-actions { display: flex; align-items: center; gap: .7em; margin: 0 0 12px; flex-wrap: wrap; }
.pf-link-button {
    background: none; border: none; box-shadow: none; padding: 0;
    color: var(--sp-primary); text-decoration: underline; font-weight: 600; cursor: pointer;
}
.pf-link-button:hover { background: none; color: var(--sp-primary); opacity: .8; }

/* ---- Dashboard (index.php) ---- */
.pf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.pf-stat {
    background: #fff;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
    padding: 16px 18px;
}
.pf-stat strong { display: block; font-size: 1.7em; letter-spacing: -.02em; }
.pf-stat span { color: var(--sp-muted); font-size: .82em; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.pf-stat-highlight { border-color: var(--pf-success); background: var(--pf-success-bg); }
.pf-stat-highlight strong { color: var(--pf-success); }

.pf-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }

.pf-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--sp-muted);
}

/* ---- Timeline (candidate.php, étapes 1-4) ---- */
.pf-step-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pf-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--pf-info-bg);
    color: var(--sp-primary-dark);
    font-size: .8em;
    font-weight: 800;
    flex: none;
}

/* ---- Connexion (SP-025) ---- */
.pf-login-card { max-width: 24em; margin: 60px auto 0; }
.pf-login-card label { display: block; font-weight: 600; font-size: .92em; margin: 1em 0 .4em; }
.pf-login-card label:first-of-type { margin-top: .6em; }
.pf-login-card button { margin-top: 1.4em; width: 100%; justify-content: center; }
.pf-login-error { color: var(--pf-danger); font-weight: 600; margin: .6em 0 0; }

@media (max-width: 720px) {
    .pf-header-inner { flex-wrap: wrap; }
    .pf-main { padding: 18px 14px 48px; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    table.candidates thead { display: none; }
    table.candidates, table.candidates tbody, table.candidates tr, table.candidates td { display: block; width: 100%; }
    table.candidates tr { margin-bottom: 1em; border: 1px solid var(--sp-border); border-radius: var(--sp-radius); overflow: hidden; }
    table.candidates td { border: none; border-bottom: 1px solid var(--sp-section); }
    table.detail th { width: auto; }
}

/* ---- SP-028 : cartes cliquables, pagination, campagnes annulées ---- */
a.pf-stat-link { color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.pf-stat-link:hover { border-color: var(--sp-primary); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
a.pf-stat-link:focus-visible { outline: 2px solid var(--sp-primary); outline-offset: 2px; }
.pf-pager { display: flex; align-items: center; gap: 1em; margin: 10px 0; font-size: .9em; flex-wrap: wrap; }
.pf-pager span { color: var(--sp-muted); }
.pf-archived { margin-top: 24px; }
.pf-archived summary { cursor: pointer; color: var(--sp-muted); font-weight: 600; margin-bottom: 10px; }

/* ---- SP-029 : associations, dossier prospect ---- */
.pf-tag { display: inline-block; margin-left: .4em; padding: .05em .5em; border-radius: 10px; font-size: .72em; font-weight: 700; background: var(--pf-info-bg); color: var(--sp-primary-dark); vertical-align: middle; }
.pf-facts-used { background: var(--sp-section); border-left: 3px solid var(--sp-primary); padding: .6em .9em; margin: .6em 0; font-size: .9em; }
.pf-facts-used ul { margin: .3em 0 0; padding-left: 1.2em; }
table.pf-facts td:first-child { white-space: nowrap; font-weight: 600; color: var(--sp-muted); }
.pf-google-summary { margin: .6em 0; }

/* ---- SP-032 : parcours guidé, tri rapide, formulaire simplifié ---- */
.pf-journey { background: var(--sp-card, #fff); border: 1px solid var(--sp-border); border-radius: var(--sp-radius); padding: 18px 20px; margin: 10px 0 22px; }
.pf-journey ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.pf-journey-step { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--sp-border); background: var(--sp-section); }
.pf-journey-step.is-done { opacity: .75; }
.pf-journey-step.is-current { border-color: var(--sp-primary); background: var(--pf-info-bg); box-shadow: 0 0 0 2px var(--pf-info-bg); }
.pf-journey-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; font-size: .85em; background: var(--sp-border); color: var(--sp-text); }
.pf-journey-step.is-done .pf-journey-icon { background: var(--pf-success); color: #fff; }
.pf-journey-step.is-current .pf-journey-icon { background: var(--sp-primary); color: #fff; }
.pf-journey-title { font-weight: 700; }
.pf-journey-summary { font-size: .85em; color: var(--sp-muted); }
.pf-journey-link { font-size: .85em; background: none; border: none; padding: 0; color: var(--sp-primary); text-decoration: underline; cursor: pointer; text-align: left; }
.pf-journey-next { margin-top: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.pf-journey-cta { font-size: 1.05em; padding: .7em 1.4em; }
.pf-inline-form { display: inline; margin: 0; }
.pf-tabs { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.pf-tabs a { padding: .45em .9em; border-radius: 20px; border: 1px solid var(--sp-border); text-decoration: none; color: var(--sp-text); font-weight: 600; font-size: .9em; }
.pf-tabs a.is-active { background: var(--sp-primary); border-color: var(--sp-primary); color: #fff; }
.pf-triage-card h2 { font-size: 1.35em; }
.pf-triage-facts { list-style: none; padding: 0; margin: .6em 0; display: grid; gap: .35em; }
.pf-triage-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-top: 16px; }
.pf-triage-actions form { margin: 0; }
.pf-btn-keep, .pf-btn-drop, .pf-btn-later { font-size: 1.1em; padding: .75em 1.6em; border-radius: 10px; }
.pf-btn-keep { background: var(--pf-success); border-color: var(--pf-success); color: #fff; }
.pf-btn-drop { background: var(--pf-danger); border-color: var(--pf-danger); color: #fff; }
.pf-btn-later { background: var(--sp-section); color: var(--sp-text); border: 1px solid var(--sp-border); }
.pf-reasons { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pf-chip { font-size: .8em; padding: .35em .8em; border-radius: 16px; background: var(--sp-section); color: var(--sp-text); border: 1px solid var(--sp-border); }
.pf-chip:hover { border-color: var(--sp-primary); color: var(--sp-primary); background: var(--sp-section); }
.pf-triage-site { margin: 10px 0; display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
kbd { border: 1px solid var(--sp-border); border-bottom-width: 2px; border-radius: 4px; padding: 0 .35em; font-size: .85em; background: var(--sp-section); }
fieldset.pf-plain { border: none; box-shadow: none; padding: 0; margin: 0; }
.pf-presets { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pf-summary ul { margin-bottom: 0; }
.pf-subsection { margin: 10px 0; }
.pf-next-link { font-weight: 600; font-size: .9em; }
.pf-howto-list { margin: 0; padding-left: 1.3em; display: grid; gap: .4em; }

/* Refonte 2026-09-28 — complétude de l'enrichissement et étapes par campagne. */
.pf-complete { display: inline-block; padding: .15em .65em; border-radius: 12px; font-size: .78em; font-weight: 700; white-space: nowrap; }
.pf-complete-prete { background: #e3f4e8; color: #1d6b3a; }
.pf-complete-partielle { background: #fff4d6; color: #7a5a00; }
.pf-complete-injoignable { background: #fbe4e4; color: #8a1f1f; }
.pf-complete-a_enrichir { background: var(--sp-section); color: var(--sp-text); }
.pf-enrichment-head { margin: .2em 0 .4em; }
.pf-stage { display: inline-block; padding: .1em .55em; border-radius: 10px; font-size: .78em; font-weight: 700; background: var(--sp-section); }
.pf-stage-qualifie { background: #e3f4e8; color: #1d6b3a; }
.pf-stage-prospect { background: var(--sp-primary); color: #fff; }
.pf-stage-ecarte { background: #fbe4e4; color: #8a1f1f; }
.pf-bulk-validate { margin: 0 0 14px; }
.pf-report-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
@media print {
    .pf-header, .pf-breadcrumb, .pf-report-actions, .pf-journey, form { display: none !important; }
    .pf-main { max-width: none; padding: 0; }
}


/* ---- UX 2026-10-03 : en-têtes d'action, tableaux larges, sommaire de page ---- */
.pf-head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
a.button.pf-secondary, button.pf-secondary { background: #fff; border-color: var(--sp-border); color: var(--sp-text); }
a.button.pf-secondary:hover { background: var(--sp-section); }
.pf-nowrap { white-space: nowrap; }
.pf-campaign-name { font-weight: 700; }
.pf-row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 150px; }
.pf-row-actions form { margin: 0; display: inline-flex !important; }
.pf-row-actions a.button, .pf-row-actions button { padding: 6px 12px; font-size: .86em; }
.pf-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; position: sticky; top: 0; z-index: 5; padding: 8px 0; background: var(--sp-bg, #fff); }
.pf-jump a { padding: 6px 14px; border: 1px solid var(--sp-border); border-radius: 999px; background: #fff; font-size: .88em; font-weight: 600; text-decoration: none; color: var(--sp-text); }
.pf-jump a:hover { border-color: var(--sp-primary); color: var(--sp-primary); }
/* tableau des fiches : défilement horizontal signalé par des ombres, colonne « Structure » figée */
.pf-scroll { background:
    linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left center / 40px 100% no-repeat local,
    linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right center / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(11,23,48,.18), rgba(11,23,48,0)) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(11,23,48,.18), rgba(11,23,48,0)) right center / 12px 100% no-repeat scroll; }
.pf-scroll:focus-visible { outline: 2px solid var(--sp-primary); outline-offset: 2px; }
@media (min-width: 761px) {
    table.pf-wide { min-width: 1180px; }
    table.pf-wide th:nth-child(2), table.pf-wide td:nth-child(2) { position: sticky; left: 0; background: #fff; z-index: 1; box-shadow: 1px 0 0 var(--sp-border); min-width: 170px; }
    table.pf-wide tbody tr:hover td:nth-child(2) { background: var(--sp-section); }
    table.pf-wide td:nth-child(3), table.pf-wide td:nth-child(4), table.pf-wide td:nth-child(5), table.pf-wide td:nth-child(12), table.pf-wide td:nth-child(13) { white-space: nowrap; }
}
table.candidates .pf-next-link { display: block; min-width: 210px; }
@media (max-width: 760px) {
    table.candidates td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font-size: .7em; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--sp-muted); margin-bottom: 2px; }
    .pf-row-actions { flex-wrap: wrap; }
    .pf-jump { position: static; }
}


/* ---- UI 2026-10-03 : charte « Bleu de travail » (indigo, écru, fil orange) ---- */
.pf-header { border-bottom: 1px solid var(--sp-border); background: var(--sp-paper); box-shadow: 0 1px 0 rgba(224, 123, 36, .35); }
.pf-brand-app { font-family: var(--sp-mono); font-size: .78em; letter-spacing: .08em; text-transform: uppercase; color: var(--sp-primary); }
.pf-brand-sep { color: var(--sp-fil); }
.pf-suite-nav a { color: var(--sp-muted); }
.pf-suite-nav a:hover { color: var(--sp-primary); text-decoration: underline; text-decoration-color: var(--sp-fil); text-underline-offset: 4px; }
a { text-underline-offset: 3px; }
/* surtitres et en-têtes de tableau en chasse fixe, comme les surtitres du site */
table.candidates thead th, .pf-stat span, table.detail th { font-family: var(--sp-mono); font-size: .7em; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.pf-stat { background: #fff; border-radius: var(--sp-radius); }
.pf-stat strong { font-weight: 600; letter-spacing: -.02em; }
.pf-stat-highlight { background: var(--pf-success-bg); }
/* bouton principal : indigo, avec le « point de couture » orange du site */
a.button:not(.pf-secondary), button[name="action"][value="run_step"], button[name="action"][value="collect"], button[name="action"][value="validate_message"] { box-shadow: inset 0 0 0 2px var(--sp-primary), inset 0 0 0 3px var(--sp-fil); }
a.button:not(.pf-secondary):hover, button[name="action"][value="run_step"]:hover, button[name="action"][value="collect"]:hover { background: var(--sp-primary-dark); }
button, .button, a.button, input[type="submit"] { border-radius: var(--sp-radius); }
:focus-visible { outline: 2px solid var(--sp-fil); outline-offset: 2px; }
table.candidates tbody tr:hover, .pf-jump a:hover { background: var(--sp-section); }
.pf-jump { background: var(--sp-paper); }
.pf-footer { border-top: 1px dashed rgba(224, 123, 36, .55); margin-top: 24px; }
input[type="text"], input[type="search"], input[type="email"], input[type="number"], select, textarea { border-radius: var(--sp-radius); border: 1px solid var(--sp-border); background: #fff; font-family: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--sp-primary); box-shadow: 0 0 0 3px rgba(31, 60, 116, .15); outline: none; }
/* puces de motif d'écart : discrètes (le sélecteur générique des boutons « submit » les rendait aussi fortes que l'action principale) */
button[type="submit"].pf-chip { background: #fff; color: var(--sp-text); border: 1px solid var(--sp-border); box-shadow: none; font-weight: 600; }
button[type="submit"].pf-chip:hover { background: var(--sp-section); border-color: var(--sp-primary); transform: none; }
[class^="badge-status-"] { white-space: nowrap; display: inline-block; }

/* Parcours simplifié (2026-10-12) : création en 3 questions, écran « Décider ». */
.pf-quick { max-width: 720px; }
.pf-quick-q { display: flex; align-items: center; gap: .6em; margin: 0 0 .8em; font-size: 1.2em; }
.pf-quick-q span { display: inline-grid; place-items: center; width: 1.8em; height: 1.8em; border-radius: 50%; background: var(--sp-primary); color: #fff; font-size: .85em; }
.pf-quick-field { display: block; margin: .8em 0 0; font-weight: 600; }
.pf-quick-field input { display: block; width: 100%; margin-top: .35em; font-size: 1.05em; padding: .55em .7em; }
.pf-choices { display: flex; flex-wrap: wrap; gap: .6em; }
.pf-choice { display: inline-flex; align-items: center; gap: .5em; padding: .7em 1.1em; border: 1px solid var(--sp-border, #d4d9e2); border-radius: 10px; cursor: pointer; font-weight: 600; background: #fff; }
.pf-choice:has(input:checked) { border-color: var(--sp-primary); background: var(--pf-info-bg); }
.pf-quick-submit { font-size: 1.1em; padding: .8em 1.6em; }
.pf-decide { max-width: 860px; }
.pf-decide-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5em; }
.pf-decide-message textarea { width: 100%; min-height: 16em; font: inherit; line-height: 1.5; padding: .7em; }
.pf-decide-subject { font-weight: 600; margin: .2em 0 .6em; }
.pf-decide-actions { display: flex; flex-wrap: wrap; gap: .6em; margin: 1em 0 .4em; }
.pf-decide-actions button { font-size: 1.05em; padding: .75em 1.4em; }
.pf-decide-wait { padding: 1em; background: var(--pf-info-bg); border-radius: 8px; }
.pf-campaign-cards { display: grid; gap: 14px; }
.pf-campaign-card { display: flex; justify-content: space-between; align-items: center; gap: 1em; flex-wrap: wrap; }
.pf-campaign-card h2 { margin: 0 0 .2em; font-size: 1.15em; }
.pf-campaign-card p { margin: .15em 0; }
.pf-campaign-card .pf-row-actions { display: flex; gap: .4em; flex-wrap: wrap; align-items: center; }
.pf-journey-step.is-run .pf-journey-icon { background: var(--sp-primary); color: #fff; }
