/* Yenilik — console client. Même identité que yenilik.ai : Sora, Figtree, bleu 2AF, encre marine, accent ambre. */

@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("/assets/fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("/assets/fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("/assets/fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("/assets/fonts/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url("/assets/fonts/sora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url("/assets/fonts/sora-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: #05092B; --ink-2: #1B2250; --text: #3A4260; --muted: #4A5370;
  --on-dark: #C9CFE3; --on-dark-muted: #9AA3C0;
  --line: #E4E7EF; --line-strong: #C9D0DE; --soft: #F4F6FB; --white: #FFFFFF;
  --blue: #0A4DFF; --blue-dark: #0638B8; --blue-soft: #EAF0FF;
  --amber: #F6A21A; --amber-text: #A35F00; --amber-soft: #FFF4DE;
  --green: #37B853; --green-text: #1F7A35; --green-soft: #E8F6EC;
  --red: #C8192B; --red-soft: #FDECEE; --red-text: #8E1520;
  --radius: 14px;
  --font-title: "Sora", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.55; color: var(--text); background: var(--soft); }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-title); color: var(--ink); margin: 0; line-height: 1.2; }
h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--white); color: var(--ink); padding: 10px 16px; z-index: 100; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); margin-bottom: 8px; }

/* Logo */
.logo { display: inline-flex; align-items: baseline; text-decoration: none; font-family: var(--font-title); font-weight: 700; font-size: 26px; color: var(--ink); letter-spacing: -0.02em; }
.logo:hover { color: var(--ink); }
.logo-dot { color: var(--amber); }
.logo-tag { font-family: var(--font-body); font-weight: 600; font-size: 12px; color: var(--on-dark-muted); margin-left: 8px; letter-spacing: 0; }
.logo-light, .logo-light:hover { color: var(--white); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; font: inherit; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); color: var(--white); }
.btn-outline { background: var(--white); color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-soft); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #A3121F; color: var(--white); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--blue); cursor: pointer; text-decoration: underline; }
.link-danger { color: var(--red); }

/* Notices et badges */
.notice { border-radius: 10px; padding: 12px 16px; margin-bottom: 20px; font-size: 15px; }
.notice ul { margin: 0; padding-left: 18px; }
.notice-succes { background: var(--green-soft); color: var(--green-text); }
.notice-erreur { background: var(--red-soft); color: var(--red-text); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge-ok { color: var(--green-text); background: var(--green-soft); }
.badge-ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.badge-soon { color: var(--amber-text); background: var(--amber-soft); }
.badge-blue { color: var(--blue-dark); background: var(--blue-soft); }
.badge-muted { color: var(--muted); background: var(--soft); border: 1px solid var(--line); }

/* Formulaires */
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend, .qa-list legend { font-weight: 600; color: var(--ink); font-size: 15px; padding: 0; }
.field-hint { font-size: 13.5px; color: var(--muted); }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--white); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--blue-soft); border-color: var(--blue); }
.field-row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; padding-top: 8px; }
.form-inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.form-inline .field { flex: 1 1 260px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.consent input, .check input, .choice input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--blue); }
.checks { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.checks-col { flex-direction: column; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.choices-col { grid-template-columns: 1fr; }
.choice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px 16px; cursor: pointer; background: var(--white); }
.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.choice span { display: flex; flex-direction: column; gap: 2px; }
.choice strong { color: var(--ink); }
.choice small { color: var(--muted); font-size: 14px; }
fieldset.bare { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
fieldset.bare:disabled { opacity: .75; }
.narrow { max-width: 560px; }

/* Pages d'authentification */
.auth-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); min-height: 100vh; background: var(--white); }
.auth-main { padding: 32px clamp(20px, 6vw, 80px) 48px; display: flex; flex-direction: column; }
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 48px; }
.lang-switch button { background: none; border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; min-height: 40px; }
.auth-card { width: 100%; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.auth-card h1 { margin-bottom: 4px; }
.auth-alt { text-align: center; font-size: 15px; }
.auth-side { background: var(--ink); color: var(--on-dark); display: flex; align-items: center; padding: 48px; }
.auth-side-inner { max-width: 420px; }
.auth-side .eyebrow { color: var(--amber); }
.auth-side-title { font-family: var(--font-title); font-weight: 700; font-size: 34px; line-height: 1.15; color: var(--white); margin: 8px 0 28px; }
.auth-avatars { display: flex; gap: 12px; margin-bottom: 28px; }
.auth-avatars img { width: 72px; height: 72px; border-radius: 20px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.auth-points li::before { content: "✓"; color: var(--amber); font-weight: 700; margin-right: 10px; }
@media (max-width: 880px) { .auth-body { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* Coquille de l'application */
.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--ink) 248px, transparent 248px); }
.app-side { background: var(--ink); color: var(--on-dark); padding: 24px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.app-side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 24px; }
.app-menu { display: flex; flex-direction: column; flex: 1; }
.app-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.app-menu nav a { display: flex; align-items: center; justify-content: space-between; color: var(--on-dark); text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 500; }
.app-menu nav a:hover { background: var(--ink-2); color: var(--white); }
.app-menu nav a[aria-current="page"] { background: var(--blue); color: var(--white); }
.count { background: var(--amber); color: var(--ink); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.app-user { margin-top: auto; border-top: 1px solid var(--ink-2); padding: 16px 12px 0; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.app-user strong { color: var(--white); }
.app-user span { color: var(--on-dark-muted); }
.app-user .link-btn { color: var(--on-dark); }
.nav-toggle { display: none; }
.nav-toggle-dark { background: transparent; color: var(--white); border: 1px solid var(--ink-2); border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 600; min-height: 40px; cursor: pointer; }
.app-main { padding: 32px clamp(16px, 4vw, 48px) 64px; max-width: 1180px; width: 100%; }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; background: none; }
  .app-side { position: static; height: auto; padding: 16px; }
  .app-side-top { padding: 0; }
  .nav-toggle { display: inline-flex; }
  .app-menu { display: none; padding-top: 16px; }
  .app-menu.is-open { display: flex; }
}

/* Barre d'essai */
.trial-bar { background: var(--amber-soft); color: var(--amber-text); border-radius: 10px; padding: 10px 16px; margin-bottom: 24px; font-size: 14.5px; font-weight: 500; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; }
.trial-bar a { color: var(--amber-text); font-weight: 700; }
.trial-bar-end { background: var(--red-soft); color: var(--red-text); }
.trial-bar-end a { color: var(--red-text); }

/* En-têtes et panneaux */
.page-head { margin-bottom: 24px; }
.page-head p { margin-top: 6px; }
.page-head-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.panel > h2 { margin-bottom: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.panel-head a { font-size: 14px; font-weight: 600; }
.panel-highlight { border: 2px solid var(--blue); }
.panel-highlight p { margin-bottom: 12px; }
.panel-danger { border-color: #F2B8BE; }
.empty { color: var(--muted); font-size: 15px; padding: 12px 0; }
.grid-main { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.grid-2col { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
@media (max-width: 1000px) { .grid-main { grid-template-columns: 1fr; } }

/* Statistiques */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); margin-bottom: 24px; }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat-value { font-size: 24px; } }
.stats-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat-label { font-size: 14px; color: var(--muted); }
.stat-value { font-family: var(--font-title); font-weight: 700; font-size: 30px; color: var(--ink); margin-top: 4px; }
.stat-note { font-size: 12.5px; color: var(--muted); }
.stat-alert { border-color: var(--amber); background: #FFF8EC; }

/* Journal */
.log-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.log-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.log-row-pending { border-color: var(--amber); background: #FFF8EC; }
.log-avatar { width: 36px; height: 36px; border-radius: 10px; flex: none; }
.log-text { flex: 1 1 260px; min-width: 0; font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.log-text strong { color: var(--ink); }
.log-meta { font-size: 13px; color: var(--muted); }
.log-actions { display: flex; gap: 8px; align-items: center; }
.filters-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin-bottom: 20px; }
.filters-bar .field { flex: 0 1 220px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 20px; font-size: 14px; }

/* Agents */
.agent-mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.agent-mini-list a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; text-decoration: none; color: var(--text); border: 1px solid var(--line); }
.agent-mini-list a:hover { border-color: var(--blue); color: var(--text); }
.agent-mini-list img { width: 44px; height: 44px; border-radius: 12px; }
.agent-mini-list span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.agent-mini-list strong { color: var(--ink); }
.agent-mini-list small { color: var(--muted); font-size: 13px; }
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.agent-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.agent-card form, .agent-card .btn { width: 100%; margin-top: auto; }
.agent-card.is-soon { background: transparent; border-style: dashed; }
.agent-card-head { display: flex; gap: 14px; align-items: center; }
.agent-card-head img { width: 56px; height: 56px; border-radius: 16px; }
.agent-card h2 { font-size: 18px; }
.agent-card p { font-size: 14px; }
.agent-hero { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-bottom: 24px; }
.agent-hero img { width: 88px; height: 88px; border-radius: 24px; }
.agent-hero-text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; }
.test-box { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; background: var(--soft); border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; }
.test-code { display: flex; flex-direction: column; }
.test-code span { font-size: 13px; color: var(--muted); }
.test-code strong { font-family: var(--font-title); font-size: 28px; letter-spacing: 0.12em; color: var(--ink); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.kv dt { font-weight: 600; color: var(--ink); }
.kv dd { margin: 0; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } }

/* Démarrage */
.stepper { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stepper li { display: flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--muted); background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 6px; }
.stepper li a { display: flex; align-items: center; color: inherit; text-decoration: none; }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--soft); margin-right: 8px; font-size: 13px; }
.stepper li.current { border-color: var(--blue); color: var(--ink); }
.stepper li.current .step-n { background: var(--blue); color: var(--white); }
.stepper li.done { color: var(--green-text); }
.stepper li.done .step-n { background: var(--green-soft); }
.agent-pick { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.agent-option { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: var(--white); }
.agent-option input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.agent-option img { width: 48px; height: 48px; border-radius: 14px; flex: none; }
.agent-option span:not(.badge) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.agent-option strong { color: var(--ink); }
.agent-option small { color: var(--muted); font-size: 13.5px; }
.agent-option:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.agent-option.is-disabled { cursor: not-allowed; opacity: .6; border-style: dashed; }
.qa-list { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.qa-row { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--soft); }
.qa-remove { align-self: flex-end; font-size: 14px; }
.qa-list .btn { align-self: flex-start; }
.recap { display: flex; gap: 14px; align-items: center; background: var(--soft); border-radius: 12px; padding: 14px 16px; }
.recap img { width: 56px; height: 56px; border-radius: 16px; }

/* Rapports */
.bars { display: flex; align-items: flex-end; gap: 12px; height: 220px; padding-top: 24px; border-bottom: 1px solid var(--line); }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.bar { width: 100%; max-width: 56px; background: var(--blue); border-radius: 6px 6px 0 0; }
.bar-value { font-size: 13px; font-weight: 600; color: var(--ink); }
.bar-label { font-size: 13px; color: var(--muted); padding-bottom: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { color: var(--muted); font-weight: 600; font-size: 13.5px; }
tbody th { color: var(--ink); font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.simple-list { padding-left: 18px; margin: 8px 0 0; font-size: 15px; }

/* Compte */
.plan-name { font-family: var(--font-title); font-weight: 700; font-size: 24px; color: var(--ink); margin-bottom: 8px; }

/* Conversations */
.conv-link { color: var(--ink); text-decoration: none; }
.conv-link:hover { color: var(--blue); text-decoration: underline; }
.conv-apercu { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-attente { background: var(--amber-soft); color: var(--amber-text); }
.fil { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bulle { max-width: min(560px, 85%); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.bulle p { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.bulle-client { align-self: flex-start; background: var(--soft); border: 1px solid var(--line); }
.bulle-agent { align-self: flex-end; background: var(--blue-soft); }
.bulle-humain { align-self: flex-end; background: var(--amber-soft); }
.bulle-auteur { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.bulle-heure { font-size: 12px; color: var(--muted); }
