/* RiLoPos Technician portal — Microsoft Fluent 2 design.
   Tokens d'après @fluentui/tokens (Web Light) : Segoe UI Variable, brand
   #0F6CBD, rayons 2/4/8, ombres d'élévation Fluent, neutres gris. Les noms de
   classes sont inchangés (les vues ne bougent pas), seul le style est refait. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

:root {
  /* Neutres (Fluent NeutralBackground / Foreground / Stroke) */
  --bg:        #f0f0f0;   /* canvas */
  --bg-2:      #fafafa;   /* subtle layer */
  --surface:   #ffffff;   /* card / layer */
  --surface-2: #f5f5f5;   /* hover */
  --surface-3: #ebebeb;   /* pressed */
  --border:    #e0e0e0;   /* Stroke2 */
  --border-2:  #d1d1d1;   /* Stroke1 */
  --text:      #242424;   /* Foreground1 */
  --text-2:    #424242;   /* Foreground2 */
  --text-muted:#616161;   /* Foreground3 */
  --text-faint:#a6a6a6;   /* disabled */
  /* Brand (Fluent communication blue) */
  --primary:   #0f6cbd;
  --primary-2: #115ea3;   /* hover */
  --primary-3: #0e4775;   /* pressed */
  --primary-soft: #ebf3fc;
  --accent:    #0f6cbd;
  --accent-soft: #ebf3fc;
  /* Statuts Fluent */
  --warn:      #bc4b09;  --warn-soft:    #fdf6e7;
  --danger:    #c50f1f;  --danger-soft:  #fdf3f4;
  --success:   #0e700e;  --success-soft: #f1faf1;
  /* Élévation Fluent (shadow2 / shadow8 / shadow28) */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.14), 0 0 2px rgba(0,0,0,0.12);
  --shadow:    0 4px 8px rgba(0,0,0,0.14), 0 0 2px rgba(0,0,0,0.12);
  --shadow-lg: 0 14px 36px rgba(0,0,0,0.18), 0 0 8px rgba(0,0,0,0.10);
  --radius:    4px;   /* Fluent medium */
  --radius-lg: 8px;   /* Fluent xlarge */
}

body {
  font-family: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* ─── Auth ──────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px circle at 25% 15%, rgba(15,108,189,0.08), transparent 55%),
    radial-gradient(700px circle at 85% 85%, rgba(15,108,189,0.05), transparent 55%),
    var(--bg);
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  width: 100%; max-width: 380px;
}
.auth-card h1 { margin: 0 0 6px; font-size: 24px; font-weight: 600; }
.auth-card .subtitle { color: var(--text-muted); font-size: 14px; margin: 0 0 24px; }

/* ─── Forms ─────────────────────────────────────────── */
label {
  display: block; font-size: 12px; color: var(--text-2);
  margin: 14px 0 6px; font-weight: 600;
}
input, select, textarea {
  width: 100%; padding: 7px 10px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-bottom-color: #8a8a8a;            /* Fluent : bordure basse plus marquée */
  border-radius: var(--radius);
  color: var(--text); font: inherit; font-size: 14px;
  transition: border-color .1s, box-shadow .1s;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:hover, select:hover, textarea:hover { border-color: #8a8a8a; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: inset 0 -2px 0 0 var(--primary);   /* trait de focus Fluent (bas) */
}

/* ─── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius); border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  text-decoration: none; line-height: 1.2; min-height: 32px;
  transition: background .08s, border-color .08s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { background: var(--surface-3); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.btn-primary {
  background: var(--primary); color: #fff; border-color: transparent;
}
.btn-primary:hover { background: var(--primary-2); }
.btn-primary:active { background: var(--primary-3); }
.btn-danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn-danger:hover { background: #b10e1c; }
.btn-block { width: 100%; padding: 9px 14px; font-size: 14px; }

.err-msg {
  color: var(--danger); font-size: 13px; padding: 10px 14px;
  background: var(--danger-soft);
  border: 1px solid rgba(197,15,31,0.25);
  border-radius: var(--radius); margin-bottom: 14px;
  display: flex; gap: 8px; align-items: flex-start;
}

/* ─── App layout ────────────────────────────────────── */
.app { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  height: 48px;
  background: rgba(255,255,255,0.80);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px; gap: 20px;
  position: sticky; top: 0; z-index: 50;
}
.topbar .brand {
  font-weight: 600; font-size: 14px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.topbar .brand-logo { width: 24px; height: 24px; flex: none; display: block; }
.topbar .right {
  margin-left: auto; display: flex; align-items: center; gap: 14px;
  font-size: 13px; color: var(--text-muted);
}

.content { flex: 1; padding: 28px; max-width: 1400px; margin: 0 auto; width: 100%; }

h2 {
  font-size: 20px; margin: 0 0 18px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}

/* ─── Client cards (dashboard) ──────────────────────── */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.client-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-decoration: none; color: var(--text);
  display: block; position: relative;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .1s, transform .1s;
}
.client-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.client-card::after {
  content: ""; position: absolute; top: 14px; right: 14px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint);
}
.client-card.online::after { background: var(--success); box-shadow: 0 0 0 3px rgba(14,112,14,0.15); }
.client-card.offline::after { background: var(--text-faint); }

.client-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-right: 18px; }
.client-card-info { flex: 1; min-width: 0; }
.client-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-sub { color: var(--text-muted); font-size: 12px; margin-top: 3px; }
.client-card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.stat-value { font-size: 17px; font-weight: 600; margin-top: 3px; font-feature-settings: "tnum"; }
.stat-value-small { font-size: 11.5px; margin-top: 5px; font-feature-settings: "tnum"; font-family: "Cascadia Code", "Consolas", monospace; color: var(--text-2); }
.client-card-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

.company-icon {
  width: 38px; height: 38px; border-radius: var(--radius);
  background: var(--primary-soft);
  border: 1px solid rgba(15,108,189,0.20);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--primary); font-weight: 600; font-size: 14px; flex: none;
}

/* ─── Badges (Fluent badge filled subtle) ──────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--radius);
  font-size: 11px; font-weight: 600;
  border: 1px solid transparent;
}
.badge.active    { background: var(--success-soft); color: var(--success); border-color: rgba(14,112,14,0.20); }
.badge.setup     { background: var(--warn-soft);    color: var(--warn);    border-color: rgba(188,75,9,0.20); }
.badge.suspended { background: var(--danger-soft);  color: var(--danger);  border-color: rgba(197,15,31,0.20); }
.badge.closed    { background: var(--surface-3); color: var(--text-muted); border-color: var(--border-2); }

.section-title {
  font-size: 11px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.08em; font-weight: 600;
  margin: 28px 0 12px; display: flex; align-items: center; gap: 8px;
}
.section-title::before { content: ""; width: 16px; height: 1px; background: var(--border-2); }

/* ─── Tables ───────────────────────────────────────── */
table {
  width: 100%; border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
table th, table td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--border); }
table th { background: var(--bg-2); font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
table tr:last-child td { border-bottom: none; }
table tbody tr:hover { background: var(--surface-2); }

/* ─── Info / pos boxes ─────────────────────────────── */
.info-box {
  background: var(--primary-soft);
  border: 1px solid rgba(15,108,189,0.20);
  padding: 12px 14px; border-radius: var(--radius);
  font-size: 13px; margin: 14px 0; color: var(--primary-3);
  display: flex; gap: 10px; align-items: flex-start;
}

.pos-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.pos-card.online { border-color: rgba(14,112,14,0.30); }
.pos-card-head { padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pos-card-body { padding: 14px 16px; }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 16px; font-size: 12.5px; }
.tk { color: var(--text-muted); font-size: 11px; }
code { font-family: "Cascadia Code", "Consolas", monospace; font-size: 12px; background: var(--surface-2); padding: 1px 6px; border-radius: var(--radius); }

.chip { display: inline-block; padding: 3px 9px; margin: 2px 4px 2px 0; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--radius); font-size: 11px; font-weight: 600; }

/* ─── Modal ────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.40);
  z-index: 999; display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fadeIn .12s ease-out;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: zoomIn .15s cubic-bezier(0.1, 0.9, 0.2, 1);
}
@keyframes zoomIn { from { transform: translateY(8px) scale(0.98); opacity: 0 } to { transform: none; opacity: 1 } }
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: var(--bg-2); }

/* ─── Spinner ──────────────────────────────────────── */
.spinner { width: 36px; height: 36px; margin: 0 auto 14px; border: 2.5px solid var(--surface-3); border-top-color: var(--primary); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.20); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.32); border: 3px solid transparent; background-clip: padding-box; }

/* ─── Detail page layout ───────────────────────────── */
.t-nav { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.t-nav a { color: var(--primary); text-decoration: none; }
.t-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.t-nav-sep { opacity: 0.45; }
.t-nav-current { color: var(--text); font-weight: 600; }

.t-detail { display: grid; grid-template-columns: 280px 1fr; flex: 1; height: calc(100vh - 48px); overflow: hidden; }

/* Sidebar */
.t-side { background: var(--bg-2); border-right: 1px solid var(--border); overflow-y: auto; padding: 16px 0; }
.t-side-section { padding: 0 18px 18px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.t-side-section:last-child { border-bottom: none; }
.t-side-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; font-weight: 600; }
.t-side-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; word-break: break-word; }
.t-side-sub { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 11px; margin-bottom: 12px; }
.t-side-meta { font-size: 12px; line-height: 1.6; color: var(--text-2); }
.t-side-meta a { color: var(--primary); text-decoration: none; word-break: break-all; }
.t-side-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.t-side-meta .tk { color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

.t-side-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px; margin-bottom: 6px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: var(--radius); font-size: 13px; font-weight: 600;
  cursor: pointer; text-align: left;
  transition: background .08s, border-color .08s;
}
.t-side-btn:hover { background: var(--surface-2); }
.t-side-btn.btn-primary { background: var(--primary); color: #fff; border-color: transparent; }
.t-side-btn.btn-primary:hover { background: var(--primary-2); }
.t-side-hint { font-size: 11px; color: var(--text-muted); line-height: 1.5; margin: 4px 0 0; }

.t-side-poslist { display: flex; flex-direction: column; gap: 2px; }
.t-side-pos { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: var(--radius); color: var(--text); text-decoration: none; font-size: 13px; transition: background .08s; }
.t-side-pos:hover { background: var(--surface); }
.t-side-pos .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); flex: none; }
.t-side-pos.on .dot { background: var(--success); box-shadow: 0 0 0 3px rgba(14,112,14,0.15); }
.t-side-pos.off .dot { background: var(--text-faint); }
.t-side-pos-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-side-pos small { color: var(--text-muted); font-size: 10.5px; font-feature-settings: "tnum"; }

/* Main */
.t-main { overflow-y: auto; padding: 22px 28px; }
.t-empty { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; text-align: center; box-shadow: var(--shadow-sm); }
.t-empty h3 { margin: 0 0 8px; font-size: 16px; }
.t-empty p { color: var(--text-muted); font-size: 13px; margin: 0; }

/* POS section */
.t-pos { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 18px; overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .12s; }
.t-pos:hover { box-shadow: var(--shadow); }
.t-pos-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--bg-2); border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
.t-pos-title h3 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.t-pos-id { font-size: 10.5px; color: var(--text-muted); display: block; margin-top: 4px; font-family: "Cascadia Code", "Consolas", monospace; }
.t-pos-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.t-pos-seen { color: var(--text-muted); font-feature-settings: "tnum"; }

.dot-status { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot-status.on { background: var(--success); box-shadow: 0 0 0 4px rgba(14,112,14,0.15); animation: pulseDot 2.4s ease-in-out infinite; }
@keyframes pulseDot { 0%, 100% { box-shadow: 0 0 0 4px rgba(14,112,14,0.15); } 50% { box-shadow: 0 0 0 6px rgba(14,112,14,0.04); } }
.dot-status.off { background: var(--text-faint); }

/* Action bar */
.t-actions { display: flex; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.t-act-btn { padding: 6px 13px; background: var(--surface); color: var(--text); border: 1px solid var(--border-2); border-radius: var(--radius); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .08s; min-height: 30px; }
.t-act-btn:hover:not(:disabled) { background: var(--surface-2); }
.t-act-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.t-act-btn.rdp:not(:disabled) { background: var(--primary); border-color: transparent; color: #fff; }
.t-act-btn.rdp:not(:disabled):hover { background: var(--primary-2); }

/* Telemetria grid */
.t-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; background: var(--border); padding: 1px; }
.t-card { background: var(--surface); padding: 16px 18px; }
.t-card-head { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }

.t-dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; margin: 0; font-size: 12.5px; }
.t-dl dt { color: var(--text-muted); font-size: 11.5px; align-self: start; padding-top: 1px; font-weight: 600; }
.t-dl dd { margin: 0; word-break: break-word; color: var(--text); }
.t-dl code { font-family: "Cascadia Code", "Consolas", monospace; font-size: 11.5px; background: var(--surface-2); padding: 1px 6px; border-radius: var(--radius); }

.t-iface { padding: 8px 0; border-top: 1px dashed var(--border); }
.t-iface:first-child { border-top: none; padding-top: 0; }
.t-iface strong { font-size: 12.5px; font-weight: 600; }
.t-iface small { color: var(--text-muted); font-feature-settings: "tnum"; }

/* Usage bar */
.t-bar { margin-top: 6px; height: 5px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.t-bar-fill { height: 100%; background: var(--success); transition: width .3s ease; border-radius: 999px; }
.t-bar-fill.warn { background: var(--warn); }

.t-table { width: 100%; border-collapse: collapse; }
.t-table th, .t-table td { padding: 9px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.t-table th { background: var(--bg-2); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; }
.t-table tr:last-child td { border-bottom: none; }
.t-table tbody tr:hover { background: var(--surface-2); }

/* Hide global container for client.php */
.app:has(.t-detail) > .content { display: none; }

/* ─── Responsive ───────────────────────────────────── */
@media (max-width: 900px) {
  .t-detail { grid-template-columns: 1fr; height: auto; }
  .t-side { border-right: none; border-bottom: 1px solid var(--border); }
  .content { padding: 20px 16px; }
}

/* ─── Tickets ──────────────────────────────────────── */
.ticket-filters { display: flex; gap: 4px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ticket-filters a { padding: 6px 13px; border-radius: var(--radius); color: var(--text-muted); text-decoration: none; font-size: 13px; font-weight: 600; transition: background .08s, color .08s; }
.ticket-filters a:hover { background: var(--surface-2); color: var(--text); }
.ticket-filters a.cur { background: var(--primary-soft); color: var(--primary); }

.ticket-list { display: flex; flex-direction: column; gap: 8px; }
.ticket-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 18px; text-decoration: none; color: var(--text); display: block; box-shadow: var(--shadow-sm); transition: box-shadow .1s, transform .08s; }
.ticket-row:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.ticket-row-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ticket-row-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.ticket-row-meta { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-muted); flex-wrap: wrap; font-feature-settings: "tnum"; }
.ticket-row-time { margin-left: auto; font-size: 11.5px; color: var(--text-muted); font-feature-settings: "tnum"; }

/* Priority badges */
.badge.priority-urgent { background: var(--danger-soft); color: var(--danger); border-color: rgba(197,15,31,0.20); }
.badge.priority-high   { background: var(--warn-soft);   color: var(--warn);   border-color: rgba(188,75,9,0.20); }
.badge.priority-normal { background: var(--accent-soft); color: var(--primary); border-color: rgba(15,108,189,0.20); }
.badge.priority-low    { background: var(--surface-3); color: var(--text-muted); border-color: var(--border-2); }

/* Status badges */
.badge.st-open        { background: var(--danger-soft);  color: var(--danger);  border-color: rgba(197,15,31,0.20); }
.badge.st-in-progress { background: var(--warn-soft);    color: var(--warn);    border-color: rgba(188,75,9,0.20); }
.badge.st-waiting     { background: #f4f0fb; color: #8764b8; border-color: rgba(135,100,184,0.25); }
.badge.st-resolved    { background: var(--success-soft); color: var(--success); border-color: rgba(14,112,14,0.20); }
.badge.st-closed      { background: var(--surface-3); color: var(--text-muted); border-color: var(--border-2); }
.badge.new-reply      { background: #f4f0fb; color: #8764b8; font-weight: 700; }

/* Ticket detail */
.ticket-detail-head { padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.ticket-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }

.ticket-message { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.ticket-message.first { border-left: 3px solid var(--primary); }
.ticket-message.admin { border-left: 3px solid #8764b8; background: #faf9fd; }
.ticket-message.tech  { border-left: 3px solid var(--primary); }
.ticket-message-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 12px; color: var(--text-muted); }
.ticket-message-head strong { color: var(--text); font-weight: 600; }
.ticket-message-body { font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

.ticket-reply { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; margin-top: 22px; box-shadow: var(--shadow-sm); }
.ticket-reply textarea { min-height: 100px; resize: vertical; font-family: inherit; }

/* ─── Language switcher ────────────────────────────── */
.lang-switch { position: relative; display: inline-block; }
.lang-switch summary {
  list-style: none; cursor: pointer; padding: 5px 11px;
  background: var(--surface); color: var(--text-2);
  border: 1px solid var(--border-2); border-radius: var(--radius);
  font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
  transition: background .08s;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::marker { content: ""; }
.lang-switch summary:hover { background: var(--surface-2); }
.lang-switch[open] summary { background: var(--surface-2); }
.lang-switch-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 150px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 5px; z-index: 100; }
.lang-switch-menu a { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: var(--radius); color: var(--text); text-decoration: none; font-size: 13px; }
.lang-switch-menu a:hover { background: var(--surface-2); }
.lang-switch-menu a.cur { color: var(--primary); font-weight: 600; }

.lang-popup-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.40); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lang-popup { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; max-width: 380px; box-shadow: var(--shadow-lg); }
.lang-popup h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.lang-popup p { margin: 0 0 18px; color: var(--text-muted); font-size: 13px; }
.lang-popup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lang-popup-grid a { display: block; padding: 14px; border: 1px solid var(--border-2); border-radius: var(--radius); text-align: center; color: var(--text); text-decoration: none; font-weight: 600; font-size: 13px; transition: background .08s, border-color .08s; }
.lang-popup-grid a:hover { border-color: var(--primary); background: var(--primary-soft); }

/* ─── Provision new shop modal ─────────────────────── */
.prov-section { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-top: 14px; }
.prov-section-title { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }

.cred-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.cred-row:last-child { border-bottom: none; }
.cred-label { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; min-width: 130px; flex: none; }
.cred-val { font-family: "Cascadia Code", "Consolas", monospace; font-size: 13px; background: var(--surface-2); padding: 7px 11px; border-radius: var(--radius); border: 1px solid var(--border); flex: 1; word-break: break-all; }

/* Pied légal (connexion) : identité de l'éditeur + liens légaux. */
.legal-foot {
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border, rgba(127,127,127,.25));
  font-size: 11px; line-height: 1.5; color: var(--text-muted); text-align: center;
}
.legal-foot-id { display: block; }
.legal-foot-links { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.legal-foot-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
