/*
 * Assistant SPANCO — feuille de style commune à tous les domaines.
 * Les couleurs de marque viennent des variables --brand-* servies par /theme
 * (sélecteur [data-brand="<code>"]). Ne jamais écrire une couleur de marque en dur ici.
 */

/* Valeurs par défaut (écrans sans domaine : connexion, choix du domaine) */
:root,
[data-brand="default"] {
    --brand-primary: #3E3278;
    --brand-on-primary: #FFFFFF;
    --brand-primary-dark: #2A2254;
    --brand-secondary: #7EBEEC;
    --brand-surface: #F4F4F8;
    --brand-text: #1E1B2E;
    --brand-gradient: linear-gradient(90deg, #7969BE 0%, #97CAEE 50%, #FAA818 100%);
}

:root {
    --bg: #F7F7FA;
    --card: #FFFFFF;
    --border: #E3E3EC;
    --muted: #5F6170;
    --danger: #B42318;
    --danger-bg: #FEF3F2;
    --success: #067647;
    --success-bg: #ECFDF3;
    --success-bg-strong: #D1FADF;
    --on-success: #FFFFFF;
    --info-bg: #EFF4FF;
    --highlight: #FFF1A8;
    --radius: 12px;
    --radius-small: 8px;
    --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 4px 12px rgb(16 24 40 / 6%);
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-title: "Poppins", var(--font-body);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* L'attribut hidden l'emporte toujours, même sur un élément mis en grille ou en flex */
[hidden] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

/* Sans animation pour qui l'a demandé dans son système */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--brand-text);
    background: var(--bg);
}

h1, h2, h3 {
    font-family: var(--font-title);
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 .5rem;
    color: var(--brand-primary-dark);
}

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

img {
    max-width: 100%;
}

code {
    font-size: .875em;
    background: var(--brand-surface);
    padding: .1em .35em;
    border-radius: 4px;
}

small,
.muted {
    color: var(--muted);
}

:focus-visible {
    outline: 3px solid var(--brand-secondary);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }
}

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 44px;
    padding: .55rem 1.1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}

.btn--primary {
    background: var(--brand-primary);
    color: var(--brand-on-primary);
}

.btn--primary:hover {
    background: var(--brand-primary-dark);
    color: #FFFFFF;
}

.btn--secondary {
    background: var(--brand-surface);
    color: var(--brand-primary-dark);
    border-color: var(--border);
}

.btn--ghost {
    background: transparent;
    color: var(--brand-primary-dark);
    border-color: var(--border);
}

.btn--ghost:hover,
.btn--secondary:hover {
    background: var(--brand-surface);
}

.btn--small {
    min-height: 36px;
    padding: .3rem .75rem;
    font-size: .875rem;
}

.btn--block {
    width: 100%;
}

.inline-form {
    display: inline;
    margin: 0;
}

/* ---------- Badges, puces, statuts ---------- */
.badge {
    display: inline-block;
    padding: .1rem .5rem;
    border-radius: 999px;
    background: var(--brand-surface);
    color: var(--brand-primary-dark);
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}

.chip {
    display: inline-block;
    margin: 0 .25rem .25rem 0;
    padding: .1rem .55rem;
    border-radius: 999px;
    border: 1px solid var(--brand-primary);
    color: var(--brand-primary-dark);
    background: var(--brand-surface);
    font-size: .8125rem;
}

.status {
    font-size: .8125rem;
    font-weight: 600;
}

.status--on {
    color: var(--success);
}

.status--off {
    color: var(--muted);
}

/* ---------- Messages ---------- */
.flashes {
    margin-bottom: 1rem;
}

.flash {
    margin: 0 0 .5rem;
    padding: .75rem 1rem;
    border-radius: var(--radius-small);
    border: 1px solid var(--border);
    background: var(--info-bg);
}

.flash--success {
    background: var(--success-bg);
    border-color: #ABEFC6;
    color: var(--success);
}

.flash--error {
    background: var(--danger-bg);
    border-color: #FECDCA;
    color: var(--danger);
}

.notice {
    padding: .75rem 1rem;
    border-radius: var(--radius-small);
    background: var(--info-bg);
    font-size: .9375rem;
}

/* ---------- Cartes ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.card__title {
    font-size: 1.5rem;
}

.card__lead {
    color: var(--muted);
    margin: 0 0 1.25rem;
}

/* ---------- Écrans sans domaine (connexion, choix, erreurs) ---------- */
.guest {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 15% 10%, rgb(121 105 190 / 18%), transparent 45%),
        radial-gradient(circle at 85% 90%, rgb(250 168 24 / 14%), transparent 45%),
        var(--bg);
}

.guest__main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.guest__footer {
    padding: 16px;
    text-align: center;
    font-size: .8125rem;
    color: var(--muted);
}

.card--auth {
    width: 100%;
    max-width: 440px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card--auth::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--brand-gradient);
}

.auth-logo {
    display: block;
    height: 44px;
    width: auto;
    margin: .75rem auto 1.5rem;
}

.card--auth-wide {
    max-width: 520px;
}

/* Formulaires de connexion : champs alignés à gauche dans la carte centrée. */
.auth-form {
    display: grid;
    gap: 1rem;
    text-align: left;
}

.auth-note {
    margin: 1.25rem 0 0;
    font-size: .875rem;
    color: var(--muted);
}

/* Compte en cours de connexion, rappelé aux étapes suivantes. */
.auth-account {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0 0 1.25rem;
    padding: .5rem .75rem;
    border-radius: var(--radius-small);
    background: var(--brand-surface);
    font-weight: 600;
}

.auth-account .link-small {
    font-weight: 400;
}

.field__input--code {
    font-size: 1.25rem;
    letter-spacing: .2em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Configuration de la double authentification */
.totp-steps {
    margin: 0 0 1.25rem;
    padding-left: 1.25rem;
    text-align: left;
    display: grid;
    gap: .75rem;
}

.totp-qr {
    display: block;
    margin: .75rem auto .5rem;
    padding: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.totp-secret {
    display: block;
    text-align: center;
    font-size: .875rem;
    color: var(--muted);
}

.totp-secret code {
    display: inline-block;
    margin-top: .25rem;
    font-size: .9375rem;
    color: var(--brand-text);
    letter-spacing: .05em;
    user-select: all;
}

.recovery {
    display: grid;
    gap: .75rem;
    justify-items: center;
    margin-bottom: 1.25rem;
    text-align: left;
}

.recovery__codes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem 1.5rem;
    font-size: 1rem;
}

.recovery__codes code {
    letter-spacing: .05em;
}

.error-code {
    font-family: var(--font-title);
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.trace {
    margin-top: 1rem;
    max-height: 300px;
    overflow: auto;
    text-align: left;
    font-size: .75rem;
    white-space: pre-wrap;
    background: var(--brand-surface);
    padding: .75rem;
    border-radius: var(--radius-small);
}

/* ---------- Choix du domaine ---------- */
.domain-picker {
    width: 100%;
    max-width: 960px;
    text-align: center;
}

.domain-picker__title {
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    margin-bottom: 1.5rem;
}

.domain-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .domain-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1100px) {
    .domain-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .domain-picker {
        max-width: 1160px;
    }
}

.domain-card {
    margin: 0;
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.domain-card__button,
.domain-card--disabled {
    width: 100%;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: 2rem 1.25rem 1.5rem;
    font: inherit;
    color: var(--brand-text);
}

.domain-card__button {
    background: transparent;
    border: 0;
    cursor: pointer;
}

.domain-card:not(.domain-card--disabled):hover {
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    transition: transform .15s, border-color .15s;
}

.domain-card__band {
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: var(--brand-gradient);
}

.domain-card__logo {
    height: 40px;
    width: auto;
    max-width: 85%;
}

.domain-card__name {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--brand-primary-dark);
}

.domain-card__tagline {
    font-size: .875rem;
    color: var(--muted);
}

.domain-card__cta {
    margin-top: .25rem;
    padding: .35rem .9rem;
    border-radius: 999px;
    background: var(--brand-primary);
    color: var(--brand-on-primary);
    font-weight: 600;
    font-size: .875rem;
}

.domain-card--disabled {
    filter: grayscale(1);
    opacity: .6;
}

.domain-card__status {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--muted);
}

.domain-picker__logout {
    margin-top: 1.5rem;
}

/* ---------- Barre supérieure ---------- */
.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar::after {
    content: "";
    display: block;
    height: 3px;
    background: var(--brand-gradient);
}

.topbar__inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 64px;
}

.topbar__brand {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .1rem;
    text-decoration: none;
    margin-right: auto;
    min-width: 0;
}

.topbar__logo {
    height: 28px;
    width: auto;
}

.topbar__app {
    font-size: .6875rem;
    line-height: 1.2;
    letter-spacing: .02em;
    color: var(--muted);
    white-space: nowrap;
}

.topbar__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: transparent;
    cursor: pointer;
}

.burger,
.burger::before,
.burger::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--brand-primary-dark);
    position: relative;
}

.burger::before,
.burger::after {
    content: "";
    position: absolute;
}

.burger::before {
    top: -6px;
}

.burger::after {
    top: 6px;
}

.topbar__nav {
    display: none;
    width: 100%;
    padding-bottom: 12px;
}

.topbar__nav.is-open {
    display: block;
}

.nav {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav__link {
    display: flex;
    align-items: center;
    gap: .4rem;
    min-height: 44px;
    padding: .5rem .75rem;
    border-radius: var(--radius-small);
    text-decoration: none;
    color: var(--brand-text);
    font-weight: 500;
}

.nav__link:hover {
    background: var(--brand-surface);
}

.nav__link.is-active {
    background: var(--brand-surface);
    color: var(--brand-primary-dark);
    font-weight: 600;
}

.nav__link--disabled {
    color: var(--muted);
    cursor: default;
}

.nav__link--disabled:hover {
    background: transparent;
}

.topbar__account {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem .75rem;
}

.domain-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 36px;
    padding: .25rem .75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: .875rem;
    background: var(--brand-surface);
}

.domain-chip__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand-gradient);
}

.domain-chip__switch {
    color: var(--muted);
}

.user-name {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .875rem;
    color: var(--muted);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
    padding: .3rem .5rem;
    border-radius: var(--radius-small);
}

.user-name:hover,
.user-name.is-active {
    background: var(--brand-surface);
    color: var(--brand-primary);
}

/* Menu complet sur grand écran ; en dessous (tablette, mobile) : bouton menu */
@media (min-width: 1100px) {
    .topbar__inner {
        flex-wrap: nowrap;
    }

    .topbar__toggle {
        display: none;
    }

    .topbar__brand {
        margin-right: 0;
        flex-shrink: 0;
    }

    .topbar__nav,
    .topbar__nav.is-open {
        display: flex;
        align-items: center;
        flex: 1;
        width: auto;
        padding-bottom: 0;
        gap: 1rem;
    }

    .nav {
        flex-direction: row;
        margin: 0 auto 0 1rem;
    }

    .nav__link {
        min-height: 40px;
    }
}

/* ---------- Pages ---------- */
.page {
    padding-top: 24px;
    padding-bottom: 40px;
    min-height: calc(100vh - 140px);
}

.footer {
    padding-top: 16px;
    padding-bottom: 24px;
    font-size: .8125rem;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.page-title {
    font-size: 1.6rem;
}

.page-subtitle {
    margin: 0;
    color: var(--muted);
}

.breadcrumb {
    margin: 0 0 .25rem;
    font-size: .875rem;
}

.hero {
    position: relative;
    padding: 1.75rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
    background: var(--brand-surface);
    border: 1px solid var(--border);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--brand-gradient);
}

.hero__eyebrow {
    margin: 0 0 .25rem;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--brand-primary-dark);
}

.hero__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.hero__lead {
    margin: 0;
    color: var(--muted);
}

.tiles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .tiles {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .tiles {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tile {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.tile__title {
    font-size: 1.05rem;
    margin-top: .6rem;
}

.tile__text {
    margin: 0;
    color: var(--muted);
    font-size: .9375rem;
}

/* ---------- Tableaux ---------- */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: .9375rem;
}

.table th,
.table td {
    padding: .75rem 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

.table th {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--brand-surface);
}

.table tr:last-child td {
    border-bottom: 0;
}

.table tr.is-inactive td {
    opacity: .6;
}

.table__actions {
    white-space: nowrap;
    text-align: right;
}

/* ---------- Formulaires ---------- */
.form {
    max-width: 820px;
}

.form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 20px;
}

@media (min-width: 768px) {
    .form__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.field {
    display: block;
    margin: 0 0 1.1rem;
    padding: 0;
    border: 0;
    min-width: 0;
}

.field__label {
    display: block;
    margin-bottom: .35rem;
    font-weight: 600;
    font-size: .9375rem;
    padding: 0;
}

.field__input {
    width: 100%;
    min-height: 44px;
    padding: .55rem .75rem;
    border: 1px solid #C9CAD6;
    border-radius: var(--radius-small);
    font: inherit;
    color: inherit;
    background: #FFFFFF;
}

.field__input:focus {
    border-color: var(--brand-primary);
    outline: 3px solid color-mix(in srgb, var(--brand-primary) 25%, transparent);
    outline-offset: 0;
}

.field__input.is-invalid {
    border-color: var(--danger);
}

.field__error {
    margin: .3rem 0 0;
    color: var(--danger);
    font-size: .875rem;
}

.check-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    cursor: pointer;
}

.check input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-primary);
}

.form__actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: .5rem;
}


@media (min-width: 1100px) {
    .topbar__account {
        flex-wrap: nowrap;
        flex-shrink: 0;
    }

    .nav__link {
        padding: .5rem .6rem;
        white-space: nowrap;
    }
}

/* =====================================================================
 * Lot 1 : prospects, entretiens, rendez-vous, documentation
 * ===================================================================== */

/* Étapes SPANCO : couleurs fixes, identiques dans tous les domaines */
:root {
    --stage-S: #667085;
    --stage-P: #1570EF;
    --stage-A: #7A5AF8;
    --stage-N: #DC6803;
    --stage-C: #079455;
    --stage-O: #085D3A;
}

.stage {
    display: inline-block;
    padding: .1rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
    color: #FFFFFF;
    background: var(--stage-S);
}

.stage--P { background: var(--stage-P); }
.stage--A { background: var(--stage-A); }
.stage--N { background: var(--stage-N); }
.stage--C { background: var(--stage-C); }
.stage--O { background: var(--stage-O); }

.status-pill {
    display: inline-block;
    margin-left: .25rem;
    padding: .1rem .5rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted);
}

.status-pill--won { color: var(--success); border-color: #ABEFC6; background: var(--success-bg); }
.status-pill--lost { color: var(--danger); border-color: #FECDCA; background: var(--danger-bg); }

.badge--muted {
    background: var(--bg);
    color: var(--muted);
}

.btn--large {
    min-height: 52px;
    padding: .75rem 1.5rem;
    font-size: 1.05rem;
}

.btn[disabled] {
    opacity: .6;
    cursor: progress;
}

.hint {
    display: block;
    margin: .35rem 0 0;
    font-size: .8125rem;
    color: var(--muted);
}

.prewrap {
    white-space: pre-wrap;
    margin: 0;
}

.break {
    overflow-wrap: anywhere;
    margin: 0;
}

.plain-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.plain-list li {
    padding: .2rem 0;
}

.stack > * + * {
    margin-top: 0;
}

.page-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.empty {
    padding: 2.5rem 1rem;
    text-align: center;
    background: var(--card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--muted);
}

/* Formulaires longs */
.form--wide {
    max-width: 960px;
}

.form__wide {
    grid-column: 1 / -1;
}

.form-section {
    margin: 0 0 1.5rem;
    padding: 0 0 1.25rem;
    border: 0;
    border-bottom: 1px solid var(--border);
    min-width: 0;
}

.form-section__title {
    padding: 0;
    margin-bottom: .9rem;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--brand-primary-dark);
}

.form__delete {
    margin-right: auto;
    color: var(--danger);
}

textarea.field__input {
    min-height: 96px;
    resize: vertical;
}

.input-group {
    display: flex;
    gap: .5rem;
}

.input-group .field__input {
    flex: 1;
    min-width: 0;
}

.lookup-status {
    margin: .35rem 0 0;
    font-size: .875rem;
    min-height: 1.25rem;
}

.lookup-status--error { color: var(--danger); }
.lookup-status--success { color: var(--success); }
.lookup-status--warning { color: #B54708; }

.separator {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: .5rem 0 1rem;
    color: var(--muted);
    font-size: .8125rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.separator::before,
.separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.company-search {
    position: relative;
}

.search-results {
    list-style: none;
    margin: -.6rem 0 1rem;
    padding: .25rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow);
    max-height: 280px;
    overflow-y: auto;
}

.search-results__link {
    display: flex;
    flex-direction: column;
    padding: .5rem .75rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--brand-text);
}

.search-results__link:hover,
.search-results__link:focus {
    background: var(--brand-surface);
}

.search-results__empty {
    padding: .5rem .75rem;
    color: var(--muted);
}

.selected-company {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    padding: .9rem 1rem;
    border: 1px solid var(--brand-primary);
    border-radius: var(--radius-small);
    background: var(--brand-surface);
}

.selected-company .muted {
    display: block;
    font-size: .875rem;
}

.api-panel {
    margin-top: .5rem;
    padding: 1rem;
    border-radius: var(--radius-small);
    background: var(--brand-surface);
    border: 1px solid var(--border);
}

.api-panel__title {
    margin: 0 0 .5rem;
    font-weight: 600;
}

/* Lignes de contacts présents */
.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
    padding: .75rem .75rem 0;
    margin-bottom: .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--bg);
}

.contact-row .field {
    margin-bottom: .75rem;
}

.contact-row__check {
    margin-bottom: .5rem;
}

@media (min-width: 900px) {
    .contact-row {
        grid-template-columns: 1fr 1fr 1fr 1.3fr auto;
        align-items: end;
    }

    .contact-row__check {
        margin-bottom: .75rem;
    }
}

/* Faits (dl) */
.facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .35rem 1rem;
    margin: 0 0 .75rem;
    font-size: .9375rem;
}

.facts dt {
    color: var(--muted);
}

.facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.facts--stacked {
    grid-template-columns: 1fr;
    gap: 0;
}

.facts--stacked dt {
    margin-top: .6rem;
    font-size: .8125rem;
}

/* Filtres de liste */
.filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 12px;
    margin-bottom: 1rem;
    padding: 1rem 1rem .25rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

@media (min-width: 768px) {
    .filters {
        grid-template-columns: 2fr 1fr 1fr 1fr auto;
        align-items: end;
    }
}

.filters__actions {
    margin-bottom: 1.1rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    color: var(--muted);
}

/* Mise en page fiche (principal + colonne) */
.layout-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
}

.layout-2col__main,
.layout-2col__aside {
    display: grid;
    gap: 16px;
    min-width: 0;
}

@media (min-width: 1024px) {
    .layout-2col {
        grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
        gap: 20px;
    }

    .layout-2col--even {
        grid-template-columns: 1fr 1fr;
    }
}

.section {
    padding: 1.25rem;
}

.section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .75rem;
}

.section__header .section__title {
    margin: 0;
}

.section__title {
    font-size: 1.1rem;
}

.section--soon {
    background: var(--bg);
    border-style: dashed;
    box-shadow: none;
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.timeline__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .65rem 0 .65rem 1rem;
    border-left: 3px solid var(--border);
}

.timeline__item.is-upcoming {
    border-left-color: var(--brand-primary);
}

.timeline__item + .timeline__item {
    border-top: 1px solid var(--border);
}

.timeline__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--brand-text);
}

.timeline__link:hover strong {
    text-decoration: underline;
}

.people {
    list-style: none;
    margin: 0;
    padding: 0;
}

.people__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--border);
}

.people__item:last-child {
    border-bottom: 0;
}

.suggestions {
    margin-top: 1rem;
    padding: .75rem 1rem;
    border-radius: var(--radius-small);
    background: var(--brand-surface);
}

.suggestions__title {
    margin: 0 0 .5rem;
    font-weight: 600;
    font-size: .9375rem;
}

.suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .35rem 0;
}

/* Accueil */
.hero--action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.stage-tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .stage-tiles {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1100px) {
    .stage-tiles {
        grid-template-columns: repeat(6, 1fr);
    }
}

.stage-tile {
    display: flex;
    flex-direction: column;
    padding: .9rem 1rem;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    border-top: 4px solid var(--stage-S);
    text-decoration: none;
    color: var(--brand-text);
}

.stage-tile:hover {
    box-shadow: var(--shadow);
}

.stage-tile--P { border-top-color: var(--stage-P); }
.stage-tile--A { border-top-color: var(--stage-A); }
.stage-tile--N { border-top-color: var(--stage-N); }
.stage-tile--C { border-top-color: var(--stage-C); }
.stage-tile--O { border-top-color: var(--stage-O); }

.stage-tile__count {
    font-family: var(--font-title);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}

.stage-tile__label {
    font-size: .8125rem;
    color: var(--muted);
}

/* Documentation */
.doc-group {
    margin-bottom: 1.75rem;
}

.doc-group__title {
    font-size: 1.15rem;
}

.doc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .doc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    .doc-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.doc-card {
    display: flex;
    gap: 1rem;
    padding: 1.1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.doc-card__icon {
    flex-shrink: 0;
    width: 44px;
}

.doc-card__icon .file-icon {
    width: 44px;
    height: 53px;
}

.doc-card__body {
    min-width: 0;
}

.doc-card__title {
    font-size: 1rem;
    margin-bottom: .25rem;
}

.doc-card__text {
    margin: 0 0 .4rem;
    font-size: .875rem;
    color: var(--muted);
}

.doc-card__meta {
    margin: 0 0 .75rem;
    font-size: .8125rem;
    color: var(--muted);
}

.doc-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

/* =====================================================================
 * Lot 2 : transcripts
 * ===================================================================== */
:root {
    --speaker-team: var(--brand-primary);
    --speaker-client: #0E9384;
    --speaker-unknown: #98A2B3;
}

.dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    padding: 2rem 1rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

.dropzone:hover,
.dropzone.is-dragging,
.dropzone:focus-within {
    border-color: var(--brand-primary);
    background: var(--brand-surface);
}

.dropzone__input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.dropzone__title {
    font-weight: 600;
    color: var(--brand-primary-dark);
}

.dropzone__hint {
    font-size: .875rem;
    color: var(--muted);
}

.dropzone__file {
    font-size: .875rem;
    font-weight: 600;
    color: var(--success);
}

.paste {
    margin-top: 1rem;
}

.paste summary,
.replace summary {
    cursor: pointer;
}

.paste summary {
    font-weight: 600;
    color: var(--brand-primary-dark);
    margin-bottom: .75rem;
}

.transcript-summary {
    margin: 0 0 .5rem;
    overflow-wrap: anywhere;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 0 0 1rem;
}

.speaker-map {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: var(--radius-small);
    background: var(--brand-surface);
}

.speaker-map__title {
    font-size: 1rem;
    margin-bottom: .75rem;
}

.speaker-map__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: .4rem;
    align-items: center;
    padding: .5rem 0;
    border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
    .speaker-map__row {
        grid-template-columns: minmax(160px, 1fr) minmax(200px, 1.4fr) auto;
        gap: .75rem;
    }
}

.speaker-map__label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.speaker-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--speaker-unknown);
    flex-shrink: 0;
}

.speaker-dot--team { background: var(--speaker-team); }
.speaker-dot--client { background: var(--speaker-client); }

.transcript-preview {
    margin-bottom: 1rem;
    padding: .25rem 0;
    border-top: 1px solid var(--border);
}

.transcript-preview__more {
    margin: .5rem 0 0;
    font-size: .875rem;
}

.transcript-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: .5rem;
}

.replace {
    position: relative;
}

.replace[open] {
    flex-basis: 100%;
    order: 10;
}

.replace summary {
    list-style: none;
}

.replace summary::-webkit-details-marker {
    display: none;
}

.replace__form {
    margin-top: .75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--bg);
}

.segment {
    padding: .65rem 0 .65rem .85rem;
    border-left: 3px solid var(--speaker-unknown);
    margin: .5rem 0;
}

.segment--team { border-left-color: var(--speaker-team); }
.segment--client { border-left-color: var(--speaker-client); }
.segment--none { border-left-color: var(--border); }

.segment__meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0 0 .15rem;
    font-size: .875rem;
}

.segment__speaker {
    color: var(--brand-text);
}

.segment--team .segment__speaker { color: var(--brand-primary-dark); }
.segment--client .segment__speaker { color: #0B6E63; }

.segment__time {
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

.segment__text {
    margin: 0;
    line-height: 1.6;
}

.segment__text mark {
    background: #FEF0C7;
    color: inherit;
    border-radius: 2px;
}

.transcript-tools {
    position: sticky;
    top: 68px;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 12px;
    margin-bottom: 1rem;
    padding: 1rem 1rem 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

@media (min-width: 768px) {
    .transcript-tools {
        grid-template-columns: 2fr 1fr auto;
        align-items: end;
    }
}

.transcript-tools__count {
    margin: 0 0 1.1rem;
    font-size: .875rem;
}

.transcript {
    padding: .75rem 1.5rem;
    max-width: 900px;
}

@media print {
    .topbar,
    .footer,
    .transcript-tools,
    .page-header .btn {
        display: none !important;
    }

    .transcript {
        border: 0;
        box-shadow: none;
        max-width: none;
    }
}

/* =====================================================================
 * Lot 3 : analyse IA, réponses SPANCO, administration IA
 * ===================================================================== */
.badge--warning {
    background: #FFFAEB;
    color: #B54708;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.tabs__link {
    padding: .6rem .9rem;
    border-bottom: 3px solid transparent;
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
}

.tabs__link:hover {
    color: var(--brand-primary-dark);
}

.tabs__link.is-active {
    color: var(--brand-primary-dark);
    border-bottom-color: var(--brand-primary);
}

.key-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: .25rem 1rem;
    align-items: end;
    padding: .5rem 0;
}

@media (min-width: 768px) {
    .key-row {
        grid-template-columns: minmax(240px, 1fr) auto;
    }
}

.key-row__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    margin-bottom: 1.1rem;
}

.usage-title {
    margin-top: 1.5rem;
}

.analysis-progress {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: var(--radius-small);
    background: var(--brand-surface);
}

.analysis-progress p {
    margin: .2rem 0 0;
}

.spinner {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--brand-primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

.analysis-summary__overview {
    margin: 0 0 1rem;
    line-height: 1.6;
}

.analysis-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 1.5rem;
}

@media (min-width: 900px) {
    .analysis-columns {
        grid-template-columns: repeat(3, 1fr);
    }
}

.analysis-columns__title {
    font-size: .95rem;
    margin: .75rem 0 .35rem;
}

.bullets {
    margin: 0 0 .5rem;
    padding-left: 1.1rem;
    font-size: .9375rem;
}

.bullets li + li {
    margin-top: .25rem;
}

.signals {
    margin: .75rem 0 0;
    padding: .75rem 1rem;
    border-radius: var(--radius-small);
    background: var(--bg);
    font-size: .9375rem;
}

.analysis-answers {
    margin-top: 1rem;
    border-top: 1px solid var(--border);
    padding-top: .75rem;
}

.analysis-answers > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--brand-primary-dark);
}

.stage-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1rem;
    margin: 1rem 0 .25rem;
}

.answers,
.follow-ups {
    list-style: none;
    margin: 0;
    padding: 0;
}

.follow-ups li {
    padding: .5rem 0;
    border-bottom: 1px solid var(--border);
}

.answer {
    padding: .75rem 0;
    border-bottom: 1px solid var(--border);
}

.answer:last-child {
    border-bottom: 0;
}

.answer--not_addressed .answer__label {
    color: var(--muted);
}

.answer__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .35rem .6rem;
}

.answer__code {
    font-size: .75rem;
    font-weight: 700;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.answer__label {
    flex: 1 1 280px;
    font-weight: 600;
    font-size: .9375rem;
}

.answer__badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .3rem;
    align-items: center;
}

.answer-status {
    padding: .05rem .5rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    background: var(--bg);
    color: var(--muted);
}

.answer-status--answered,
.answer-status--addressed {
    background: var(--success-bg);
    color: var(--success);
}

.answer-status--partial {
    background: #FFFAEB;
    color: #B54708;
}

.confidence {
    font-size: .75rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* Réponse mise en valeur : étiquettes pour Oui/Non et les options, texte pour le reste */
.answer__value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .5rem;
    margin: .5rem 0 0;
    padding: .6rem .85rem;
    border-left: 3px solid var(--brand-primary);
    border-radius: var(--radius-small);
    background: var(--brand-surface);
}

.answer--not_addressed .answer__value {
    border-left-color: var(--border);
}

.value-chip {
    display: inline-block;
    padding: .1rem .5rem;
    border-radius: 999px;
    background: var(--brand-primary);
    color: var(--brand-on-primary);
    font-size: .75rem;
    font-weight: 600;
}

.answer__text {
    color: var(--brand-text);
}

.answer__follow {
    margin: .35rem 0 0;
    font-size: .875rem;
    color: #B54708;
}

.quote {
    margin: .4rem 0 0;
    padding: .35rem .75rem;
    border-left: 3px solid var(--brand-secondary);
    background: var(--bg);
    font-size: .875rem;
    font-style: italic;
    color: #3F4254;
}

.quote p {
    margin: .35rem 0;
}

.quote__link {
    margin-left: .35rem;
    font-style: normal;
    font-size: .75rem;
    font-weight: 600;
}

.stage-progress {
    display: grid;
    grid-template-columns: 1fr;
    gap: .4rem;
    margin-bottom: .75rem;
}

@media (min-width: 768px) {
    .stage-progress {
        grid-template-columns: repeat(2, 1fr);
        gap: .4rem 1.5rem;
    }
}

.stage-progress__item {
    display: grid;
    grid-template-columns: 2.2rem 1fr 3rem;
    align-items: center;
    gap: .5rem;
    font-size: .875rem;
}

.meter {
    height: 8px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.meter__bar {
    display: block;
    height: 100%;
    width: 0;
    background: var(--stage-S);
    transition: width .4s;
}

.meter__bar--P { background: var(--stage-P); }
.meter__bar--A { background: var(--stage-A); }
.meter__bar--N { background: var(--stage-N); }
.meter__bar--C { background: var(--stage-C); }
.meter__bar--O { background: var(--stage-O); }

.segment:target {
    background: #FEF0C7;
    border-radius: 4px;
}

/* Barre de progression de l'analyse IA */
.analysis-progress {
    display: block;
    margin-bottom: 1.25rem;
}

.analysis-progress__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: .5rem;
}

.analysis-progress__percent {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--brand-primary-dark);
}

.analysis-progress__hint {
    margin: .5rem 0 0;
    font-size: .875rem;
}

.analysis-progress .hint:empty {
    display: none;
}

.progress {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--border);
    overflow: hidden;
}

.progress__bar {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--brand-gradient);
    transition: width .6s ease;
}

.progress.is-indeterminate .progress__bar {
    position: absolute;
    width: 35%;
    animation: progress-slide 1.6s ease-in-out infinite;
}

@keyframes progress-slide {
    from { left: -35%; }
    to { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .progress.is-indeterminate .progress__bar {
        animation: none;
        left: 0;
        width: 100%;
        opacity: .4;
    }
}

/* =====================================================================
 * Lot 4 : tableau de bord SPANCO, offre
 * ===================================================================== */
.dashboard-head {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.dashboard-head .section {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .dashboard-head {
        grid-template-columns: 1fr;
    }
}

.counters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

.stage-advice p {
    margin: .5rem 0;
}

.answers__section {
    margin: 1rem 0 .25rem;
    padding: 0;
    list-style: none;
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}

.dashboard-item {
    list-style: none;
    padding: .75rem 0 1rem;
    border-bottom: 1px solid var(--border);
}

.dashboard-item:last-child {
    border-bottom: 0;
}

.dashboard-item__answer {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-item__answer .answer {
    border-bottom: 0;
    padding-bottom: .25rem;
}

.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-top: .5rem;
}

.answer-edit {
    margin-top: .5rem;
}

.answer-edit__form {
    margin-top: .75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: #FAFAFC;
}

.field__input--short {
    max-width: 14rem;
}

.field__input--tiny {
    width: 5.5rem;
    min-height: 38px;
}

.suggestion,
.history {
    margin-top: .75rem;
    padding: .75rem 1rem;
    border-left: 4px solid #F79009;
    background: #FFFAEB;
    border-radius: var(--radius-small);
}

.history {
    border-left-color: var(--border);
    background: #FAFAFC;
}

.suggestion__title {
    margin: 0 0 .5rem;
    font-weight: 700;
}

.suggestion__compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.suggestion__compare p {
    margin: .25rem 0 0;
}

.history__list {
    margin: 0;
    padding-left: 1.1rem;
}

.history__list li {
    margin-bottom: .4rem;
}

.offer-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.offer-card {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.offer-card p {
    margin: 0;
}

.offer-card__title {
    margin: 0;
    font-size: 1.0625rem;
}

.offer-card__price {
    font-weight: 600;
    color: var(--brand-primary-dark);
}

.offer-card__doc {
    font-size: .875rem;
}

.offer-card__add {
    margin-top: auto;
    padding-top: .5rem;
}

.offer-table td {
    vertical-align: middle;
}

.offer-table .num {
    text-align: right;
    white-space: nowrap;
}

.offer-table__group th {
    background: #F4F4F8;
    font-size: .875rem;
}

.offer-totals {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: .75rem;
    margin: 1.25rem 0 .5rem;
}

.offer-totals div {
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.offer-totals dt {
    font-size: .8125rem;
    color: var(--muted);
}

.offer-totals dd {
    margin: .2rem 0 0;
    font-size: 1.125rem;
    font-weight: 700;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0 1rem;
}

@media print {
    .page-header__actions,
    .breadcrumb {
        display: none !important;
    }

    .follow-up-stage {
        border: 0;
        box-shadow: none;
        padding: 0;
    }
}

/* Aperçu du texte envoyé à l'IA */
.prompt-preview {
    margin: 0;
    max-height: 70vh;
    overflow: auto;
    padding: 1rem;
    background: var(--brand-surface);
    border-radius: var(--radius-small);
    font-size: .8125rem;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.prompt-preview mark {
    background: var(--success-bg);
    color: var(--success);
    border-radius: 2px;
}

/* Proposition commerciale (Lot 5) */
.notice--action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.field__input--small {
    width: 14rem;
    max-width: 100%;
    padding-top: .3rem;
    padding-bottom: .3rem;
    font-size: .875rem;
}

.ai-suggestion {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--brand-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.ai-suggestion__label {
    margin: .75rem 0 .25rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--brand-primary-dark);
}

.ai-suggestion__text {
    margin: 0;
    white-space: normal;
}

/* =====================================================================
 * Lot 6 : parcours du commercial
 * ===================================================================== */

/* Bandeau commun aux pages d'un prospect */
.opportunity-head {
    margin-bottom: 1.25rem;
}

.opportunity-head__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    margin-bottom: .75rem;
}

.opportunity-head__name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.opportunity-head__name .page-title {
    margin: 0;
}

.opportunity-head__company {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 600;
    text-decoration: none;
}

.opportunity-head__company:hover {
    text-decoration: underline;
}

.opportunity-head__back {
    font-size: .875rem;
}

/* Étapes du parcours (défilement horizontal sur tablette étroite) */
.steps {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.steps__list {
    display: flex;
    align-items: stretch;
    gap: .3rem;
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: max-content;
}

.steps__item {
    flex: 1 1 0;
    min-width: 7.5rem;
}

/* Flèche entre deux étapes (la même que celle du bouton « Continuer »), centrée verticalement */
.steps__arrow {
    display: flex;
    flex: none;
    align-items: center;
    color: var(--muted);
}

.steps__arrow .icon {
    width: 1rem;
    height: 1rem;
}

.steps__link {
    display: flex;
    align-items: center;
    gap: .5rem;
    height: 100%;
    padding: .55rem .75rem;
    border: 1px solid var(--border);
    border-bottom-width: 3px;
    border-radius: var(--radius-small);
    background: var(--card);
    color: var(--muted);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
}

.steps__link:hover {
    color: var(--brand-primary-dark);
    border-color: var(--brand-secondary);
}

.steps__num {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: .8125rem;
}

.steps__item--done .steps__link {
    color: var(--brand-text);
}

.steps__item--done .steps__num {
    background: var(--success-bg);
    border-color: #ABEFC6;
    color: var(--success);
}

.steps__item--current .steps__link {
    color: var(--brand-primary-dark);
    border-color: var(--brand-primary);
}

.steps__item--current .steps__num {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--brand-on-primary);
}

@media (max-width: 899px) {
    .steps__item {
        min-width: 6.25rem;
    }

    .steps__link {
        gap: .35rem;
        padding: .45rem .5rem;
        font-size: .8125rem;
    }

    .steps__num {
        width: 1.35rem;
        height: 1.35rem;
        font-size: .75rem;
    }
}

.steps__item.is-here .steps__link {
    background: var(--brand-surface);
    border-bottom-color: var(--brand-primary);
    color: var(--brand-primary-dark);
}

.next-hint {
    margin: .6rem 0 0;
    padding: .5rem .85rem;
    border-radius: var(--radius-small);
    background: var(--brand-surface);
    font-size: .9375rem;
}

.next-hint .inline-form {
    display: inline;
}

.next-hint__label {
    margin-right: .35rem;
    color: var(--muted);
}

.next-hint a,
.link-button {
    font-weight: 600;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--brand-primary-dark);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

/* Carte « Prochaine étape » */
.next-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    border-left: 6px solid var(--brand-primary);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}

.next-step--wait {
    border-left-color: var(--brand-secondary);
}

.next-step--done {
    border-left-color: var(--success);
    background: var(--success-bg);
}

.next-step__eyebrow {
    margin: 0 0 .15rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.next-step__title {
    margin: 0 0 .25rem;
    font-size: 1.25rem;
}

.next-step__hint {
    margin: 0;
    color: var(--muted);
}

/* Rendez-vous d'un prospect */
.meeting-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.meeting-list__item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    padding: .65rem 0;
    border-top: 1px solid var(--border);
}

.meeting-list__item:first-child {
    border-top: 0;
}

.meeting-list__link {
    display: flex;
    flex-direction: column;
    flex: 1 1 14rem;
    text-decoration: none;
    color: var(--brand-text);
}

.meeting-list__link:hover strong {
    text-decoration: underline;
}

.link-small {
    font-size: .8125rem;
}

.timeline__extra {
    margin-top: .4rem;
}

a.badge {
    text-decoration: none;
}

.empty--inline {
    padding: 1.25rem 1rem;
}

.empty--inline p {
    margin: 0 0 .75rem;
}

/* Blocs repliables (suivi, ajout de prestation, intervenants) */
.disclosure > .disclosure__summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .25rem 1rem;
    cursor: pointer;
    list-style: none;
}

.disclosure > .disclosure__summary::-webkit-details-marker {
    display: none;
}

.disclosure > .disclosure__summary .section__title::after {
    content: " ▸";
    color: var(--muted);
}

.disclosure[open] > .disclosure__summary {
    margin-bottom: 1rem;
}

.disclosure[open] > .disclosure__summary .section__title::after {
    content: " ▾";
}

.subsection-title {
    font-size: 1rem;
    margin-bottom: .75rem;
}

.section__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    margin-right: .35rem;
    border-radius: 999px;
    background: var(--brand-primary);
    color: var(--brand-on-primary);
    font-size: .875rem;
    vertical-align: .1em;
}

.speaker-details {
    margin: 1rem 0;
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.speaker-details > summary {
    cursor: pointer;
    font-weight: 600;
}

.speaker-details > summary .muted {
    font-weight: 400;
    font-size: .875rem;
}

.actions-row--decline {
    flex-wrap: nowrap;
}

.actions-row--decline .field__input {
    flex: 1;
    min-width: 0;
}

.actions-row--end {
    justify-content: flex-end;
}

/* Accueil « Mes actions » */
.hero__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .4rem;
}

.hero__help {
    font-size: .875rem;
}

.todo {
    margin: 0;
    padding: 0;
    list-style: none;
}

.todo__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem 0;
    border-top: 1px solid var(--border);
}

.todo__item:first-child {
    border-top: 0;
}

.todo__text {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .2rem .5rem;
    min-width: 0;
}

.todo__company {
    font-weight: 600;
}

.todo__label {
    flex-basis: 100%;
    font-size: .9375rem;
}

.todo-waiting {
    margin-top: 1rem;
}

.todo-waiting > summary {
    cursor: pointer;
    color: var(--muted);
    font-weight: 600;
}

.todo--quiet .todo__label {
    font-size: .875rem;
}

.first-steps__list {
    margin: 0 0 1.25rem;
    padding-left: 1.25rem;
}

.first-steps__list li {
    margin-bottom: .5rem;
}

.team-stages {
    margin-top: 1.5rem;
}

.team-stages__title {
    font-size: 1rem;
    color: var(--muted);
}

/* Liste des prospects : colonnes secondaires masquées sur tablette */
@media (max-width: 1023px) {
    .col-wide {
        display: none;
    }
}

.next-cell {
    font-size: .875rem;
    font-weight: 600;
}

.next-cell--wait,
.next-cell--done {
    font-weight: 400;
    color: var(--muted);
}

/* Qualification */
.tabs__count {
    display: inline-block;
    min-width: 1.5rem;
    margin-left: .2rem;
    padding: 0 .4rem;
    border-radius: 999px;
    background: var(--bg);
    font-size: .75rem;
    text-align: center;
}

.tabs__link.is-active .tabs__count {
    background: var(--brand-primary);
    color: var(--brand-on-primary);
}

.stage-progress__item {
    grid-template-columns: 8.5rem 1fr 3rem;
}

.stage-progress__item .stage {
    justify-self: start;
}

/* Proposition : documents à envoyer */
.send-box {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    border: 1px solid #ABEFC6;
    border-radius: var(--radius-small);
    background: var(--success-bg);
}

.send-box__title {
    font-size: 1.05rem;
    margin-bottom: .25rem;
}

.send-box .hint {
    margin-bottom: 0;
}

/* Nouvel entretien : sections numérotées */
.form--steps {
    counter-reset: form-step;
}

.form--steps .form-section:not(.form-section--extra) > .form-section__title::before {
    counter-increment: form-step;
    content: counter(form-step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    margin-right: .5rem;
    border-radius: 999px;
    background: var(--brand-primary);
    color: var(--brand-on-primary);
    font-size: .875rem;
}

/* Aide */
.help-steps {
    margin: 0;
    padding-left: 1.5rem;
}

.help-steps__item {
    margin-bottom: .75rem;
}

.help-steps__item p {
    margin: .15rem 0 0;
    color: var(--muted);
}

.help-rgpd .subsection-title {
    margin-top: 1.5rem;
}

.help-rgpd .quote {
    margin-bottom: .75rem;
}

.help-stages {
    display: grid;
    gap: .6rem;
    margin: 0;
}

.help-stages__item {
    display: grid;
    grid-template-columns: 1fr;
    gap: .25rem;
}

.help-stages__item dd {
    margin: 0;
}

@media (min-width: 768px) {
    .help-stages__item {
        grid-template-columns: 10rem 1fr;
        align-items: baseline;
    }
}

/* Icônes des boutons (App\Core\Icons) */
.icon {
    flex: none;
    width: 1.15em;
    height: 1.15em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

summary.btn {
    list-style: none;
}

summary.btn::-webkit-details-marker {
    display: none;
}

/* Interlocuteurs d'une affaire */
.interlocutors {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.interlocutors__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1rem;
    padding: .7rem 0;
    border-top: 1px solid var(--border);
}

.interlocutors__item:first-child {
    border-top: 0;
}

.interlocutors__who {
    flex: 1 1 14rem;
    min-width: 0;
}

.interlocutors__role {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.interlocutors__role .field__input--small {
    width: 11rem;
}

.link-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .5rem 1rem;
    padding: .75rem 1rem;
    border-radius: var(--radius-small);
    background: var(--brand-surface);
}

.link-contact .field {
    margin: 0;
    flex: 1 1 12rem;
}

.link-contact .check {
    margin-bottom: .55rem;
}

.form-section--inline {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    border-bottom: 0;
}

.filters--compact {
    grid-template-columns: 1fr auto;
}

/* Colonnes : un tableau large défile dans sa carte au lieu de déborder sur la colonne voisine */
.layout-2col__main > *,
.layout-2col__aside > * {
    min-width: 0;
}

/* Icône des titres de page : une par objet (affaire, société, contact…) */
.page-title,
.hero__title {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.page-title > .icon,
.hero__title > .icon {
    width: .9em;
    height: .9em;
    color: var(--brand-primary);
}

/* Questions à poser : accès depuis le bandeau de l'affaire */
.opportunity-head__tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem 1rem;
}

.questions-button,
.pitch-button {
    border-color: var(--success);
    background: var(--success-bg);
    color: var(--success);
}

.questions-button:hover,
.pitch-button:hover {
    background: var(--success-bg-strong);
}

.questions-button.is-active,
.questions-button.is-active:hover,
.pitch-button.is-active,
.pitch-button.is-active:hover {
    background: var(--success);
    border-color: var(--success);
    color: var(--on-success);
}

.questions-button__count {
    display: inline-block;
    min-width: 1.5rem;
    padding: 0 .4rem;
    border-radius: 999px;
    background: var(--success);
    color: var(--on-success);
    font-size: .75rem;
    line-height: 1.5;
    text-align: center;
}

.questions-button.is-active .questions-button__count {
    background: var(--on-success);
    color: var(--success);
}

/* Elevator pitch : accès à côté des « Questions à poser » et page à lire à voix haute */
.meeting-tools {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.pitch {
    max-width: 48rem;
    font-size: 1.0625rem;
    line-height: 1.65;
}

.pitch__title {
    margin: 2rem 0 .75rem;
    font-size: 1.125rem;
}

.pitch__title:first-child {
    margin-top: 0;
}

.pitch__box {
    margin: 1rem 0;
    padding: .75rem 1rem;
    border-radius: var(--radius-small);
    background: var(--brand-surface);
}

.pitch__box > :first-child {
    margin-top: 0;
}

.pitch__box > :last-child {
    margin-bottom: 0;
}

.pitch mark {
    padding: 0 .15em;
    border-radius: 3px;
    background: var(--highlight);
    color: inherit;
}

@media print {
    .opportunity-head:has(.pitch-button.is-active) {
        display: none;
    }

    .pitch {
        max-width: none;
        border: 0;
        box-shadow: none;
    }
}

/* Page « Questions à poser » */
.questions-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1.5rem;
    margin-bottom: 1rem;
}

.questions-summary__count {
    margin: 0;
}

.questions-summary__meter {
    flex: 1 1 10rem;
}

.questions-summary__meter .meter__bar {
    background: var(--brand-primary);
}

.questions {
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
}

.questions__item {
    padding: .6rem 0;
    border-top: 1px solid var(--border);
}

.questions__item:first-child {
    border-top: 0;
}

.questions__label {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    cursor: pointer;
}

/* Grande case, facile à toucher sur tablette */
.questions__label input {
    flex: none;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: .1rem;
    accent-color: var(--brand-primary);
}

.questions__text {
    font-weight: 600;
    margin-right: .35rem;
}

.questions__item.is-checked .questions__text {
    color: var(--muted);
    font-weight: 400;
}

.questions__answer,
.questions__follow {
    margin: .25rem 0 0 2.1rem;
    font-size: .875rem;
}

.questions__follow {
    color: var(--brand-primary-dark);
}

.follow-up-sheet.hide-addressed .questions__item.is-checked {
    display: none;
}

.questions-summary__stages {
    flex-basis: 100%;
    margin: 0;
}

.badge--success {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    background: var(--success-bg);
    color: var(--success);
}

.badge .icon {
    width: .95em;
    height: .95em;
}

/* Qualification : un bloc par étape SPANCO, espacés, atteignables depuis les jauges */
.stage-block {
    margin-bottom: 1.25rem;
    scroll-margin-top: 5.5rem;
}

a.stage {
    text-decoration: none;
}

a.stage:hover {
    filter: brightness(1.15);
    text-decoration: underline;
}

.stage-anchor {
    scroll-margin-top: 5.5rem;
}

/* Questions à poser : un bloc par étape SPANCO */
.follow-up-sheet {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.follow-up-stage > .stage-title {
    margin-top: 0;
}

/* Questions à poser : intitulé, code et étiquettes sur une même ligne */
.questions__line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .4rem;
}

a.questions__text {
    color: inherit;
    text-decoration: none;
}

a.questions__text:hover {
    color: var(--brand-primary-dark);
    text-decoration: underline;
}

/* Lien direct vers une question (#q-CODE) : visible sous la barre du haut */
.dashboard-item {
    scroll-margin-top: 5.5rem;
}

.dashboard-item:target .answer__label {
    background: var(--brand-surface);
    box-shadow: 0 0 0 .25rem var(--brand-surface);
    border-radius: 4px;
}

.questions__item--link {
    margin: 0 -.5rem;
    padding-left: .5rem;
    padding-right: .5rem;
    cursor: pointer;
    border-radius: var(--radius-small);
}

.questions__item--link:hover {
    background: var(--brand-surface);
}

.questions__item--link:hover .questions__text {
    color: var(--brand-primary-dark);
    text-decoration: underline;
}

/* Cartes empilées directement dans la page (Offre, Proposition…) : même espacement que les colonnes */
.page > .card + .card,
.page > .card + form.card,
.page > form.card + .card,
.page > .card + .table-wrap,
.page > .table-wrap + .card {
    margin-top: 1.25rem;
}

.steps__label {
    white-space: nowrap;
}

/* Cycle SPANCO (Questions à poser) */
.questions-summary {
    align-items: center;
}

.cycle {
    flex: 0 1 440px;
    width: 100%;
    max-width: 440px;
    height: auto;
}

.questions-summary__side {
    flex: 1 1 16rem;
    display: grid;
    gap: .6rem;
}

.cycle__arrow {
    fill: none;
    stroke: var(--muted);
    stroke-width: 2;
    stroke-linecap: round;
}

.cycle__arrowhead {
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cycle__track {
    fill: none;
    stroke: var(--border);
    stroke-width: 5;
}

.cycle__progress {
    fill: none;
    stroke-width: 5;
}

.cycle__node { fill: var(--stage-S); }
.cycle__progress--S { stroke: var(--stage-S); }
.cycle__progress--P { stroke: var(--stage-P); }
.cycle__progress--A { stroke: var(--stage-A); }
.cycle__progress--N { stroke: var(--stage-N); }
.cycle__progress--C { stroke: var(--stage-C); }
.cycle__progress--O { stroke: var(--stage-O); }
.cycle__node--P { fill: var(--stage-P); }
.cycle__node--A { fill: var(--stage-A); }
.cycle__node--N { fill: var(--stage-N); }
.cycle__node--C { fill: var(--stage-C); }
.cycle__node--O { fill: var(--stage-O); }

.cycle__letter {
    fill: #FFFFFF;
    font-family: var(--font-title);
    font-size: 22px;
    font-weight: 700;
}

.cycle__count {
    fill: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
}

.cycle__label {
    fill: var(--brand-text);
    font-size: 13px;
    font-weight: 600;
}

.cycle__center {
    fill: var(--brand-primary-dark);
    font-family: var(--font-title);
    font-size: 34px;
    font-weight: 700;
}

.cycle__center-label {
    fill: var(--muted);
    font-size: 12px;
}

.cycle__stage:hover .cycle__node {
    filter: brightness(1.12);
}

.cycle__stage:hover .cycle__label {
    text-decoration: underline;
}

/* Formulaire de document : offres liées sur plusieurs colonnes */
.check-list--columns {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: .35rem 1rem;
}

/* Icônes de type de fichier : couleurs usuelles de chaque famille (fixes, hors charte des domaines) */
:root {
    --file-pdf: #D92D20;
    --file-word: #1570EF;
    --file-sheet: #079455;
    --file-slides: #DC6803;
    --file-image: #7A5AF8;
    --file-video: #DD2590;
    --file-archive: #667085;
    --file-text: #475467;
    --file-other: #667085;
}

.file-icon {
    flex: none;
    width: 1.6em;
    height: 1.9em;
    vertical-align: middle;
}

.file-icon__page {
    fill: #FFFFFF;
    stroke: var(--border);
    stroke-width: 1.5;
}

.file-icon__fold {
    fill: var(--bg);
    stroke: var(--border);
    stroke-width: 1.5;
}

.file-icon__band { fill: var(--file-other); }
.file-icon--pdf .file-icon__band { fill: var(--file-pdf); }
.file-icon--word .file-icon__band { fill: var(--file-word); }
.file-icon--sheet .file-icon__band { fill: var(--file-sheet); }
.file-icon--slides .file-icon__band { fill: var(--file-slides); }
.file-icon--image .file-icon__band { fill: var(--file-image); }
.file-icon--video .file-icon__band { fill: var(--file-video); }
.file-icon--archive .file-icon__band { fill: var(--file-archive); }
.file-icon--text .file-icon__band { fill: var(--file-text); }

.file-icon__label {
    fill: #FFFFFF;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: .02em;
}

.current-file {
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* Icône de fichier dans un lien ou une case à cocher */
.offer-card__doc,
.check .file-icon {
    vertical-align: middle;
}

.offer-card__doc {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.offer-card__doc .file-icon,
.check .file-icon {
    width: 1.15em;
    height: 1.4em;
    margin-right: .3rem;
}

/* ---------- Mon compte (Lot 7) ---------- */
.account-grid {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .account-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.card__heading {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 1rem;
    font-size: 1.125rem;
}

.card--narrow {
    max-width: 560px;
}

/* Actions sensibles : un seul champ « mot de passe actuel », puis les boutons. */
.form--sensitive {
    display: grid;
    gap: .75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.form--sensitive .field {
    margin: 0;
}

.badge .icon {
    width: 14px;
    height: 14px;
}

.status--pending {
    color: var(--brand-primary);
}

.form__actions--start {
    justify-content: flex-start;
}

.account-security {
    margin-top: 1.5rem;
}

.link-box {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .875rem;
    resize: none;
    overflow-wrap: anywhere;
}

/* Administration → Dépendances */
td.urls {
    min-width: 18rem;
}

code.url {
    display: block;
    overflow-wrap: anywhere;
    font-size: .8125rem;
}

code.url + code.url {
    margin-top: .25rem;
}

.dependency-list {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: .75rem;
}

/* Analyse IA : plateforme, modèle et effort (prochaine analyse ou analyse en cours) */
.analysis-setup {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.25rem;
    margin: 0;
    padding: 0;
    font-size: .875rem;
}

.analysis-progress .analysis-setup {
    margin-top: .75rem;
}

.analysis-next {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    margin-bottom: 1rem;
    padding: .6rem .9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    font-size: .875rem;
}

.analysis-next__title {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-weight: 600;
}

.analysis-next--inline {
    margin: .25rem 0 1rem;
    border: 0;
    padding: 0 0 0 1.75rem;
}
