/* ===================================================================================================
   CONSOLE ADMIN, STRUCTURE ET CHARTE (refonte du 2026-09-25)

   Charge APRES css/admin.css, qui garde les composants de la console (tables, champs, graphes,
   chronologie). Ce fichier apporte :
     - les variables --fm-* que admin.css lit, dans la charte du site (navy, bleu, turquoise,
       Manrope pour les titres, IBM Plex pour le texte et les chiffres) ;
     - la structure : barre laterale fixe, barre du haut, pages ;
     - les classes acc-* et lx-* que js/admin.js genere, qui venaient avant des feuilles du site
       (account.css, landing.css) et que la page ne charge plus.
   Maquette de reference : https://claude.ai/artifact/HdMmwDTVtrGinUZqGiB7ez
   =================================================================================================== */

:root {
    --fm-bg: #F3F6FA;
    --fm-surface: #FFFFFF;
    --fm-surface-alt: #F7F9FC;
    --fm-ink: #0B1B2B;
    --fm-ink-soft: #5A6B7D;
    --fm-line: #E3E9F0;
    --fm-accent: #1B4DA6;
    --fm-accent-deep: #123A7D;
    --fm-radius: 12px;
    --fm-radius-sm: 8px;
    --fm-shadow-sm: 0 1px 2px rgba(11, 27, 43, .06);
    --adm-navy: #0B1B2B;
    --adm-navy-2: #12304A;
    --adm-navy-line: #1B3148;
    --adm-side-ink: #C9D6E3;
    --adm-side-mute: #7F95AB;
    --adm-teal: #5FD4C4;
    --adm-side-w: 248px;
    --adm-font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --adm-display: Manrope, "IBM Plex Sans", system-ui, sans-serif;
    --adm-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.adm-app {
    margin: 0;
    background: var(--fm-bg);
    color: var(--fm-ink);
    font-family: var(--adm-font);
    font-size: 14px;
    line-height: 1.5;
}
[hidden] { display: none !important; }
a { color: var(--fm-accent); text-decoration: none; }
a:hover { color: var(--fm-accent-deep); }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--fm-accent); outline-offset: 2px; }

/* ── Barre laterale ─────────────────────────────────────────────────────────── */

.adm-side {
    position: fixed; inset: 0 auto 0 0; z-index: 30;
    width: var(--adm-side-w);
    background: var(--adm-navy);
    border-right: 1px solid var(--adm-navy-line);
    color: var(--adm-side-ink);
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.adm-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 20px 18px;
    border-bottom: 1px solid var(--adm-navy-line);
    color: #FFFFFF;
}
.adm-brand:hover { color: #FFFFFF; }
.adm-brand-mark {
    width: 30px; height: 30px; border-radius: 8px; background: var(--adm-navy-2);
    display: flex; align-items: center; justify-content: center; flex: none;
}
.adm-brand-mark svg { width: 16px; height: 16px; fill: none; stroke: var(--adm-teal); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.adm-brand-text { display: flex; flex-direction: column; }
.adm-brand-text b { font-family: var(--adm-display); font-weight: 800; font-size: 15px; letter-spacing: -0.02em; }
.adm-brand-text small { font-family: var(--adm-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--adm-side-mute); }

.adm-env {
    margin: 14px 16px 2px; padding: 7px 10px; border-radius: 8px;
    font-family: var(--adm-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    display: flex; align-items: center; gap: 8px;
}
.adm-env::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.adm-env.is-uat { background: #3A2A0E; border: 1px solid #6B4E17; color: #F7D08A; }
.adm-env.is-uat::before { background: #F5B544; }
.adm-env.is-prod { background: #3D1414; border: 1px solid #7A2525; color: #FFB4A8; }
.adm-env.is-prod::before { background: #FF6B5A; }

.adm-nav { flex-grow: 1; padding: 8px 12px 16px; display: flex; flex-direction: column; gap: 14px; }
.adm-nav-group { display: flex; flex-direction: column; gap: 2px; }
.adm-nav-label {
    padding: 8px 10px 4px;
    font-family: var(--adm-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
    color: #6F87A0;
}
.adm-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 7px;
    color: var(--adm-side-ink); font-size: 13.5px; font-weight: 500;
    transition: background .15s ease, color .15s ease;
}
.adm-nav-item svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.adm-nav-item:hover { background: rgba(255, 255, 255, .05); color: #FFFFFF; }
.adm-nav-item.is-active { background: var(--adm-navy-2); color: #FFFFFF; box-shadow: inset 2px 0 0 var(--adm-teal); }
.adm-nav-item.is-danger { color: #FF9C8F; }
.adm-nav-item.is-danger:hover, .adm-nav-item.is-danger.is-active { color: #FFC2B8; }
.adm-nav-item:focus-visible { outline-color: var(--adm-teal); }

.adm-side-foot { padding: 14px 16px 16px; border-top: 1px solid var(--adm-navy-line); display: flex; flex-direction: column; gap: 8px; }
.adm-side-foot p { margin: 0; }
.adm-status { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.adm-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.adm-status.is-on::before { background: #3DD68C; }
.adm-status.is-paused { color: #FFB4A8; }
.adm-status.is-paused::before { background: #FF6B5A; }
.adm-who { font-size: 12.5px; color: #FFFFFF; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-side-links { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; }
/* Le selecteur de langue (js/admin-i18n.js), sur le fond sombre de la barre laterale. */
.adm-lang-sel {
    width: 100%; padding: 6px 8px; border-radius: 8px; font: inherit; font-size: 12.5px;
    color: var(--adm-side-ink); background: var(--adm-navy-2); border: 1px solid var(--adm-navy-line); cursor: pointer;
}
.adm-lang-sel:focus-visible { outline: 2px solid var(--adm-teal); outline-offset: 1px; }
.adm-side-links a { color: var(--adm-side-mute); }
.adm-side-links a:hover { color: #FFFFFF; }

/* ── Colonne principale ─────────────────────────────────────────────────────── */

.adm-main { margin-left: var(--adm-side-w); min-height: 100vh; display: flex; flex-direction: column; }

.adm-top {
    position: sticky; top: 0; z-index: 20;
    height: 60px; padding: 0 28px;
    display: flex; align-items: center; gap: 14px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(1.4) blur(6px);
    border-bottom: 1px solid var(--fm-line);
}
.adm-burger {
    display: none; width: 38px; height: 38px; border: 1px solid var(--fm-line); border-radius: 8px;
    background: var(--fm-surface); color: var(--fm-ink); align-items: center; justify-content: center; cursor: pointer;
}
.adm-burger svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.adm-period { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-period-label { font-size: 12px; font-weight: 600; color: var(--fm-ink-soft); text-transform: uppercase; letter-spacing: .08em; }
.adm-updated { margin-left: auto; font-size: 12.5px; color: var(--fm-ink-soft); white-space: nowrap; }

.adm-content { padding: 24px 28px 48px; max-width: 1480px; width: 100%; }
.adm-page-head { margin-bottom: 18px; }
.adm-page-title {
    margin: 0; font-family: var(--adm-display); font-size: 26px; font-weight: 800;
    letter-spacing: -0.025em; color: var(--fm-ink); text-wrap: balance;
}
.adm-page-sub { margin: 4px 0 0; font-size: 13.5px; color: var(--fm-ink-soft); }

/* ── Les classes que genere admin.js (venaient d'account.css et landing.css) ────── */

.acc-msg {
    margin: 16px 28px 0; padding: 10px 14px; border-radius: var(--fm-radius-sm);
    border: 1px solid var(--fm-line); background: var(--fm-surface); font-size: 13.5px;
}
.acc-msg.is-error { border-color: #F3C6BF; background: #FFF3F1; color: #8C2A20; }
.acc-msg.is-ok { border-color: #B9EAD6; background: #EEFBF6; color: #0E6B4B; }

.acc-panel {
    background: var(--fm-surface); border: 1px solid var(--fm-line); border-radius: var(--fm-radius);
    padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--fm-shadow-sm);
}
.acc-h2 { margin: 0 0 6px; font-family: var(--adm-display); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--fm-ink); }
.acc-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.acc-panel-head .acc-h2 { margin: 0; }
.acc-tile-note { margin: 4px 0 8px; font-size: 13px; line-height: 1.55; color: var(--fm-ink-soft); max-width: 90ch; }

.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.acc-tile {
    background: var(--fm-surface); border: 1px solid var(--fm-line); border-radius: var(--fm-radius);
    padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--fm-shadow-sm);
}
.acc-tile-label { font-size: 12px; font-weight: 500; color: var(--fm-ink-soft); }
.acc-tile-value { font-family: var(--adm-display); font-size: 24px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--fm-ink); }
.acc-tile-value--sm { font-size: 18px; }
.acc-tile .acc-tile-note { margin: 2px 0 0; font-size: 11.5px; }

.lx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 36px; padding: 0 14px; border-radius: var(--fm-radius-sm);
    border: 1px solid transparent; font-size: 13px; font-weight: 600; cursor: pointer;
    white-space: nowrap; transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.lx-btn:disabled { opacity: .5; cursor: not-allowed; }
.lx-btn-primary { background: var(--fm-accent); color: #FFFFFF; }
.lx-btn-primary:hover:not(:disabled) { background: var(--fm-accent-deep); color: #FFFFFF; }
.lx-btn-line { background: var(--fm-surface); border-color: #DCE3EB; color: var(--fm-ink); }
.lx-btn-line:hover:not(:disabled) { border-color: var(--fm-accent); color: var(--fm-accent); }
.adm-btn-danger { background: #C9372C; border-color: #C9372C; color: #FFFFFF; }

.adm-select { height: 36px; padding: 0 10px; border-radius: var(--fm-radius-sm); border: 1px solid #DCE3EB; background: var(--fm-surface); font-size: 13.5px; }
textarea.adm-select { height: auto; padding: 8px 10px; }

/* ── Ajustements des composants d'admin.css a la charte ────────────────────── */

.adm-table { font-size: 13px; }
.adm-table th { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: #6B7C8F; padding: 8px 12px 8px 0; }
.adm-table td { padding: 9px 12px 9px 0; border-bottom-color: #EEF2F6; }
.adm-table tbody tr:hover td, .adm-table tr:hover td { background: #FAFBFD; }
.adm-guards, .adm-field2-key, .adm-rate-input, .adm-tl-detail { font-family: var(--adm-mono); }
.adm-health { margin-bottom: 16px; }
.adm-health-box { border-radius: var(--fm-radius); }
.adm-empty { border-radius: var(--fm-radius-sm); background: var(--fm-surface-alt); }
.adm-intro { border-radius: var(--fm-radius-sm); }
.adm-chart { margin-top: 12px; }
.adm-two { gap: 16px; }
.adm-two .acc-panel { margin-bottom: 0; }
.adm-two { margin-bottom: 16px; }

/* ── Petits ecrans : la barre laterale devient un tiroir ───────────────────── */

.adm-scrim { position: fixed; inset: 0; z-index: 25; background: rgba(6, 14, 26, .45); }

@media (max-width: 960px) {
    .adm-side { transform: translateX(-100%); transition: transform .2s ease; }
    body.adm-menu-open .adm-side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
    .adm-main { margin-left: 0; }
    .adm-burger { display: inline-flex; }
    .adm-top { padding: 0 16px; }
    .adm-content { padding: 18px 16px 40px; }
    .acc-msg { margin: 12px 16px 0; }
    .adm-updated { display: none; }
}
@media (max-width: 560px) {
    .adm-top { height: auto; min-height: 60px; padding-block: 10px; flex-wrap: wrap; }
    .adm-period-label { display: none; }
    .adm-page-title { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .adm-side { transition: none; }
}

/* ── Tableau de bord (etape 2 de la refonte) ───────────────────────────────── */

.adm-attention { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.adm-att {
    display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
    border-radius: 10px; border: 1px solid var(--fm-line); background: var(--fm-surface); color: var(--fm-ink);
    transition: box-shadow .15s ease, transform .15s ease;
}
.adm-att:hover { color: var(--fm-ink); box-shadow: 0 4px 14px rgba(11, 27, 43, .08); transform: translateY(-1px); }
.adm-att-dot { margin-top: 6px; width: 8px; height: 8px; border-radius: 50%; flex: none; background: #94A3B8; }
.adm-att-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.adm-att-body b { font-size: 13.5px; }
.adm-att-body span { font-size: 12.5px; color: var(--fm-ink-soft); }
.adm-att.is-ok { background: #EEFBF6; border-color: #B9EAD6; }
.adm-att.is-ok .adm-att-dot { background: #13956B; }
.adm-att.is-warn { background: #FFF8EC; border-color: #F3D9A4; }
.adm-att.is-warn .adm-att-dot { background: #D98A0B; }
.adm-att.is-bad { background: #FFF3F1; border-color: #F3C6BF; }
.adm-att.is-bad .adm-att-dot { background: #C9372C; }

.adm-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.adm-kpi {
    background: var(--fm-surface); border: 1px solid var(--fm-line); border-radius: var(--fm-radius);
    padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--fm-shadow-sm); min-width: 0;
}
.adm-kpi-label { font-size: 12px; font-weight: 500; color: var(--fm-ink-soft); }
.adm-kpi-value { font-family: var(--adm-display); font-size: 24px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-kpi-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; min-height: 26px; }
.adm-kpi-note { font-size: 11.5px; color: #8A99A9; }
.adm-spark { width: 90px; height: 26px; flex: none; }
.adm-delta { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 10px; line-height: 1.4; }
.adm-delta.is-up { background: #E6F6EF; color: #0E7C56; }
.adm-delta.is-down { background: #FDECEA; color: #B42318; }
.adm-delta.is-flat { background: #EEF2F6; color: #46586B; }

.adm-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.adm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.adm-grid3 > .acc-panel, .adm-grid2 > .acc-panel { margin-bottom: 0; min-width: 0; }
.adm-span2 { grid-column: span 2; }
.adm-panel-link { font-size: 12.5px; font-weight: 500; }

.adm-kv { margin: 6px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.adm-kv dt, .adm-kv dd { margin: 0; padding: 9px 0; border-bottom: 1px solid #EEF2F6; font-size: 13.5px; }
.adm-kv dt { color: #46586B; cursor: help; }
.adm-kv dd { text-align: right; font-family: var(--adm-mono); font-size: 13px; color: var(--fm-ink); }
.adm-kv dd.is-strong { font-weight: 600; }
.adm-foot-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--fm-bg); font-size: 12.5px; color: #46586B; }

.adm-pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px; font-family: var(--adm-font); }
.adm-pill.is-up { background: #E6F6EF; color: #0E7C56; }
.adm-pill.is-down { background: #FDECEA; color: #B42318; }
.adm-pill.is-flat { background: #EEF2F6; color: #46586B; }

@media (max-width: 1280px) { .adm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
    .adm-attention { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .adm-grid3 { grid-template-columns: 1fr; }
    .adm-span2 { grid-column: auto; }
    .adm-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .adm-attention, .adm-kpis { grid-template-columns: 1fr; }
}

/* ── Fiche client, Analyses, Audit (etape 3) ───────────────────────────────── */

.adm-user-ident { display: flex; align-items: center; gap: 14px; min-width: 0; }
.adm-avatar {
    width: 44px; height: 44px; border-radius: 50%; flex: none;
    background: #E3ECFA; color: var(--fm-accent);
    font-family: var(--adm-display); font-weight: 800; font-size: 17px;
    display: flex; align-items: center; justify-content: center;
}
.adm-user-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-user-title .acc-h2 { margin: 0; font-size: 19px; }
.adm-user-meta { margin: 3px 0 0; font-size: 12.5px; color: var(--fm-ink-soft); overflow-wrap: anywhere; }
#admUserDetail { scroll-margin-top: 76px; }
#admUserDetail > h3.acc-h2 { margin-top: 22px; font-size: 15px; }
.adm-btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.ana-controls input[type="search"] { min-width: 14rem; }

/* retours beta (2026-11-16) */
.adm-nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--fm-amber, #E0A15F); color: #1a1206; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.fb-adm-msg { min-width: 320px; max-width: 560px; }
.fb-adm-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.fb-adm-meta { margin-top: 6px; font-size: 11.5px; opacity: .65; overflow-wrap: anywhere; }
.fb-adm-shot-host { margin-top: 8px; }
.fb-adm-see { height: 28px; font-size: 12px; }
.fb-adm-shot { display: block; max-width: 100%; max-height: 420px; border-radius: 6px; border: 1px solid rgba(127,127,127,.3); }
.fb-adm-kind { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600; }
.fb-adm-bug { background: rgba(229,72,77,.14); color: #E5484D; }
.fb-adm-idea { background: rgba(139,108,255,.14); color: #8B6CFF; }
.fb-adm-opinion { background: rgba(95,212,196,.14); color: #2BA493; }
.fb-adm-reply { margin-top: 8px; padding: 8px 10px; border-radius: 6px; border: 1px solid rgba(127,127,127,.25); }
.fb-adm-team { border-color: rgba(95,212,196,.5); background: rgba(95,212,196,.07); }
.fb-adm-who { font-size: 11px; opacity: .7; margin-bottom: 3px; }
.fb-adm-form { margin-top: 10px; display: grid; gap: 6px; }
.fb-adm-ta { width: 100%; box-sizing: border-box; resize: vertical; padding: 7px 9px; border-radius: 6px; border: 1px solid rgba(127,127,127,.35); background: transparent; color: inherit; font: inherit; font-size: 13px; }
.fb-adm-form .lx-btn { justify-self: start; height: 30px; font-size: 12.5px; }
.fb-adm-wait { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.fb-adm-wait-team { color: #E0A15F; }
.fb-adm-wait-tester { opacity: .6; }
.adm-table td.fb-adm-excerpt { min-width: 220px; max-width: 380px; white-space: normal; overflow-wrap: anywhere; }
.adm-table td:has(> .fb-adm-open) { white-space: nowrap; }
.fb-adm-open { height: 28px; font-size: 12px; text-decoration: none; }
.fb-tk-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fb-tk-who { font-weight: 600; }
.fb-tk-status { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; }
.fb-tk-meta { margin: 8px 0 0; font-size: 11.5px; opacity: .6; overflow-wrap: anywhere; }
.fb-tk-conv { display: grid; gap: 10px; margin-top: 16px; }
.fb-tk-msg { max-width: 82%; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(127,127,127,.25); }
.fb-tk-tester { justify-self: start; }
.fb-tk-team { justify-self: end; border-color: rgba(95,212,196,.5); background: rgba(95,212,196,.07); }
.fb-tk-form { display: grid; gap: 8px; margin-top: 18px; }
.fb-tk-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fb-tk-foot .lx-btn { margin-left: auto; }
.fb-shot { display: block; margin-top: 8px; max-width: 260px; max-height: 180px; border-radius: 6px; border: 1px solid rgba(127,127,127,.3); cursor: zoom-in; }
.fb-shot.is-big { max-width: 100%; max-height: none; cursor: zoom-out; }
.fb-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fb-file-btn { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 6px; border: 1px dashed rgba(127,127,127,.45); font-size: 12.5px; cursor: pointer; }
.fb-file-btn input { display: none; }
.fb-thumb { max-height: 54px; max-width: 120px; border-radius: 6px; border: 1px solid rgba(127,127,127,.3); }
.fb-file-x { border: 0; background: none; color: inherit; opacity: .7; font-size: 12px; cursor: pointer; text-decoration: underline; }
@media (max-width: 700px) { .fb-tk-msg { max-width: 100%; } .fb-tk-status { margin-left: 0; } }
