/* =====================================================================
   KCK-IT Desk — style du site kck-it.fr (24/11/2026)
   Chargée en dernier : reprend les couleurs, les polices et les formes
   du site (fond gris clair #F4F6FA, cartes blanches pleines, texte bleu
   nuit, bouton bleu #155DFC, boutons en pilule, titres en Bricolage).
   Plus de verre, de halos ni de taches de couleur en fond.
   Le thème sombre reprend la bande sombre du site (#121722).
   ===================================================================== */

/* ---------- Polices du site (hébergées avec le Desk, licence SIL OFL) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/inter.woff2") format("woff2"); }
@font-face { font-family: "Bricolage"; font-style: normal; font-weight: 500 800; font-display: swap; src: url("../fonts/bricolage.woff2") format("woff2"); }

/* ---------- Jetons : sombre (bande sombre du site) ---------- */
:root {
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --display: "Bricolage", "Inter", system-ui, sans-serif;

    --bg: #121722;
    --glass: #1A2130;
    --glass-2: #1E2533;
    --glass-3: #283041;
    --glass-strong: rgba(18, 23, 34, .94);
    --glass-line: rgba(255, 255, 255, .07);
    --glass-hi: rgba(255, 255, 255, .1);
    --sep: rgba(255, 255, 255, .08);
    --blur: none;
    --shadow: none;
    --shadow-pop: 0 24px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .07);

    --ink: #F4F6FA;
    --ink-2: #D3DAE6;
    --muted: #B2BCCC;
    --faint: rgba(244, 246, 250, .32);
    --fill: rgba(255, 255, 255, .1);
    --fill-2: rgba(255, 255, 255, .055);
    --field: #262E3E;

    --blue: #2E6BFF; --green: #34C46A; --orange: #F29A2E; --red: #F2564B; --yellow: #FFE066;
    --purple: #A78BFA; --teal: #38BDF8; --indigo: #818CF8; --pink: #F472B6; --mint: #2DD4BF;
    --accent-ink: color-mix(in srgb, var(--accent) 62%, white);
    --accent-soft: color-mix(in srgb, var(--accent) 20%, transparent);

    /* Couleurs fixes du site */
    --k-field: #1254E4;
    --k-yellow: #FFE066;
    --k-night: #0E1726;

    --r-xl: 26px; --r-lg: 22px; --r: 16px; --r-sm: 12px; --r-xs: 9px;
    --row-solid: #1A2130;
}
:root[data-theme="light"] {
    --bg: #F4F6FA;
    --glass: #FFFFFF;
    --glass-2: #FFFFFF;
    --glass-3: #FFFFFF;
    --glass-strong: rgba(244, 246, 250, .94);
    --glass-line: rgba(14, 23, 38, .08);
    --glass-hi: #FFFFFF;
    --sep: rgba(14, 23, 38, .08);
    --shadow: 0 1px 2px rgba(14, 23, 38, .04);
    --shadow-pop: 0 24px 60px -18px rgba(14, 23, 38, .28), 0 0 0 1px rgba(14, 23, 38, .06);

    --ink: #0E1726;
    --ink-2: #2B3647;
    --muted: #4E5B6E;
    --faint: rgba(14, 23, 38, .3);
    --fill: #E4E9F1;
    --fill-2: #EEF2F7;
    --field: #ECF0F6;

    --blue: #155DFC; --green: #16A34A; --orange: #E07800; --red: #DC2626; --yellow: #C99700;
    --purple: #7C3AED; --teal: #0E8FC4; --indigo: #4F46E5; --pink: #DB2777; --mint: #0D9488;
    --accent-ink: color-mix(in srgb, var(--accent) 70%, black);
    --accent-soft: color-mix(in srgb, var(--accent) 10%, white);
    --row-solid: #FFFFFF;
}

/* ---------- Base ---------- */
body { font-family: var(--font); letter-spacing: -.006em; }
body::before { content: none; }
a, .link-btn, .back, .section-head .link { color: var(--accent-ink); }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }

/* Titres et grands chiffres : Bricolage, comme les titres du site */
.hero h1, .profile h1, .ticket-hero h1, .lock-card h1, .section-head h2, .sheet-head h2, .sheet-alert h2, .card h3,
.kpi-val, .amount-big, .total-bar .amount, .mini b, .w-next .w-count, .hchart-callout b, .run-clock-text b, .ur-title,
.slot-time b, .month-head, .reward-money b, .ka-hello-t, .ka-head-t strong {
    font-family: var(--display); letter-spacing: -.01em;
}
.hero h1 { font-size: clamp(32px, 3.6vw, 44px); font-weight: 800; line-height: 1.04; }
.profile h1, .ticket-hero h1 { font-weight: 800; }
.section-head h2 { font-size: 22px; font-weight: 700; letter-spacing: 0; }
.card h3 { font-size: 17px; font-weight: 700; letter-spacing: 0; }
.kpi-val { font-weight: 800; letter-spacing: -.015em; }
.amount-big, .total-bar .amount { font-weight: 800; letter-spacing: -.02em; }
.mini b { font-weight: 750; letter-spacing: -.01em; }

/* Petites étiquettes : en minuscules comme sur le site, pas en capitales */
.eyebrow, .widget-eyebrow, .group-label, .palette-group, .hchart-callout small {
    text-transform: none; letter-spacing: 0;
}
.eyebrow { font-size: 14.5px; font-weight: 600; color: var(--muted); }
.eyebrow::first-letter { text-transform: uppercase; }
.group-label { font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
.palette-group { font-size: 12.5px; }

/* ---------- Surfaces pleines (fini le verre et les reflets) ---------- */
.glass, .card, .list, .kpi, .widget, .slot, .app-tile, .article-card, .week-scroll, .side-panel {
    -webkit-backdrop-filter: none; backdrop-filter: none;
}
@media (hover: hover) and (pointer: fine) {
    :is(.card, .list, .kpi, .widget, .slot)::after { content: none; }
    :is(.card, .list, .widget).is-lit { background-image: none; }
}
.kpi::before { content: none; }

/* ---------- Barre de gauche ---------- */
.side-panel { background: var(--glass); border-color: var(--glass-line); box-shadow: var(--shadow); }
.brand { gap: 10px; padding: 10px 12px 6px 20px; }
.brand-logo { display: none; }
.brand-word { display: block; height: 26px; width: auto; }
.brand-word--dark { display: none; }
:root:not([data-theme="light"]) .brand-word--light { display: none; }
:root:not([data-theme="light"]) .brand-word--dark { display: block; }
.brand-desk { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--k-yellow); color: var(--k-night); font: 700 12px/1 var(--display); letter-spacing: .01em; }
.brand small { margin-top: 4px; }
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-top { display: flex; align-items: center; gap: 8px; }
.live-dot { background: var(--green); }

.side-search { border-radius: 999px; background: var(--field); }
.side-search kbd { background: var(--glass); border: 1px solid var(--glass-line); }
.nav-glider { background: var(--accent-soft); box-shadow: none; border-radius: 999px; }
.nav a { border-radius: 999px; font-weight: 600; }
.nav a:hover { background: var(--fill-2); }
.nav a[aria-current="page"] { color: var(--accent-ink); }
.nav-ico { border-radius: 50%; background: transparent; }
.nav a[aria-current="page"] .nav-ico { background: var(--accent); color: #fff; box-shadow: none; }

/* ---------- Boutons en pilule, à plat comme sur le site ---------- */
.btn, .btn--sm, .btn--lg { border-radius: 999px; }
.btn { font-weight: 650; }
.btn--fill, :root[data-theme="light"] .btn--fill { color: #fff; background: var(--c); box-shadow: none; }
.btn--fill:hover { background: color-mix(in srgb, var(--c) 86%, black); box-shadow: none; }
.btn--gray { background: var(--glass); color: var(--ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 16%, transparent); }
.btn--gray:hover { background: var(--glass); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 40%, transparent); }
.icon-btn { background: var(--fill-2); }
.icon-btn--accent { background: var(--accent-soft); color: var(--accent-ink); }
.quick a, .quick button { color: var(--accent-ink); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); }
.quick a:hover, .quick button:hover { background: var(--accent-soft); }
.chip[aria-pressed="true"] { background: var(--accent); color: #fff; }
.chip[aria-pressed="true"] .i, .chip[aria-pressed="true"] b { color: #fff; }
.chip .i { color: var(--accent-ink); }

/* Contrôle segmenté et onglets */
.seg { border-radius: 999px; }
.seg-thumb { border-radius: 999px; background: var(--glass-3); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
:root[data-theme="light"] .seg-thumb { background: #fff; box-shadow: 0 1px 3px rgba(14, 23, 38, .14), 0 0 0 .5px rgba(14, 23, 38, .05); }
.seg button { border-radius: 999px; }
.seg button[aria-pressed="true"] .count { background: var(--accent-soft); color: var(--accent-ink); }
.seg--status .seg-thumb, :root[data-theme="light"] .seg--status .seg-thumb { background: var(--thumb, var(--accent)); box-shadow: none; }
.tabs-bar { box-shadow: none; }
.tabs button[aria-selected="true"] { color: var(--ink); }

/* Champs : comme le formulaire du site */
.input, .select, .textarea { border: 1.5px solid transparent; border-radius: 14px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); background: var(--glass); }
.search { border-radius: 999px; }
.search:focus-within { background: var(--glass); box-shadow: 0 0 0 1.5px var(--accent), 0 0 0 5px color-mix(in srgb, var(--accent) 14%, transparent); }
:root[data-theme="light"] .select option { color: #0E1726; }
.select option { background: #1E2533; }
.switch input:checked + i { background: var(--accent); }
.check input:checked + i { background: var(--accent); border-color: var(--accent); }

/* ---------- Pastilles, avatars, icônes : à plat ---------- */
.pill::before { box-shadow: none; }
.badge--hot { box-shadow: none; }
.badge--warn { background: var(--k-yellow); color: var(--k-night); }
.ico-tile { box-shadow: none; border-radius: 12px; }
.avatar { background: hsl(var(--h) 58% 46%); box-shadow: none; }
.ring .ring-fg { filter: none; }
.slot::before { box-shadow: none; }
.slot.is-now { border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.day-now { box-shadow: none; }

/* ---------- Chiffres de l'accueil ---------- */
.kpi { background: var(--glass); }
button.kpi:hover { border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.kpi-top .ico-tile { border-radius: 50%; }

/* ---------- Carte « À suivre » : l'aplat bleu du haut de page du site ---------- */
.widget.w-next {
    background: var(--k-field); border: 0; color: #fff; box-shadow: none;
    --muted: rgba(255, 255, 255, .78); --fill-2: rgba(255, 255, 255, .18); --fill: rgba(255, 255, 255, .26); --ink: #fff; --ink-2: rgba(255, 255, 255, .9);
}
.w-next .widget-eyebrow, .w-next.is-now .widget-eyebrow { color: var(--k-yellow); font-size: 13.5px; font-weight: 700; }
.w-next .w-count { font-weight: 800; }
.w-next .w-bar { background: rgba(255, 255, 255, .2); }
.w-next .w-bar i, .w-next.is-now .w-bar i { background: var(--k-yellow); }
.w-next .icon-btn { background: #fff; color: #0A3BB0; }
.w-next .icon-btn:hover { background: #E6EEFF; color: #0A3BB0; }
.w-next .icon-btn--accent { background: var(--k-yellow); color: var(--k-night); }
.w-next .w-who .w-leave { color: #0A3BB0; background: #fff; }
.w-next .w-who .w-leave.is-go { color: var(--k-night); background: var(--k-yellow); }
.w-next .btn { --c: #fff; color: #0A3BB0; background: #fff; }
.w-next a { color: #fff; }

/* ---------- Frise du jour, agenda, graphiques ---------- */
.day-track { background: var(--fill-2); }
.day-ev { background: color-mix(in srgb, var(--c) 16%, var(--glass)); }
.week-dh.is-today b, .day-cell.is-today .d { background: var(--accent); box-shadow: none; }
.ev { background: color-mix(in srgb, var(--c) 14%, var(--glass)); box-shadow: none; }
.ev:hover { box-shadow: 0 6px 16px -10px color-mix(in srgb, var(--c) 80%, black); }
.bar-fill { background: var(--c, var(--accent)); box-shadow: none; border-radius: 8px 8px 4px 4px; }
.bar.is-now .bar-fill { --c: var(--k-field); }
.hbar i { background: var(--c, var(--accent)); }
.hbar.is-now i { --c: var(--k-field); }

/* ---------- Fenêtres, menus, messages ---------- */
.sheet-panel, :root[data-theme="light"] .sheet-panel { background: var(--glass); -webkit-backdrop-filter: none; backdrop-filter: none; }
.sheet-foot { background: var(--glass); }
dialog.sheet::backdrop { background: rgba(14, 23, 38, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
:root[data-theme="light"] dialog.sheet::backdrop { background: rgba(14, 23, 38, .32); }
.menu, .slot-pop { background: var(--glass); -webkit-backdrop-filter: none; backdrop-filter: none; }
.palette-item[aria-selected="true"] { background: var(--accent-soft); }
.toast, .run-pill { background: var(--k-night); box-shadow: 0 18px 40px -16px rgba(14, 23, 38, .6), 0 0 0 1px rgba(255, 255, 255, .08); }
.toast-act { background: rgba(255, 255, 255, .12); color: var(--k-yellow); }
.reward-check, .reward-money { background: var(--glass); -webkit-backdrop-filter: none; backdrop-filter: none; }
.reward-money .coin { background: var(--green); box-shadow: none; }
.drag-ghost { background: var(--accent); }

/* ---------- Barre d'onglets du téléphone ---------- */
@media (max-width: 900px) {
    .tabbar { background: var(--glass); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 10px 30px -14px rgba(14, 23, 38, .35), 0 0 0 1px var(--glass-line); border: 0; }
    .tabbar a[aria-current="page"] { color: var(--accent-ink); }
    .tab-glider { background: var(--accent-soft); border-radius: 999px; }
}
.page.is-scrolled .navbar { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

/* ---------- Écran de connexion : l'aplat bleu du site ---------- */
.lock { background: var(--k-field); }
.lock-card, .lock-card.glass { background: #fff; color: #0E1726; border: 0; box-shadow: 0 30px 70px -30px rgba(5, 20, 60, .55); border-radius: 28px;
    --ink: #0E1726; --ink-2: #2B3647; --muted: #4E5B6E; --faint: rgba(14, 23, 38, .3); --field: #ECF0F6; --glass: #fff; --accent: #155DFC; --accent-ink: #0A3BB0; --c: #155DFC; --red: #DC2626; }
.lock-card .input { color: #0E1726; }
.lock-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 4px 0 18px; }
.lock-word { display: block; height: 34px; width: auto; }
.lock-brand .brand-desk { height: 26px; padding: 0 11px; font-size: 14px; }
.lock-card h1 { font-weight: 800; font-size: 27px; }

/* ---------- Assistant : bouton bleu uni, sans arc-en-ciel ---------- */
.ka-fab { background: var(--k-field); box-shadow: 0 14px 30px -14px rgba(18, 84, 228, .8); }
.ka-fab-ring { display: none; }
.ka-panel, :root[data-theme="light"] .ka-panel { background: var(--glass); -webkit-backdrop-filter: none; backdrop-filter: none; }
.ka-panel::before { content: none; }
.ka-orb { background: var(--k-field); box-shadow: none; }
@keyframes ka-breath { 50% { transform: scale(1.06); } }
.ka-hello-t { background: none; color: var(--ink); -webkit-background-clip: border-box; background-clip: border-box; }
.ka-msg--me .ka-b { background: var(--accent); box-shadow: none; }
.ka-av { background: var(--k-field); }
.ka-sugg button { background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); }
.ka-sugg button:hover { background: var(--accent-soft); }
.ka-sugg button small { color: var(--accent-ink); }

/* ---------- Réglages → Apparence : aperçus aux couleurs du Desk ---------- */
.ap-phone--light { background: #F4F6FA; }
.ap-phone--dark { background: #121722; }
.ap-phone--light i { background: #fff; box-shadow: 0 0 0 1px rgba(14, 23, 38, .08); }
.ap-phone--light i:first-child { background: rgba(14, 23, 38, .14); box-shadow: none; }
.ap-phone i.acc { background: var(--accent); box-shadow: none; }

@media (max-width: 900px) { .hero h1 { font-size: 34px; } }
@media print { .lock { background: none; } }

/* Changement de page : simple fondu court, sans zoom ni glissement (plus fluide, 30/11/2026). */
.page.push-in, .page.pop-in, .page.fade-in { animation: page-in .16s ease-out both; }
.page.push-out, .page.pop-out, .page.fade-out, .page.zoom-under { animation: page-out .12s ease-in both; filter: none; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes page-out { to { opacity: 0; } }

/* Étiquette d'urgence des demandes (public/urgence.js) */
.tag--urg { gap: 6px; font-weight: 650; }
.tag--urg i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.tag--urg-red { color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); }
.tag--urg-orange { color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, transparent); }
.tag--urg-gray { color: var(--ink-2, #6b7280); background: color-mix(in srgb, currentColor 10%, transparent); }

/* Tableau (Outils → Tableau) */
.tb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.tb-tabs { flex-wrap: wrap; }
.tb-name { max-width: 220px; }
.tb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.tb-wrap { overflow: auto; max-height: 70vh; border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 14px; background: var(--card, var(--bg)); }
.tb { border-collapse: collapse; font-size: 14px; }
.tb th { position: sticky; top: 0; z-index: 2; background: var(--panel, #F4F6FA); color: var(--mute, #4E5B6E); font-weight: 600; font-size: 12px; padding: 6px 8px; border: 1px solid var(--line, rgba(127,127,127,.2)); }
.tb tbody th { position: sticky; left: 0; z-index: 1; text-align: right; min-width: 38px; }
.tb .tb-corner { left: 0; z-index: 3; }
.tb td { padding: 0; border: 1px solid var(--line, rgba(127,127,127,.2)); }
.tb-cell { width: 150px; min-width: 90px; padding: 7px 9px; border: 0; background: transparent; color: var(--ink); font: inherit; outline: none; }
.tb-cell:focus { box-shadow: inset 0 0 0 2px var(--blue, #155DFC); background: color-mix(in srgb, var(--blue, #155DFC) 6%, transparent); }
.tb-cell.is-formula { color: var(--blue, #155DFC); font-weight: 600; text-align: right; }
