/* =============================================================================
   style.css — Feuille de style de TicketPro (interface atelier + page publique)
   Organisation : variables de thème (:root) → mise en page → composants
   (boutons, cartes, tableaux, badges, formulaires, modale) → responsive.
   Le design est « responsive » : la barre latérale se réduit en icônes et les
   grilles passent sur une colonne sous 900px de large (voir @media en bas).
   ============================================================================= */
:root {
  --bg: #0f1729;
  --bg-2: #1a2338;
  --panel: #ffffff;
  --panel-2: #f7f9fc;
  --border: #e4e9f2;
  --text: #1a2338;
  --muted: #6b7690;
  --primary: #2563eb;
  --primary-d: #1d4ed8;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --purple: #7c3aed;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app { display: flex; min-height: 100vh; }

/* ---------- Sidebar (design moderne) ---------- */
.sidebar {
  width: 258px;
  background: linear-gradient(180deg, #16203a 0%, #0c1322 100%);
  color: #aeb9d0;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  padding: 18px 14px;
  border-right: 1px solid rgba(255,255,255,.06);
  box-shadow: 4px 0 24px rgba(0,0,0,.25);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 6px 18px; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand-logo { font-size: 24px; width: 44px; height: 44px; border-radius: 13px; background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { color: #fff; font-size: 16px; letter-spacing: .2px; }
.brand-text span { font-size: 11px; color: #6b7794; margin-top: 1px; }
nav { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; margin-top: 4px; }
/* Zone libre de la barre latérale accueillant la grande cloche de notifications */
.bell-zone { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px 0; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  color: #b6c1d8; text-decoration: none; font-weight: 600; font-size: 14px;
  transition: background .18s, color .18s;
}
.nav-item .ic {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: rgba(255,255,255,.05); font-size: 16px;
  transition: background .18s;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item:hover .ic { background: rgba(255,255,255,.09); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(37,99,235,.95), rgba(59,130,246,.7));
  color: #fff; box-shadow: 0 8px 22px rgba(37,99,235,.35);
}
.nav-item.active .ic { background: rgba(255,255,255,.22); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.nav-item.active::before {
  content: ''; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: #60a5fa; box-shadow: 0 0 10px rgba(96,165,250,.85);
}
/* Boutons additionnels de la barre latérale (notifications, lien public) */
.sidebar-extra { display: flex; flex-direction: column; gap: 3px; padding: 12px 0 4px; border-top: 1px solid rgba(255,255,255,.06); margin-top: 4px; }
.nav-btn {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 8px 12px; border-radius: 11px; border: none; background: transparent;
  color: #a9b4cc; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; text-align: left;
  transition: background .18s, color .18s;
}
.nav-btn span:first-child {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; background: rgba(255,255,255,.05); font-size: 15px;
}
.nav-btn:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-btn:hover span:first-child { background: rgba(255,255,255,.09); }
.nav-btn.on { color: #34d399; }
.nav-btn.on span:first-child { background: rgba(52,211,153,.16); }
.sidebar-footer { font-size: 12px; color: #6b7794; padding: 10px 12px 2px; display: flex; align-items: center; gap: 8px; border-top: 1px solid rgba(255,255,255,.06); margin-top: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #64748b; }
.dot.ok { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.dot.ko { background: var(--red); }

/* ---------- Content ---------- */
.content { flex: 1; margin-left: 258px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px; background: var(--panel); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 20px; font-weight: 700; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.view { padding: 28px 32px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); font-weight: 600; font-size: 13px;
  cursor: pointer; transition: all .15s; font-family: inherit;
}
.btn:hover { background: var(--panel-2); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-d); }
.btn-danger { background: #fff; color: var(--red); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.icon-btn { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 6px; }
.icon-btn:hover { background: var(--panel-2); }

/* ---------- Cards / grid ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); cursor: grab; }
.stat-card[draggable="true"]:active { cursor: grabbing; }
.stat-card.dragging { opacity: .45; transform: scale(.98); }
.panel[draggable="true"] { cursor: grab; }
.panel[draggable="true"]:active { cursor: grabbing; }
.panel.dragging { opacity: .45; }
.two-col .dash-col { min-height: 48px; display: flex; flex-direction: column; gap: 20px; }
.two-col .dash-col .panel { margin: 0; }
.stat-card .label { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.stat-card .value { font-size: 30px; font-weight: 700; margin-top: 6px; }
.stat-card .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat-card.accent-blue { border-top: 3px solid var(--primary); }
.stat-card.accent-green { border-top: 3px solid var(--green); }
.stat-card.accent-amber { border-top: 3px solid var(--amber); }
.stat-card.accent-purple { border-top: 3px solid var(--purple); }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 22px; overflow: hidden; }
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.panel-head h3 { font-size: 15px; font-weight: 700; }
.panel-body { padding: 6px 0; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: start; }

/* ---------- Table ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; padding: 10px 20px; border-bottom: 1px solid var(--border); }
td { padding: 13px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--panel-2); }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.st-recu { background: #eff6ff; color: #1d4ed8; }
.st-en_cours { background: #fef9c3; color: #a16207; }
.st-en_attente_piece { background: #ffedd5; color: #c2410c; }
.st-repare { background: #dcfce7; color: #15803d; }
.st-rendu { background: #ecfdf5; color: #047857; }
.st-annule { background: #f1f5f9; color: #64748b; }
.pr-basse { background: #f1f5f9; color: #64748b; }
.pr-normale { background: #e0f2fe; color: #0369a1; }
.pr-urgente { background: #fee2e2; color: #b91c1c; }
.tag-low { background: #fee2e2; color: #b91c1c; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row { display: flex; flex-direction: column; gap: 5px; }
.form-row.full { grid-column: 1 / -1; }
/* Titre de section dans un formulaire (ex: modale Paramètres) */
.set-section {
  grid-column: 1 / -1; margin: 8px 0 -2px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--primary);
}
.set-section:first-child { margin-top: 0; }
label { font-size: 12.5px; font-weight: 600; color: #475569; }
input, select, textarea {
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: inherit; color: var(--text); background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
textarea { resize: vertical; min-height: 70px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; grid-column: 1 / -1; }
/* Grande cloche de notification (barre latérale) */
.cloche { position: relative; border: 1px solid rgba(255,255,255,.10); background: radial-gradient(circle at 50% 34%, rgba(255,255,255,.11), rgba(255,255,255,.03)); width: 92px; height: 92px; border-radius: 50%; font-size: 50px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transform-origin: 50% 12%; box-shadow: 0 12px 32px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.10); transition: background .18s, transform .18s; }
.cloche:hover { background: radial-gradient(circle at 50% 34%, rgba(255,255,255,.16), rgba(255,255,255,.05)); transform: translateY(-2px); }
.cloche-badge { position: absolute; top: 2px; right: 2px; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: 15px; font-weight: 800; display: none; align-items: center; justify-content: center; box-shadow: 0 0 0 3px var(--bg); }
.cloche.on .cloche-badge { display: inline-flex; }
.cloche.on { animation: clocheSonne 1s ease-in-out infinite; }
@keyframes clocheSonne { 0%,100% { transform: rotate(0); } 15% { transform: rotate(12deg); } 30% { transform: rotate(-10deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }

.pay-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; padding: 8px 0; }
.pay-toggle input { width: auto; }
.pay-toggle .muted { font-weight: 400; }

.search {
  padding: 9px 13px 9px 34px; border: 1px solid var(--border); border-radius: 9px; font-size: 13px;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill='none' stroke='%236b7690' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 11px center;
  width: 260px;
}
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.chip { padding: 7px 14px; border-radius: 20px; border: 1px solid var(--border); background: #fff; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted); }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,41,.5); display: none; align-items: flex-start; justify-content: center; z-index: 50; padding: 40px 20px; overflow-y: auto; }
.modal-overlay.open { display: flex; }
.modal { background: var(--panel); border-radius: 14px; width: 100%; max-width: 640px; box-shadow: var(--shadow-lg); animation: pop .18s ease; }
.modal.wide { max-width: 760px; }
.modal.xwide { max-width: 940px; }   /* modale Paramètres : navigation + panneau */
.modal.tdwide { max-width: 1080px; } /* fiche ticket : 2 colonnes horizontales */

/* Modale Paramètres : disposition « blade » façon Azure
   (colonne de navigation à gauche + panneau détail qui s'ouvre à côté) */
.settings-azure { display: flex; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; min-height: 320px; }
.set-nav { flex: 0 0 236px; background: var(--panel-2); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.set-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border: none; background: transparent;
  border-left: 3px solid transparent; border-radius: 8px;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--text);
  cursor: pointer; text-align: left; transition: background .12s, color .12s;
}
.set-nav-item .ic { font-size: 16px; }
.set-nav-item:hover { background: rgba(37,99,235,.06); }
.set-nav-item.active { background: #fff; color: var(--primary); border-left-color: var(--primary); box-shadow: var(--shadow); }
.set-detail { flex: 1; min-width: 0; padding: 20px 24px 24px; }
.set-panel { display: none; }
.set-panel.active { display: block; animation: bladeIn .22s ease; }
.set-panel h3 { font-size: 15px; }
.set-hint { font-size: 12.5px; color: var(--muted); margin: 4px 0 16px; }
@keyframes bladeIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.set-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.set-status { font-size: 12.5px; font-weight: 600; color: var(--muted); }
/* Panneau « Arrière-plans » : liste de boutons ouvrant l'éditeur (bg.js) */
.bg-edit-list { display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.bg-edit-list .btn { justify-content: flex-start; }
.set-status.ok { color: var(--green); }
.set-status.err { color: var(--red); }

/* Champ logo (panneau Identité) */
.logo-field { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.logo-preview { width: 56px; height: 56px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-preview .muted { font-size: 11px; text-align: center; padding: 4px; }
.logo-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Logo dans la barre latérale (remplace l'emoji si défini) — pastille arrondie */
.brand-logo img { width: 44px; height: 44px; object-fit: cover; border-radius: 13px; display: block; }

/* Médiathèque */
.media-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.media-bar .search { flex: 1; }
.media-upload { cursor: pointer; white-space: nowrap; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; max-height: 56vh; overflow-y: auto; padding: 2px; }
.media-tile { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
.media-thumb { aspect-ratio: 4 / 3; background: var(--panel-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-ic { font-size: 34px; }
.media-tile.pick .media-thumb { cursor: pointer; transition: transform .12s; }
.media-tile.pick .media-thumb:hover { transform: scale(1.03); }
.media-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 9px; }
.media-title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-actions { display: flex; gap: 2px; flex: 0 0 auto; }
.media-actions .icon-btn { font-size: 13px; padding: 2px 5px; }

/* Pièces jointes d'un ticket (fiche atelier) */
.tk-medias { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-media { position: relative; width: 64px; height: 64px; }
.tk-media a { display: block; width: 100%; height: 100%; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.tk-media img, .tk-media video { width: 100%; height: 100%; object-fit: cover; }
.tk-x { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: none; background: var(--red); color: #fff; font-size: 10px; cursor: pointer; line-height: 1; }

/* Slider d'avis clients (étoiles + commentaire) en haut de la page Tickets.
   Effet de fondu (flou) aux deux extrémités, sur toute la largeur. */
.avis-slider { margin-bottom: 16px; -webkit-mask-image: linear-gradient(to right, transparent, #000 52px, #000 calc(100% - 52px), transparent); mask-image: linear-gradient(to right, transparent, #000 52px, #000 calc(100% - 52px), transparent); }
.avis-track { display: flex; gap: 12px; overflow-x: auto; padding: 4px 52px 10px; scroll-snap-type: x proximity; scrollbar-width: none; }
.avis-track::-webkit-scrollbar { display: none; }
.avis-tile { flex: 0 0 258px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); scroll-snap-align: start; }
.avis-stars { color: #f59e0b; font-size: 16px; letter-spacing: 2px; }
.avis-off { color: #e2e8f0; }
.avis-com { font-size: 13px; margin-top: 6px; color: var(--text); line-height: 1.45; }
.avis-meta { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
/* Évaluation dans le dossier du ticket */
.avis-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; }
.avis-inline .stars-ro { color: #f59e0b; font-size: 18px; letter-spacing: 2px; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.modal-header h2 { font-size: 17px; margin-right: auto; display: flex; align-items: center; gap: 10px; }
.modal-header #modalClose { margin-left: 0; }
.modal-body { padding: 22px; position: relative; }

/* Fiche ticket : n° client en pastille dégradée dans l'en-tête */
.td-gsm {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: linear-gradient(90deg, #2563eb, #7c3aed 55%, #db2777);
  box-shadow: 0 2px 8px rgba(124,58,237,.35);
}
/* Boutons d'action dans l'en-tête de la fiche */
.td-hdr-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Corps de la fiche : 2 colonnes horizontales */
.td-cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 900px) { .td-cols { grid-template-columns: 1fr; } }
/* Tampon « PAYÉ » sur la fiche ticket */
.tampon-paye {
  position: absolute; top: 6px; right: 20px; z-index: 2;
  color: #16a34a; border: 3px double #16a34a; border-radius: 7px;
  padding: 4px 16px; font-size: 24px; font-weight: 900; letter-spacing: 3px;
  text-transform: uppercase; transform: rotate(-12deg); opacity: .82;
  pointer-events: none; font-family: 'Arial Black', Impact, sans-serif;
}

/* ---------- Misc ---------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 10px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar { width: 100%; max-width: 26px; background: var(--primary); border-radius: 5px 5px 0 0; min-height: 3px; transition: height .3s; }
.bar-lbl { font-size: 9px; color: var(--muted); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 4px 20px 14px; }
.legend span { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.toast { position: fixed; bottom: 24px; right: 24px; background: var(--text); color: #fff; padding: 13px 20px; border-radius: 10px; font-weight: 500; font-size: 13px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px); transition: all .25s; z-index: 60; }
.toast.show { opacity: 1; transform: none; }
.toast.err { background: var(--red); }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin-bottom: 18px; }
/* Titres de section dans une fiche (ex: « Pièces jointes », « Suivi / historique ») — bien visibles */
.k { font-size: 14px; font-weight: 700; color: var(--text); }
.detail-grid .k { font-size: 11px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); font-weight: 600; }
.detail-grid .v { font-size: 14px; margin-top: 2px; }
.hist-item { padding: 11px 0; border-bottom: 1px solid var(--border); }
.hist-item:last-child { border: none; }
.hist-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 600; }
.row-flex { display: flex; gap: 10px; align-items: center; }
/* Indicateur « non lu » (activité client) dans la liste des tickets — la ligne clignote */
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-left: 7px; vertical-align: middle; animation: dotClignote 1.2s ease-in-out infinite; }
tbody tr.unread td { animation: ligneClignote 1.4s ease-in-out infinite; }
tbody tr.unread .mono { font-weight: 700; color: var(--primary); }
@keyframes ligneClignote { 0%, 100% { background: rgba(37,99,235,.04); } 50% { background: rgba(37,99,235,.17); } }
@keyframes dotClignote { 0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.5); opacity: 1; } 50% { box-shadow: 0 0 0 4px rgba(220,38,38,0); opacity: .55; } }
/* Panneau « Tickets non lus » du tableau de bord */
.panel-notif { border-color: #fecaca; }
.panel-notif .panel-head h3 { color: var(--red); }

/* ---------- Page Tickets : tuiles par catégorie (glisser-déposer) ---------- */
.tk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.tk-col { display: flex; flex-direction: column; gap: 18px; min-height: 60px; }
.tk-tile { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tk-tile[draggable="true"] { cursor: grab; }
.tk-tile.dragging { opacity: .45; }
.tk-tile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.tk-tile-head h3 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tk-grip { color: var(--muted); opacity: .55; }
.tk-count { background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 999px; }
.tk-sort { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; font-family: inherit; white-space: nowrap; }
.tk-sort:hover { background: var(--panel-2); color: var(--text); }
.tk-tile-body { max-height: 420px; overflow-y: auto; }
.tk-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.tk-row:last-child { border-bottom: none; }
.tk-row:hover { background: var(--panel-2); }
.tk-row-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tk-row-client { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-row-side { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.tk-row-date { font-size: 12px; color: var(--muted); }
.tk-row.unread { animation: ligneClignote 1.4s ease-in-out infinite; }
.tk-row.unread .mono { font-weight: 700; color: var(--primary); }
@media (max-width: 1000px) { .tk-grid { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  .sidebar { width: 68px; padding: 16px 8px; }
  .brand-text, .nav-item .lbl, .sidebar-footer span:last-child, .nav-btn .lbl { display: none; }
  .nav-btn { justify-content: center; }
  .nav-item { justify-content: center; }
  .content { margin-left: 68px; }
  .two-col { grid-template-columns: 1fr; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  /* Modale Paramètres : navigation empilée au-dessus du panneau */
  .settings-azure { flex-direction: column; min-height: 0; }
  .set-nav { flex-direction: row; overflow-x: auto; flex: 0 0 auto; border-right: none; border-bottom: 1px solid var(--border); }
  .set-nav-item { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .set-nav-item.active { border-left-color: transparent; border-bottom-color: var(--primary); }
  .search { width: 100%; }
  .view, .topbar { padding-left: 16px; padding-right: 16px; }
}
