/* =========================================================
   CHM3 DASHBOARD - STYLE.CSS
   Version restructurée et commentée
   ========================================================= */

/* =========================================================
   01. VARIABLES GLOBALES
   ========================================================= */

:root {
  --bg-main: #111827;
  --bg-sidebar: #020617;
  --bg-card: #1f2937;
  --bg-card-soft: #1f2a3a;
  --bg-input: #2b3748;
  --bg-input-dark: #1f2937;

  --border-soft: #334155;
  --border-input: #3b4a5f;

  --text-main: #f9fafb;
  --text-soft: #d1d5db;
  --text-muted: #94a3b8;

  --orange: #f97316;
  --orange-dark: #ea580c;
  --orange-gradient: linear-gradient(90deg, #ff7a00, #ff4d00);

  --blue: #2563eb;
  --green: #16a34a;
  --red: #ef4444;

  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-card: 0 20px 40px rgba(0, 0, 0, .25);
  --shadow-modal: 0 30px 90px rgba(0, 0, 0, .55);
}

/* =========================================================
   02. RESET / BASE
   ========================================================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  font-family: Arial, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
}

input,
textarea,
select,
button {
  font-family: inherit;
}

button {
  cursor: pointer;
  font-weight: 800;
}

.hidden {
  display: none !important;
}

.muted {
  opacity: .6;
}

/* =========================================================
   03. LAYOUT GLOBAL
   ========================================================= */

.sidebar {
  width: 240px;
  background: var(--bg-sidebar);
  padding: 24px;
  border-right: 1px solid #1f2937;
}

.sidebar h1 {
  margin: 0 0 32px;
  color: var(--orange);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar a {
  color: var(--text-soft);
  text-decoration: none;
  padding: 12px;
  border-radius: 10px;
}

.sidebar a:hover {
  background: #1f2937;
}

.main {
  flex: 1;
  padding: 24px;
}

/* =========================================================
   04. CARTES / HEADERS
   ========================================================= */

.card,
.event-form-card,
.events-list-card,
.announce-preview-card {
  background: var(--bg-card-soft);
  border-radius: 18px;
  padding: 26px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
}

.card {
  background: var(--bg-card);
  padding: 20px;
  margin-bottom: 20px;
}

/* =========================================================
   05. FORMULAIRES
   ========================================================= */

.event-form label {
  display: block;
  margin: 14px 0 8px;
  font-weight: 700;
}

.event-form input,
.event-form textarea,
.event-form select,
input {
  width: 100%;
  background: var(--bg-input);
  color: white;
  border: 1px solid var(--border-input);
  border-radius: 10px;
  padding: 13px;
  font-size: 15px;
}

.event-form textarea {
  min-height: 120px;
  resize: vertical;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-line input {
  width: auto;
}

.create-btn {
  margin-top: 24px;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 10px;
  background: var(--orange-gradient);
  color: white;
  font-size: 17px;
  font-weight: 800;
}

/* =========================================================
   06. LOGIN
   ========================================================= */

.login-main {
  margin-left: 0;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  max-width: 420px;
  text-align: center;
}

/* =========================================================
   07. ÉVÉNEMENTS
   ========================================================= */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.upload-zone {
  height: 285px;
  border: 2px dashed #4b5c72;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #182334;
  text-align: center;
}

.upload-icon {
  font-size: 44px;
  margin-bottom: 12px;
}

.preview-img {
  width: 100%;
  height: 285px;
  object-fit: cover;
  border-radius: 12px;
}

.events-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 20px;
}

.event-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card-soft);
  border-radius: 14px;
  padding: 18px;
  transition: .2s;
}

/* Dans la colonne d'aperçu (embeds créés), la carte doit remplir la colonne
   sans déborder ni imposer sa largeur de 420px. */
.announce-preview-card .event-card {
  max-width: 100%;
}

.announce-preview-card .event-card .event-content {
  padding: 0;
}

/* Les mots très longs (IDs, URLs) ne doivent jamais casser la mise en page. */
.event-card h3,
.event-card p {
  overflow-wrap: anywhere;
}

.event-card:hover {
  transform: translateY(-4px);
}

.event-banner {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
}

.event-content {
  padding: 18px;
}

.event-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.compose-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border: none;
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 700;
}

.edit-btn {
  background: #ff7a00;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
}

.delete-btn {
  background: #ff4d4d;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
}

/* =========================================================
   08. COMPOSITION
   ========================================================= */

.composition-actions {
  margin: 20px 0;
  display: flex;
  gap: 12px;
}

#saveComposition {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  border: none;
  padding: 11px 18px;
  border-radius: 12px;
}

.composition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.composition-card {
  background: rgba(15, 23, 42, .95);
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.composition-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 18px;
  color: #e5e7eb;
}

.slot {
  position: relative;
  background: rgba(30, 41, 59, .95);
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 12px;
  padding: 12px 42px 12px 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: .15s ease;
}

.slot:hover {
  transform: translateY(-1px);
  border-color: #3b82f6;
  background: rgba(37, 99, 235, .18);
}

.slot span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.slot strong {
  color: #f8fafc;
  font-size: 15px;
}

.remove-slot {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: #dc2626;
  color: white;
  border: none;
  border-radius: 999px;
  width: 24px;
  height: 24px;
  font-weight: 900;
}

.role-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 6px;
}

/* =========================================================
   09. MODAL JOUEURS
   ========================================================= */

.player-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.player-modal.hidden {
  display: none !important;
}

.player-modal-box {
  width: 420px;
  max-width: 90vw;
  background: #111827;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}

#playerSearch {
  width: 100%;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .25);
  background: #1f2937;
  color: white;
}

.players-list {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-choice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1f2937;
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 12px;
  padding: 12px;
}

.player-choice:hover {
  border-color: #3b82f6;
  background: #243449;
}

.player-choice.used {
  opacity: .45;
  cursor: not-allowed;
}

.player-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-info {
  display: flex;
  flex-direction: column;
}

.wanted-role {
  color: #9da5b4;
  font-size: 12px;
  margin-top: 4px;
}

#closePlayerModal {
  margin-top: 14px;
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  border: none;
  background: #374151;
  color: white;
}

/* =========================================================
   10. INSCRITS
   ========================================================= */

.registered-card {
  background: #101827;
  border: 1px solid #253653;
  border-radius: 14px;
  padding: 18px;
  margin: 18px 0;
}

.registered-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.registered-box {
  background: var(--bg-card-soft);
  border-radius: 12px;
  padding: 12px;
  min-width: 210px;
}

.registered-player {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #26364d;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 6px;
}

.registered-player small {
  opacity: .7;
  margin-left: auto;
}

/* =========================================================
   11. ORGANIGRAMME
   ========================================================= */

.org-card {
  border-radius: 18px;
  padding: 34px 30px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.org-level {
  display: flex;
  justify-content: center;
  width: 100%;
}

.org-line {
  width: 2px;
  height: 34px;
  background: linear-gradient(180deg, var(--modern-orange), transparent);
  margin: 4px auto;
}

.org-branches {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  margin-top: 8px;
  width: 100%;
}

.org-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  max-width: 360px;
}

.org-box {
  position: relative;
  background: rgba(15, 23, 42, .72);
  border: 1px solid var(--modern-border);
  color: white;
  padding: 16px 18px;
  border-radius: 16px;
  text-align: left;
  width: 320px;
  max-width: 100%;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
}

.org-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
}

.org-box-title {
  font-weight: 900;
  font-size: 15px;
}

.org-count {
  min-width: 26px;
  height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  font-size: 13px;
  font-weight: 900;
}

/* Accents de couleur par niveau (barre gauche + halo). */
.org-box.admin { border-color: rgba(251, 146, 60, .5); }
.org-box.admin .org-count { background: linear-gradient(135deg, #ff7a18, #ffb347); color: #3a1d00; }

.org-box.staff { border-color: rgba(148, 163, 184, .4); }

.org-box.responsable { border-color: rgba(59, 130, 246, .5); }
.org-box.responsable .org-count { background: rgba(59, 130, 246, .35); }

.org-box.members { border-color: rgba(148, 163, 184, .2); }

.org-box.recrues { border-color: rgba(34, 197, 94, .4); }
.org-box.recrues .org-count { background: rgba(34, 197, 94, .3); }

.org-members-list {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.org-member {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(148, 163, 184, .12);
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  max-width: 100%;
}

.org-member img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.org-member span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}

.org-empty {
  font-size: 12px;
  color: var(--modern-muted);
  padding: 6px 2px;
}

@media (max-width: 820px) {
  .org-branches {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  .org-column { max-width: 100%; align-items: center; }
}

/* =========================================================
   12. PAGE ANNONCES
   ========================================================= */

.announce-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
}

.discord-preview {
  background: #313338;
  border-radius: 14px;
  padding: 18px;
}

.discord-embed {
  background: #2b2d31;
  border-left: 5px solid var(--orange);
  border-radius: 6px;
  padding: 14px;
  color: #dbdee1;
  max-width: 100%;
}

.preview-author {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: white;
}

.preview-title {
  color: #00a8fc;
  font-weight: 800;
  margin-bottom: 8px;
}

.preview-description {
  white-space: pre-wrap;
  line-height: 1.45;
  margin-bottom: 12px;
}

.preview-image {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 8px;
  margin: 12px 0;
}

.preview-footer {
  font-size: 12px;
  color: #b5bac1;
  margin-top: 10px;
}

/* =========================================================
   13. PINGS EN CHIPS
   ========================================================= */

.ping-box {
  background: #111827;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 14px;
}

.roles-ping-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 180px;
  overflow-y: auto;
}

.ping-chip {
  display: inline-flex !important;
  width: auto !important;
  margin: 0 !important;
  cursor: pointer;
}

.ping-chip input {
  display: none !important;
}

.ping-chip span {
  display: inline-flex;
  align-items: center;
  background: #334155;
  color: #e5e7eb;
  border: 1px solid #475569;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 700;
}

.ping-chip input:checked + span {
  background: linear-gradient(135deg, #ff7a00, #ff3d00);
  border-color: #ffb86b;
  color: white;
  box-shadow: 0 0 0 2px rgba(255, 122, 0, .25);
}

/* =========================================================
   14. BARRE ÉDITEUR DESCRIPTION
   ========================================================= */

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.editor-toolbar button {
  background: #293548;
  border: 1px solid #3f5069;
  color: white;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
}

.editor-toolbar button:hover {
  background: #ff7a00;
}
/* =========================================================
   15. Application
   ========================================================= */
#applicationConfig {
  display: none;
  margin-top: 16px;
  padding: 16px;
  background: #111827;
  border: 1px solid #f97316;
  border-radius: 10px;
}
#addApplicationSection {
  margin-top: 12px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}
/* =========================================================
   16. PICKER MODERNE SALONS / RÔLES
   IMPORTANT : .picker-overlay.hidden doit cacher la popup.
   ========================================================= */

.picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.picker-overlay.hidden {
  display: none !important;
}

.modern-picker {
  width: 620px;
  max-width: 92vw;
  background: #111827;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

.picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #263244;
}

.picker-header h3 {
  margin: 0;
  color: white;
}

.picker-header button {
  background: #1f2937;
  color: white;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  width: 36px;
  height: 36px;
}

.picker-search {
  margin: 16px 20px;
  width: calc(100% - 40px);
  padding: 13px 15px;
  border-radius: 12px;
  background: #1f2937;
  border: 1px solid var(--border-input);
  color: white;
}

.picker-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 18px 24px;
  max-height: 360px;
  overflow-y: auto;
  min-height: 120px;
}

.picker-empty {
  color: var(--text-muted);
  padding: 20px;
  text-align: center;
  grid-column: 1 / -1;
}

.picker-card {
  position: relative;
  display: block !important;
  min-height: 72px;
  background: #1f2937;
  border: 1px solid var(--border-soft);
  color: white;
  border-radius: 14px;
  padding: 12px;
  text-align: left;
  transition: .15s;
}

.picker-card:hover {
  transform: translateY(-1px);
  border-color: var(--orange);
}

.picker-card.selected {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  border-color: #fdba74;
}

.picker-icon {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
  font-weight: 900;
}

.picker-name {
  font-weight: 800;
  font-size: 13px;
}

.picker-check {
  display: none;
  position: absolute;
  top: 8px;
  right: 10px;
  font-weight: 900;
}

.picker-card.selected .picker-check {
  display: block;
}

.picker-footer {
  border-top: 1px solid #263244;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #cbd5e1;
}

.picker-footer button {
  background: #263244;
  color: white;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 800;
}

#pickerInsert {
  background: var(--orange);
  border-color: #fb923c;
}

/* =========================================================
   17. RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
  .announce-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .composition-grid,
  .picker-grid {
    grid-template-columns: 1fr;
  }

  .org-branches {
    flex-direction: column;
    gap: 24px;
  }
}

/* =========================================================
   MODERN CHM3 DASHBOARD UI - 2026
   ========================================================= */
:root {
  --modern-bg: #070b14;
  --modern-bg-2: #0b1220;
  --modern-sidebar: rgba(4, 9, 18, .96);
  --modern-card: rgba(20, 29, 48, .82);
  --modern-card-2: rgba(15, 23, 42, .92);
  --modern-border: rgba(148, 163, 184, .16);
  --modern-text: #f8fafc;
  --modern-muted: #a7b0c2;
  --modern-blue: #3b82f6;
  --modern-purple: #a855f7;
  --modern-orange: #fb923c;
  --modern-green: #22c55e;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, .14), transparent 36rem),
    radial-gradient(circle at 70% 20%, rgba(249, 115, 22, .10), transparent 30rem),
    linear-gradient(135deg, #05070d 0%, #0a1020 48%, #090b12 100%);
  color: var(--modern-text);
}

.sidebar {
  width: 280px;
  min-height: 100vh;
  padding: 22px;
  background: linear-gradient(180deg, rgba(2, 6, 15, .98), rgba(5, 10, 22, .94));
  border-right: 1px solid var(--modern-border);
  box-shadow: 24px 0 70px rgba(0, 0, 0, .35);
  position: sticky;
  top: 0;
}

.brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 14px 8px 28px;
  border-bottom: 1px solid var(--modern-border);
  margin-bottom: 26px;
}

.brand-logo {
  width: 170px;
  height: 170px;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .55));
}

.status-line {
  color: #d7dee9;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.status-dot {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 999px;
  background: var(--modern-green);
  box-shadow: 0 0 0 5px rgba(34, 197, 94, .13), 0 0 24px rgba(34, 197, 94, .8);
}

.sidebar-nav, .sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  color: #d4d9e6;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid transparent;
  transition: .18s ease;
}

.sidebar a span {
  width: 24px;
  text-align: center;
  opacity: .95;
}

.sidebar a:hover,
.sidebar a.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(79, 70, 229, .88), rgba(59, 130, 246, .34));
  border-color: rgba(129, 140, 248, .36);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 14px 30px rgba(30, 64, 175, .20);
  transform: translateX(3px);
}

.logout-btn {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 24px;
  min-height: 50px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, .55);
  background: rgba(127, 29, 29, .10);
  color: #fecaca;
  font-size: 15px;
  font-weight: 900;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, .18);
}

.main {
  min-width: 0;
  flex: 1;
  padding: 0;
}

#app {
  padding: 34px 28px 48px;
}

.card,
.event-form-card,
.events-list-card,
.announce-preview-card,
.announcement-card,
.embed-card,
.org-card {
  background: linear-gradient(145deg, rgba(26, 36, 58, .88), rgba(14, 21, 36, .88));
  border: 1px solid var(--modern-border);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.05);
}

/* En-tête de page : simple titre, sans grosse carte/bannière (le titre est déjà
   affiché dans la barre du haut). */
.page-header {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 20px;
}

.page-header h2 {
  margin: 0 0 4px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.page-header p {
  margin: 0;
  color: var(--modern-muted);
  font-weight: 700;
}

/* formulaires/pages existantes : moderne sans casser les IDs JS */
input, textarea, select,
.event-form input,
.event-form textarea,
.event-form select,
.edit-event-form input,
.edit-event-form textarea,
.edit-event-form select {
  background: rgba(5, 10, 22, .72) !important;
  border: 1px solid rgba(148, 163, 184, .18) !important;
  color: white !important;
  border-radius: 11px !important;
}

button,
.create-btn,
.compose-btn,
.edit-btn,
.save-edit-btn,
.send-announcement-btn,
.send-embed-btn {
  border-radius: 11px;
}

@media (max-width: 760px) {
  body { display: block; }
  .sidebar { width: 100%; min-height: auto; position: relative; }
  .logout-btn { position: static; width: 100%; margin-top: 20px; }
  .brand-logo { width: 120px; height: 120px; }
  #app { padding: 20px 14px; }
}

/* =========================================================
   18. SÉLECTEUR D'EMOJIS
   ========================================================= */

.emoji-toolbar-btn {
  background: #293548;
  border: 1px solid #3f5069;
  color: white;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
}

.emoji-toolbar-btn:hover {
  background: var(--orange);
}

.emoji-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-overlay.hidden {
  display: none !important;
}

.emoji-modal {
  width: 460px;
  max-width: 94vw;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border: 1px solid var(--modern-border);
  border-radius: 18px;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

.emoji-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #1f2a3a;
}

.emoji-header h3 {
  margin: 0;
  font-size: 16px;
}

.emoji-close {
  background: #1f2937;
  color: white;
  border: 1px solid var(--modern-border);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  font-size: 18px;
}

.emoji-search {
  margin: 14px 18px 8px;
  width: calc(100% - 36px);
}

.emoji-grid-wrap {
  overflow-y: auto;
  padding: 4px 18px 18px;
}

.emoji-section {
  margin-top: 12px;
}

.emoji-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.emoji-section-head h4 {
  margin: 0;
}

.emoji-section h4 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--modern-muted);
}

.emoji-clear-recent {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--modern-border);
  color: var(--modern-muted);
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
}

.emoji-clear-recent:hover {
  background: rgba(239, 68, 68, .2);
  color: #fecaca;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 6px;
}

.emoji-item {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .03);
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: .12s;
}

.emoji-item img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.emoji-item:hover {
  background: rgba(59, 130, 246, .22);
  border-color: #3b82f6;
  transform: translateY(-1px);
}

.emoji-server-item img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.emoji-empty {
  color: var(--modern-muted);
  text-align: center;
  padding: 24px 0;
}

/* =========================================================
   19. LISTE COMPACTE DES EMBEDS CRÉÉS
   ========================================================= */

.embed-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, .6);
  border: 1px solid var(--modern-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.embed-list-item .embed-list-info {
  min-width: 0;
  flex: 1;
}

.embed-list-item .embed-list-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.embed-list-item .embed-list-info small {
  color: var(--modern-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.embed-list-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.embed-list-actions button {
  border: none;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 13px;
}

/* =========================================================
   20. MODAL "MODIFIER L'ÉVÉNEMENT"
   ========================================================= */

.edit-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}

.edit-modal-box {
  width: 860px;
  max-width: 100%;
  background: linear-gradient(145deg, rgba(26, 36, 58, .96), rgba(14, 21, 36, .96));
  border: 1px solid var(--modern-border);
  border-radius: 20px;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  margin: auto;
}

.edit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px;
  border-bottom: 1px solid var(--modern-border);
}

.edit-modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.edit-modal-header button {
  background: #1f2937;
  color: white;
  border: 1px solid var(--modern-border);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  font-size: 20px;
}

.edit-event-form {
  padding: 24px 26px;
}

.edit-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.edit-event-form label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
  color: var(--text-soft);
}

.edit-event-form textarea {
  min-height: 140px;
  resize: vertical;
}

.event-date-info {
  background: rgba(15, 23, 42, .6);
  border: 1px solid var(--modern-border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
}

.event-date-info h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.event-date-info p {
  margin: 4px 0;
  font-size: 13px;
  color: var(--modern-muted);
}

.event-date-info p strong {
  color: var(--text-soft);
}

.unlock-series-btn {
  margin-top: 12px;
  background: #293548;
  border: 1px solid #3f5069;
  color: white;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
}

.unlock-series-btn:hover {
  background: var(--orange);
}

.edit-image-preview {
  height: 200px;
  border: 2px dashed #4b5c72;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #182334;
  overflow: hidden;
  margin-bottom: 6px;
}

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

.edit-image-preview span {
  color: var(--modern-muted);
}

.edit-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--modern-border);
}

.cancel-edit-btn {
  background: #374151;
  color: white;
  border: none;
  border-radius: 11px;
  padding: 12px 20px;
}

.save-edit-btn {
  background: var(--orange-gradient);
  color: white;
  border: none;
  border-radius: 11px;
  padding: 12px 24px;
  font-size: 15px;
}

@media (max-width: 760px) {
  .edit-form-grid {
    grid-template-columns: 1fr;
  }
}

@import url("./pages/tickets.css");
