/* =====================================================
   ATLAS REFUND — espace membre (dashboard)
   Styles propres au dashboard uniquement.
   ===================================================== */

/* ===== LAYOUT ===== */
.dash-main { padding: 120px 0 90px; min-height: 100vh; }

.dash-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 48px;
  align-items: start;
}

/* ===== HEADER ALLÉGÉ ===== */
.dash-badge { font-size: 10.5px; padding: 7px 14px; }
.dash-logout { padding: 10px 20px; font-size: 12px; }

/* ===== ONGLETS (sidebar desktop) ===== */
.dash-tabs {
  position: sticky; top: 108px;
  display: flex; flex-direction: column; gap: 6px;
}
.dash-tab {
  display: flex; align-items: center;
  min-height: 48px; padding: 12px 18px;
  background: transparent;
  border: 1px solid transparent; border-radius: 12px;
  font-family: var(--font-body); font-size: 14.5px; font-weight: 500;
  color: var(--soft); text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.dash-tab:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.dash-tab.active {
  color: #fff;
  background: var(--card);
  border-color: rgba(255, 30, 30, 0.45);
  box-shadow: 0 0 24px rgba(255, 30, 30, 0.08);
}

/* ===== PANNEAUX ===== */
.dash-panel[hidden] { display: none; }

.dash-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(34px, 4.6vw, 54px);
  letter-spacing: -0.02em; line-height: 1.05;
  color: #fff; margin-bottom: 12px;
}
.dash-sub { color: var(--soft); font-size: 15.5px; margin-bottom: 40px; }

.dash-h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 24px; letter-spacing: -0.01em;
  color: #fff; margin: 48px 0 20px;
}

/* ===== CARTES GÉNÉRIQUES ===== */
.dash-card {
  background: var(--card);
  border: 1px solid rgba(255, 80, 80, 0.14);
  border-radius: 16px;
  padding: 30px;
}
.dash-card-flat {
  background: var(--card);
  border: 1px solid rgba(255, 80, 80, 0.14);
  border-radius: 16px;
}
.dash-empty { color: var(--soft); font-size: 14.5px; }

.dash-error {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--accent);
  margin: 14px 0;
}

/* ===== STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 8px;
}
.stat-card {
  background: var(--card);
  border: 1px solid rgba(255, 80, 80, 0.14);
  border-radius: 16px;
  padding: 26px 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(255, 30, 30, 0.45); }
.stat-card-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: 34px; color: var(--accent);
  letter-spacing: -0.02em; line-height: 1.1;
  margin-bottom: 6px;
}
.stat-card-label {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--soft);
}

/* ===== BARRES DE PROGRESSION ===== */
.prog {
  height: 6px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden; margin-top: 14px;
}
.prog-fill {
  height: 100%; width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  box-shadow: 0 0 12px var(--glow);
  transition: width 0.5s ease;
}
.prog-lg { height: 10px; margin-top: 0; }

/* ===== ACCÈS RAPIDE ===== */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.quick-card {
  background: var(--card);
  border: 1px solid rgba(255, 80, 80, 0.14);
  border-radius: 16px;
  padding: 26px 24px;
  text-align: left; cursor: pointer;
  color: var(--ink);
  font-family: var(--font-body);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.quick-card:hover { transform: translateY(-4px); border-color: rgba(255, 30, 30, 0.45); }
.quick-tag {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--accent); margin-bottom: 12px;
}
.quick-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 19px; letter-spacing: -0.01em;
  color: #fff; margin-bottom: 8px;
}
.quick-sub { font-size: 13.5px; color: var(--soft); }

/* ===== DOSSIERS ===== */
.dossier {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.dossier:first-child { padding-top: 0; }
.dossier:last-child { border-bottom: none; padding-bottom: 0; }

.dossier-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.dossier-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: 20px; letter-spacing: -0.01em; color: #fff;
}
.dossier-amount {
  font-family: var(--font-display); font-weight: 800;
  font-size: 20px; color: var(--accent); letter-spacing: -0.02em;
}
.dossier-meta {
  font-family: var(--font-mono); font-size: 12px; color: var(--soft);
  margin-bottom: 18px;
}

/* badges statut */
.badge {
  display: inline-block;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 6px 13px; border-radius: 999px;
  white-space: nowrap;
}
.badge-encours { color: #FFB020; background: rgba(255, 176, 32, 0.12); border: 1px solid rgba(255, 176, 32, 0.4); }
.badge-valide { color: #4EA8FF; background: rgba(78, 168, 255, 0.12); border: 1px solid rgba(78, 168, 255, 0.4); }
.badge-rembourse { color: #2FD57A; background: rgba(47, 213, 122, 0.12); border: 1px solid rgba(47, 213, 122, 0.4); }
.badge-refuse { color: #FF4D4D; background: rgba(255, 77, 77, 0.12); border: 1px solid rgba(255, 77, 77, 0.4); }

/* timeline */
.timeline {
  display: flex; align-items: center; gap: 0;
  margin: 6px 0 16px; max-width: 480px;
}
.tl-step { display: flex; align-items: center; flex: 1; }
.tl-step:last-child { flex: 0 0 auto; }
.tl-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: var(--bg);
  flex-shrink: 0;
}
.tl-step.done .tl-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 10px var(--glow);
}
.tl-line { flex: 1; height: 2px; background: rgba(255, 255, 255, 0.12); }
.tl-step.done .tl-line { background: var(--accent); }
.tl-labels {
  display: flex; justify-content: space-between;
  max-width: 480px;
  font-family: var(--font-mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--soft);
}
.tl-labels span.on { color: var(--accent); }
.tl-refused {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: #FF4D4D; margin-top: 8px;
}

.dossier-action {
  margin-top: 14px;
  padding: 11px 20px; font-size: 12px;
}

/* formulaire nouveau dossier */
.dash-form .btn-ink { margin-top: 6px; }

/* ===== CHAT (membres + chatbot) ===== */
.chat-box {
  background: var(--card);
  border: 1px solid rgba(255, 80, 80, 0.14);
  border-radius: 16px;
  overflow: hidden;
}
.chat-messages {
  height: 420px;
  overflow-y: auto;
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.chat-msg { max-width: 78%; }
.chat-msg.mine { align-self: flex-end; text-align: right; }
.chat-row { display: flex; align-items: flex-end; gap: 10px; }
.chat-body { min-width: 0; }
.chat-msg.mine .chat-body { text-align: right; }
.chat-author {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--soft); margin-bottom: 5px;
}
.chat-bubble {
  display: inline-block;
  padding: 12px 17px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.55;
  text-align: left;
  overflow-wrap: anywhere;
}
.chat-msg.mine .chat-bubble {
  background: rgba(255, 30, 30, 0.16);
  border-color: rgba(255, 30, 30, 0.4);
}
.chat-ts {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--soft); margin-top: 5px;
}
.chat-welcome {
  align-self: center; text-align: center;
  font-size: 14px; color: var(--soft);
  padding: 18px 24px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  max-width: 420px;
}
.chat-typing .chat-bubble {
  font-family: var(--font-mono); letter-spacing: 0.2em;
  color: var(--soft);
}

.chat-form {
  display: flex; gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
}
.chat-form input {
  flex: 1;
  min-height: 48px;
  padding: 13px 20px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-body); font-size: 14.5px; color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chat-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 30, 30, 0.15);
}
.chat-send { padding: 13px 24px; font-size: 13px; flex-shrink: 0; }

/* suggestions chatbot */
.bot-suggestions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.bot-chip {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.bot-chip:hover {
  background: rgba(255, 30, 30, 0.12);
  border-color: rgba(255, 30, 30, 0.45);
  transform: translateY(-2px);
}

/* ===== FORMATION ===== */
.form-progress { margin-bottom: 36px; max-width: 520px; }
.form-progress-text {
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--soft); margin-top: 12px;
}

.module {
  background: var(--card);
  border: 1px solid rgba(255, 80, 80, 0.14);
  border-radius: 16px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.module:hover { border-color: rgba(255, 30, 30, 0.35); }
.module.done { border-color: rgba(47, 213, 122, 0.35); }

.module-head {
  width: 100%;
  display: flex; align-items: center; gap: 16px;
  min-height: 64px; padding: 16px 22px;
  background: none; border: none; cursor: pointer;
  text-align: left;
  color: var(--ink); font-family: var(--font-body);
}
.module-num {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: var(--accent); flex-shrink: 0;
}
.module-title {
  flex: 1;
  font-family: var(--font-display); font-weight: 700;
  font-size: 17.5px; letter-spacing: -0.01em; color: #fff;
}
.module-state {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--soft); flex-shrink: 0;
}
.module.done .module-state { color: #2FD57A; }
.module-plus {
  font-family: var(--font-mono); font-size: 20px;
  color: var(--accent); flex-shrink: 0;
  transition: transform 0.25s ease;
}
.module.open .module-plus { transform: rotate(45deg); }

.module-body { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.module-body-inner { padding: 0 22px 22px; }
.module-body p { color: var(--soft); font-size: 14.5px; margin-bottom: 12px; max-width: 660px; }

.module-check {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px; margin-top: 8px;
  cursor: pointer;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink);
}
.module-check input {
  width: 22px; height: 22px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ===== BOUTIQUES & SERVICES ===== */
.dash-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

/* ===== AVATARS (photos de profil) ===== */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: rgba(255, 30, 30, 0.12);
  border: 1px solid rgba(255, 30, 30, 0.4);
  font-family: var(--font-display); font-weight: 700;
  color: var(--accent);
  user-select: none;
}
/* Fallback pastel déterministe (fond injecté en JS via hsl) */
.avatar-pastel { color: #f7f3ea; font-weight: 700; }
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.avatar-chat { width: 32px; height: 32px; font-size: 13px; }
.avatar-overview { width: 48px; height: 48px; font-size: 19px; }
.avatar-settings-preview { width: 64px; height: 64px; font-size: 24px; }

/* ===== BADGE NON LUS (onglet Chat membres) ===== */
.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px;
  margin-left: 10px; padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  line-height: 1;
  box-shadow: 0 0 10px var(--glow);
}
.tab-badge[hidden] { display: none; }

/* ===== SÉPARATEURS DE DATE (chat) ===== */
.chat-day-sep {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--soft);
}
.chat-day-sep::before, .chat-day-sep::after {
  content: ""; flex: 1; height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

/* ===== SUPPRESSION MESSAGE (admin) ===== */
.chat-msg { position: relative; }
.chat-del {
  position: absolute; top: -8px; right: -8px; z-index: 1;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--line);
  color: var(--soft);
  font-size: 12px; line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.chat-msg:hover .chat-del, .chat-del:focus-visible { opacity: 1; }
.chat-del:hover { color: var(--accent); border-color: rgba(255, 30, 30, 0.45); }

/* ===== FORMATION — SECTION ADMIN ===== */
.admin-forma {
  margin-bottom: 40px;
  border-color: rgba(255, 30, 30, 0.45);
}
.admin-forma-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 22px; letter-spacing: -0.01em;
  color: #fff; margin: 6px 0 22px;
}
.admin-forma .field { display: block; margin-bottom: 20px; }
.admin-forma .field > span {
  display: block;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--soft); margin-bottom: 8px;
}
.admin-forma .field input {
  width: 100%; min-height: 48px;
  padding: 13px 20px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-body); font-size: 14.5px; color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-forma .field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 30, 30, 0.15);
}

/* éditeur markdown : côte à côte desktop */
.md-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 6px;
}
.md-pane-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--soft); margin-bottom: 8px;
}
.md-textarea {
  width: 100%; min-height: 260px; resize: vertical;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line); border-radius: 12px;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.6;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.md-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 30, 30, 0.15);
}
.md-preview {
  min-height: 260px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.admin-forma-publish { margin-top: 10px; }

/* contenu markdown rendu (aperçu + modules extra) */
.md-body { color: var(--soft); font-size: 14.5px; line-height: 1.6; }
.md-body h1, .md-body h2, .md-body h3 {
  font-family: var(--font-display); font-weight: 700;
  color: #fff; letter-spacing: -0.01em;
  margin: 18px 0 10px;
}
.md-body h1 { font-size: 22px; }
.md-body h2 { font-size: 19px; }
.md-body h3 { font-size: 16.5px; }
.md-body > :first-child { margin-top: 0; }
.md-body p { margin: 0 0 12px; max-width: 660px; }
.md-body ul { margin: 0 0 12px; padding-left: 22px; }
.md-body li { margin-bottom: 6px; }
.md-body code {
  font-family: var(--font-mono); font-size: 12.5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 2px 6px;
}
.md-body a {
  color: var(--accent);
  text-decoration: underline; text-underline-offset: 3px;
}
.md-body strong { color: var(--ink); }

.module-extra { border-style: dashed; }
.module-extra-del { margin-top: 10px; padding: 11px 20px; font-size: 12px; }

.overview-head {
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
}
.overview-head .dash-title { margin-bottom: 12px; }

/* ===== PARAMÈTRES ===== */
.settings-card { max-width: 560px; }
.settings-label {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--soft); margin-bottom: 10px;
}
.settings-number {
  font-family: var(--font-mono); font-size: 26px; font-weight: 600;
  color: #fff; letter-spacing: 0.06em; margin-bottom: 10px;
}
.settings-hint { color: var(--soft); font-size: 13.5px; margin-bottom: 26px; }
.settings-note { max-width: none; margin-bottom: 28px; }

.settings-pseudo-form {
  display: flex; gap: 12px;
  margin-bottom: 10px;
}
.settings-pseudo-form input {
  flex: 1; min-width: 0;
  min-height: 48px;
  padding: 13px 20px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-body); font-size: 14.5px; color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.settings-pseudo-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 30, 30, 0.15);
}
.settings-pseudo-btn { padding: 13px 24px; font-size: 13px; flex-shrink: 0; }
.settings-ok {
  font-family: var(--font-mono); font-size: 13px;
  color: #2FD57A;
  margin: 0 0 26px;
}

/* section photo de profil */
.avatar-settings {
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 10px;
}
.avatar-settings-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.avatar-upload-btn, .avatar-remove-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  padding: 12px 22px; font-size: 12.5px;
  cursor: pointer;
}

/* ===== MODAL PSEUDO ===== */
.pseudo-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(4px);
}
.pseudo-modal[hidden] { display: none; }
.pseudo-modal-card {
  width: 100%; max-width: 460px;
  background: var(--card);
  border: 1px solid rgba(255, 30, 30, 0.45);
  border-radius: 16px;
  padding: 34px 30px;
  box-shadow: 0 0 40px rgba(255, 30, 30, 0.12);
}
.pseudo-modal-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: 26px; letter-spacing: -0.02em;
  color: #fff; margin-bottom: 10px;
}
.pseudo-modal-sub {
  color: var(--soft); font-size: 14px; line-height: 1.55;
  margin-bottom: 22px;
}
.pseudo-modal-card input {
  width: 100%;
  min-height: 50px;
  padding: 13px 20px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pseudo-modal-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 30, 30, 0.15);
}
.pseudo-modal-actions {
  display: flex; gap: 12px; margin-top: 18px;
}
.pseudo-modal-actions .btn-ink { flex: 1; min-height: 48px; }
.pseudo-modal-actions .btn-line { min-height: 48px; }

/* ===== BADGES DE RÔLE (emoji seul + tooltip) ===== */
.user-badge {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 14px; line-height: 1;
  vertical-align: middle;
  cursor: default;
  user-select: none;
}
.user-badge-emoji { display: block; transform: translateY(0.5px); }
/* Tooltip custom : survol desktop (:hover), tap tactile (.tip-open) */
.user-badge-tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 10;
  transform: translateX(-50%) translateY(3px);
  padding: 6px 12px;
  background: var(--card-solid);
  border: 1px solid rgba(255, 30, 30, 0.45);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.user-badge-tip::after {
  content: "";
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(255, 30, 30, 0.45);
}
.user-badge:hover .user-badge-tip,
.user-badge.tip-open .user-badge-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.chat-author { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-title .user-badge { margin-left: 12px; }
.settings-card .user-badge { margin-top: 8px; }

/* ===== ANNUAIRE DES MEMBRES ===== */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.member-card {
  background: var(--card);
  border: 1px solid rgba(255, 80, 80, 0.14);
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.member-card:hover { transform: translateY(-4px); border-color: rgba(255, 30, 30, 0.45); }
.member-self { border-color: rgba(255, 30, 30, 0.45); }
.member-head { display: flex; align-items: center; gap: 16px; }
.avatar-member { width: 48px; height: 48px; font-size: 19px; }
.member-who { min-width: 0; }
.member-name {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-display); font-weight: 700;
  font-size: 17.5px; letter-spacing: -0.01em; color: #fff;
}
.member-name-text { overflow-wrap: anywhere; }
.member-meta {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--soft); margin-top: 6px;
}
.member-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.member-action {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 17px; line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.member-action:hover {
  background: rgba(255, 30, 30, 0.12);
  border-color: rgba(255, 30, 30, 0.45);
  transform: translateY(-2px);
}
.member-action:disabled { opacity: 0.5; cursor: default; transform: none; }
.member-action-del:hover {
  background: rgba(255, 77, 77, 0.16);
  border-color: rgba(255, 77, 77, 0.5);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 940px) {
  .dash-layout { grid-template-columns: 1fr; gap: 28px; }
  .dash-tabs {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .dash-tabs::-webkit-scrollbar { display: none; }
  .dash-tab {
    flex: 0 0 auto;
    min-height: 44px;
    white-space: nowrap;
  }
}

@media (max-width: 700px) {
  .dash-main { padding: 100px 0 70px; }
  .dash-badge { display: none; }
  .dash-logout { padding: 12px 20px; min-height: 44px; font-size: 13px; }
  .dash-title { font-size: clamp(30px, 9vw, 40px); }
  .dash-sub { margin-bottom: 32px; }
  .dash-card { padding: 24px 20px; }
  .stat-card { padding: 22px 20px; }
  .stat-card-num { font-size: 28px; }
  .chat-messages { height: 380px; padding: 18px; }
  .chat-msg { max-width: 88%; }
  .avatar-chat { width: 28px; height: 28px; font-size: 12px; }
  .chat-row { gap: 8px; }
  .overview-head { gap: 14px; }
  .chat-form { padding: 12px; }
  .chat-send { padding: 13px 18px; }
  .module-head { padding: 14px 18px; }
  .module-body-inner { padding: 0 18px 20px; }
  .dossier-action { min-height: 44px; }
  .tab-badge { margin-left: 8px; min-width: 18px; height: 18px; font-size: 10px; }
  .chat-del { opacity: 1; } /* pas de survol fiable au tactile */
  /* éditeur markdown : aperçu empilé sur mobile */
  .md-editor { grid-template-columns: 1fr; }
  .md-textarea, .md-preview { min-height: 200px; }
  .admin-forma { padding: 24px 20px; }
  .pseudo-modal-card { padding: 28px 22px; }
  .pseudo-modal-title { font-size: 23px; }
  /* annuaire : cartes empilées */
  .members-grid { grid-template-columns: 1fr; gap: 14px; }
  .member-card { padding: 20px; }
}

@media (max-width: 480px) {
  .dash-main { padding: 92px 0 56px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 18px 16px; }
  .stat-card-num { font-size: 24px; }
  .stat-card-label { font-size: 10px; }
  .quick-grid { grid-template-columns: 1fr; }
  .dash-form select, .dash-form input[type="number"] { font-size: 14px; }
  .chat-form { flex-direction: column; }
  .chat-send { width: 100%; min-height: 48px; }
  .bot-chip { font-size: 12.5px; }
  .settings-number { font-size: 21px; }
  .settings-pseudo-form { flex-direction: column; }
  .settings-pseudo-btn { width: 100%; min-height: 48px; }
  .avatar-settings { flex-direction: column; align-items: flex-start; gap: 14px; }
  .avatar-settings-actions { width: 100%; flex-direction: column; }
  .avatar-upload-btn, .avatar-remove-btn { width: 100%; min-height: 48px; }
  .md-textarea { font-size: 12.5px; }
  .admin-forma-publish { width: 100%; min-height: 48px; }
  .pseudo-modal { padding: 16px; }
  .pseudo-modal-actions { flex-direction: column; }
  .pseudo-modal-actions .btn-line { width: 100%; }
  .dash-links .btn-ink, .dash-links .btn-line { flex: 1 1 100%; }
  .member-actions { gap: 8px; }
  .member-action { flex: 1; }
}

/* ===== MOTION RÉDUIT ===== */
@media (prefers-reduced-motion: reduce) {
  .prog-fill { transition: none; }
  .module-plus { transition: none; }
  .module-body { transition: none; }
}
