:root {
  --navy: #07182d;
  --navy-2: #0d2d48;
  --cyan: #24c4d7;
  --cyan-dark: #087f91;
  --ink: #102033;
  --muted: #617386;
  --line: #dce6ee;
  --soft: #f3f7fa;
  --white: #fff;
  --green: #16875f;
  --amber: #d77b08;
  --red: #cb3546;
  --shadow: 0 13px 35px rgba(17, 45, 71, .075);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--soft); }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--soft);
  font: 15px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 19px; height: 19px; stroke-width: 1.9; }

.cp-loader {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.cp-loader img { width: 220px; filter: none; }

.cp-app { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.cp-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 260px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 25px 18px 18px;
  color: #d9e5ef;
  background:
    radial-gradient(circle at 12% 95%, rgba(36, 196, 215, .16), transparent 21rem),
    var(--navy);
}
.cp-brand { min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 9px; color: #fff; text-decoration: none; }
.cp-brand img { width: 205px; height: auto; }
.cp-brand span { padding-left: 12px; border-left: 1px solid rgba(255,255,255,.18); color: #65dbe7; font: 800 12px Manrope, sans-serif; }
.cp-nav { display: grid; gap: 6px; margin-top: 34px; }
.cp-nav p { margin: 18px 12px 5px; color: #6f879d; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.cp-nav p:first-child { margin-top: 0; }
.cp-nav button {
  min-height: 47px;
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #a0b4c5;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: .18s ease;
}
.cp-nav button span { font-size: 13.5px; font-weight: 700; }
.cp-nav button b { min-width: 24px; padding: 3px 6px; border-radius: 20px; background: rgba(255,255,255,.08); font-size: 10px; text-align: center; }
.cp-nav button:hover { color: #fff; background: rgba(255,255,255,.055); }
.cp-nav button.is-active { color: #fff; border-color: rgba(64, 215, 232, .17); background: linear-gradient(90deg, rgba(36,196,215,.21), rgba(36,196,215,.07)); }
.cp-nav button.is-active svg { color: #5adce9; }
.cp-nav button.is-active b { color: #06333b; background: #69dce8; }
.cp-sidebar-foot { display: grid; gap: 12px; margin-top: auto; }
.cp-site-return {
  min-height: 44px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid rgba(101, 219, 231, .2);
  border-radius: 11px;
  color: #b9d3df;
  background: rgba(36, 196, 215, .08);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
.cp-site-return:hover {
  color: #fff;
  border-color: rgba(101, 219, 231, .42);
  background: rgba(36, 196, 215, .16);
  transform: translateY(-1px);
}
.cp-site-return:focus-visible { outline: 2px solid #65dbe7; outline-offset: 2px; }
.cp-site-return svg { width: 17px; height: 17px; }
.cp-user-card { display: grid; grid-template-columns: 39px minmax(0,1fr) 34px; align-items: center; gap: 10px; padding: 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; background: rgba(255,255,255,.045); }
.cp-avatar { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; color: #06333b; background: #63dbe7; font-weight: 900; }
.cp-user-card div { min-width: 0; display: grid; }
.cp-user-card strong, .cp-user-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-user-card strong { color: #fff; font-size: 12.5px; }
.cp-user-card small { color: #8097aa; font-size: 10.5px; }
.cp-user-card button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; color: #8fa5b7; background: transparent; cursor: pointer; }
.cp-user-card button:hover { color: #fff; background: rgba(255,255,255,.08); }

.cp-sidebar-backdrop { display: none; }

.cp-main { grid-column: 2; min-width: 0; }
.cp-topbar {
  position: sticky;
  top: 0;
  z-index: 31;
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 34px;
  border-bottom: 1px solid rgba(217,228,237,.92);
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(14px);
}
.cp-page-heading { flex: 1; }
.cp-page-heading span { color: var(--cyan-dark); font-size: 10.5px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.cp-page-heading h1 { margin: 2px 0 0; font: 800 23px/1.25 Manrope, sans-serif; letter-spacing: -.035em; }
.cp-top-actions { display: flex; align-items: center; gap: 12px; }
.cp-online { display: inline-flex; align-items: center; gap: 8px; color: #617387; font-size: 12px; font-weight: 700; }
.cp-online i { width: 7px; height: 7px; border-radius: 50%; background: #21b980; box-shadow: 0 0 0 4px rgba(33,185,128,.1); }
.cp-top-actions button, .cp-menu-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.cp-menu-button { display: none; }

/* ─── Cloche de notifications ───────────────────────────────────────────────── */
.cp-notif { position: relative; }
.cp-notif-trigger { position: relative; }
.cp-notif-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: var(--red); color: #fff; font-size: 9.5px; font-weight: 850; }
.cp-notif.is-open .cp-notif-trigger { border-color: var(--cyan-dark); color: var(--cyan-dark); }

.cp-notif-panel { position: absolute; z-index: 60; top: calc(100% + 9px); right: 0; width: 390px; max-width: calc(100vw - 24px); border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 20px 46px rgba(16, 32, 51, .17); overflow: hidden; }

/* La regle globale ".cp-top-actions button" force 40x40 : on la neutralise
   pour tous les boutons de la liste, sinon le contenu se superpose. */
.cp-notif-panel button { width: auto; height: auto; display: block; place-items: initial; border: 0; border-radius: 0; background: transparent; }

.cp-notif-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; border-bottom: 1px solid #eef2f6; }
.cp-notif-head strong { font-size: 13px; }
.cp-notif-head-actions { display: flex; align-items: center; gap: 8px; }
.cp-notif-panel .cp-notif-sound { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--cyan-dark); cursor: pointer; }
.cp-notif-panel .cp-notif-sound.is-off { color: #9aa8b5; }
.cp-notif-panel .cp-notif-sound svg { width: 14px !important; height: 14px !important; }
.cp-notif-panel .cp-notif-readall { color: var(--cyan-dark); font-size: 10.5px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.cp-notif-panel .cp-notif-readall:hover { text-decoration: underline; }

.cp-notif-list { max-height: 420px; overflow-y: auto; }
.cp-notif-panel .cp-notif-item { width: 100%; display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #edf2f5; background: #fff; box-shadow: inset 3px 0 var(--notif-company, var(--cyan-dark)); text-align: left; cursor: pointer; }
.cp-notif-panel .cp-notif-item:last-child { border-bottom: 0; }
.cp-notif-panel .cp-notif-item:hover { background: #f7fafc; }
.cp-notif-panel .cp-notif-item.is-unread { background: #f7fbfc; }
.cp-notif-company { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--notif-company, #087f91) 22%, transparent); border-radius: 10px; color: var(--notif-company-text, #087080); background: var(--notif-company-bg, #d9f3f6); font-size: 10px; font-weight: 900; letter-spacing: .02em; }
.cp-notif-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #eef5f9; color: var(--cyan-dark); }
.cp-notif-item.is-unread .cp-notif-icon { background: #d9f3f6; }
.cp-notif-icon svg { width: 15px !important; height: 15px !important; }
.cp-notif-copy { display: grid; gap: 4px; min-width: 0; }
.cp-notif-title { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cp-notif-title strong { min-width: 0; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 800; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.cp-notif-title small { flex: 0 0 auto; color: #8a98a6; font-size: 8.5px; white-space: nowrap; }
.cp-notif-context { min-width: 0; display: flex; align-items: center; gap: 7px; }
.cp-notif-context b { min-width: 0; overflow: hidden; color: #526578; font-size: 9.5px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.cp-notif-kind { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 999px; color: #087080; background: #dff4f6; font-size: 8px; font-style: normal; font-weight: 850; }
.cp-notif-kind svg { width: 10px !important; height: 10px !important; }
.cp-notif-kind.is-voice { color: #7a4d05; background: #fff0ca; }
.cp-notif-kind.is-image { color: #6046a2; background: #eee9ff; }
.cp-notif-kind.is-file { color: #405d75; background: #eaf0f4; }
.cp-notif-kind.is-alert { color: #b23442; background: #ffe9ec; }
.cp-notif-kind.is-status { color: #16714f; background: #e5f7ef; }
.cp-notif-preview { display: -webkit-box; overflow: hidden; color: #24394c; font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.cp-notif-item.is-unread .cp-notif-title strong { font-weight: 900; }
.cp-notif-empty { margin: 0; padding: 30px 15px; color: #8493a1; font-size: 12px; text-align: center; }

@media (max-width: 560px) {
  .cp-notif-panel { position: fixed; top: 66px; right: 8px; left: 8px; width: auto; max-width: none; }
  .cp-notif-head { padding: 10px 11px; }
  .cp-notif-panel .cp-notif-item { grid-template-columns: 34px minmax(0, 1fr); gap: 9px; padding: 9px 10px; }
  .cp-notif-company { width: 34px; height: 34px; }
  .cp-notif-title strong { font-size: 11.5px; }
  .cp-notif-context b { font-size: 10px; }
  .cp-notif-kind { font-size: 8.5px; }
  .cp-notif-preview { font-size: 10.5px; -webkit-line-clamp: 1; }
}
.cp-content { max-width: 1540px; margin: 0 auto; padding: 30px 34px 50px; }
.cp-view { display: grid; gap: 22px; }

.cp-hero {
  min-height: 230px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 30px;
  overflow: hidden;
  padding: 36px 40px;
  border-radius: 21px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 5%, rgba(54,213,231,.28), transparent 21rem),
    linear-gradient(128deg, #07182d, #0d2d48 68%, #0a5e6c 150%);
  box-shadow: 0 22px 48px rgba(7,24,45,.15);
}
.cp-eyebrow { color: #5edeea; font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.cp-hero h2 { margin: 13px 0 8px; font: 800 clamp(30px,4vw,48px)/1.08 Manrope, sans-serif; letter-spacing: -.055em; }
.cp-hero p { max-width: 660px; margin: 0; color: #b9cad8; font-size: 15px; line-height: 1.7; }
.cp-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.cp-company-card { min-width: 270px; display: flex; align-items: center; gap: 14px; padding: 19px; border: 1px solid rgba(255,255,255,.15); border-radius: 16px; background: rgba(255,255,255,.09); backdrop-filter: blur(10px); }
.cp-company-logo { width: 54px; height: 54px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 15px; color: #06333b; background: #64dce8; font-size: 20px; font-weight: 900; }
.cp-company-card div { min-width: 0; display: grid; gap: 2px; }
.cp-company-card small, .cp-company-card span { color: #9fb6c8; font-size: 11px; }
.cp-company-card .cp-company-logo { color: #06333b; font-size: 20px; }
.cp-company-card strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }

.cp-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 800; cursor: pointer; transition: .16s ease; }
.cp-button:hover { transform: translateY(-1px); }
.cp-button:disabled { opacity: .58; cursor: wait; transform: none; }
.cp-primary { color: #052d35; background: linear-gradient(135deg,#69dce8,#26c3d5); box-shadow: 0 8px 20px rgba(36,196,215,.2); }
.cp-dark-ghost { color: #fff; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.09); }
.cp-light { color: #40556a; border-color: var(--line); background: #fff; }
.cp-submit { min-height: 48px; color: #fff; background: var(--navy); }

/* ═══ Vitrine offres & services ═════════════════════════════════════════════ */

.cp-promos {
  display: grid;
  gap: 10px;
  overflow: hidden;
  padding: 15px;
  border: 1px solid #cbdde8;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(36,196,215,.14), transparent 10rem),
    #fff;
  box-shadow: var(--shadow);
}
.cp-promos-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cp-promos-head .cp-eyebrow { color: var(--cyan-dark); font-size: 9.5px; }
.cp-promos-head h3 { margin: 2px 0 0; font: 800 16px/1.25 Manrope,sans-serif; letter-spacing: -.025em; }
.cp-promos-nav { display: flex; gap: 7px; }
.cp-promos-nav button {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid #d5e2ea; border-radius: 9px;
  background: rgba(255,255,255,.88); color: #4a5f74; cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.cp-promos-nav button:hover { color: var(--cyan-dark); border-color: #a5dbe2; background: #f2fbfc; }
.cp-promos-nav i { width: 15px; height: 15px; }

.cp-promos-track { position: relative; display: grid; }
.cp-promo {
  grid-area: 1 / 1;
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid rgba(255,255,255,.09); border-radius: 14px;
  background:
    radial-gradient(circle at 100% 10%, rgba(36,196,215,.18), transparent 11rem),
    linear-gradient(145deg, var(--navy) 0%, var(--navy-2) 100%);
  box-shadow: 0 14px 30px rgba(7,24,45,.14);
  opacity: 0; visibility: hidden; transform: translateX(8px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.cp-promo.is-active { opacity: 1; visibility: visible; transform: none; }

.cp-promo-copy { display: grid; align-content: start; gap: 5px; padding: 14px; color: #fff; }
.cp-promo-badge {
  justify-self: start; padding: 4px 9px; border-radius: 999px;
  background: var(--accent); color: #04222c;
  font-size: 9px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase;
}
.cp-promo-copy h4 {
  display: -webkit-box; overflow: hidden; margin: 2px 0 0;
  font: 800 15.5px/1.25 Manrope,sans-serif; letter-spacing: -.025em;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.cp-promo-sub {
  display: -webkit-box; overflow: hidden; margin: 0; color: var(--accent);
  font-size: 11px; line-height: 1.4; font-weight: 750;
  -webkit-box-orient: vertical; -webkit-line-clamp: 1;
}
.cp-promo-desc {
  display: -webkit-box; overflow: hidden; margin: 1px 0 0; color: #bacddd;
  font-size: 10.5px; line-height: 1.45;
  -webkit-box-orient: vertical; -webkit-line-clamp: 1;
}
.cp-promo-cta {
  justify-self: stretch; display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 5px; padding: 9px 11px; border-radius: 9px;
  background: var(--accent); color: #04222c;
  font-size: 11.5px; font-weight: 850; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.cp-promo-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.cp-promo-cta i { width: 15px; height: 15px; }

.cp-promo-visual { position: relative; order: -1; overflow: hidden; background: #eaf3f7; }
.cp-promo-visual img { width: 100%; height: auto; object-fit: contain; display: block; }

.cp-promos-dots { min-height: 7px; display: flex; justify-content: center; gap: 6px; }
.cp-promos-dots button {
  width: 6px; height: 6px; padding: 0;
  border: 0; border-radius: 999px; background: #c3d2de; cursor: pointer;
  transition: width .2s ease, background .2s ease;
}
.cp-promos-dots button.is-active { width: 20px; background: var(--cyan-dark); }
.cp-promos-progress {
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3edf2;
}
.cp-promos-progress:empty { display: none; }
.cp-promos-progress i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan-dark), var(--cyan));
  transform: scaleX(0);
  transform-origin: left center;
  animation: cp-promo-progress 7s linear forwards;
}
.cp-promos.is-paused .cp-promos-progress i { animation-play-state: paused; }

@keyframes cp-promo-progress {
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .cp-promo { transition: none; }
  .cp-promos-progress { display: none; }
}

.cp-kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.cp-kpi { min-height: 106px; display: flex; align-items: center; gap: 15px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; color: inherit; background: #fff; box-shadow: var(--shadow); font: inherit; text-align: left; }
.cp-kpi[data-kpi-action] { cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.cp-kpi[data-kpi-action]:hover { transform: translateY(-2px); border-color: #b9dae2; box-shadow: 0 14px 30px rgba(17, 42, 67, .1); }
.cp-kpi[data-kpi-action]:focus-visible { outline: 3px solid rgba(34, 197, 216, .24); outline-offset: 2px; border-color: var(--cyan); }
.cp-kpi[data-kpi-action]:active { transform: translateY(0); }
.cp-kpi > span { width: 45px; height: 45px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; }
.cp-kpi .blue { color: #226cdb; background: #eaf1ff; }
.cp-kpi .amber { color: #d27805; background: #fff3dd; }
.cp-kpi .green { color: #128c63; background: #e5f8f1; }
.cp-kpi .red { color: #d03749; background: #ffeaed; }
.cp-kpi div { display: grid; gap: 1px; }
.cp-kpi strong { font: 800 28px/1 Manrope,sans-serif; letter-spacing: -.04em; }
.cp-kpi small { color: var(--muted); font-size: 12px; font-weight: 700; }
.cp-kpi .cp-kpi-arrow { width: 17px; height: 17px; margin-left: auto; color: #9aabb8; transition: transform .16s ease, color .16s ease; }
.cp-kpi[data-kpi-action]:hover .cp-kpi-arrow { color: var(--cyan-dark); transform: translateX(3px); }

.cp-overview-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(310px,.65fr); gap: 18px; }
.cp-overview-aside { min-width: 0; display: grid; align-content: start; gap: 16px; }
.cp-panel { border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.cp-panel-head { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 20px; border-bottom: 1px solid #e8eef3; }
.cp-panel-head span { color: var(--cyan-dark); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.cp-panel-head h3 { margin: 2px 0 0; font: 800 16px Manrope,sans-serif; }
.cp-panel-head button { display: flex; align-items: center; gap: 5px; border: 0; color: var(--cyan-dark); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.cp-panel-head button svg { width: 15px; }
.cp-support-card { display: flex; flex-direction: column; align-items: flex-start; padding: 27px; border: 1px solid #b9e8ed; border-radius: 16px; background: linear-gradient(145deg,#f8fdfe,#e7fafd); box-shadow: var(--shadow); }
.cp-support-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: #076c7b; background: #caf2f6; }
.cp-support-card small { margin-top: 21px; color: var(--cyan-dark); font-size: 10.5px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.cp-support-card h3 { margin: 5px 0 7px; font: 800 20px/1.25 Manrope,sans-serif; }
.cp-support-card p { margin: 0 0 20px; color: var(--muted); font-size: 12.5px; line-height: 1.65; }

.cp-toolbar { display: flex; align-items: center; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.cp-search { min-width: 240px; flex: 1; position: relative; }
.cp-search svg { position: absolute; left: 13px; top: 50%; width: 17px; transform: translateY(-50%); color: #8292a1; }
.cp-search input, .cp-toolbar select { height: 42px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; outline: 0; }
.cp-search input { width: 100%; padding: 0 13px 0 40px; }
.cp-toolbar select { min-width: 165px; padding: 0 34px 0 12px; font-size: 12px; font-weight: 700; }
.cp-search input:focus, .cp-toolbar select:focus { border-color: #70d2dc; box-shadow: 0 0 0 3px rgba(36,196,215,.1); }
.cp-master-detail { display: grid; grid-template-columns: minmax(350px,.85fr) minmax(0,1.35fr); gap: 18px; align-items: start; }
.cp-list-panel { overflow: hidden; }
.cp-list-title { min-height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; border-bottom: 1px solid #e8eef3; }
.cp-list-title strong { font-size: 14px; }
.cp-list-title span { min-width: 28px; padding: 4px 7px; border-radius: 20px; color: #0a7482; background: #e5f8fa; font-size: 10px; font-weight: 850; text-align: center; }
.cp-ticket-list { max-height: 630px; overflow: auto; }
.cp-ticket-list.compact { max-height: 440px; }
.cp-ticket-row { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 15px 17px; border: 0; border-bottom: 1px solid #edf2f5; background: #fff; text-align: left; cursor: pointer; transition: .15s ease; }
.cp-ticket-row:hover, .cp-ticket-row.is-selected { background: #f1fafb; }
.cp-ticket-row.is-selected { box-shadow: inset 3px 0 #25c3d5; }
.cp-ticket-main { min-width: 0; display: grid; gap: 6px; }
.cp-ticket-top { display: flex; align-items: center; gap: 8px; }
.cp-reference { color: #0b7d8d; font-size: 10px; font-weight: 850; letter-spacing: .05em; }
.cp-ticket-main strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.cp-ticket-main small { color: var(--muted); font-size: 10.5px; }
.cp-badge { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border-radius: 20px; color: #566b7e; background: #edf2f5; font-size: 9.5px; font-weight: 850; white-space: nowrap; }
.cp-badge.open { color: #9b5a05; background: #fff0d7; }
.cp-badge.done { color: #147454; background: #e7f6ef; }
.cp-badge.critical { color: #b42c3c; background: #ffeaed; }
.cp-ticket-detail { position: sticky; top: 106px; min-width: 0; min-height: 430px; padding: 22px; overflow: hidden; }
.cp-mobile-ticket-nav { display: none; }
.cp-empty { min-height: 380px; display: grid; place-content: center; justify-items: center; color: #7b8b9b; text-align: center; }
.cp-empty svg { width: 30px; height: 30px; color: #9ba9b5; }
.cp-empty h3 { margin: 16px 0 5px; color: var(--ink); font-size: 16px; }
.cp-empty p { max-width: 340px; margin: 0; font-size: 12px; }
.cp-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid #e8eef3; }
.cp-detail-head h2 { margin: 8px 0 8px; font: 800 22px/1.25 Manrope,sans-serif; }
.cp-detail-badges, .cp-detail-actions, .cp-detail-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.cp-detail-actions button { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; color: #476175; background: #fff; font-size: 11px; font-weight: 800; cursor: pointer; }
.cp-detail-actions button:hover { border-color: #8dd7df; color: var(--cyan-dark); }
.cp-detail-meta { margin: 17px 0; }
.cp-detail-meta span { padding: 6px 9px; border-radius: 8px; color: #5d7082; background: #f2f6f8; font-size: 11px; }
.cp-detail-section { min-width: 0; max-width: 100%; padding: 18px 0; border-top: 1px solid #edf1f4; }
.cp-detail-section:first-of-type { border-top: 0; }
.cp-detail-section h3 { margin: 0 0 10px; font-size: 13px; }
.cp-detail-section p { margin: 0; color: #4f6274; font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; }
.cp-timeline { min-width: 0; display: grid; gap: 10px; }
.cp-timeline article { min-width: 0; max-width: 100%; padding: 12px 13px; border: 1px solid #dce5ec; border-left-width: 4px; border-radius: 10px; background: #f5fafb; overflow-wrap: anywhere; }
.cp-timeline strong { font-size: 12px; }
.cp-timeline p { margin-top: 4px; font-size: 11.5px; }
.cp-timeline small { color: #7e8e9d; font-size: 10px; }
.cp-ticket-attachments { display: grid; gap: 9px; margin-top: 14px; padding-top: 13px; border-top: 1px solid #cfe8dd; }
.cp-ticket-attachments-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px 12px; }
.cp-ticket-attachments-head > span { display: inline-flex; width: fit-content; padding: 4px 9px; border-radius: 999px; color: #fff; background: #16875f; font-size: 9.5px; font-weight: 900; letter-spacing: .045em; text-transform: uppercase; }
.cp-ticket-attachments-head small { color: #4d7666; font-size: 10px; font-weight: 750; }
.cp-attachments { min-width: 0; max-width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.cp-attachments a { min-width: 0; max-width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid #b8dfcf; border-radius: 10px; color: #205f4b; background: #f1faf6; font-size: 11px; font-weight: 750; text-decoration: none; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.cp-attachments a:hover { border-color: #68b798; background: #e5f6ee; box-shadow: 0 4px 12px rgba(22, 135, 95, .1); }
.cp-attachments a svg { flex: 0 0 auto; }
.cp-attachment-type { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 4px 7px; border-radius: 999px; color: #fff; background: #16875f; font-size: 9px; font-weight: 900; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.cp-attachment-type svg { width: 12px !important; height: 12px !important; }
.cp-attachment-name { min-width: 0; overflow: hidden; color: #205f4b; text-overflow: ellipsis; white-space: nowrap; }
.cp-ticket-attachments .cp-attachment-audio { border-color: #b8dfcf; background: #f1faf6; }
.cp-ticket-attachments .cp-attachment-audio .cp-attachment-type { color: #fff; background: #16875f; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.cp-form-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(290px,.55fr); gap: 18px; align-items: start; }
.cp-ticket-form { display: grid; gap: 20px; padding: 26px; }
.cp-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 21px; border-bottom: 1px solid #e8eef3; }
.cp-form-head span, .cp-section-intro span { color: var(--cyan-dark); font-size: 10.5px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.cp-form-head h2, .cp-section-intro h2 { margin: 3px 0 4px; font: 800 25px/1.25 Manrope,sans-serif; letter-spacing: -.035em; }
.cp-form-head p, .cp-section-intro p { margin: 0; color: var(--muted); font-size: 12.5px; }
.cp-form-head > svg { width: 28px; height: 28px; color: #2d71d7; }
.cp-ticket-form label, .cp-profile-form label { display: grid; gap: 7px; color: #4d6275; font-size: 12px; font-weight: 800; }
.cp-ticket-form label em { color: var(--red); font-style: normal; }
.cp-ticket-form input, .cp-ticket-form select, .cp-ticket-form textarea, .cp-profile-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  outline: 0;
}
.cp-ticket-form input, .cp-ticket-form select, .cp-profile-form input { height: 44px; }
.cp-ticket-form textarea { resize: vertical; }
.cp-ticket-form input:focus, .cp-ticket-form select:focus, .cp-ticket-form textarea:focus, .cp-profile-form input:focus { border-color: #6fd2dc; box-shadow: 0 0 0 3px rgba(36,196,215,.1); }
.cp-remote-banner { display: flex; gap: 12px; align-items: center; padding: 13px; border: 1px solid #b7e8ed; border-radius: 11px; color: #116b78; background: #effbfd; }
.cp-remote-banner div { display: grid; }
.cp-remote-banner strong { font-size: 12px; }
.cp-remote-banner span { font-size: 11px; }

/* ─── Etapes colorees du formulaire ─────────────────────────────────────────── */
.cp-step { padding: 18px 20px; border: 1px solid #e8eef3; border-radius: 14px; background: #fbfcfd; }
.cp-step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.cp-step-head strong { display: block; font-size: 13.5px; }
.cp-step-head small { color: var(--muted); font-size: 11px; font-weight: 600; }
.cp-step-num { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: #fff; background: #99a6b3; font: 800 12.5px Manrope,sans-serif; }
.cp-step-fields { display: grid; gap: 15px; }
.cp-step-fields.two { grid-template-columns: 1fr 1fr; }
.cp-step-fields .full { grid-column: 1/-1; }

.cp-step.blue { background: #f2f8ff; border-color: #d6e7fb; }
.cp-step.blue .cp-step-num { background: linear-gradient(135deg,#5296f2,#2d71d7); }
.cp-step.cyan { background: #eefbfc; border-color: #c9edf1; }
.cp-step.cyan .cp-step-num { background: linear-gradient(135deg,#3fd2e0,var(--cyan-dark)); }
.cp-step.amber { background: #fffaf1; border-color: #f7e6c4; }
.cp-step.amber .cp-step-num { background: linear-gradient(135deg,#f2ab4c,var(--amber)); }
.cp-step.violet { background: #f8f6ff; border-color: #e4dcfb; }
.cp-step.violet .cp-step-num { background: linear-gradient(135deg,#a482f0,#7a4fdb); }
.cp-step.slate { background: #f7f9fb; border-color: #e3e9ef; }
.cp-step.slate .cp-step-num { background: linear-gradient(135deg,#8fa0b0,#5c7186); }

/* ─── Priorite : cartes colorees par niveau de gravite ──────────────────────── */
.cp-priority { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding: 0; border: 0; }
.cp-priority label { position: relative; display: block; }
.cp-priority input { position: absolute; opacity: 0; pointer-events: none; }
.cp-priority span { position: relative; min-height: 82px; display: grid; grid-template-columns: 22px 1fr; align-content: center; gap: 2px 10px; padding: 13px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.cp-priority label:hover span { transform: translateY(-1px); }
.cp-priority svg { grid-row: 1/3; }
.cp-priority strong { font-size: 12.5px; }
.cp-priority small { color: var(--muted); font-size: 10px; font-weight: 600; }
.cp-priority-check { position: absolute; top: 9px; right: 9px; width: 15px !important; height: 15px !important; display: none; color: #fff; }
.cp-priority input:checked + span .cp-priority-check { display: block; }

.cp-priority .is-normale svg { color: var(--green); }
.cp-priority .is-normale input:checked + span { border-color: #7fd2b3; background: #eafaf3; box-shadow: 0 0 0 3px rgba(22,135,95,.1); }
.cp-priority .is-normale input:checked + span .cp-priority-check { background: var(--green); border-radius: 50%; padding: 2px; }
.cp-priority .is-urgente svg { color: var(--amber); }
.cp-priority .is-urgente input:checked + span { border-color: #f0c47c; background: #fff6e8; box-shadow: 0 0 0 3px rgba(215,123,8,.1); }
.cp-priority .is-urgente input:checked + span .cp-priority-check { background: var(--amber); border-radius: 50%; padding: 2px; }
.cp-priority .is-critique svg { color: var(--red); }
.cp-priority .is-critique input:checked + span { border-color: #ec9aa4; background: #fdedef; box-shadow: 0 0 0 3px rgba(203,53,70,.1); }
.cp-priority .is-critique input:checked + span .cp-priority-check { background: var(--red); border-radius: 50%; padding: 2px; }

/* ─── Etape 2 : selecteur d'equipement ──────────────────────────────────────── */
.cp-asset-picker { display: grid; gap: 14px; }
.cp-asset-group { display: grid; gap: 8px; }
.cp-asset-group-title { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan-dark); font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.cp-asset-group-title svg { width: 13px !important; height: 13px !important; }
.cp-asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 9px; }

.cp-asset-card { position: relative; display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.cp-asset-card:hover { border-color: #a5dbe2; background: #f8fdfe; }
.cp-asset-card.is-selected { border-color: var(--cyan-dark); background: #f0fbfc; box-shadow: 0 2px 10px rgba(8, 127, 145, .12); }
.cp-asset-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; background: #eef5f9; color: #4d6275; }
.cp-asset-card.is-selected .cp-asset-icon { background: #d9f3f6; color: var(--cyan-dark); }
.cp-asset-icon svg { width: 17px !important; height: 17px !important; }
.cp-asset-body { display: grid; gap: 2px; min-width: 0; }
.cp-asset-body strong { color: #1f3345; font-size: 12.5px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-asset-body small { color: #8493a1; font-size: 10.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-asset-badge { flex: 0 0 auto; margin-left: auto; padding: 3px 8px; border-radius: 999px; background: #d9f3f6; color: var(--cyan-dark); font-size: 9.5px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.cp-asset-check { flex: 0 0 auto; margin-left: auto; width: 17px !important; height: 17px !important; color: var(--cyan-dark); opacity: 0; transition: opacity .15s ease; }
.cp-asset-card.is-selected .cp-asset-badge { display: none; }
.cp-asset-card.is-selected .cp-asset-check { opacity: 1; }

.cp-asset-none { display: inline-flex; align-items: center; gap: 7px; justify-self: start; padding: 7px 13px; border: 1px dashed #c7d6e2; border-radius: 999px; background: transparent; color: #7a8a99; font-size: 11.5px; font-weight: 700; cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.cp-asset-none svg { width: 14px !important; height: 14px !important; }
.cp-asset-none:hover { border-color: #a5b7c6; color: #4d6275; }
.cp-asset-none.is-selected { border-style: solid; border-color: var(--cyan-dark); background: #f0fbfc; color: var(--cyan-dark); }

.cp-asset-empty { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px; border: 1.5px dashed #c7d6e2; border-radius: 12px; color: #8493a1; font-size: 11.5px; font-weight: 650; }
.cp-asset-empty svg { width: 15px !important; height: 15px !important; color: var(--cyan-dark); }
.cp-asset-precision { margin-top: 2px; }

/* Technicien responsable du ticket, affiche au client. */
.cp-assignee { display: flex; align-items: center; gap: 9px; margin: 0 0 4px; padding: 11px 14px; border: 1px solid #a5dbe2; border-radius: 11px; background: #f4fcfd; color: #4d6275; font-size: 12px; font-weight: 650; }
.cp-assignee strong { color: var(--cyan-dark); font-weight: 800; }
.cp-assignee svg { width: 16px !important; height: 16px !important; color: var(--cyan-dark); }
.cp-remote-status { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 2px; padding: 12px 14px; border: 1px solid #b7e8ed; border-radius: 11px; color: #116b78; background: #effbfd; }
.cp-remote-status > svg { width: 18px !important; height: 18px !important; flex: 0 0 auto; }
.cp-remote-status div { display: grid; gap: 2px; }
.cp-remote-status strong { font-size: 11.5px; }
.cp-remote-status span { color: #557281; font-size: 10.5px; line-height: 1.45; }

/* ─── Fil de discussion et reponse du client ────────────────────────────────── */
.cp-timeline article.is-client { border-color: #efca89; border-left-color: #d98212; background: #fff9ed; }
.cp-timeline article.is-staff { border-color: #addce5; border-left-color: #087f91; background: #f0fbfd; }
.cp-timeline-head { display: grid; gap: 5px; margin-bottom: 3px; }
.cp-message-role { display: inline-flex; width: fit-content; padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
.cp-timeline article.is-client .cp-message-role { color: #9b5a05; background: #ffedc9; }
.cp-timeline article.is-staff .cp-message-role { color: #087080; background: #d8f2f5; }
.cp-thread-file { min-width: 0; max-width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; margin-top: 7px; padding: 9px 10px; border: 1px solid #b8dfcf; border-radius: 10px; color: #205f4b; background: #f1faf6; font-size: 11px; font-weight: 750; text-decoration: none; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.cp-thread-file:hover { border-color: #68b798; background: #e5f6ee; box-shadow: 0 4px 12px rgba(22, 135, 95, .1); }
.cp-thread-file-badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 4px 7px; border-radius: 999px; color: #fff; background: #16875f; font-size: 9px; font-weight: 900; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.cp-thread-file-badge svg { flex: 0 0 auto; width: 12px !important; height: 12px !important; }
.cp-thread-file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cp-reply { min-width: 0; max-width: 100%; }
.cp-reply textarea { width: 100%; min-width: 0; max-width: 100%; min-height: 74px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 11px; color: var(--ink); background: #fff; font: inherit; font-size: 12.5px; resize: vertical; outline: 0; }
.cp-reply textarea:focus { border-color: var(--cyan-dark); box-shadow: 0 0 0 3px rgba(8, 127, 145, .13); }
.cp-reply-tools { min-width: 0; max-width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 9px; }
.cp-reply-mic, .cp-reply-attach, .cp-reply-camera { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #4d6275; cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.cp-reply-mic svg, .cp-reply-attach svg, .cp-reply-camera svg { width: 16px !important; height: 16px !important; }
.cp-reply-mic:hover, .cp-reply-attach:hover, .cp-reply-camera:hover { border-color: #7fd6df; background: #f4fcfd; color: var(--cyan-dark); }
.cp-reply-camera { display: none; }
.cp-reply-send { margin-left: auto; }
.cp-reply-file-name { max-width: 190px; overflow: hidden; color: var(--cyan-dark); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.cp-reply-recording, .cp-reply-preview { min-width: 0; max-width: 100%; display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; }
.cp-reply-recording { border-color: #f3c9cf; background: #fffafb; }
.cp-reply-preview { border-color: #a5dbe2; background: #f8fdfe; }
.cp-reply-preview span { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; color: var(--cyan-dark); font-size: 11px; font-weight: 750; }
.cp-reply-preview svg { width: 14px !important; height: 14px !important; }
.cp-reply-preview audio { display: block; flex: 1 1 auto; width: 100%; max-width: 100%; height: 32px; min-width: 0; }

.cp-reply-closed { display: flex; align-items: center; gap: 8px; margin: 0; padding: 13px; border: 1.5px dashed #c7d6e2; border-radius: 11px; color: #8493a1; font-size: 11.5px; font-weight: 650; }
.cp-reply-closed svg { width: 15px !important; height: 15px !important; }

@media (pointer: coarse) { .cp-reply-camera { display: grid; } }

/* ─── Message vocal (style WhatsApp) ────────────────────────────────────────── */
.cp-voice { min-width: 0; max-width: 100%; margin-top: 4px; }
.cp-voice-idle, .cp-voice-recording, .cp-voice-preview { min-width: 0; max-width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; }
.cp-voice-idle { border-style: dashed; }
.cp-voice-label { color: #7a8a99; font-size: 11.5px; font-weight: 600; }
.cp-voice-label strong { color: var(--cyan-dark); font-weight: 800; }

.cp-voice-mic, .cp-voice-stop, .cp-voice-play, .cp-voice-cancel, .cp-voice-delete { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border: none; border-radius: 50%; cursor: pointer; transition: transform .1s ease, filter .15s ease, background .15s ease; }
.cp-voice-mic:active, .cp-voice-stop:active, .cp-voice-play:active { transform: scale(.94); }
.cp-voice-mic svg, .cp-voice-stop svg, .cp-voice-play svg { width: 16px !important; height: 16px !important; }
.cp-voice-cancel svg, .cp-voice-delete svg { width: 15px !important; height: 15px !important; }

.cp-voice-mic { background: linear-gradient(135deg, var(--cyan-dark), var(--cyan)); color: #fff; box-shadow: 0 2px 8px rgba(8, 127, 145, .28); }
.cp-voice-mic:hover { filter: brightness(1.07); }
.cp-voice-stop { background: var(--cyan-dark); color: #fff; }
.cp-voice-stop:hover { filter: brightness(1.1); }
.cp-voice-play { background: #d9f3f6; color: var(--cyan-dark); }
.cp-voice-play:hover { background: #c7edf1; }
.cp-voice-cancel, .cp-voice-delete { background: transparent; color: #9aa8b5; }
.cp-voice-cancel:hover, .cp-voice-delete:hover { background: #fdf0f2; color: var(--red); }

.cp-voice-recording { border-color: #f3c9cf; background: #fffafb; }
.cp-voice-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: cp-voice-blink 1.1s ease-in-out infinite; }
@keyframes cp-voice-blink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
.cp-voice-timer, .cp-voice-time { flex: 0 0 auto; min-width: 38px; color: #4d6275; font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }

.cp-voice-wave { min-width: 0; display: flex; align-items: center; gap: 2.5px; flex: 1 1 auto; height: 26px; overflow: hidden; }
.cp-voice-wave span { flex: 1 1 auto; min-width: 2px; height: 12%; border-radius: 2px; background: #a5dbe2; transition: height .08s linear; }

.cp-voice-preview { border-color: #a5dbe2; background: #f8fdfe; }
.cp-voice-track { position: relative; min-width: 0; flex: 1 1 auto; height: 4px; border-radius: 999px; background: #d3e4ea; overflow: hidden; }
.cp-voice-progress { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; background: var(--cyan-dark); transition: width .1s linear; }

.cp-attachment-audio { min-width: 0; max-width: 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fdfe; }
.cp-attachment-audio span { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan-dark); font-size: 11.5px; font-weight: 750; }
.cp-attachment-audio svg { width: 14px !important; height: 14px !important; }
.cp-attachment-audio audio { display: block; flex: 1 1 240px; width: 100%; height: 32px; min-width: 0; max-width: 100%; }
.cp-timeline article.is-client .cp-attachment-audio { border-color: #efcc90; background: #fff3d8; }
.cp-timeline article.is-client .cp-attachment-audio span { color: #a76208; }
.cp-timeline article.is-staff .cp-attachment-audio { border-color: #a9dbe4; background: #ddf4f7; }
.cp-timeline article.is-staff .cp-attachment-audio span { color: #087080; }

@media (max-width: 560px) {
  .cp-voice-label { font-size: 10.5px; }
  .cp-voice-wave { height: 22px; }
  .cp-voice-idle { align-items: flex-start; border-radius: 15px; }
  .cp-voice-recording { display: grid; grid-template-columns: 34px 9px auto minmax(30px, 1fr) 34px; gap: 7px; border-radius: 15px; }
  .cp-voice-preview { gap: 8px; padding: 9px; }
}

/* ─── Piece jointe : selecteur de fichier custom ────────────────────────────── */
.cp-file { position: relative; cursor: pointer; }
.cp-file input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cp-file-visual { display: grid; justify-items: center; gap: 6px; padding: 22px 16px; border: 1.5px dashed #c7d6e2; border-radius: 12px; color: var(--muted); background: #fff; text-align: center; transition: border-color .15s ease, background .15s ease; }
.cp-file-visual svg { color: var(--cyan-dark); }
.cp-file-text { max-width: 100%; color: #4d6275; font-size: 12.5px; font-weight: 750; overflow-wrap: anywhere; }
.cp-file-visual small { color: #8493a1; font-size: 10.5px; font-weight: 600; }
.cp-file:hover .cp-file-visual, .cp-file.has-file .cp-file-visual { border-color: #7fd6df; background: #f4fcfd; }
.cp-file.has-file .cp-file-text { color: var(--cyan-dark); }
.cp-file.is-dragover .cp-file-visual { border-color: var(--cyan-dark); background: #eafbfc; }
.cp-file:focus-within .cp-file-visual { outline: none; border-color: var(--cyan-dark); box-shadow: 0 0 0 3px rgba(0, 180, 190, .18); }
.cp-file-clear { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: #7a8a99; background: #fff; cursor: pointer; z-index: 1; }
.cp-file-clear:hover { color: var(--red); border-color: #efbec4; }
.cp-file-clear svg { width: 13px !important; height: 13px !important; }

.cp-file-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 10px; }
.cp-file-paste { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border: 1px solid #a5dbe2; border-radius: 10px; background: #f4fcfd; color: var(--cyan-dark); font-size: 12.5px; font-weight: 750; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .1s ease; }
.cp-file-paste svg { width: 15px !important; height: 15px !important; }
.cp-file-paste:hover { border-color: var(--cyan-dark); background: #eafbfc; box-shadow: 0 2px 8px rgba(8, 127, 145, .12); }
.cp-file-paste:active { transform: translateY(1px); }
.cp-file-paste:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(8, 127, 145, .2); }

/* Prise de photo : reservee aux appareils tactiles (telephone / tablette),
   ou l'attribut capture ouvre directement l'appareil photo. */
.cp-file-camera { display: none; align-items: center; gap: 7px; padding: 8px 15px; border: 1px solid var(--cyan-dark); border-radius: 10px; background: var(--cyan-dark); color: #fff; font-size: 12.5px; font-weight: 750; cursor: pointer; transition: filter .15s ease, transform .1s ease; }
.cp-file-camera svg { width: 15px !important; height: 15px !important; }
.cp-file-camera:hover { filter: brightness(1.08); }
.cp-file-camera:active { transform: translateY(1px); }
.cp-file-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; color: #7a8a99; font-size: 11px; font-weight: 600; line-height: 1.7; }
.cp-file-hint kbd { display: inline-block; min-width: 20px; padding: 2px 6px; border: 1px solid #d3dfe8; border-bottom-width: 2px; border-radius: 5px; background: #fff; color: #4d6275; font-family: inherit; font-size: 10.5px; font-weight: 750; text-align: center; }

@media (pointer: coarse) {
  .cp-file-camera { display: inline-flex; }
  /* Le raccourci clavier Win+Maj+S n'a aucun sens sur mobile. */
  .cp-file-hint { display: none; }
  .cp-file-paste { display: none; }
}

.cp-checkbox { display: flex !important; grid-auto-flow: column; justify-content: start; align-items: center; gap: 9px !important; }
.cp-checkbox input { width: 17px; height: 17px; padding: 0; accent-color: var(--cyan-dark); }
.cp-checkbox svg { width: 16px; height: 16px; color: #25a45d; }
.cp-form-status { padding: 11px 12px; border-radius: 9px; color: #176c51; background: #e9f8f1; font-size: 12px; font-weight: 750; }
.cp-form-status.error { color: #a22f3b; background: #ffedef; }
.cp-form-aside { position: sticky; top: 106px; display: grid; gap: 11px; }
.cp-form-aside > article { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.cp-form-aside > article svg { flex: 0 0 auto; color: var(--cyan-dark); }
.cp-form-aside > article strong { font-size: 12px; }
.cp-form-aside > article p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.cp-form-aside .cp-support-card { padding: 21px; }
.cp-form-aside .cp-support-icon { width: 42px; height: 42px; }
.cp-form-aside .cp-support-card h3 { font-size: 16.5px; }
.cp-form-aside .cp-support-card p { font-size: 11.5px; }
.cp-form-aside .cp-support-card .cp-button { width: 100%; }
.cp-form-aside .cp-form-promos { grid-column: 1 / -1; }
.cp-created-ticket { display: grid; gap: 11px; padding: 18px; border: 1px solid #aee1d2; border-radius: 13px; color: #17674f; background: #edfaf5; box-shadow: var(--shadow); }
.cp-created-ticket strong { font-size: 14px; }
.cp-created-ticket code { overflow-wrap: anywhere; font-size: 11px; }
.cp-created-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.cp-created-actions button, .cp-created-actions a { min-height: 35px; display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; border: 1px solid #a8dacb; border-radius: 8px; color: #17674f; background: #fff; font-size: 10.5px; font-weight: 800; text-decoration: none; cursor: pointer; }

.cp-section-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.cp-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; padding: 17px; }
.cp-view > .cp-card-grid { padding: 0; }
.cp-data-card { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.cp-data-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cp-data-card h3 { margin: 0; font-size: 13px; }
.cp-data-card p { margin: 8px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.cp-data-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 15px 0 0; }
.cp-data-card dl div { display: grid; min-width: 0; }
.cp-data-card dt { color: #81909e; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.cp-data-card dd { overflow: hidden; margin: 2px 0 0; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.cp-two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.cp-stack-list { display: grid; gap: 10px; padding: 17px; }
.cp-stack-item { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfd; }
.cp-stack-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cp-stack-item h3 { margin: 0; font-size: 12.5px; }
.cp-stack-item p { margin: 7px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.cp-stack-item small { color: #8493a1; font-size: 10px; }
.cp-profile-form { display: grid; gap: 15px; padding: 21px; }
.cp-profile-form .cp-panel-head { margin: -21px -21px 2px; }
.cp-profile-form .cp-form-status { margin: 0; }

.cp-placeholder { grid-column: 1/-1; display: grid; place-content: center; justify-items: center; min-height: 180px; padding: 30px; color: var(--muted); text-align: center; }
.cp-placeholder svg { width: 28px; height: 28px; color: #91a1af; }
.cp-placeholder h3 { margin: 13px 0 4px; color: var(--ink); font-size: 14px; }
.cp-placeholder p { max-width: 330px; margin: 0; font-size: 11.5px; }
.cp-toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: grid; gap: 8px; }
.cp-toast { min-width: 280px; max-width: 390px; display: flex; align-items: flex-start; gap: 9px; padding: 13px 14px; border: 1px solid #d9e5ec; border-radius: 11px; color: #29475b; background: #fff; box-shadow: 0 15px 40px rgba(9,32,54,.17); font-size: 12px; font-weight: 750; }
.cp-toast.success { border-color: #b5e3d4; color: #17674f; }
.cp-toast.error { border-color: #efbec4; color: #a42e3b; }

@media (max-width: 1120px) {
  .cp-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cp-master-detail { grid-template-columns: minmax(320px,.9fr) minmax(0,1.1fr); }
  .cp-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .cp-app { display: block; }
  .cp-sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 12px 0 35px rgba(4,16,30,.25); }
  body.menu-open .cp-sidebar { transform: translateX(0); }
  .cp-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 29;
    display: none;
    background: rgba(7, 24, 45, .45);
    opacity: 0;
    transition: opacity .2s ease;
  }
  body.menu-open .cp-sidebar-backdrop { display: block; opacity: 1; }
  .cp-main { grid-column: auto; }
  .cp-menu-button { display: grid; }
  .cp-overview-grid, .cp-master-detail, .cp-form-layout, .cp-two-columns { grid-template-columns: 1fr; }
  .cp-ticket-detail, .cp-form-aside { position: static; }
  .cp-form-aside { grid-template-columns: repeat(3,1fr); }
  .cp-remote-card, .cp-created-ticket { grid-column: 1/-1; }
  .cp-master-detail:not(.is-detail-open) > [data-ticket-detail] { display: none; }
  .cp-master-detail.is-detail-open > .cp-list-panel { display: none; }
  body.ticket-detail-open [data-view="tickets"] > .cp-toolbar { display: none; }
  .cp-mobile-ticket-nav {
    position: relative;
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 16px;
    padding: 5px;
    border: 1px solid #cbe2e7;
    border-radius: 10px;
    color: var(--cyan-dark);
    background: #f6fbfc;
    box-shadow: none;
    font-size: 11px;
    font-weight: 850;
  }
  .cp-mobile-ticket-back, .cp-mobile-ticket-step { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; color: inherit; background: transparent; cursor: pointer; }
  .cp-mobile-ticket-back { gap: 7px; padding: 0 8px; font: inherit; font-weight: 850; }
  .cp-mobile-ticket-nav > span { display: flex; gap: 3px; }
  .cp-mobile-ticket-step { width: 36px; }
  .cp-mobile-ticket-back:hover, .cp-mobile-ticket-step:hover { background: #dff5f7; }
  .cp-mobile-ticket-nav svg { width: 16px; height: 16px; }
}

@media (max-width: 680px) {
  .cp-topbar { min-height: 72px; padding: 13px 15px; }
  .cp-page-heading h1 { font-size: 19px; }
  .cp-online { display: none; }
  .cp-content { padding: 17px 13px 35px; }
  .cp-hero { min-height: 0; grid-template-columns: 1fr; padding: 27px 23px; }
  .cp-hero h2 { font-size: 32px; }
  .cp-company-card { min-width: 0; }
  .cp-kpi-grid { gap: 9px; }
  .cp-kpi { min-width: 0; min-height: 91px; padding: 14px; gap: 11px; }
  .cp-kpi div { min-width: 0; }
  .cp-kpi > span { width: 39px; height: 39px; }
  .cp-kpi strong { font-size: 23px; }
  .cp-toolbar { align-items: stretch; flex-direction: column; }
  .cp-toolbar select, .cp-toolbar .cp-button { width: 100%; }
  .cp-search { min-width: 0; }
  .cp-ticket-form { padding: 18px; gap: 16px; }
  .cp-step { padding: 15px; }
  .cp-step-fields.two { grid-template-columns: 1fr; }
  .cp-priority { grid-template-columns: 1fr; }
  .cp-priority span { grid-template-columns: 22px 1fr; }
  .cp-form-aside { grid-template-columns: 1fr; }
  .cp-card-grid { grid-template-columns: 1fr; padding: 12px; }
  .cp-section-intro { align-items: flex-start; flex-direction: column; }
  .cp-detail-head { flex-direction: column; }
  .cp-ticket-detail { padding: 16px; }
  .cp-detail-section { overflow: hidden; }
  .cp-attachments { display: grid; grid-template-columns: minmax(0, 1fr); }
  .cp-attachments a { width: 100%; }
  .cp-attachment-audio { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .cp-attachment-audio span { min-width: 0; }
  .cp-attachment-audio audio { width: 100%; min-width: 0; }
  .cp-thread-file { width: 100%; }
  .cp-reply-tools { display: grid; grid-template-columns: repeat(3, 42px) minmax(0, 1fr); align-items: center; }
  .cp-reply-mic, .cp-reply-attach, .cp-reply-camera { width: 42px; height: 42px; }
  .cp-reply-file-name { grid-column: 1 / -1; max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
  .cp-reply-send { grid-column: 1 / -1; width: 100%; margin-left: 0; }
  .cp-reply-recording {
    display: grid;
    grid-template-columns: 34px 9px auto minmax(34px, 1fr) 34px;
    gap: 7px;
    border-radius: 15px;
  }
  .cp-reply-recording .cp-voice-wave { min-width: 0; }
  .cp-reply-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 8px;
    border-radius: 15px;
  }
  .cp-reply-preview span { min-width: 0; white-space: normal; }
  .cp-reply-preview audio { grid-column: 1 / -1; grid-row: 2; width: 100%; min-width: 0; }
  .cp-reply-preview .cp-voice-delete { grid-column: 2; grid-row: 1; justify-self: end; }
  .cp-timeline { gap: 12px; }
  .cp-timeline article { width: 94%; padding: 13px; }
  .cp-timeline article.is-client {
    justify-self: start;
    border-color: #e4aa43;
    border-left-color: #c86f00;
    background: #fff0cf;
    box-shadow: 0 5px 14px rgba(165, 96, 6, .1);
  }
  .cp-timeline article.is-staff {
    justify-self: end;
    border-color: #69bdca;
    border-left-color: #047486;
    background: #dcf4f7;
    box-shadow: 0 5px 14px rgba(8, 112, 128, .1);
  }
  .cp-message-role { font-size: 9.5px; }
  .cp-timeline article.is-client .cp-attachment-audio { border-color: #dfaa4d; background: #ffe5ae; }
  .cp-timeline article.is-staff .cp-attachment-audio { border-color: #67bdca; background: #c8edf2; }
  .cp-timeline article.is-client audio::-webkit-media-controls-panel { background-color: #ffe0a0; }
  .cp-timeline article.is-staff audio::-webkit-media-controls-panel { background-color: #bde8ee; }
  .cp-toast-region { right: 12px; bottom: 12px; left: 12px; }
  .cp-toast { min-width: 0; max-width: none; }
}

@media (max-width: 380px) {
  .cp-content { padding-right: 10px; padding-left: 10px; }
  .cp-ticket-detail { padding: 13px; }
  .cp-reply-recording { grid-template-columns: 32px 8px auto minmax(20px, 1fr) 32px; padding: 8px; }
  .cp-timeline article { width: 97%; }
  .cp-attachments a, .cp-thread-file { grid-template-columns: minmax(0, 1fr); }
  .cp-attachment-name, .cp-thread-file-name { overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
}
