/*
 * Thème Kore pour EasyAdmin — palette et typographie : docs/specs/01-identite-kore.md
 * CSS hors cascade layers : il prime sur les styles EasyAdmin sans !important.
 */

:root,
.ea-dark-scheme {
    --kore-night: #2C1A0E;
    --kore-orange: #F5A623;
    --kore-sand: #F2E2C8;
    --kore-teal: #3ABCB1;
    --kore-coral: #E8503A;
    --kore-muted: #B8A89A;

    --ea-primary: var(--kore-orange);
    --ea-primary-foreground: var(--kore-night);
    --ea-radius: 0.375rem;
}

:root {
    --font-family-sans-serif: "Inter", system-ui, sans-serif;
    --body-bg: #FBF6EE;
    --sidebar-bg: var(--kore-sand);
    --text-color: var(--kore-night);
}

/* Titres : Montserrat en capitales, trait orange court (règles d'usage Kore) */
.content-header-title h1,
.content-header-title .title {
    font-family: "Montserrat", sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.content-header-title h1::after,
.content-header-title .title::after {
    content: "";
    display: block;
    width: 32px;
    height: 3px;
    margin-top: 8px;
    background: var(--kore-orange);
    border-radius: 2px;
}

/* Logo */
.kore-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--kore-night);
    text-decoration: none;
}

.kore-logo-bricks span {
    display: block;
    width: 22px;
    height: 6px;
    margin: 2px 0;
    border-radius: 2px;
}

.kore-logo-bricks span:nth-child(1) { background: var(--kore-orange); }
.kore-logo-bricks span:nth-child(2) { margin-left: 3px; background: var(--kore-muted); }
.kore-logo-bricks span:nth-child(3) { margin-left: 6px; background: #D9CBB8; }

.kore-logo-text {
    display: flex;
    flex-direction: column;
    font-family: "Montserrat", sans-serif;
    font-weight: 900;
    font-size: 20px;
    line-height: 1;
    letter-spacing: 0.04em;
}

.kore-logo-text small {
    margin-top: 3px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: #B07A1A;
}

/* Page de connexion : fond brun nuit, logo clair */
body.page-login {
    background: var(--kore-night);
}

body.page-login .kore-logo { color: var(--kore-sand); }
body.page-login .kore-logo-text small { color: var(--kore-orange); }
body.page-login .kore-logo-bricks span:nth-child(3) { background: #5A4535; }

/* Tableau de bord */
.kore-dashboard-intro {
    color: #8A7868;
}

.kore-section-title {
    margin: 24px 0 12px;
    font-family: "Montserrat", sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8A7868;
}

.kore-bricks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.kore-brick {
    padding: 18px;
    background: #FFFDF9;
    border: 1px solid var(--kore-orange);
    border-radius: 10px;
}

.kore-brick.is-upcoming {
    border-color: #E6D8C4;
    opacity: 0.75;
}

.kore-brick h3 {
    margin: 10px 0 6px;
    font-size: 15px;
    font-weight: 600;
}

.kore-brick p {
    margin: 0 0 12px;
    font-size: 13px;
    color: #6E5D4E;
}

.kore-brick > svg,
.kore-brick > .icon {
    color: var(--kore-orange);
    font-size: 18px;
}

/* Indicateurs et échéances */
.kore-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}

.kore-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    background: #FFFDF9;
    border: 1px solid #E6D8C4;
    border-radius: 10px;
    color: var(--kore-night);
    text-decoration: none;
}

.kore-stat strong {
    font-family: "Montserrat", sans-serif;
    font-size: 26px;
    font-weight: 900;
}

.kore-stat span {
    font-size: 13px;
    color: #6E5D4E;
}

.kore-stat.is-alert {
    border-color: var(--kore-coral);
}

.kore-stat.is-alert strong {
    color: var(--kore-coral);
}

.kore-empty {
    color: #8A7868;
    font-size: 13px;
}

.kore-days {
    display: block;
    color: #8A7868;
}

.kore-days.is-late {
    color: var(--kore-coral);
    font-weight: 600;
}

/* Contrats */
.kore-contract-summary dl {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px 24px;
    margin: 0 0 8px;
}

.kore-contract-summary dt {
    font-size: 12px;
    font-weight: 600;
    color: #8A7868;
}

.kore-contract-summary dd {
    margin: 2px 0 0;
}


.kore-line {
    margin-bottom: 12px;
    padding: 14px 16px;
    background: #FFFDF9;
    border: 1px solid #E6D8C4;
    border-radius: 10px;
}

.kore-line header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
}

.kore-line header strong {
    margin-left: 6px;
}

.kore-line-meta {
    margin: 8px 0 0;
    font-size: 13px;
    color: #6E5D4E;
}

.kore-line-description {
    margin-top: 8px;
    font-size: 13px;
}

.kore-line-description summary {
    cursor: pointer;
    color: #8A7868;
}

.kore-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.kore-inline-form .form-control,
.kore-inline-form .form-select {
    width: auto;
}

.kore-inline-form .kore-note {
    min-width: 240px;
    flex: 1;
}

.kore-hours {
    margin-top: 10px;
}

.kore-hours-balance {
    margin: 0;
}

.kore-hours-balance.is-late,
.kore-late {
    color: var(--kore-coral);
    font-weight: 600;
}

.kore-hours-table {
    margin-top: 10px;
    font-size: 13px;
}

.kore-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px 16px;
    margin: 10px 0;
}

.kore-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
}

.kore-check {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    font-weight: 400 !important;
}

/* Spécificités et commentaires des contrats */
.kore-specifics p {
    padding: 12px 14px;
    background: #FFF6E6;
    border-left: 3px solid var(--kore-orange);
    border-radius: 6px;
}

.kore-comment-form {
    margin-bottom: 12px;
}

.kore-comment {
    margin-bottom: 8px;
    padding: 10px 14px;
    background: #FFFDF9;
    border: 1px solid #E6D8C4;
    border-radius: 8px;
}

.kore-comment.is-pinned {
    border-color: var(--kore-orange);
}

.kore-comment header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: #8A7868;
}

.kore-comment p {
    margin: 6px 0 0;
}

.kore-comment-actions {
    display: flex;
    gap: 4px;
}

.kore-comment-actions .btn {
    padding: 0 4px;
    font-size: 12px;
}

/* Sections liées (fiches client et site) */
.kore-related {
    margin-top: 24px;
}

.kore-related > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.kore-related > header .kore-section-title {
    margin: 12px 0;
}

/* Lignes de contrat (formulaire imbriqué) : libellés au-dessus des champs, description contenue */
.field-collection-item .form-group {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.field-collection-item .form-group > .form-control-label,
.field-collection-item .form-group > .col-form-label {
    width: auto;
    max-width: none;
    padding: 0;
    text-align: start;
    white-space: nowrap;
}

.field-collection-item .form-group > .form-widget {
    width: 100%;
}

.field-collection-item textarea {
    max-height: 14rem;
    resize: vertical;
}

.field-collection-item .field-boolean.form-group {
    padding-top: 4px;
}

.kore-form-grid .kore-span-2 {
    grid-column: span 2;
}

.kore-pending {
    margin: 4px 0 8px;
    padding: 8px 10px;
    background: #FFF6E6;
    border-radius: 6px;
    font-size: 13px;
}

/* Reprise des contrats */
tr.kore-muted td {
    color: #8A7868;
}

.kore-actions {
    white-space: nowrap;
}

.kore-actions .btn + .btn {
    margin-left: 4px;
}

.kore-recovery-section > summary {
    cursor: pointer;
    list-style: none;
}

.kore-recovery-section > summary::before {
    content: "▸ ";
    color: #8A7868;
}

.kore-recovery-section[open] > summary::before {
    content: "▾ ";
}

.kore-recovery-section > summary .kore-section-title {
    display: inline;
}

.kore-section-separator {
    margin-top: 40px;
    padding-top: 16px;
    border-top: 1px solid #E6D8C4;
}

/* Accès IA : jeton et commandes à copier */
.kore-token { font-size: 0.95rem; user-select: all; word-break: break-all; }
.kore-code { white-space: pre-wrap; word-break: break-all; background: var(--body-bg, #fff); padding: 0.5rem 0.75rem; border-radius: 4px; font-size: 0.8rem; user-select: all; }

/* Connexions : une carte par service externe */
.kore-conn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}

.kore-conn {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    background: #FFFDF9;
    border: 1px solid #E6D8C4;
    border-left: 4px solid var(--kore-muted);
    border-radius: 10px;
}

.kore-conn.is-ok { border-left-color: var(--kore-teal); }
.kore-conn.is-error { border-left-color: var(--kore-coral); }
.kore-conn.is-unknown { border-left-color: var(--kore-orange); }
.kore-conn.is-upcoming { opacity: 0.6; border-left-color: #E6D8C4; }

.kore-conn header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.kore-conn h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.kore-conn h3 i { color: var(--kore-orange); margin-right: 4px; }

.kore-conn-usage { margin: 0; font-size: 13px; color: #6E5D4E; }
.kore-conn-detail { margin: 0; font-size: 12px; color: var(--kore-night); word-break: break-word; }
.kore-conn.is-error .kore-conn-detail { color: var(--kore-coral); }

.kore-conn footer {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.kore-conn footer form { margin: 0; }

.kore-conn-state {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #EFE6D8;
    color: #6E5D4E;
}

.kore-conn-state.is-ok { background: #DDF3F0; color: #1F7A72; }
.kore-conn-state.is-error { background: #FBE1DC; color: #A8321F; }
.kore-conn-state.is-unknown { background: #FDF0D8; color: #8A5A07; }

.kore-conn-add {
    align-items: center;
    justify-content: center;
    text-align: center;
    border-style: dashed;
    border-left-width: 1px;
    color: var(--kore-night);
    text-decoration: none;
    min-height: 120px;
}

.kore-conn-add:hover { border-color: var(--kore-orange); color: var(--kore-night); }
.kore-conn-add i { color: var(--kore-orange); font-size: 18px; }
.kore-conn-add small { color: #6E5D4E; }

.kore-conn-subtitle { font-size: 12px; font-weight: 400; color: #6E5D4E; text-transform: none; letter-spacing: 0; }

/* Temps Redmine : choix de la période */
.kore-periods { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.kore-periods a { padding: 4px 12px; border: 1px solid #E6D8C4; border-radius: 999px; font-size: 13px; color: var(--kore-night); text-decoration: none; background: #FFFDF9; }
.kore-periods a.is-active { background: var(--kore-orange); border-color: var(--kore-orange); font-weight: 600; }
.kore-statement-actions { margin: 4px 0 16px; align-items: center; }
.kore-statement-actions form { margin: 0; }

/* Reprise d'un client */
.kore-recovery-context { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.kore-recovery-context h3 { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.kore-recovery-context p { margin: 0 0 4px; }
.kore-muted-row td { color: #8a7a6c; }
code.kore-strong { font-weight: 700; }
.kore-ok { color: var(--kore-teal); }

.kore-computed { align-self: end; padding: 6px 0; }
.kore-mode { margin: 0 0 16px; padding: 10px 14px; background: #FFFDF9; border: 1px solid #E6D8C4; border-radius: 8px; align-items: center; }
.kore-stat.is-accent { border-color: var(--kore-orange); }
.kore-time-links { margin: 8px 0 0; }

/* Envoi d'une facture : destinataires cochés par défaut */
.kore-recipients { border: 1px solid #E6D8C4; border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.kore-recipients legend { font-size: 14px; font-weight: 600; float: none; width: auto; margin: 0 0 4px; padding: 0; }

/* Connexion : alternative Google */
.kore-login-alt { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.kore-login-alt > span { font-size: 13px; color: #8A7A6A; }
.kore-google-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }

/* ===== Design Kore (maquettes UX/Maquettes) — lot 1 : barre du haut, page « Aujourd'hui » ===== */
:root {
    --kore-surface: #FFFDF9;
    --kore-surface-2: #F7EEDF;
    --kore-line: #E6D8C4;
    --kore-text-2: #6E5D4E;
    --kore-text-3: #8A7868;
    --kore-orange-soft: #FDF0D8;
    --kore-orange-ink: #8A5A07;
    --kore-teal-soft: #DDF3F0;
    --kore-teal-ink: #1F7A72;
    --kore-coral-soft: #FBE1DC;
    --kore-coral-ink: #A8321F;
}

/* menu latéral : élément actif marqué d'un trait orange, sections en capitales */
.ea-sidebar-item.is-active > .ea-sidebar-item-link { background: var(--kore-surface); box-shadow: inset 3px 0 0 var(--kore-orange); color: var(--kore-night); font-weight: 600; border-radius: 6px; }
.ea-sidebar-group-label-text { font-family: "Montserrat", sans-serif; font-weight: 800; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--kore-text-3); }

/* bouton « Nouveau » */
.kore-new { position: relative; margin-right: 12px; }
.kore-new > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.kore-new > summary::-webkit-details-marker { display: none; }
.kore-new-menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 1000; width: 270px; padding: 6px;
    background: var(--kore-surface); border: 1px solid var(--kore-line); border-radius: 8px; box-shadow: 0 12px 40px rgba(44, 26, 14, .18);
}
.kore-new-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--kore-night); text-decoration: none; }
.kore-new-menu a:hover { background: var(--kore-orange-soft); }

/* tuiles chiffrées cliquables */
.kore-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 4px 0 8px; }
.kore-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--kore-line); border-radius: 12px; background: var(--kore-surface); color: var(--kore-night); text-decoration: none; }
.kore-tile:hover { border-color: var(--kore-text-3); color: var(--kore-night); }
.kore-tile-label { font-size: 12px; font-weight: 500; color: var(--kore-text-3); }
.kore-tile-value { font: 800 26px/1.2 "Montserrat", sans-serif; font-variant-numeric: tabular-nums; }
.kore-tile-value small { font: 500 13px "Inter", sans-serif; color: var(--kore-text-3); }
.kore-tile-foot { font-size: 12px; color: var(--kore-text-2); }
.kore-tile.is-warn .kore-tile-value { color: var(--kore-orange-ink); }
.kore-tile.is-err .kore-tile-value { color: var(--kore-coral-ink); }

/* page « Aujourd'hui » : liste de tâches + colonne de contexte */
.kore-today { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.kore-section-title small { font: 400 12px "Inter", sans-serif; text-transform: none; letter-spacing: 0; color: var(--kore-text-3); margin-left: 6px; }
.kore-filter { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 10px; border: 1px solid var(--kore-line); border-radius: 8px; background: var(--kore-surface-2); }
.kore-filter button { padding: 4px 12px; border: 0; border-radius: 6px; background: none; color: var(--kore-text-2); font-size: 12px; font-weight: 500; cursor: pointer; }
.kore-filter button.is-active { background: var(--kore-surface); color: var(--kore-night); font-weight: 600; box-shadow: 0 1px 2px rgba(44, 26, 14, .08); }
.kore-tasks { border: 1px solid var(--kore-line); border-radius: 12px; background: var(--kore-surface); overflow: hidden; }
.kore-task { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--kore-line); }
.kore-task:first-child { border-top: 0; }
.kore-task:hover { background: #FBF6EE; }
.kore-task-icon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--kore-orange-soft); color: var(--kore-orange-ink); }
.kore-task-icon.is-err { background: var(--kore-coral-soft); color: var(--kore-coral-ink); }
.kore-task-icon.is-neutral { background: #EFE6D8; color: var(--kore-text-2); }
.kore-task-body { flex: 1; min-width: 0; }
.kore-task-title { font-weight: 600; }
.kore-task-meta { font-size: 12px; color: var(--kore-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kore-task-actions { display: flex; gap: 6px; flex: none; }
.kore-empty-ok { padding: 28px; text-align: center; color: var(--kore-teal-ink); font-weight: 600; }

.kore-today-side { display: flex; flex-direction: column; gap: 16px; }
.kore-panel { padding: 16px 18px; border: 1px solid var(--kore-line); border-radius: 12px; background: var(--kore-surface); }
.kore-panel h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.kore-panel-link { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 500; color: var(--kore-orange-ink); text-decoration: none; }
.kore-when { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.kore-date { flex: none; width: 46px; height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--kore-line); border-radius: 8px; background: var(--kore-surface-2); }
.kore-date b { font: 800 17px/1 "Montserrat", sans-serif; }
.kore-date small { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--kore-text-3); }
.kore-date.is-today { background: var(--kore-orange); border-color: var(--kore-orange); }
.kore-when-title { font-weight: 600; font-size: 13px; }
.kore-when-meta { font-size: 12px; color: var(--kore-text-3); }
.kore-activity { list-style: none; margin: 0; padding: 0; }
.kore-activity li { display: flex; flex-direction: column; padding: 6px 0 6px 14px; border-left: 2px solid var(--kore-line); position: relative; font-size: 13px; }
.kore-activity li::before { content: ""; position: absolute; left: -6px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--kore-surface); border: 2px solid var(--kore-muted); }
.kore-activity small { color: var(--kore-text-3); font-size: 12px; }

@media (max-width: 1100px) {
    .kore-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kore-today { grid-template-columns: 1fr; }
}

/* ===== Lot 2 : recherche globale (⌘K), raccourcis ===== */
.kore-search-trigger {
    display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; margin-right: 10px; min-width: 260px;
    border: 1px solid var(--kore-line); border-radius: 8px; background: var(--kore-surface); color: var(--kore-text-3); font-size: 13px; cursor: pointer;
}
.kore-search-trigger span { flex: 1; text-align: left; }
.kore-search-trigger:hover { border-color: var(--kore-text-3); }
.kore-overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; background: rgba(44, 26, 14, .38); }
.kore-overlay[hidden] { display: none; }
.kore-palette { width: min(640px, 92vw); max-height: 70vh; display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; background: var(--kore-surface); box-shadow: 0 12px 40px rgba(44, 26, 14, .25); }
.kore-palette-q { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--kore-line); }
.kore-palette-q input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--kore-night); }
.kore-palette-q b { flex: 1; }
.kore-palette-results { overflow-y: auto; padding-bottom: 6px; }
.kore-palette-group { padding: 10px 16px 4px; font: 800 10px "Montserrat", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--kore-text-3); }
.kore-palette-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; color: var(--kore-night); text-decoration: none; }
.kore-palette-item i { width: 16px; color: var(--kore-text-2); }
.kore-palette-item small { margin-left: auto; color: var(--kore-text-3); font-size: 12px; white-space: nowrap; }
.kore-palette-item.is-selected, .kore-palette-item:hover { background: var(--kore-orange-soft); color: var(--kore-night); }
.kore-palette-empty { padding: 18px 16px; margin: 0; color: var(--kore-text-3); }
.kore-palette-foot { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--kore-line); background: var(--kore-surface-2); font-size: 12px; color: var(--kore-text-3); }
.kore-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; padding: 12px 16px; overflow-y: auto; }
.kore-shortcuts > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--kore-line); font-size: 13px; }
kbd { display: inline-block; min-width: 18px; padding: 0 5px; border: 1px solid #D9CBB8; border-bottom-width: 2px; border-radius: 4px; background: var(--kore-surface); color: var(--kore-text-2); font: 11px/16px ui-monospace, Menlo, monospace; text-align: center; }

/* ===== Contrôler ===== */
.kore-checks { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.kore-check-card { border: 1px solid var(--kore-line); border-radius: 12px; background: var(--kore-surface); overflow: hidden; }
.kore-check-card.is-err { box-shadow: inset 4px 0 0 var(--kore-coral); }
.kore-check-card.is-warn { box-shadow: inset 4px 0 0 var(--kore-orange); }
.kore-check-card.is-ok { box-shadow: inset 4px 0 0 var(--kore-teal); }
.kore-check-card > header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--kore-line); }
.kore-check-card > header h3 { flex: 1; margin: 0; font-size: 15px; font-weight: 700; }
.kore-check-card.is-ok > header { border-bottom: 0; }
.kore-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; background: #EFE6D8; color: var(--kore-text-2); }
.kore-pill.is-ok { background: var(--kore-teal-soft); color: var(--kore-teal-ink); }
.kore-pill.is-warn { background: var(--kore-orange-soft); color: var(--kore-orange-ink); }
.kore-pill.is-err { background: var(--kore-coral-soft); color: var(--kore-coral-ink); }
.kore-task-meta.is-wrap { white-space: normal; }
.kore-suggestion { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; padding: 4px 8px; border-radius: 6px; background: var(--kore-orange-soft); font-size: 12px; }
.kore-dismiss { margin-top: 6px; font-size: 12px; }
.kore-dismiss > summary { display: inline; cursor: pointer; color: var(--kore-text-3); }
.kore-dismiss form { margin-top: 6px; }
.kore-dismiss input[name=reason] { max-width: 320px; }
.kore-search-trigger { white-space: nowrap; flex: none; }
.content-top .navbar-custom-menu, .content-top { gap: 0; }

/* ===== Lot 2 : écran Facturer (étapes, onglets, actions groupées), cellules ===== */
.kore-steps { display: flex; list-style: none; margin: 16px 0; padding: 0; counter-reset: s; }
.kore-steps li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 3px solid var(--kore-line); font-weight: 600; color: var(--kore-text-3); }
.kore-steps li b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #EFE6D8; font-size: 12px; }
.kore-steps li span { margin-left: auto; font-size: 12px; padding: 0 7px; border-radius: 10px; background: #EFE6D8; }
.kore-steps li.is-current { color: var(--kore-night); border-color: var(--kore-orange); }
.kore-steps li.is-current b, .kore-steps li.is-current span { background: var(--kore-orange); color: var(--kore-night); }
.kore-tabs { display: flex; gap: 2px; margin: 8px 0 16px; border-bottom: 1px solid var(--kore-line); overflow-x: auto; }
.kore-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; font-weight: 600; font-size: 13px; color: var(--kore-text-3); cursor: pointer; white-space: nowrap; }
.kore-tabs button:hover { color: var(--kore-night); }
.kore-tabs button.is-active { color: var(--kore-night); border-bottom-color: var(--kore-orange); }
.kore-tabs button span { font-size: 11px; padding: 0 6px; border-radius: 10px; background: #EFE6D8; color: var(--kore-text-2); }
.kore-tabs button.is-active span { background: var(--kore-orange); color: var(--kore-night); }
.kore-cell-title { font-weight: 600; text-decoration: none; }
.kore-cell-sub { display: block; font-size: 12px; color: var(--kore-text-3); }
.kore-cell-sub.kore-late { color: var(--kore-coral-ink); font-weight: 600; }
.kore-bulkbar { position: sticky; bottom: 16px; z-index: 15; display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 10px 14px; border-radius: 8px; background: var(--kore-night); color: var(--kore-sand); box-shadow: 0 12px 40px rgba(44, 26, 14, .18); font-size: 13px; }
.kore-bulkbar span { flex: 1; }

/* ===== Lot 3 : fiche contrat ===== */
.kore-contract-identity { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; color: var(--kore-text-2); }
.kore-next-invoice { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 18px; align-items: center; padding: 16px 20px; margin-bottom: 16px; border: 1px solid var(--kore-line); border-radius: 12px; background: var(--kore-surface); box-shadow: inset 4px 0 0 var(--kore-orange); }
.kore-next-invoice > div { display: flex; flex-direction: column; gap: 2px; }
.kore-next-amount { font: 800 22px/1.2 "Montserrat", sans-serif; }
.kore-next-action { align-items: flex-end; }
.kore-two-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.kore-panel h3 small { font-size: 12px; font-weight: 400; color: var(--kore-text-3); margin-left: 6px; }
.kore-kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--kore-line); font-size: 13px; }
.kore-kv:last-child { border-bottom: 0; }
.kore-kv > span:first-child { color: var(--kore-text-3); }
@media (max-width: 1100px) { .kore-next-invoice, .kore-two-cards { grid-template-columns: 1fr; } .kore-next-action { align-items: flex-start; } }

/* ===== Lot 3 : fiche client ===== */
.kore-client-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.kore-mark { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--kore-night); color: var(--kore-sand); font: 900 17px "Montserrat", sans-serif; }
.kore-client-head > div:nth-child(2) { flex: 1; }
.kore-client-meta { color: var(--kore-text-2); margin-bottom: 2px; }

/* ===== Lot 3 : Parc web ===== */
.kore-parc-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.kore-parc-bar .kore-filter { margin: 0 8px 0 0; }
.kore-filter a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 6px; color: var(--kore-text-2); font-size: 12px; font-weight: 500; text-decoration: none; }
.kore-filter a.is-active { background: var(--kore-surface); color: var(--kore-night); font-weight: 600; box-shadow: 0 1px 2px rgba(44, 26, 14, .08); }
.kore-chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 1px solid #D9CBB8; border-radius: 16px; background: var(--kore-surface); color: var(--kore-text-2); font-size: 12px; font-weight: 500; text-decoration: none; }
.kore-chip:hover { border-color: var(--kore-text-3); color: var(--kore-night); }
.kore-chip.is-active { background: var(--kore-night); border-color: var(--kore-night); color: var(--kore-sand); }

/* ===== Lot 4 : mise sous contrat ===== */
.kore-setup { display: grid; grid-template-columns: 270px minmax(0, 1fr) 360px; gap: 16px; align-items: start; margin-top: 8px; }
.kore-setup-queue { border: 1px solid var(--kore-line); border-radius: 12px; background: var(--kore-surface); overflow: hidden; position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow-y: auto; }
.kore-queue-group { padding: 7px 12px; font: 800 10px "Montserrat", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--kore-text-3); background: var(--kore-surface-2); border-top: 1px solid var(--kore-line); }
.kore-queue-group:first-child { border-top: 0; }
.kore-queue-item { display: block; padding: 10px 12px; border-top: 1px solid var(--kore-line); color: var(--kore-night); text-decoration: none; }
.kore-queue-item:hover { background: #FBF6EE; color: var(--kore-night); }
.kore-queue-item.is-selected { background: var(--kore-orange-soft); box-shadow: inset 3px 0 0 var(--kore-orange); }
.kore-queue-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.kore-setup-check, .kore-setup-draft { display: flex; flex-direction: column; gap: 16px; }
.kore-rhythm { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--kore-line); }
.kore-rhythm:first-of-type { border-top: 0; }
.kore-rhythm.is-done { opacity: .6; }
.kore-rhythm-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.kore-mail { padding: 8px 0; border-top: 1px dashed var(--kore-line); }
.kore-mail:first-of-type { border-top: 0; }
.kore-mail-head { display: flex; justify-content: space-between; gap: 10px; }
.kore-mail-head small { color: var(--kore-text-3); white-space: nowrap; }
.kore-proposed { box-shadow: inset 4px 0 0 var(--kore-orange); }
.kore-proposed .btn { margin-top: 10px; }
@media (max-width: 1400px) { .kore-setup { grid-template-columns: 240px minmax(0, 1fr); } .kore-setup-draft { grid-column: 1 / -1; } }
#devis .kore-inline-form { flex-wrap: nowrap; gap: 6px; }
#devis input[type=date] { width: 150px; }
#devis th, #devis td { padding-left: 10px; padding-right: 10px; }
.kore-more { margin-top: 10px; }

/* ===== Connexions IA ===== */
.kore-conn.is-active-ai { box-shadow: inset 0 0 0 2px var(--kore-orange); }
.kore-ai-form { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.kore-ai-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.kore-ai-form label.kore-check { flex-direction: row; font-weight: 400; }

/* Facturer : prochaines factures, date pas encore atteinte */
.kore-upcoming tbody tr { opacity: .55; }
.kore-upcoming tbody tr:hover { opacity: 1; }

/* Rappel des temps : une personne par ligne, champs en ligne */
.kore-person-form { flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.kore-person-form .form-control { width: auto; min-width: 160px; flex: 1 1 160px; }
