/* Thème commun AB-CONNECT de la console d'exploitation et de l'espace
   commerçant : bleu signal et violet du site, logo AB, titres en Space
   Grotesk, cartes avec un filet bleu-violet. Chargé après les styles propres
   à chaque page, il ne change que l'habillage, jamais la mise en page des
   écrans. Clair et sombre suivent l'attribut data-theme déjà posé par chaque
   page. */

@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/space-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }

:root {
  --ab-blue: #2e9bff;
  --ab-blue-ink: #147fd9;
  --ab-violet: #7c5cff;
  --ab-gradient: linear-gradient(135deg, #2e9bff, #7c5cff);
  --ab-glow: rgba(46, 155, 255, .14);
  --ab-soft: #f3f6fa;
  --ab-line-soft: #edf1f6;
  --ab-display: "Space Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
  --canvas: #f7f9fc;
  --line: #e3e8f0;
}
:root[data-theme="dark"] {
  --ab-blue-ink: #6cb8ff;
  --ab-glow: rgba(46, 155, 255, .2);
  --ab-soft: #121826;
  --ab-line-soft: rgba(237, 239, 245, .07);
  --canvas: #05070c;
  --surface: #0b0f17;
  --line: rgba(237, 239, 245, .11);
  --ink: #edeff5;
  --muted: #8b8e97;
  --accent-pale: rgba(46, 155, 255, .14);
}

/* Fond : un halo bleu et violet derrière le haut de la page. */
body {
  background:
    radial-gradient(ellipse 60rem 26rem at 30% 0%, var(--ab-glow), transparent 70%),
    radial-gradient(ellipse 40rem 22rem at 90% 0%, rgba(124, 92, 255, .08), transparent 70%),
    var(--canvas);
  background-attachment: fixed;
}
:root[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 60rem 26rem at 30% 0%, var(--ab-glow), transparent 70%),
    radial-gradient(ellipse 40rem 22rem at 90% 0%, rgba(124, 92, 255, .1), transparent 70%),
    var(--canvas);
  background-attachment: fixed;
}

h1, h2, h3, .brand-copy strong, .product-metrics strong, .ops-desk-head h2, .desk-tile strong {
  font-family: var(--ab-display);
}
h1 { letter-spacing: -.035em; }

/* Logo : « AB », le B en bleu, dans un carré à bord lumineux. */
.brand-mark {
  display: flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(46, 155, 255, .6);
  background: #0b0f17 !important;
  box-shadow: 0 0 16px rgba(46, 155, 255, .3) !important;
  color: #edeff5;
  font: 700 15px/1 var(--ab-display);
  letter-spacing: -.02em;
}
.brand-mark::before, .brand-mark::after {
  position: static !important;
  width: auto !important;
  height: auto !important;
  transform: none !important;
  border-radius: 0 !important;
  background: none !important;
  opacity: 1 !important;
}
.brand-mark::before { content: "A" !important; color: #edeff5; }
.brand-mark::after { content: "B" !important; color: var(--ab-blue); }

/* Boutons : le dégradé des boutons principaux devient celui du site. */
:root { --gradient: var(--ab-gradient); }

/* Cartes et panneaux. */
.panel, .product-card {
  border-color: var(--line);
  background: var(--surface);
}
.product-card { position: relative; overflow: hidden; }
.product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--ab-gradient);
}
.product-card::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ab-glow), transparent 65%);
  pointer-events: none;
}
.product-card > * { position: relative; z-index: 1; }
.product-name .panel-icon { background: var(--ab-gradient); font-family: var(--ab-display); }
.product-metrics span { border: 1px solid var(--ab-line-soft); background: var(--ab-soft); }
.product-actions a { border-color: var(--line); background: var(--surface); color: var(--ink); }
:root[data-theme="dark"] .product-actions a { background: transparent; }
.service-state { color: var(--ab-blue-ink); }
.service-state::before { background: var(--ab-blue); }
.service-state[data-state="ready"] { color: #15803d; background: #dcfce7; }
.service-state[data-state="ready"]::before { background: #22c55e; }
:root[data-theme="dark"] .service-state[data-state="ready"] { color: #4ade80; background: rgba(34, 197, 94, .15); }
.dashboard-hero .eyebrow, .eyebrow { color: var(--ab-blue-ink); }
.dashboard-date { background: var(--surface); }

/* Menu latéral (console) : élément actif en bleu, filet à gauche. */
html[data-shell="sidebar"] body[data-view="dashboard"] .service-nav > button[aria-current="page"] {
  color: var(--ab-blue-ink);
  background: linear-gradient(90deg, rgba(46, 155, 255, .14), rgba(124, 92, 255, .06));
  box-shadow: inset 3px 0 0 var(--ab-blue);
}
:root[data-theme="dark"] .service-nav button[aria-current="page"],
:root[data-theme="dark"][data-shell="sidebar"] body[data-view="dashboard"] .service-nav > button[aria-current="page"] { background: linear-gradient(90deg, rgba(46, 155, 255, .2), rgba(124, 92, 255, .08)); color: #8cc4ff; }
.service-nav { background: var(--surface); }
.theme-switch { background: var(--ab-soft); }
:root[data-theme="dark"] .theme-switch button[aria-pressed="true"] { background: #1c2436; color: var(--ink); }

/* --- Vue d'ensemble de la console : barre de recherche, À traiter, Aujourd'hui --- */
.ops-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.ops-chips button {
  min-height: 32px;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  box-shadow: none;
  font-size: .78rem;
  font-weight: 600;
}
.ops-chips button:hover:not(:disabled) { color: var(--ab-blue-ink); border-color: rgba(46, 155, 255, .45); box-shadow: none; transform: none; }
.ops-desk-card { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.ops-section-title span { color: var(--muted); font-size: .76rem; }
.desk-list { display: grid; }
.desk-rest { padding: 12px 18px; border-top: 1px solid var(--ab-line-soft); color: var(--muted); font-size: .74rem; }
.desk-item {
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border: 0;
  border-top: 1px solid var(--ab-line-soft);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  font-weight: 400;
  text-align: left;
}
.desk-item:first-child { border-top: 0; }
button.desk-item:hover:not(:disabled) { background: var(--ab-soft); box-shadow: none; transform: none; }
.desk-icon { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--ab-blue-ink); background: var(--accent-pale); font-weight: 800; font-size: .8rem; }
.desk-item[data-level="danger"] .desk-icon { color: #dc2626; background: #fee2e2; }
:root[data-theme="dark"] .desk-item[data-level="danger"] .desk-icon { color: #fca5a5; background: rgba(239, 68, 68, .16); }
.desk-copy { flex: 1; min-width: 0; display: grid; }
.desk-copy strong { font-size: .86rem; }
.desk-copy span { color: var(--muted); font-size: .74rem; }
.desk-pill { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .68rem; font-weight: 750; white-space: nowrap; }
.desk-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.desk-pill[data-level="danger"] { color: #b91c1c; background: #fee2e2; }
.desk-pill[data-level="warning"] { color: #a15c07; background: #fef3c7; }
.desk-pill[data-level="info"] { color: #1069b7; background: #e0efff; }
.desk-pill[data-level="ok"] { color: #15803d; background: #dcfce7; }
:root[data-theme="dark"] .desk-pill[data-level="danger"] { color: #fca5a5; background: rgba(239, 68, 68, .16); }
:root[data-theme="dark"] .desk-pill[data-level="warning"] { color: #fbbf24; background: rgba(251, 191, 36, .15); }
:root[data-theme="dark"] .desk-pill[data-level="info"] { color: #8cc4ff; background: rgba(46, 155, 255, .16); }
:root[data-theme="dark"] .desk-pill[data-level="ok"] { color: #4ade80; background: rgba(34, 197, 94, .15); }
.ops-section-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.ops-section-title h2 { font-size: 1.15rem; }
}

/* Haut de page centré, barre de demande et raccourcis (maquette 65). */
#overviewPanel .ops-hero { position: relative; display: block; margin-bottom: 0; text-align: center; padding-top: 34px; }
#overviewPanel .ops-hero > div { display: flex; flex-direction: column; align-items: center; }
.ops-hero h1 { font-size: clamp(2rem, 3.4vw, 2.75rem); }
.ops-hero p:last-child { margin: 10px auto 0; max-width: 560px; }
#overviewPanel .ops-hero .eyebrow { justify-content: center; margin: 0 0 6px; color: var(--muted); }
.ops-hero .eyebrow::before { display: none; }
#overviewPanel .ops-hero .dashboard-date { position: absolute; right: 0; top: 0; }
.ops-command { width: min(790px, 100%); margin: 22px auto 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 14px 34px -22px rgba(20, 36, 68, .45); }
.ops-command input { width: 100%; min-height: 64px; padding: 16px 18px 26px; border: 0; outline: none; background: transparent; color: var(--ink); font-size: .98rem; box-shadow: none; }
.ops-command-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 14px; border-top: 1px solid var(--ab-line-soft); background: var(--ab-soft); color: var(--muted); font-size: .74rem; }
.ops-command-foot kbd { padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; font: 600 .66rem Inter, sans-serif; }
.ops-command-foot button { min-height: 34px; padding: 0 16px; border-radius: 9px; font-size: .82rem; }
.ops-chips { justify-content: center; margin: 14px 0 30px; }
.ops-section-title { margin-top: 30px; }
.ops-title-link { margin-left: auto; min-height: 0; padding: 0; border: 0; color: var(--ink); background: none !important; box-shadow: none !important; font-size: .8rem; font-weight: 600; }
.ops-title-link:hover:not(:disabled) { color: var(--ab-blue-ink); transform: none; }
.ops-desk-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.ops-businesses { display: flex; flex-wrap: wrap; gap: 10px; }
.ops-business { min-height: 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); box-shadow: none; font-weight: 400; text-align: left; }
.ops-business:hover:not(:disabled) { border-color: rgba(46, 155, 255, .45); background: var(--surface); box-shadow: none; transform: none; }
.ops-business .desk-copy strong { font-size: .82rem; }
.ops-business .desk-copy span { font-size: .7rem; }
.ops-business .desk-icon[data-level="warning"] { color: #a15c07; background: #fef3c7; }
.ops-business .desk-icon[data-level="danger"] { color: #b91c1c; background: #fee2e2; }
.ops-business-add { border-style: dashed; color: var(--muted); font-size: .8rem; }

/* Les cartes de services : sombres, chiffres en une ligne, liens en bas (maquette 65). */
#overviewPanel .service-overview { gap: 14px; }
#overviewPanel .product-card {
  min-height: 0;
  padding: 20px 20px 16px;
  border: 0;
  border-radius: 14px;
  color: #e2e8f0;
  background: #0b0f17;
  box-shadow: none;
}
#overviewPanel .product-card::before { display: none; }
#overviewPanel .product-card::after { right: -60px; top: -60px; width: 220px; height: 220px; background: radial-gradient(circle, rgba(46, 155, 255, .26), rgba(124, 92, 255, .12) 45%, transparent 70%); }
#overviewPanel .product-card-head { justify-content: flex-start; }
#overviewPanel .product-name { flex-direction: column; align-items: flex-start; gap: 14px; }
#overviewPanel .product-name .panel-icon { width: 44px; height: 44px; border-radius: 10px; color: #6cb8ff; background: rgba(46, 155, 255, .14); font-size: 1rem; }
#overviewPanel .product-card h2 { color: #fff; font-size: 1.1rem; }
#overviewPanel .product-card > p { margin: 6px 0 10px; color: #94a3b8; font-size: .8rem; line-height: 1.5; }
#overviewPanel .product-metrics { margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 4px 0; color: #cbd5e1; font-size: .8rem; }
#overviewPanel .product-metrics span { padding: 0; border: 0; background: none; color: #94a3b8; font-size: .8rem; }
#overviewPanel .product-metrics span + span::before { content: "·"; margin: 0 8px; color: #475569; }
#overviewPanel .product-metrics strong { display: inline; margin: 0 4px 0 0; color: #fff; font: 600 .86rem Inter, sans-serif; }
#overviewPanel .product-actions { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; border-top: 1px solid rgba(148, 163, 184, .15); }
#overviewPanel .product-actions .service-state { margin-right: auto; padding: 2px 8px; font-size: .68rem; color: #8cc4ff; background: rgba(46, 155, 255, .16); }
#overviewPanel .product-actions .service-state[data-state="ready"] { color: #4ade80; background: rgba(34, 197, 94, .15); }
#overviewPanel .product-actions .service-state[data-state="warning"] { color: #fbbf24; background: rgba(251, 191, 36, .15); }
#overviewPanel .product-actions .service-state::before { width: 5px; height: 5px; background: currentColor; }
#overviewPanel .product-actions button, #overviewPanel .product-actions a {
  width: auto; min-height: 0; padding: 0; display: inline; white-space: nowrap; border: 0; color: #8cc4ff; background: none; box-shadow: none; font-size: .78rem; font-weight: 600;
}
#overviewPanel .product-actions a::after { content: " ↗"; }
#overviewPanel .product-actions button:hover:not(:disabled), #overviewPanel .product-actions a:hover { color: #fff; transform: none; box-shadow: none; }
@media (max-width: 760px) {
  #overviewPanel .ops-hero .dashboard-date { position: static; display: inline-block; margin-top: 12px; }
  .ops-command-foot > span { display: none; }
}

/* --- Espace commerçant ------------------------------------------------------ */
:root {
  --studio-canvas: #f7f9fc;
  --studio-line: #e3e8f0;
  --studio-gradient: var(--ab-gradient);
  --studio-sunken: #f3f6fa;
}
:root[data-theme="dark"] {
  --studio-canvas: #05070c;
  --studio-surface: #0b0f17;
  --studio-line: rgba(237, 239, 245, .11);
  --studio-line-soft: rgba(237, 239, 245, .07);
  --studio-ink: #edeff5;
  --studio-muted: #8b8e97;
  --studio-accent: #2e9bff;
  --studio-accent-pale: rgba(46, 155, 255, .14);
  --studio-sunken: #121826;
  --studio-chip: #121826;
  --studio-glass: rgba(11, 15, 23, .94);
}
html { background: var(--studio-canvas); }
.dashboard-nav, .dashboard-welcome h1, .overview-card-head h2, .overview-kpi strong { font-family: var(--ab-display); }
.dashboard-welcome h1, .overview-card-head h2, .overview-kpi strong, .overview-next-time { font-family: var(--ab-display); letter-spacing: -.02em; }
.dashboard-nav { background: var(--studio-surface); }
.dashboard-nav a span { font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.dashboard-nav a[aria-current="page"] {
  color: var(--ab-blue-ink);
  background: linear-gradient(90deg, rgba(46, 155, 255, .14), rgba(124, 92, 255, .06));
  box-shadow: inset 3px 0 0 var(--ab-blue);
}
.dashboard-nav a[aria-current="page"] small { color: var(--studio-muted); }
.overview-card, .phone-card { position: relative; border-color: var(--studio-line); background: var(--studio-surface); }
.overview-card::before, .phone-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--ab-gradient);
  opacity: .9;
  z-index: 1;
}
:root[data-theme="dark"] .theme-switch button[aria-pressed="true"],
:root[data-theme="dark"] .overview-period button[aria-pressed="true"] { background: #1c2436; }
.nav-badge { background: var(--ab-gradient); color: #fff; }
/* Les actions principales prennent le dégradé AB-CONNECT ; les boutons des
   listes restent en bleu uni, plus sobres quand ils se répètent. */
#welcomeAdd, #overviewAdd, #manualSubmit, #login button[type="submit"] {
  border-color: transparent;
  background: var(--ab-gradient);
  box-shadow: 0 8px 20px -12px rgba(46, 155, 255, .9);
}
#welcomeAdd:hover:not(:disabled), #overviewAdd:hover:not(:disabled), #manualSubmit:hover:not(:disabled), #login button[type="submit"]:hover:not(:disabled) {
  background: var(--ab-gradient);
  filter: brightness(1.06);
}

/* --- Espace commerçant : page « Activité » comme la maquette ---------------- */
:root { --studio-deep: #147fd9; --studio-deep-soft: #cfe3fb; --studio-deep-label: #9cc8f5; }
:root[data-theme="dark"] { --studio-deep: #2e9bff; --studio-deep-soft: #b9cbe2; --studio-deep-label: #8cc4ff; }
body[data-section="operations"][data-layout="overview"] #dashboardWelcome { display: none !important; }
.client-desk { position: relative; padding: 18px 0 8px; text-align: center; }
.client-desk-eyebrow { margin: 0; color: var(--studio-muted); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.client-desk-title { margin: 10px 0 8px; font: 700 clamp(1.9rem, 3.2vw, 2.6rem)/1.1 var(--ab-display); letter-spacing: -.035em; color: var(--studio-ink); }
.client-desk-summary { max-width: 560px; margin: 0 auto; color: var(--studio-ink-2); font-size: .95rem; }
.client-desk-ask { width: min(790px, 100%); margin: 22px auto 0; overflow: hidden; border: 1px solid var(--studio-line); border-radius: 14px; background: var(--studio-surface); box-shadow: 0 14px 34px -22px rgba(20, 36, 68, .45); text-align: left; }
.client-desk-ask input { width: 100%; min-height: 64px; padding: 16px 18px 26px; border: 0; outline: none; background: transparent; color: var(--studio-ink); font: inherit; font-size: .98rem; box-shadow: none; }
.client-desk-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 14px; border-top: 1px solid var(--studio-line-soft); background: var(--studio-sunken); color: var(--studio-muted); font-size: .74rem; }
.client-desk-foot button { min-height: 34px; padding: 0 16px; border: 0; border-radius: 9px; background: var(--ab-gradient); font-size: .82rem; }
.client-desk-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.client-desk-chip { min-height: 32px; padding: 5px 13px; border: 1px solid var(--studio-line); border-radius: 999px; color: var(--studio-ink-2); background: var(--studio-surface); box-shadow: none; font-size: .78rem; font-weight: 600; }
.client-desk-chip:hover:not(:disabled) { color: var(--ab-blue-ink); border-color: rgba(46, 155, 255, .45); background: var(--studio-surface); box-shadow: none; transform: none; }
.client-desk-miss { margin: 10px 0 0; color: var(--studio-muted); font-size: .8rem; }
#overview { display: grid; gap: 18px; }
#overview[hidden] { display: none; }

/* Chiffres : quatre cartes séparées, le chiffre à surveiller en rouge. */
html[data-shell="sidebar"] .overview-kpis { gap: 14px; overflow: visible; border: 0; background: none; }
html[data-shell="sidebar"] .overview-kpis .overview-kpi,
html[data-shell="sidebar"] .overview-kpis .overview-kpi:first-child { border: 1px solid var(--studio-line); border-radius: 14px; background: var(--studio-surface); }
html[data-shell="sidebar"] .overview-kpis .overview-kpi[data-tone="warn"] { background: var(--studio-surface); border-color: var(--studio-line); }
.overview-kpi[data-tone="warn"] .overview-kpi-label { color: var(--studio-muted); }
.overview-kpi[data-tone="warn"] .overview-kpi-value strong, .overview-kpi[data-tone="warn"] .overview-kpi-value b { color: #dc2626; }
.overview-kpi-value strong, .overview-kpi-value b { font-family: var(--ab-display); }

/* « À traiter » : carte blanche comme les autres. */
html[data-shell="sidebar"] .overview-todo { border-color: var(--studio-line); }
html[data-shell="sidebar"] .overview-todo .overview-card-head { background: none; }

/* Prochain rendez-vous : bandeau sombre AB-CONNECT. */
.overview-next { background: #0b0f17 !important; background-image: radial-gradient(circle at 92% 0%, rgba(46, 155, 255, .3), transparent 45%) !important; }

/* Services du commerce : cartes sombres. */
.client-services { margin-top: 10px; }
.client-services[hidden] { display: none; }
.client-services-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.client-services-head h2 { margin: 0; font: 700 1.15rem var(--ab-display); }
.client-services-head span { color: var(--studio-muted); font-size: .76rem; }
.client-services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.client-service, .dark-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  color: #e2e8f0;
  background: #0b0f17;
}
.client-service::after, .dark-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(46, 155, 255, .26), rgba(124, 92, 255, .12) 45%, transparent 70%); pointer-events: none; }
.client-service-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; color: #6cb8ff; background: rgba(46, 155, 255, .14); font-size: 1.1rem; }
.client-service h3 { margin: 16px 0 6px; color: #fff; font: 700 1.05rem var(--ab-display); }
.client-service p { margin: 0; color: #94a3b8; font-size: .8rem; line-height: 1.5; }
.client-service-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid rgba(148, 163, 184, .15); }
.client-service-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; background: rgba(34, 197, 94, .15); color: #4ade80; font-size: .68rem; font-weight: 700; }
.client-service-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.client-service-link { position: relative; z-index: 1; min-height: 0; padding: 0; border: 0; color: #8cc4ff; background: none !important; box-shadow: none !important; font-size: .8rem; font-weight: 600; }
.client-service-link:hover:not(:disabled) { color: #fff; transform: none; }
@media (max-width: 760px) {
  .client-desk-foot span { display: none; }
  html[data-shell="sidebar"] .overview-kpis { grid-template-columns: 1fr 1fr; }
}
#overview > .client-desk { order: -10; }
#overview > .client-services { order: 99; }
html[data-shell="sidebar"] .overview > #overviewKpis { order: 0; }

/* --- Pages des services de la console (maquettes 66 à 68) --------------------
   L'en-tête posé sur le fond, puis des cartes blanches : plus de grand cadre
   autour de toute la page. */
.service-workspace { padding: 6px 0 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }
.service-workspace > .dashboard-hero { margin-bottom: 18px; }
.service-workspace .panel, .service-workspace .mail-summary > div, .service-workspace .summary-card {
  border-color: var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: none;
}
.service-workspace .panel-icon { color: var(--ab-blue-ink); background: var(--accent-pale); }
/* Tableaux : en-têtes en petites capitales, lignes aérées. */
#console table { border-collapse: collapse; }
#console table th {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: var(--ab-soft);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: left;
}
#console table td { padding: 12px 16px; border-bottom: 1px solid var(--ab-line-soft); }
#console table tr:last-child td { border-bottom: 0; }
#console table tbody tr:hover td { background: color-mix(in srgb, var(--ab-soft) 60%, transparent); }
.business-table-head { border-color: var(--line); background: var(--ab-soft); color: var(--muted); }
#businesses > .card { border-color: var(--line); background: var(--surface); }

/* --- Page « Designs » des sites de démo -------------------------------------- */
.design-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.design-card { overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.design-swatch { padding: 12px; }
.design-swatch-hero { display: grid; gap: 6px; justify-items: start; padding: 16px; border-radius: 8px; box-shadow: 0 10px 24px -18px rgba(0, 0, 0, .5); }
.design-swatch-hero small { font: 700 .74rem Inter, sans-serif; letter-spacing: .08em; }
.design-swatch-hero b { font-size: 1.15rem; font-weight: 600; }
.design-swatch-btn { padding: 5px 12px; font: 600 .7rem Inter, sans-serif; }
.design-swatch-colors { display: flex; gap: 6px; margin-top: 10px; }
.design-swatch-colors i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .1); }
.design-card-body { display: grid; gap: 3px; padding: 4px 16px 12px; }
.design-card-body small { color: var(--muted); font-size: .74rem; }
.design-usage { color: var(--ab-blue-ink); font-size: .74rem; font-weight: 600; }
.design-card-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--ab-line-soft); }
.design-card-actions button, .design-card-actions .button-link { min-height: 34px; padding: 6px 12px; font-size: .76rem; }
.design-form { margin-top: 20px; padding: 22px; display: grid; gap: 12px; }
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.design-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.design-field { display: grid; gap: 5px; font-size: .78rem; font-weight: 600; }
.design-field input[type="color"] { width: 100%; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.design-card-actions a { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface); font-weight: 700; text-decoration: none; }

/* --- Pages des services : en-tête compact, listes à plat, cartes sombres ------
   (maquettes 66, 68 et 69) : « CONSOLE · SERVICE » en petit, un titre court,
   les chiffres dans le sous-titre, les actions à droite. */
.service-workspace > .dashboard-hero { align-items: flex-end; gap: 20px; margin-bottom: 20px; }
.service-workspace > .dashboard-hero .eyebrow { display: block; margin: 0 0 6px; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .16em; }
.service-workspace > .dashboard-hero .eyebrow::before { display: none; }
.service-workspace > .dashboard-hero h1 { font-size: clamp(1.7rem, 2.6vw, 2.1rem); letter-spacing: -.03em; }
.service-workspace > .dashboard-hero p:not(.eyebrow) { margin-top: 6px; font-size: .9rem; }
.service-workspace .service-actions > button, .service-workspace .service-actions > a { min-height: 38px; padding: 0 16px; border-radius: 10px; font-size: .84rem; }

/* État du service d'AB Studio : une ligne de pastilles, sans grand cadre. */
.studio-health { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 18px; }
.studio-health h2 { margin: 0; color: var(--muted); font: 700 .66rem Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.studio-health .health { margin: 0; }

/* Établissements : le titre de section, puis le tableau seul. */
.studio-workspace .business-section { padding: 0; border: 0; background: none; box-shadow: none; }
.studio-workspace .business-section > .panel-head { margin-bottom: 12px; padding: 0; border: 0; }
.studio-workspace .business-section .panel-title > .panel-icon { display: none; }
.studio-workspace .business-section h2 { font-size: 1.15rem; }
.studio-workspace .business-section .panel-title p { font-size: .76rem; }
.studio-workspace .business-table-head { border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; }
/* Pas d'overflow: hidden : il couperait le menu « ⋯ » de la dernière ligne. Les
   coins arrondis sont portés par la dernière ligne. */
.studio-workspace #businesses { overflow: visible; border: 1px solid var(--line); border-radius: 0 0 14px 14px; background: var(--surface); }
.studio-workspace #businesses > .card { margin: 0; border: 0; border-bottom: 1px solid var(--ab-line-soft); border-radius: 0; box-shadow: none; }
.studio-workspace #businesses > .card:last-child { border-bottom: 0; border-radius: 0 0 13px 13px; }
.studio-workspace .assistant-incidents { margin-bottom: 18px; }

/* Cartes sombres : raccourcis et réceptionnistes. */
.ops-shortcuts { margin-top: 30px; }
.ops-shortcut-grid, .ops-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ops-card-grid { margin-bottom: 26px; }
.ops-card-grid[hidden], .ops-section-title[hidden] { display: none; }
.ops-shortcut { min-height: 0; }
.ops-shortcut > * { position: relative; z-index: 1; }
.ops-shortcut h3 { margin: 16px 0 6px; color: #fff; font: 700 1.05rem var(--ab-display); }
.ops-shortcut p { margin: 0 0 14px; color: #94a3b8; font-size: .8rem; line-height: 1.5; }
.ops-card-links { display: inline-flex; gap: 14px; }
.client-service-pill[data-tone="warn"] { color: #fbbf24; background: rgba(251, 191, 36, .15); }
.client-service-pill[data-tone="info"] { color: #8cc4ff; background: rgba(46, 155, 255, .16); }
.client-service-pill[data-tone="off"] { color: #cbd5e1; background: rgba(148, 163, 184, .16); }
.service-workspace .ops-section-title { margin-top: 26px; }
.phone-tab-panel > .ops-section-title:first-of-type { margin-top: 22px; }

/* Panneau « Configurer » : champs en graisse normale, cases à cocher
   AB-CONNECT, module coché surligné en bleu. */
.block input, .block select, .block textarea { font-weight: 500; }
.block > strong { font: 700 .92rem var(--ab-display); }
.block input[type="checkbox"] { accent-color: var(--ab-blue); }
.block label.module-choice { transition: border-color .15s ease, background .15s ease; }
.block label.module-choice:has(input:checked) { border-color: rgba(46, 155, 255, .45); background: color-mix(in srgb, var(--ab-blue) 7%, var(--surface)); }
.block label.module-choice:hover, .block label.demo-module:hover { border-color: rgba(46, 155, 255, .45); }
.block label.demo-module:has(input:checked) { border-color: rgba(46, 155, 255, .45); background: color-mix(in srgb, var(--ab-blue) 7%, var(--surface)); }
:root[data-theme="dark"] .block { background: var(--ab-soft); }
:root[data-theme="dark"] .block label.module-choice, :root[data-theme="dark"] .demo-module { background: var(--surface); }
:root[data-theme="dark"] .demo-module[data-on] { background: rgba(34, 197, 94, .1); }
:root[data-theme="dark"] .block label.module-choice b, :root[data-theme="dark"] .demo-module b, :root[data-theme="dark"] .demo-template b { color: var(--ink); }

/* AB-PHONE : titres de section comme les autres pages, tableau sans débord. */
.phone-message-section h2 { font-size: 1.15rem; }
.phone-report-calls-head h2 { margin: 0 0 4px; font-size: 1.15rem; }
.phone-report-calls-head p { margin: 0; color: var(--muted); font-size: .8rem; }
.phone-report-calls-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.phone-report-controls { display: flex; gap: 10px; }
.service-workspace .mail-table-wrap { border-color: var(--line); border-radius: 14px; background: var(--surface); box-shadow: none; }
#operatorPhoneBusinesses td:nth-child(3) { white-space: nowrap; }
#console .mail-table td.mail-actions { display: table-cell; min-width: 0; text-align: right; white-space: nowrap; }
#console .mail-table td.mail-actions button + button { margin-left: 6px; }
#console #operatorPhoneBusinesses td { padding-left: 12px; padding-right: 12px; }
#console #operatorPhoneBusinesses td.mail-actions { width: 1%; white-space: normal; }
#console #operatorPhoneBusinesses td.mail-actions button { display: block; width: 100%; margin: 0 0 6px; }
#console #operatorPhoneBusinesses td.mail-actions button:last-child { margin-bottom: 0; }

/* Designs : filtres par modèle. */
.design-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.design-filters[hidden] { display: none; }
.design-filter { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 .82rem Inter, sans-serif; box-shadow: none; cursor: pointer; }
.design-filter b { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--ab-soft); color: var(--muted); font-size: .72rem; }
.design-filter:hover { border-color: rgba(46, 155, 255, .45); }
.design-filter[aria-pressed="true"] { border-color: transparent; background: var(--ab-ink, #0b1220); color: #fff; }
.design-filter[aria-pressed="true"] b { background: rgba(255, 255, 255, .16); color: #fff; }
:root[data-theme="dark"] .design-filter[aria-pressed="true"] { background: var(--ab-blue); }
