/* =============================================
   ADMIN.CSS — Styles du panneau d'administration
   ============================================= */

/* -------------------------------------------------------
   CORRECTIF CRITIQUE : l'attribut [hidden] est écrasé
   par les règles display:flex de .pw-screen et .admin-panel.
   Ce !important force le masquage à prendre le dessus.
   ------------------------------------------------------- */
[hidden] { display: none !important; }

/* ---- Reset admin body ---- */
.admin-body {
  background: #0d0d0d;
  min-height: 100vh;
  overflow-x: hidden;
  /* IMPORTANT : style.css impose body{color:#1a1a1a} (thème clair).
     On force une couleur claire pour tout le panneau admin. */
  color: #cccccc;
}

/* =============================================
   ÉCRAN MOT DE PASSE
   ============================================= */
.pw-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, #1a0a00 0%, #0d0d0d 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.pw-card {
  background: #1a1a1a;
  border: 1px solid rgba(232, 80, 10, 0.25);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%  { transform: translateX(-8px); }
  40%  { transform: translateX(8px); }
  60%  { transform: translateX(-5px); }
  80%  { transform: translateX(5px); }
}

.pw-logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.pw-logo span { color: #e8500a; }

.pw-icon {
  font-size: 3rem;
  margin-bottom: 1.2rem;
}

.pw-card h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}

.pw-card p {
  font-size: 0.88rem;
  color: #888;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.pw-field {
  position: relative;
  margin-bottom: 1rem;
}

.pw-field input {
  width: 100%;
  background: #111;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 14px 48px 14px 16px;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

.pw-field input:focus { border-color: #e8500a; box-shadow: 0 0 0 3px rgba(232,80,10,0.15); }

.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.pw-toggle:hover { opacity: 1; }

.pw-error {
  background: rgba(224,82,82,0.1);
  border: 1px solid rgba(224,82,82,0.3);
  color: #e05252;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.pw-btn {
  width: 100%;
  padding: 14px;
  font-size: 0.95rem;
  letter-spacing: 1px;
  cursor: pointer;
}

.pw-back {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: #666;
  transition: color 0.2s;
}

.pw-back:hover { color: #e8500a; }

/* =============================================
   PANNEAU ADMIN
   ============================================= */
.admin-panel {
  display: flex;
  min-height: 100vh;
  font-family: 'Montserrat', sans-serif;
}

/* ---- Sidebar ---- */
.admin-sidebar {
  width: 240px;
  min-width: 240px;
  background: #111;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.admin-logo {
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.admin-logo span { color: #e8500a; }

.admin-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-nav-item {
  width: 100%;
  background: none;
  border: none;
  padding: 0.75rem 1rem;
  color: #888;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-nav-item:hover {
  background: rgba(255,255,255,0.04);
  color: #ccc;
}

.admin-nav-item.active {
  background: rgba(232, 80, 10, 0.15);
  color: #e8500a;
}

.nav-icon { font-size: 1rem; }

.admin-sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-view-site {
  display: block;
  padding: 0.65rem 1rem;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #888;
  transition: all 0.2s;
  text-align: center;
}

.admin-view-site:hover { background: rgba(255,255,255,0.08); color: #ccc; }

.admin-logout {
  padding: 0.65rem 1rem;
  background: rgba(224,82,82,0.08);
  border: 1px solid rgba(224,82,82,0.15);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e05252;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Montserrat', sans-serif;
}

.admin-logout:hover { background: rgba(224,82,82,0.15); }

/* ---- Main ---- */
.admin-main {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: auto;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13,13,13,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-header h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.save-status {
  font-size: 0.82rem;
  font-weight: 700;
  transition: opacity 0.3s;
}

.save-status.success { color: #4ade80; }
.save-status.error   { color: #e05252; }

.admin-save-btn {
  padding: 10px 22px;
  font-size: 0.85rem;
  letter-spacing: 1px;
  cursor: pointer;
}

/* ---- Sections ---- */
.admin-section {
  display: none;
  padding: 2rem;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-section.active {
  display: flex;
}

/* ---- Cards ---- */
.admin-card {
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 2rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.admin-subcard {
  background: #111;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.admin-subcard:last-child { margin-bottom: 0; }

.admin-subcard h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #e8500a;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---- Champs ---- */
.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1rem;
}

.admin-field:last-child { margin-bottom: 0; }

.admin-field label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #aaa;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  background: #111;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 14px;
  color: #f5f5f5;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.admin-field input:focus,
.admin-field textarea:focus {
  border-color: #e8500a;
  box-shadow: 0 0 0 3px rgba(232,80,10,0.12);
}

.field-hint {
  font-size: 0.7rem;
  color: #888; /* était #555 — invisible sur fond sombre */
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* ---- Grilles ---- */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.2rem;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1rem;
}

/* ---- Upload médias ---- */
.media-upload-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.media-preview {
  width: 140px;
  min-width: 140px;
  height: 100px;
  background: #111;
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-placeholder {
  font-size: 0.75rem;
  color: #444;
  text-align: center;
  padding: 0.5rem;
}

.upload-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232,80,10,0.12);
  border: 1px solid rgba(232,80,10,0.3);
  color: #e8500a;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Montserrat', sans-serif;
}

.btn-upload:hover { background: rgba(232,80,10,0.2); }

.btn-remove-media {
  background: rgba(224,82,82,0.08);
  border: 1px solid rgba(224,82,82,0.2);
  color: #e05252;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Montserrat', sans-serif;
}

.btn-remove-media:hover { background: rgba(224,82,82,0.15); }

.upload-hint {
  font-size: 0.72rem;
  color: #555;
  line-height: 1.4;
}

/* ---- Aperçu vidéo ---- */
.video-preview-thumb {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 0.75rem;
  background: #111;
  border-radius: 8px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}

.video-preview-thumb img {
  width: 80px;
  height: 45px;
  object-fit: cover;
  border-radius: 4px;
}

.video-preview-thumb span {
  font-size: 0.78rem;
  color: #666;
}

/* ---- Danger zone ---- */
.btn-danger {
  background: rgba(224,82,82,0.1);
  border: 1px solid rgba(224,82,82,0.3);
  color: #e05252;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Montserrat', sans-serif;
}

.btn-danger:hover { background: rgba(224,82,82,0.2); }

/* ---- Info box ---- */
.info-box {
  background: rgba(232,80,10,0.06);
  border: 1px solid rgba(232,80,10,0.2);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.info-box strong { color: #e8500a; font-size: 0.9rem; display: block; margin-bottom: 0.75rem; }
.info-box p { color: #888; font-size: 0.85rem; line-height: 1.6; margin-bottom: 0.5rem; }
.info-box code { background: rgba(232,80,10,0.15); color: #e8500a; padding: 2px 6px; border-radius: 4px; font-size: 0.82rem; }

/* =============================================
   BOUTON ADMIN FLOTTANT (sur les pages du site)
   ============================================= */
.admin-floating-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(26,26,26,0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(232,80,10,0.3);
  color: #888;
  padding: 10px 16px;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.admin-floating-btn:hover {
  background: rgba(232,80,10,0.15);
  border-color: #e8500a;
  color: #e8500a;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(232,80,10,0.2);
}

.admin-floating-btn .lock-icon { font-size: 1rem; }

/* =============================================
   SECTION TÉMOIGNAGES — ÉDITEUR
   ============================================= */

.temo-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.btn-add-temo {
  background: #e8500a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.5px;
  transition: background 0.2s, transform 0.2s;
}

.btn-add-temo:hover {
  background: #c44008;
  transform: translateY(-1px);
}

.admin-hint {
  color: #777;
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.testimonials-editor {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-empty {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  padding: 2rem;
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 8px;
}

/* Carte individuelle dans l'éditeur */
.temo-card {
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 1.5rem;
  position: relative;
  transition: border-color 0.2s;
}

.temo-card:hover {
  border-color: rgba(232, 80, 10, 0.3);
}

.temo-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.temo-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: #e8500a;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.btn-delete-temo {
  background: rgba(224, 82, 82, 0.12);
  border: 1px solid rgba(224, 82, 82, 0.3);
  color: #e05252;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  transition: all 0.2s;
}

.btn-delete-temo:hover {
  background: rgba(224, 82, 82, 0.25);
}

/* Sélecteur d'étoiles */
.star-selector {
  display: flex;
  gap: 4px;
  align-items: center;
}

.star-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
  transition: color 0.15s, transform 0.15s;
  padding: 2px;
  line-height: 1;
}

.star-btn.active { color: #e8500a; }
.star-btn:hover  { color: #e8500a; transform: scale(1.2); }

/* Sélecteur d'avatar */
.avatar-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.avatar-btn {
  background: rgba(255,255,255,0.05);
  border: 2px solid transparent;
  border-radius: 8px;
  width: 38px; height: 38px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.avatar-btn:hover   { border-color: rgba(232,80,10,0.4); background: rgba(232,80,10,0.08); }
.avatar-btn.active  { border-color: #e8500a; background: rgba(232,80,10,0.15); }

/* Compteur de caractères */
.char-counter {
  text-align: right;
  font-size: 0.72rem;
  color: #666;
  margin-top: 4px;
}

.char-counter.warn { color: #e8a000; }
.char-counter.over { color: #e05252; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .admin-sidebar { width: 200px; min-width: 200px; }
  .admin-main { margin-left: 200px; }
  .form-grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
  .admin-section { padding: 1rem; }
  .media-upload-row { flex-direction: column; }
}

/* =============================================
   MESSAGES — Section boîte de réception
   ============================================= */

/* Badge rouge dans la nav */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e05252;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  margin-left: 6px;
  line-height: 1;
}
.nav-badge:empty { display: none; }

/* Barre de statistiques */
.msg-stats-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.msg-stat {
  flex: 1;
  min-width: 100px;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}
.msg-stat--new {
  border-color: rgba(224, 82, 82, 0.4);
  background: rgba(224, 82, 82, 0.08);
}
.msg-stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}
.msg-stat--new .msg-stat-num { color: #e05252; }
.msg-stat-lbl {
  font-size: 0.78rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Barre de filtres */
.msg-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}
.msg-filter {
  background: #1e1e1e;
  border: 1px solid #333;
  color: #aaa;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.msg-filter:hover { border-color: #666; color: #fff; }
.msg-filter.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.msg-refresh {
  margin-left: auto;
  background: transparent;
  border: 1px solid #333;
  color: #888;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.msg-refresh:hover { border-color: #666; color: #fff; }

/* Liste des messages */
.msg-list { display: flex; flex-direction: column; gap: 0.6rem; }
.msg-loading, .msg-error, .msg-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
  font-size: 0.9rem;
}
.msg-empty-icon { display: block; font-size: 3rem; margin-bottom: 0.75rem; }

/* Carte message */
.msg-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 1rem 1rem 1rem 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.msg-card:hover { border-color: #444; background: #242424; }
.msg-card--new {
  border-left: 4px solid #e05252;
  background: rgba(224, 82, 82, 0.04);
}
.msg-card-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}
.msg-card-body { flex: 1; min-width: 0; }
.msg-card-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.msg-name { color: #fff; font-size: 0.95rem; }
.msg-date {
  margin-left: auto;
  font-size: 0.78rem;
  color: #666;
  white-space: nowrap;
}
.msg-card-meta {
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 6px;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}
.msg-sujet { color: #aaa; }
.msg-email-link { color: var(--primary) !important; text-decoration: none; }
.msg-email-link:hover { text-decoration: underline; }
.msg-preview {
  font-size: 0.85rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.msg-open-btn {
  background: none;
  border: none;
  color: #555;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.25rem;
  transition: color 0.2s;
  align-self: center;
  flex-shrink: 0;
}
.msg-card:hover .msg-open-btn { color: #aaa; }

/* Badges de statut */
.msg-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge--new     { background: rgba(224,82,82,0.15);  color: #e05252; }
.badge--read    { background: rgba(100,100,200,0.15); color: #8888dd; }
.badge--replied { background: rgba(74,222,128,0.15);  color: #4ade80; }
.badge--archive { background: rgba(120,120,120,0.15); color: #888; }

/* Pagination */
.msg-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 0 0.5rem;
  color: #888;
  font-size: 0.85rem;
}

/* Backend hors-ligne */
.msg-offline {
  display: flex;
  justify-content: center;
  padding: 3rem 1rem;
}
.msg-offline-inner {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 14px;
  padding: 2.5rem 2rem;
  max-width: 480px;
  text-align: center;
}
.msg-offline-icon { display: block; font-size: 3rem; margin-bottom: 1rem; }
.msg-offline-inner h3 { color: #fff; margin-bottom: 0.5rem; }
.msg-offline-inner p  { color: #888; font-size: 0.9rem; margin-bottom: 1.5rem; line-height: 1.6; }
.msg-offline-code {
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-family: monospace;
  color: #4ade80;
  font-size: 0.85rem;
}

/* Modal détail message */
.msg-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.msg-modal-inner {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.msg-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #2a2a2a;
}
.msg-modal-header h3 { color: #fff; font-size: 1.05rem; margin: 0; }
.msg-modal-close {
  background: none;
  border: none;
  color: #888;
  font-size: 1.2rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.msg-modal-close:hover { background: #333; color: #fff; }
.msg-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}
.msg-detail-grid { margin-bottom: 1.5rem; }
.msg-detail-row {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #222;
  font-size: 0.9rem;
  align-items: baseline;
}
.msg-detail-lbl {
  width: 130px;
  flex-shrink: 0;
  color: #666;
  font-size: 0.8rem;
}
.msg-detail-row a { color: var(--primary); text-decoration: none; }
.msg-detail-row a:hover { text-decoration: underline; }
.msg-detail-message { background: #111; border-radius: 10px; padding: 1rem 1.25rem; }
.msg-detail-msg-lbl { color: #666; font-size: 0.8rem; margin-bottom: 0.5rem; }
.msg-detail-msg-body {
  color: #ddd;
  font-size: 0.92rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #2a2a2a;
}
.msg-modal-actions .btn-primary,
.msg-modal-actions .btn-outline,
.msg-modal-actions .btn-danger {
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  text-decoration: none;
}

/* Responsive messages */
@media (max-width: 600px) {
  .msg-stats-bar { gap: 0.5rem; }
  .msg-stat { min-width: 70px; padding: 0.75rem 0.5rem; }
  .msg-stat-num { font-size: 1.5rem; }
  .msg-card-avatar { width: 34px; height: 34px; font-size: 0.75rem; }
  .msg-date { display: none; }
  .msg-modal-actions { gap: 0.5rem; }
}
