@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --br-cyan: #8b5cf6;
  --br-purple: #ec4899;
  --br-text: #f4f4f5;
  --br-muted: #a1a1aa;
  --br-border: rgba(255,255,255,.08);
}

html {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100%;
  background-color: #09090b;
}

body {
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--br-text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: transparent !important;
  position: relative;
}

body::before {
  content: "" !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: -1 !important;
  background-image: url('/image.png') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  filter: blur(15px) !important;
  opacity: 0.18 !important;
  pointer-events: none !important;
}

/* ── Topbar / Header ── */
.topbar-wrapper {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 99999;
  background: #09090b;
}

.topbar {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  height: 70px;
  background: #09090b;
  border-bottom: 1px solid var(--br-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .02em;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}
.brand-text-img {
  height: 32px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  display: block;
}
.brand-accent, .brand span.brand-accent { color: var(--br-cyan); }

/* ── Nav links ── */
.br-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 1;
}
.nav-link {
  padding: 6px 14px;
  border-radius: 8px;
  color: var(--br-muted) !important;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--br-text) !important;
  background: rgba(255,255,255,.06);
}

.br-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Bouton blockradio.fr ── */
.btn-site-fr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 8px;
  color: #c4b5fd !important;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-site-fr:hover {
  background: rgba(139, 92, 246, 0.28);
  border-color: rgba(139, 92, 246, 0.65);
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.35);
  transform: translateY(-1px);
}

.btn-site-fr-icon {
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
}

.btn-site-fr-text {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn-site-fr-arrow {
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-site-fr:hover .btn-site-fr-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

.sub { color: var(--br-muted); margin-bottom: 2rem; font-size: .95rem; }

h1, h2 { color: var(--br-text); margin-bottom: 1rem; }

p { color: var(--br-muted); margin-bottom: 1.5rem; line-height: 1.6; }

/* ── Page Layout ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.page-main {
  flex: 1 0 auto;
  padding: 32px 24px 60px;
}

/* ── Footer ── */
.br-footer-simple {
  margin-top: auto;
  border-top: 1px solid var(--br-border);
  background: #09090b;
  padding: 24px 0;
  width: 100%;
}
.footer-simple-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-simple-content p {
  margin: 0;
  color: var(--br-muted);
  font-size: 0.85rem;
}
.footer-simple-links {
  display: flex;
  gap: 16px;
}
.footer-simple-links a {
  color: var(--br-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s;
}
.footer-simple-links a:hover {
  color: var(--br-cyan);
}

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

.card, .choice {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all .15s ease;
}
.card:hover, .choice:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}
.card h3, .choice h3 { color: var(--cyan); font-weight: 700; margin-bottom: .5rem; font-size: 1.05rem; }
.card p, .choice p { font-size: .88rem; color: var(--text-secondary); margin: 0; }

.choices { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.8rem 0; }
.choice { flex: 1 1 160px; text-align: center; }

.btn, button, .btn-primary-gradient {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--gradient-btn);
  color: #fff !important;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  font-family: inherit;
}
.btn:hover, button:hover, .btn-primary-gradient:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: #fff !important;
}

.discord-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #5865F2;
  color: #fff;
  padding: 10px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.25);
}
.discord-login:hover {
  opacity: .95;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.35);
}

.google-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  color: #1f2937;
  padding: 10px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.google-login:hover {
  opacity: .95;
  background: #f8fafc;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}


.userbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 12px 4px 6px;
  border-radius: 30px;
}
.userbar .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--br-cyan, #06b6d4);
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.userbar .username {
  color: var(--br-text, #fff);
  font-weight: 600;
  font-size: .85rem;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.userbar .logout {
  color: var(--br-muted, #94a3b8);
  font-size: .78rem;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  transition: all .15s ease;
  white-space: nowrap;
}
.userbar .logout:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.25);
}

/* ── Navbar Mes Tickets Link ── */
.nav-my-tickets {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #c4b5fd !important;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  transition: all .15s ease;
  white-space: nowrap;
}

.nav-my-tickets:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.6);
  color: #fff !important;
  transform: translateY(-1px);
}

.badge-nav-unread {
  background: #22c55e;
  color: #000;
  font-weight: 800;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.2;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.85; }
}

/* ══════════════════════════════════════════
   ESPACE CLIENT — MES TICKETS
══════════════════════════════════════════ */
.mes-tickets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.tickets-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ticket-card {
  background: rgba(24, 24, 27, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px 24px;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.ticket-card:hover {
  background: rgba(24, 24, 27, 0.95);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.ticket-card.ticket-has-reply {
  border-color: rgba(34, 197, 94, 0.4);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(24, 24, 27, 0.8) 100%);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.08);
}

.ticket-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.ticket-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.ticket-card-id {
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.ticket-badge-cat {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.ticket-badge-sub {
  font-size: 0.8rem;
  color: var(--br-muted, #a1a1aa);
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 8px;
  border-radius: 6px;
}

.ticket-card-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-staff-reply {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseGlow 1.5s infinite;
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-pill.status-open {
  background: rgba(6, 182, 212, 0.12);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.status-pill.status-closed {
  background: rgba(255, 255, 255, 0.05);
  color: #71717a;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ticket-card-body {
  margin-bottom: 14px;
}

.ticket-card-preview {
  margin: 0;
  font-size: 0.92rem;
  color: #d4d4d8;
  line-height: 1.5;
}

.ticket-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ticket-date {
  font-size: 0.78rem;
  color: var(--br-muted, #a1a1aa);
}

.ticket-open-btn {
  padding: 7px 18px !important;
  font-size: 0.82rem !important;
  border-radius: 8px !important;
  gap: 6px !important;
}

.tickets-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: rgba(24, 24, 27, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  margin: 20px 0;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.breadcrumb {
  color: var(--text-secondary); margin-bottom: 1.2rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em;
}
.breadcrumb a { color: var(--cyan); text-decoration: none; }

label:not(.poste-card):not(.upload-label), .dm-label {
  display: block; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-secondary); margin: 1.2rem 0 .5rem;
}

input, select, textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  padding: 12px 14px;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
  box-sizing: border-box;
}
input:focus, select:focus, textarea:focus { border-color: rgba(139,92,246,.5); }

textarea { resize: vertical; min-height: 100px; }

.ticket { text-align: center; padding: 2rem 1rem; }
.ticket .num {
  font-size: 2.5rem; font-weight: 900; color: var(--cyan); letter-spacing: 4px; margin: 1rem 0;
}

.tabs { display: flex; gap: 6px; margin-bottom: 1.5rem; }
.tab {
  padding: 6px 20px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary); font-size: .82rem; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: all .2s;
}
.tab.active, .tab:hover { border-color: var(--cyan); color: var(--cyan); }

.suggestion {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 10px; display: flex;
  justify-content: space-between; align-items: center; gap: 1rem;
}
.suggestion:hover { border-color: rgba(139,92,246,.25); }
.suggestion p { color: var(--text-primary); margin: 0; }
.suggestion small { color: var(--text-muted); }
.vote-form button {
  margin-top: 0; background: transparent; color: var(--cyan); border: 1px solid var(--border);
  border-radius: 8px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: pointer; transition: all .2s;
}
.vote-form button:hover { background: rgba(139,92,246,.08); border-color: var(--cyan); }

/* ── Upload & Attachments ── */
.upload-zone {
  margin: 1.5rem 0;
  padding: 16px;
  background: rgba(139,92,246,.06);
  border: 1px dashed rgba(139,92,246,.3);
  border-radius: 10px;
}
.upload-label {
  cursor: pointer;
  display: block;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-weight: normal !important;
  margin: 0 !important;
}
.upload-label small { color: var(--text-muted); font-size: .78rem; }

.attachments {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.attachment {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 300px;
}
.attachment img {
  max-width: 280px;
  max-height: 200px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
}
.attachment video {
  max-width: 320px;
  max-height: 240px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.attachment audio { width: 100%; max-width: 300px; }
.attachment small { color: var(--text-muted); font-size: .72rem; word-break: break-all; }

/* ── Recrutement : sélection de poste ── */
.recruit-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.recruit-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.recruit-icon svg { width: 28px; height: 28px; }

.poste-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: .8rem 0 1.8rem;
}

.poste-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all .15s ease;
  position: relative;
  margin: 0 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-weight: normal !important;
  color: inherit !important;
}
.poste-card:hover:not([data-closed="true"]) {
  border-color: rgba(139,92,246,.35);
  background: var(--bg-card-hover);
}

.poste-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.poste-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.poste-icon svg { width: 24px; height: 24px; }

.poste-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-transform: none !important;
  letter-spacing: normal !important;
}
.poste-info strong {
  color: var(--text-primary);
  font-size: .95rem;
  font-weight: 700;
  text-transform: none !important;
  letter-spacing: normal !important;
}
.poste-info small {
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1.4;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.badge-ferme {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(239,68,68,.15);
  color: #ef4444;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 6px;
  vertical-align: middle;
}

.poste-radio {
  width: 22px; height: 22px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}
.poste-radio span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: all .15s;
}
.poste-card input[type="radio"]:checked ~ .poste-radio {
  border-color: var(--cyan);
}
.poste-card input[type="radio"]:checked ~ .poste-radio span {
  background: var(--cyan);
}
.poste-card input[type="radio"]:checked + .poste-icon,
.poste-card input[type="radio"]:checked ~ .poste-icon {
  box-shadow: 0 0 0 2px #fff4;
}

.poste-card[data-closed="true"] {
  opacity: .55;
  cursor: not-allowed;
}
.poste-lock {
  flex-shrink: 0;
  color: var(--text-muted);
}
.poste-lock svg { width: 20px; height: 20px; }

/* Bordure colorée quand sélectionné */
.poste-card:has(input[type="radio"]:checked) {
  border-color: var(--cyan);
  background: rgba(139,92,246,.08);
}

/* ── Captcha ── */
.captcha-wrap {
  margin: 1.5rem 0;
  padding: 16px;
  background: rgba(139,92,246,.06);
  border: 1px solid rgba(139,92,246,.2);
  border-radius: 10px;
}
.captcha-wrap label {
  margin: 0 0 .5rem;
  color: var(--cyan);
  font-size: .85rem;
}

/* ══════════════════════════════════════════
   RESPONSIVE — TABLETTE & MOBILE
══════════════════════════════════════════ */

/* ── Tablette (≤ 768px) ── */
@media (max-width: 768px) {
  body {
    font-size: 14px !important;
    overflow-x: hidden !important;
  }

  .topbar {
    height: 60px !important;
    padding: 0 14px !important;
    flex-wrap: nowrap !important;
  }
  .brand { font-size: 1.1rem !important; white-space: nowrap; }
  .brand-logo { width: 26px; height: 26px; flex-shrink: 0; }
  .brand-text-img { height: 24px !important; max-width: 130px !important; }

  .br-nav-links { display: none !important; }

  .br-nav-actions { flex-shrink: 0; }
  .userbar { gap: .4rem !important; }
  .userbar .username { display: none !important; }
  .userbar .avatar { width: 30px; height: 30px; flex-shrink: 0; }
  .userbar .logout { font-size: .75rem !important; }

  .discord-login, .google-login { padding: 8px 12px; font-size: .78rem; }
  .btn-site-fr { padding: 5px 9px !important; font-size: .75rem !important; gap: 4px !important; }
  .nav-my-tickets { padding: 4px 8px !important; font-size: .74rem !important; }
  .mes-tickets-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .mes-tickets-header .btn { width: 100%; justify-content: center; }
  .ticket-card { padding: 16px !important; }
  .ticket-card-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .ticket-open-btn { width: 100%; justify-content: center; }

  .container { padding: 0 14px !important; max-width: 100% !important; }
  .page-main { padding: 20px 14px 40px !important; }

  .grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .choices {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .choice { flex: 1 1 auto !important; width: 100%; }

  h1 { font-size: 1.3rem !important; }
  h2 { font-size: 1.15rem !important; }
  p { font-size: .85rem !important; margin-bottom: 1rem !important; }

  .card, .choice { padding: 16px !important; }
  .card h3, .choice h3 { font-size: .95rem !important; }

  .breadcrumb { font-size: .7rem !important; word-break: break-all; }

  .ticket { padding: 1.5rem .5rem !important; }
  .ticket .num { font-size: 1.6rem !important; letter-spacing: 2px; }

  .suggestion {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 14px !important;
  }
  .vote-form button { align-self: flex-end; }

  .tabs { flex-wrap: wrap; gap: 4px !important; }
  .tab { padding: 5px 12px; font-size: .76rem; }

  input, select, textarea {
    padding: 10px 12px !important;
    font-size: 16px !important;
    width: 100% !important;
  }
  .btn, button, .btn-primary-gradient {
    padding: 10px 16px !important;
    font-size: .82rem !important;
    width: 100% !important;
    justify-content: center !important;
  }

  /* Upload & attachments */
  .upload-zone { padding: 12px !important; }
  .attachment { max-width: 100% !important; }
  .attachment img { max-width: 100% !important; max-height: 180px; }
  .attachment video { max-width: 100% !important; max-height: 200px; }
  .attachment audio { width: 100% !important; }

  /* Captcha */
  .captcha-wrap { padding: 12px !important; margin: 1rem 0 !important; }

  /* Footer */
  .footer-simple-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {
  .topbar {
    height: 56px !important;
    padding: 0 10px !important;
  }
  .brand { font-size: .95rem !important; letter-spacing: .02em; }
  .brand-logo { width: 22px; height: 22px; }
  .brand-text-img { height: 20px !important; max-width: 110px !important; }

  .container { padding: 0 10px !important; }
  .page-main { padding: 16px 10px 32px !important; }

  h1 { font-size: 1.15rem !important; }
  h2 { font-size: 1rem !important; }

  .card, .choice { padding: 14px !important; }

  .ticket .num { font-size: 1.3rem !important; }

  .userbar .logout { font-size: .7rem !important; }
  .discord-login, .google-login { padding: 6px 10px; font-size: .72rem; }
  .btn-site-fr { padding: 4px 8px !important; font-size: .7rem !important; }
  .nav-my-tickets { padding: 3px 6px !important; font-size: .68rem !important; }
  .ticket-card { padding: 12px 14px !important; }
  .ticket-card-meta { gap: 6px !important; }
  .ticket-badge-cat { font-size: 0.7rem !important; padding: 2px 7px !important; }
  .badge-staff-reply { font-size: 0.68rem !important; padding: 3px 7px !important; }
  .status-pill { font-size: 0.68rem !important; padding: 3px 7px !important; }
  .ticket-card-preview { font-size: 0.85rem !important; }
}

/* ══════════════════════════════════════════════════════════════
   CHAT MESSAGES, LEFT/RIGHT BUBBLES & RICH MEDIA EMBEDS
   ══════════════════════════════════════════════════════════════ */

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 2rem;
  width: 100%;
}

.chat-row {
  display: flex;
  width: 100%;
}

.chat-row-user {
  justify-content: flex-start;
}

.chat-row-admin {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 82%;
  width: fit-content;
  min-width: 280px;
  padding: 14px 18px;
  border-radius: 16px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-bubble-user {
  background: rgba(20, 20, 28, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top-left-radius: 4px;
}

.chat-bubble-admin {
  background: linear-gradient(135deg, rgba(32, 18, 54, 0.96) 0%, rgba(18, 18, 30, 0.96) 100%);
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-top-right-radius: 4px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.12);
}

.chat-bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.chat-author-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-role-badge {
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
}

.chat-client-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #d4d4d8;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.chat-author-name {
  font-size: 0.85rem;
  color: #f4f4f5;
  font-weight: 600;
}

.chat-author-admin {
  color: #a78bfa;
}

.chat-time {
  font-size: 0.74rem;
  color: var(--br-muted, #a1a1aa);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .chat-bubble {
    max-width: 96% !important;
    min-width: 0 !important;
    padding: 12px 14px !important;
  }
}

.chat-msg-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.chat-msg-text {
  margin: 0;
  color: var(--br-text);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  font-size: 0.94rem;
}

/* ── Liens cliquables inline ── */
.chat-link {
  color: #a78bfa;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: all 0.2s ease;
  word-break: break-all;
}

.chat-link:hover {
  color: #c084fc;
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(167, 139, 250, 0.4);
}

/* ── Container des Embeds ── */
.message-embeds {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  width: 100%;
}

/* ── Carte d'Embed générique ── */
.chat-embed {
  background: rgba(15, 15, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  overflow: hidden;
  max-width: 540px;
  width: 100%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.chat-embed:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 16px rgba(139, 92, 246, 0.12);
}

/* ── Barre supérieure de l'embed ── */
.chat-embed-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  gap: 8px;
}

.chat-embed-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #e4e4e7;
  letter-spacing: 0.01em;
}

.chat-embed-action {
  color: var(--br-cyan, #06b6d4);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.76rem;
  transition: opacity 0.2s, color 0.2s;
  white-space: nowrap;
}

.chat-embed-action:hover {
  text-decoration: underline;
  color: #a5f3fc;
}

/* ── Image Embed ── */
.chat-embed-img-wrap {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 380px;
}

.chat-embed-img {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: contain;
  display: block;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1);
}

.chat-embed-img-wrap:hover .chat-embed-img {
  transform: scale(1.015);
}

.chat-embed-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.chat-embed-img-overlay span {
  background: rgba(14, 14, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.chat-embed-img-wrap:hover .chat-embed-img-overlay {
  opacity: 1;
}

/* ── YouTube Video Embed (Ratio 16:9) ── */
.chat-embed-iframe-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  background: #000;
}

.chat-embed-iframe-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Carte OpenGraph / Rich Embed Complète (Discord style) ── */
.chat-embed-og-card {
  display: flex;
  position: relative;
  border-radius: 12px;
  background: rgba(18, 18, 28, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  max-width: 520px;
  width: 100%;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.chat-embed-og-card:hover {
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.15);
  transform: translateY(-2px);
}

.og-card-accent {
  width: 4px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #8b5cf6, #06b6d4);
  transition: background 0.3s;
}

.og-card-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px 14px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.og-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: #a1a1aa;
  font-weight: 500;
}

.og-card-favicon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: contain;
  flex-shrink: 0;
}

.og-card-provider {
  color: #d4d4d8;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.og-card-external-arrow {
  margin-left: auto;
  color: var(--br-muted);
  font-size: 0.85rem;
  transition: transform 0.2s, color 0.2s;
  flex-shrink: 0;
}

.chat-embed-og-card:hover .og-card-external-arrow {
  color: var(--br-cyan);
  transform: translate(2px, -2px);
}

.og-card-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #a78bfa;
  line-height: 1.35;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s;
}

.chat-embed-og-card:hover .og-card-title {
  color: #c084fc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.og-card-description {
  font-size: 0.82rem;
  color: #a1a1aa;
  line-height: 1.45;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.og-card-image-wrap {
  margin-top: 6px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  max-height: 240px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.og-card-image {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.chat-embed-og-card:hover .og-card-image {
  transform: scale(1.02);
}

/* ══════════════════════════════════════════════════════════════
   IMAGE LIGHTBOX MODAL
   ══════════════════════════════════════════════════════════════ */

.image-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeInLightbox 0.2s ease-out;
}

@keyframes fadeInLightbox {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}

.image-lightbox-container {
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: rgba(15, 15, 22, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(139, 92, 246, 0.15);
}

.image-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.image-lightbox-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
}

.image-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-lightbox-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #f4f4f5;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-lightbox-action:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
  color: #fff;
}

.btn-lightbox-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: all 0.2s;
}

.btn-lightbox-close:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #fff;
}

.image-lightbox-body {
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #000;
}

.image-lightbox-body img {
  max-width: 88vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

