/* Tokens partagés — tous les modals InterFilm secours */
:root {
  --ff-head: var(--font-display), Georgia, serif;
  --ff-body: var(--font);
  --modal-overlay: rgba(6, 6, 14, 0.78);
  --modal-panel-bg: linear-gradient(165deg, rgba(20, 20, 32, 0.97) 0%, rgba(10, 10, 18, 0.99) 100%);
  --modal-border: rgba(155, 140, 248, 0.2);
  --modal-shadow: 0 28px 72px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 64px rgba(155, 140, 248, 0.1);
}

/* ─── Modal Mes tickets (masquée tant qu’elle n’est pas ouverte) ─── */
body.metiquer-modal-open { overflow: hidden; }

.metiquer-modal {
  position: fixed;
  inset: 0;
  z-index: 100000030;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.metiquer-modal.open {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

.metiquer-box {
  width: min(560px, calc(100vw - 2rem));
  max-height: min(84vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(155, 140, 248, 0.22);
  background: rgba(8, 8, 12, 0.92);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.75);
}

.metiquer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.metiquer-kicker {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(155, 140, 248, 0.85);
  margin-bottom: 4px;
}

.metiquer-head-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.metiquer-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
}

.metiquer-body {
  padding: 16px 22px;
  overflow: auto;
}

.metiquer-section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 10px;
}

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

.my-ticket-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
}

.my-ticket-card:hover {
  border-color: rgba(155, 140, 248, 0.35);
}

.my-ticket-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.my-ticket-card-id {
  font-size: 11px;
  font-weight: 800;
  color: rgba(155, 140, 248, 0.9);
}

.my-ticket-card-subject {
  flex: 1;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-ticket-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.metiquer-loading {
  padding: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

.metiquer-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 24px 12px;
  color: rgba(255, 255, 255, 0.55);
}

.metiquer-foot {
  padding: 14px 22px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.metiquer-btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.metiquer-btn--primary {
  background: linear-gradient(135deg, #9b8cf8, #7c6cf0);
  color: #fff;
}

/* ─── Modal contact / légal ─── */
body.contact-modal-open { overflow: hidden; }

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 100000060;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.legal-modal.open { display: flex; }

.legal-box {
  width: min(640px, calc(100vw - 2rem));
  max-height: min(90vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(155, 140, 248, 0.22);
  background: linear-gradient(165deg, rgba(20, 20, 32, 0.97) 0%, rgba(10, 10, 18, 0.99) 100%);
  box-shadow: var(--modal-shadow);
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.legal-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(155, 140, 248, 0.15);
  flex-shrink: 0;
}

.legal-title-main {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.legal-title-sub {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

.legal-body {
  padding: 18px 20px;
  overflow-y: auto;
}

.legal-lead {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.5;
  margin: 0 0 16px;
}

.legal-section { margin-bottom: 16px; }

.legal-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 8px;
}

.legal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-callout {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.45;
}

.legal-callout-warning {
  background: rgba(247, 127, 0, 0.1);
  border: 1px solid rgba(247, 127, 0, 0.25);
  color: rgba(255, 255, 255, 0.82);
}

.legal-callout-info {
  background: rgba(155, 140, 248, 0.08);
  border: 1px solid rgba(155, 140, 248, 0.2);
  color: rgba(255, 255, 255, 0.75);
}

.contact-char-count {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
  margin-top: 6px;
  text-align: right;
}

.legal-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.legal-list li {
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.65;
  padding: 8px 0 8px 18px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.legal-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.legal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9b8cf8;
}

ol.legal-list li {
  padding-left: 28px;
}

ol.legal-list {
  counter-reset: legal;
}

ol.legal-list li::before {
  counter-increment: legal;
  content: counter(legal);
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(155, 140, 248, 0.18);
  border: 1px solid rgba(155, 140, 248, 0.35);
  color: #9b8cf8;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 10px;
}

.legal-callout-accent {
  background: rgba(155, 140, 248, 0.08);
  border: 1px solid rgba(155, 140, 248, 0.22);
}

.legal-callout-accent strong {
  color: #b8a8ff;
}

.legal-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.legal-contact-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.legal-contact-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(155, 140, 248, 0.12);
  border: 1px solid rgba(155, 140, 248, 0.22);
}

.legal-contact-icon--discord {
  background: rgba(88, 101, 242, 0.15);
  border-color: rgba(88, 101, 242, 0.28);
}

.legal-contact-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.legal-contact-info strong {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.legal-contact-info span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.45;
}

.legal-contact-link {
  font-size: 12px;
  color: #b8a8ff;
  font-weight: 600;
  margin-top: 4px;
  text-decoration: none;
}

.legal-contact-link:hover {
  color: #d4c8ff;
  text-decoration: underline;
}

.legal-footer .btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.legal-footer .btn-primary {
  background: linear-gradient(135deg, #9b8cf8, #7c6cf0);
  color: #fff;
}

.legal-footer .btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 640px) {
  .legal-contact-grid {
    grid-template-columns: 1fr;
  }
}
