/* ═══════════════════════════════════════════════════
   InterFilm — Création de ticket (esthétique)
   Scoped to #contactModal
   ═══════════════════════════════════════════════════ */

#contactModal.ctk-modal {
  --ctk-violet: #9b8cf8;
  --ctk-violet-bright: #b4a8ff;
  --ctk-blue: #4c8dff;
  --ctk-gold: #e8c547;
  --ctk-ink: #07070f;
  padding: max(12px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
}

#contactModal .ctk-shell {
  position: relative;
  width: min(720px, calc(100vw - 1.5rem));
  max-height: min(92vh, 900px);
  border-radius: 24px;
  border: 1px solid rgba(155, 140, 248, 0.28);
  background:
    linear-gradient(165deg, rgba(18, 18, 32, 0.98) 0%, rgba(8, 8, 16, 0.99) 100%);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 80px rgba(155, 140, 248, 0.12);
  overflow: hidden;
  animation: ctkIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ctkIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#contactModal .ctk-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

#contactModal .ctk-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}

#contactModal .ctk-glow--a {
  width: 280px;
  height: 280px;
  top: -80px;
  right: -40px;
  background: radial-gradient(circle, rgba(155, 140, 248, 0.45), transparent 70%);
}

#contactModal .ctk-glow--b {
  width: 220px;
  height: 220px;
  bottom: 10%;
  left: -60px;
  background: radial-gradient(circle, rgba(76, 141, 255, 0.28), transparent 70%);
}

#contactModal .ctk-head,
#contactModal .ctk-body,
#contactModal .ctk-foot {
  position: relative;
  z-index: 1;
}

#contactModal .ctk-head {
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(155, 140, 248, 0.08), transparent);
}

#contactModal .ctk-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ctk-violet-bright);
  margin-bottom: 4px;
}

#contactModal .ctk-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(155, 140, 248, 0.35), rgba(76, 141, 255, 0.2));
  border: 1px solid rgba(155, 140, 248, 0.35);
  color: #fff;
}

#contactModal .ctk-head .legal-title-main {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

#contactModal .ctk-close {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

#contactModal .ctk-close:hover {
  background: rgba(155, 140, 248, 0.15);
  border-color: rgba(155, 140, 248, 0.4);
  color: #fff;
}

#contactModal .ctk-body {
  padding: 20px 24px 8px;
}

#contactModal .ctk-lead {
  margin: 0 0 20px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(240, 240, 248, 0.62);
}

#contactModal .ctk-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(180, 168, 255, 0.85);
}

#contactModal .ctk-label em {
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(240, 240, 248, 0.35);
}

#contactModal .ctk-section {
  margin-bottom: 20px;
}

/* Categories */
#contactModal .ctk-cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#contactModal .ctk-cat.support-cat-card {
  position: relative;
  padding: 14px 14px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

#contactModal .ctk-cat:hover {
  border-color: rgba(155, 140, 248, 0.4);
  background: rgba(155, 140, 248, 0.08);
  transform: translateY(-1px);
}

#contactModal .ctk-cat.active {
  border-color: rgba(155, 140, 248, 0.65);
  background: linear-gradient(145deg, rgba(155, 140, 248, 0.2), rgba(76, 141, 255, 0.1));
  box-shadow: 0 8px 24px rgba(107, 92, 231, 0.2), 0 0 0 1px rgba(232, 197, 71, 0.2) inset;
}

#contactModal .ctk-cat strong {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #fff;
  margin-bottom: 3px;
}

#contactModal .ctk-cat span {
  font-size: 0.72rem;
  color: rgba(240, 240, 248, 0.42);
  line-height: 1.35;
}

#contactModal .ctk-cat.active strong {
  color: var(--ctk-violet-bright);
}

/* Inputs */
#contactModal .ctk-input,
#contactModal .ctk-textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  padding: 14px 16px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

#contactModal .ctk-textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.55;
}

#contactModal .ctk-input:focus,
#contactModal .ctk-textarea:focus {
  border-color: rgba(155, 140, 248, 0.55);
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 0 3px rgba(155, 140, 248, 0.15);
}

#contactModal .ctk-count {
  margin-top: 8px;
  text-align: right;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(240, 240, 248, 0.35);
}

/* Upload */
#contactModal .ctk-upload {
  display: block;
  border: 1px dashed rgba(155, 140, 248, 0.35);
  border-radius: 16px;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  background: rgba(155, 140, 248, 0.04);
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 0;
}

#contactModal .ctk-upload:hover {
  border-color: rgba(155, 140, 248, 0.55);
  background: rgba(155, 140, 248, 0.08);
}

#contactModal .ctk-upload.has-file {
  border-style: solid;
  border-color: rgba(155, 140, 248, 0.45);
}

#contactModal .ctk-upload-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ctk-violet), var(--ctk-blue));
  color: #0a0a14;
  font-size: 1.4rem;
  font-weight: 700;
}

#contactModal .ctk-upload-remove {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(240, 240, 248, 0.7);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

#contactModal .ctk-upload-remove:hover {
  color: #fff;
  border-color: rgba(255, 120, 140, 0.4);
}

#contactModal .ctk-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(155, 140, 248, 0.22);
  background: rgba(155, 140, 248, 0.08);
  margin-bottom: 12px;
}

#contactModal .ctk-info strong {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ctk-gold);
}

#contactModal .ctk-info span {
  font-size: 0.85rem;
  color: rgba(240, 240, 248, 0.58);
  line-height: 1.45;
}

/* Gate login */
#contactModal .ctk-gate-card {
  text-align: center;
  padding: 28px 18px;
  border-radius: 18px;
  border: 1px solid rgba(155, 140, 248, 0.25);
  background: rgba(155, 140, 248, 0.06);
}

#contactModal .ctk-gate-card strong {
  display: block;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 10px;
}

#contactModal .ctk-gate-card p {
  margin: 0 0 20px;
  color: rgba(240, 240, 248, 0.58);
  font-size: 0.92rem;
  line-height: 1.5;
}

#contactModal .ctk-discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #5865f2, #4752c4);
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(88, 101, 242, 0.35);
  transition: transform 0.2s, filter 0.2s;
}

#contactModal .ctk-discord-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* Footer */
#contactModal .ctk-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
}

#contactModal .ctk-btn-ghost {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(240, 240, 248, 0.7);
  font-weight: 700;
}

#contactModal .ctk-btn-ghost:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

#contactModal .ctk-btn-send {
  min-height: 46px;
  padding: 0 22px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ctk-violet) 0%, var(--ctk-blue) 55%, var(--ctk-violet-bright) 100%);
  color: #0a0a14;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 10px 28px rgba(155, 140, 248, 0.35);
  transition: transform 0.2s, filter 0.2s;
}

#contactModal .ctk-btn-send:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

@media (max-width: 720px) {
  #contactModal .ctk-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #contactModal .ctk-shell {
    width: 100%;
    max-height: min(96vh, 100dvh);
    border-radius: 20px;
  }

  #contactModal .ctk-head,
  #contactModal .ctk-body,
  #contactModal .ctk-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  #contactModal .ctk-foot {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  #contactModal .ctk-btn-ghost,
  #contactModal .ctk-btn-send {
    width: 100%;
  }
}

@media (max-width: 420px) {
  #contactModal .ctk-cats {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  #contactModal .ctk-shell {
    animation: none;
  }
}
