/* DS Jarvis Assistant v3.7.0 — Adapté home DigiSense */
/* Même DNA : fond sombre, coins bleus, scan line, fadeUp, particules */

.dsj, .dsj * { box-sizing: border-box !important; float: none !important; }

/* Shell */
.dsj-shell { position: relative !important; z-index: 1 !important; background: transparent !important; }
.dsj-shell__backdrop { display: none !important; }

/* Animations identiques à la home */
@keyframes dsjFadeUp  { 0%{opacity:0;transform:translateY(30px);}100%{opacity:1;transform:translateY(0);} }
@keyframes dsjScan    { 0%{transform:translateY(0);opacity:0;} 15%{opacity:0.6;} 85%{opacity:0.3;} 100%{transform:translateY(700px);opacity:0;} }
@keyframes dsjPulse   { 0%,100%{transform:scale(0.8);opacity:0.5;} 50%{transform:scale(1.3);opacity:1;} }
@keyframes dsjPop     { from{transform:translateY(8px);opacity:0;} to{transform:translateY(0);opacity:1;} }
@keyframes dsjShimmer { 0%,100%{background-position:0% 50%;} 50%{background-position:100% 50%;} }

/* Conteneur principal — même style que .hero de la home */
.dsj {
  position: relative;
  max-width: 1100px;
  min-height: 620px;
  margin: 20px auto 0;
  color: #e8f0ff;
  border-radius: 24px;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.18);
  background: linear-gradient(160deg, rgba(8,22,52,0.92) 0%, rgba(4,12,28,0.96) 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 32px 80px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.08);
  animation: dsjFadeUp 0.7s 0.1s both;
}

/* Scan line — identique home */
.dsj:before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(58,160,255,0.55), transparent);
  animation: dsjScan 5s linear infinite;
  pointer-events: none;
  z-index: 10;
}

/* Coins déco — identiques home */
.dsj__frame {
  position: absolute; inset: 0;
  border-radius: 24px;
  pointer-events: none;
  z-index: 2;
  border: none;
  mask-image: none;
}
.dsj__frame:before, .dsj__frame:after {
  content: '';
  position: absolute;
  width: 56px; height: 56px;
  border: 1.5px solid rgba(58,160,255,0.5);
  opacity: 0.55;
}
.dsj__frame:before { top: 12px; left: 12px; border-right: none; border-bottom: none; border-top-left-radius: 10px; }
.dsj__frame:after  { bottom: 12px; right: 12px; border-left: none; border-top: none; border-bottom-right-radius: 10px; }

/* Glow */
.dsj__glow {
  position: absolute; inset: -60px;
  background:
    radial-gradient(circle at 20% 0%, rgba(58,160,255,0.16), transparent 45%),
    radial-gradient(circle at 80% 5%, rgba(100,180,255,0.10), transparent 45%);
  pointer-events: none;
  z-index: 0;
  filter: blur(8px);
}

/* Header */
.dsj__header {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.025);
  backdrop-filter: blur(10px);
}
.dsj__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dsj__logo  { height: 28px; width: auto; display: block; filter: drop-shadow(0 0 10px rgba(58,160,255,0.4)); }
.dsj__txt   { min-width: 0; }
.dsj__title { font-weight: 800; font-size: 15px; letter-spacing: 0.2px; color: #fff; line-height: 1.2; }
.dsj__sub   { font-size: 12px; color: rgba(200,220,255,0.6); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Status */
.dsj__sys    { display: flex; align-items: center; gap: 8px; }
.dsj__dot    { width: 8px; height: 8px; border-radius: 50%; background: #00e676; box-shadow: 0 0 0 4px rgba(0,230,118,0.12), 0 0 14px rgba(0,230,118,0.3); animation: dsjPulse 1.8s ease-in-out infinite; }
.dsj__sysTxt { font-size: 11px; letter-spacing: 0.1em; color: rgba(200,220,255,0.55); }
.dsj__reset  {
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.75); border-radius: 10px; padding: 7px 9px;
  cursor: pointer; transition: all 0.15s ease; font-size: 14px;
}
.dsj__reset:hover { background: rgba(255,255,255,0.1); transform: translateY(-1px); }

/* Main zone */
.dsj__main { position: relative; z-index: 3; padding: 16px 24px; }

/* Messages */
.dsj__messages {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 320px; max-height: 480px;
  overflow: auto; padding: 4px 2px 20px; scroll-behavior: smooth;
}
.dsj__messages::-webkit-scrollbar { width: 6px; }
.dsj__messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }
.dsj__messages::-webkit-scrollbar-track { background: transparent; }

.dsj__fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 36px;
  background: linear-gradient(to bottom, transparent, rgba(4,12,28,0.95));
  pointer-events: none;
}

/* Bulles */
.dsj-bubble {
  max-width: 78%; border-radius: 16px; padding: 11px 14px;
  line-height: 1.55; font-size: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  animation: dsjPop 0.2s ease-out;
}
.dsj-bubble--bot  { align-self: flex-start; background: rgba(58,120,255,0.1); border-color: rgba(58,160,255,0.2); color: rgba(220,235,255,0.95); }
.dsj-bubble--user { align-self: flex-end; background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); color: #fff; }
.dsj-meta { margin-top: 10px; font-size: 14px; line-height: 1.7; color: rgba(220,235,255,0.85); }

/* Quick buttons — même style que .btn-ghost de la home */
.dsj__quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.dsj__qbtn {
  border: 1.5px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: rgba(220,235,255,0.88);
  border-radius: 12px; padding: 9px 14px;
  cursor: pointer; font-size: 13px; font-family: inherit;
  transition: all 0.15s ease;
}
.dsj__qbtn:hover { background: rgba(255,255,255,0.11); border-color: rgba(255,255,255,0.28); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.25); }
.dsj__qbtn.is-primary {
  background: linear-gradient(135deg, #1a6cd4, #3aa0ff);
  border-color: rgba(100,180,255,0.4); color: #fff;
  box-shadow: 0 8px 24px rgba(58,160,255,0.3);
}
.dsj__qbtn.is-primary:hover { box-shadow: 0 12px 32px rgba(58,160,255,0.45); transform: translateY(-2px); }

/* Composer */
.dsj__composer {
  position: relative; z-index: 3;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 12px 20px 16px;
  background: rgba(255,255,255,0.015);
}

/* Input row */
.dsj__inputRow { display: flex; gap: 10px; align-items: stretch; }
.dsj__input {
  flex: 1; border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.95); color: #0b1224;
  padding: 13px 16px; font-size: 14px; font-family: inherit;
  outline: none; min-height: 50px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dsj__input::placeholder { color: rgba(11,18,36,0.4); }
.dsj__input:focus { border-color: #3aa0ff; box-shadow: 0 0 0 4px rgba(58,160,255,0.2); }

/* Bouton envoi — même style que .btn-primary de la home */
.dsj__send {
  border-radius: 14px;
  background: linear-gradient(135deg, #1a6cd4, #3aa0ff);
  border: 1.5px solid rgba(100,180,255,0.35);
  color: #fff; padding: 0 18px; min-width: 110px;
  font-weight: 700; font-size: 14px; font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(58,160,255,0.3);
  transition: all 0.15s ease;
}
.dsj__send:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(58,160,255,0.45); }
.dsj__send[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

/* File */
/* Zone pièce jointe — custom, sans input natif visible */
.dsj__fileRow {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(58,160,255,0.3);
  background: rgba(58,160,255,0.04);
}

/* Cacher l'input natif hors écran — ne doit PAS capturer de clics */
.dsj__fileRow input[type="file"] {
  position: fixed;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Bouton custom qui remplace le "Choisir un fichier" du système */
.dsj__filePick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(58,160,255,0.4);
  background: rgba(58,160,255,0.1);
  color: rgba(180,220,255,0.9);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.dsj__filePick:hover {
  background: rgba(58,160,255,0.2);
  border-color: rgba(58,160,255,0.7);
}
.dsj__filePick::before { content: '📎'; font-size: 14px; }

/* Nom du fichier sélectionné */
.dsj__fileName {
  flex: 1;
  font-size: 12px;
  color: rgba(180,220,255,0.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dsj__fileName.has-file {
  color: rgba(100,200,255,0.9);
  font-weight: 500;
}

/* Bouton × pour retirer le fichier */
.dsj__fileClear {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.5);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  transition: background .15s;
  flex-shrink: 0;
}
.dsj__fileClear:hover { background: rgba(255,80,80,0.15); color: #ff6b6b; border-color: rgba(255,80,80,0.3); }

.dsj__live { margin-top: 8px; font-size: 12px; color: rgba(200,220,255,0.5); line-height: 1.5; }
.dsj__hint { margin-top: 8px; font-size: 12px; color: rgba(200,220,255,0.5); }
.dsj__sr   { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ds-navbar { position: sticky !important; z-index: 9999 !important; }

@media (max-width: 720px) {
  .dsj__messages { min-height: 200px; max-height: 340px; }
  .dsj-bubble  { max-width: 90%; }
  .dsj__send   { min-width: 90px; }
  .dsj__sub    { display: none; }
  .dsj__main   { padding: 12px 14px; }
  .dsj__composer { padding: 10px 12px 14px; }
}

/* === Client ticket viewer (conversation) === */
.ds-client-ticket{max-width:980px;margin:28px auto 40px auto;padding:0 16px}
.ds-client-ticket__card{background:rgba(8,18,35,.72);border:1px solid rgba(255,255,255,.10);border-radius:22px;box-shadow:0 20px 70px rgba(0,0,0,.35);overflow:hidden}
.ds-client-ticket__head{padding:18px 20px;border-bottom:1px solid rgba(255,255,255,.08)}
.ds-client-ticket__title{font-size:20px;font-weight:800;color:rgba(255,255,255,.92)}
.ds-client-ticket__meta{margin-top:8px;display:flex;flex-wrap:wrap;gap:12px;font-size:13px;color:rgba(255,255,255,.72)}
.ds-client-ticket__timeline{padding:18px 20px;display:flex;flex-direction:column;gap:12px}
.ds-client-ticket__item{display:flex}
.ds-client-ticket__item--client{justify-content:flex-end}
.ds-client-ticket__item--admin{justify-content:flex-start}
.ds-client-ticket__bubble{max-width:740px;padding:14px 14px 10px 14px;border-radius:16px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.06);color:rgba(255,255,255,.90)}
.ds-client-ticket__item--admin .ds-client-ticket__bubble{background:rgba(0,160,255,.10);border-color:rgba(0,160,255,.25)}
.ds-client-ticket__who{font-size:12px;opacity:.85;margin-bottom:6px;font-weight:700}
.ds-client-ticket__msg{font-size:14px;line-height:1.55}
.ds-client-ticket__time{margin-top:8px;font-size:11px;opacity:.65;text-align:right}

/* === Ticket Viewer (client) === */
.ds-tv{max-width:980px;margin:24px auto 60px auto;padding:0 12px;position:relative;z-index:2}
.ds-tv__card{border:1px solid rgba(255,255,255,.10);background:rgba(8,18,34,.72);backdrop-filter:blur(14px);border-radius:22px;box-shadow:0 18px 60px rgba(0,0,0,.35);padding:18px}
.ds-tv__head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
.ds-tv__title{font-size:20px;font-weight:800;color:#fff}
.ds-tv__meta{display:flex;gap:8px;flex-wrap:wrap}
.ds-tv__pill{font-size:12px;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.10);color:rgba(255,255,255,.92);border:1px solid rgba(255,255,255,.10)}
.ds-tv__pill--muted{opacity:.85}
.ds-tv__timeline{display:flex;flex-direction:column;gap:12px;padding:10px 0 16px 0}
.ds-tv__msg{display:flex;flex-direction:column;gap:6px}
.ds-tv__msg--client{align-items:flex-end}
.ds-tv__msg--support{align-items:flex-start}
.ds-tv__bubble{max-width:78%;padding:12px 14px;border-radius:18px;border:1px solid rgba(255,255,255,.10);color:rgba(255,255,255,.92);background:rgba(255,255,255,.06)}
.ds-tv__msg--client .ds-tv__bubble{background:rgba(0,160,255,.16)}
.ds-tv__stamp{font-size:11px;opacity:.75;color:rgba(255,255,255,.78)}
.ds-tv__reply{margin-top:8px;padding-top:14px;border-top:1px solid rgba(255,255,255,.10)}
.ds-tv__replyTitle{font-size:14px;font-weight:800;color:#fff;margin-bottom:8px}
.ds-tv__textarea{width:100%;border-radius:16px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:#fff;padding:12px 12px;outline:none}
.ds-tv__textarea:focus{border-color:rgba(255,255,255,.22)}
.ds-tv__actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}
.ds-tv__btn{border-radius:14px;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.10);color:#fff;padding:10px 14px;font-weight:800;cursor:pointer}
.ds-tv__btn:hover{background:rgba(255,255,255,.14)}
.ds-tv__hint{font-size:12px;opacity:.85;color:rgba(255,255,255,.85)}
@media (max-width:680px){.ds-tv__bubble{max-width:92%}.ds-tv__head{flex-direction:column;align-items:flex-start}}


/* === Client Portal (Mes tickets) — UI alignée avec l'assistant === */
.ds-portal{
  max-width: 980px;
  margin: 28px auto 70px auto;
  padding: 0 18px;
  position: relative;
  z-index: 2;
}
.ds-portal__card{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(8,18,34,.72);
  backdrop-filter: blur(14px);
  border-radius: 22px;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  padding: 20px;
  overflow: hidden;
}
.ds-portal__title{
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin: 0;
}
.ds-portal__sub{
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.35;
  opacity: .86;
  color: rgba(255,255,255,.90);
}
.ds-portal__form{
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}
.ds-portal__label{
  grid-column: 1 / -1;
  font-size: 12px;
  opacity: .85;
  color: rgba(255,255,255,.86);
}
.ds-portal__input{
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 14px 14px;
  min-height: 52px;
  outline: none;
}
.ds-portal__input:focus{
  border-color: rgba(255,255,255,.22);
}
.ds-portal__btn{
  min-height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(180deg, rgba(0,140,255,.95), rgba(0,95,210,.92));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.ds-portal__btn:hover{
  filter: brightness(1.05);
}
.ds-portal__hint{
  grid-column: 1 / -1;
  font-size: 12px;
  opacity: .9;
  color: rgba(255,255,255,.86);
  margin-top: 4px;
}
.ds-portal__pill{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.10);
}
.ds-portal__list{
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ds-portal__item{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 14px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  text-decoration: none;
}
.ds-portal__item:hover{ background: rgba(255,255,255,.08); }
.ds-portal__itemTitle{ font-weight: 900; color:#fff; }
.ds-portal__itemMeta{ font-size: 12px; opacity:.75; color: rgba(255,255,255,.85); margin-top:2px; }
.ds-portal__status{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.10);
}
.ds-portal__empty{ margin-top: 14px; opacity:.85; color: rgba(255,255,255,.86); }
.ds-portal__small{ margin-top: 12px; font-size: 12px; opacity:.8; color: rgba(255,255,255,.84); }

@media (max-width: 720px){
  .ds-portal__form{ grid-template-columns: 1fr; }
  .ds-portal__btn{ width: 100%; }
}

/* ═══════════════════════════════════════════════════════
   AVATAR JARVIS — Colonne vidéo gauche
   ═══════════════════════════════════════════════════════ */

/* Layout deux colonnes sur le conteneur principal */
.dsj {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  max-width: 1100px !important;
}

/* Colonne avatar — gauche */
.dsj-avatar {
  position: relative;
  width: 340px;
  min-width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 0 20px;
  border-right: 1px solid rgba(58,160,255,0.15);
  background: linear-gradient(180deg, rgba(4,12,34,0.6) 0%, rgba(2,8,20,0.8) 100%);
  overflow: hidden;
}

/* Anneaux décoratifs qui tournent autour de la vidéo */
.dsj-avatar__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(58,160,255,0.18);
  pointer-events: none;
}
.dsj-avatar__ring--1 { width: 290px; height: 290px; animation: dsjAvatarSpin 12s linear infinite; }
.dsj-avatar__ring--2 { width: 310px; height: 310px; animation: dsjAvatarSpin 18s linear infinite reverse; border-color: rgba(99,102,241,0.12); }
.dsj-avatar__ring--3 { width: 270px; height: 270px; animation: dsjAvatarSpin 8s linear infinite; border-color: rgba(58,160,255,0.08); }

@keyframes dsjAvatarSpin { to { transform: rotate(360deg); } }

/* Vidéos — empilées, une seule visible */
.dsj-avatar__video {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.dsj-avatar__video.is-active {
  opacity: 1;
  position: relative; /* sort du flux pour que le conteneur ait une hauteur */
}

/* HUD sous l'avatar */
.dsj-avatar__hud {
  position: absolute;
  bottom: 20px;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: rgba(58,160,255,0.5);
  font-family: monospace;
}

.dsj-avatar__hud-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #34d399;
  animation: dsjPulse 1.5s ease-in-out infinite;
}

/* Colonne principale — prend le reste de la largeur */
.dsj > :not(.dsj-avatar):not(.dsj__frame):not(.dsj__glow) {
  flex: 1;
  min-width: 0;
}

/* Sur mobile, on empile verticalement */
@media (max-width: 680px) {
  .dsj { flex-direction: column !important; }
  .dsj-avatar {
    width: 100%;
    min-width: 0;
    height: 180px;
    border-right: none;
    border-bottom: 1px solid rgba(58,160,255,0.15);
    padding: 16px 0;
  }
  .dsj-avatar__video { width: 140px; height: 140px; }
  .dsj-avatar__ring--1 { width: 160px; height: 160px; }
  .dsj-avatar__ring--2 { width: 170px; height: 170px; }
  .dsj-avatar__ring--3 { width: 150px; height: 150px; }
}

/* ── Correction layout colonne droite — header en haut + main qui remplit ── */
.dsj > .dsj__header,
.dsj > .dsj__main {
  flex-shrink: 0;
}

/* Wrapper colonne droite implicite via ordre flex */
.dsj__header {
  width: 100%;
  order: 1;
}
.dsj__main {
  width: 100%;
  order: 2;
  flex: 1;
}
.dsj-avatar {
  order: 0;
  flex-direction: column;
  justify-content: center;
}

/* ── Colonne droite : contenu empilé verticalement ─────────── */
.dsj__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dsj__content .dsj__header {
  width: 100%;
  flex-shrink: 0;
}

.dsj__content .dsj__main {
  flex: 1;
  width: 100%;
}

@media (max-width: 680px) {
  .dsj__content { width: 100%; }
}

/* (fond vidéo supprimé — incompatible multi-écrans avec format 9:16) */

/* ═══════════════════════════════════════════════════════
   MODE CINEMA — [ds_jarvis_assistant style="cinema"]
   Fond plein écran, sans avatar cercle, conversation centrée
   ═══════════════════════════════════════════════════════ */

/* En mode cinéma, le fond vidéo est plus lumineux et plus présent */
.dsj--cinema .dsj-bg-video {
  filter: brightness(0.32) blur(0.5px);
}

/* L'avatar cercle disparaît complètement */
.dsj--cinema .dsj-avatar {
  display: none !important;
}

/* La colonne de contenu prend toute la largeur */
.dsj--cinema .dsj__content {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

/* Le conteneur principal passe en colonne centrée */
.dsj--cinema {
  flex-direction: column !important;
  align-items: center !important;
  min-height: 520px;
}

/* Header en mode cinéma — fond plus transparent pour laisser voir le perso */
.dsj--cinema .dsj__header {
  background: rgba(2,8,23,0.55) !important;
  backdrop-filter: blur(16px) !important;
}

/* Bulles de chat — fond légèrement plus opaque pour rester lisibles sur le fond */
.dsj--cinema .dsj-bubble--bot {
  background: rgba(8,22,52,0.75) !important;
  backdrop-filter: blur(8px);
}
.dsj--cinema .dsj-bubble--user {
  background: rgba(58,120,255,0.3) !important;
  backdrop-filter: blur(8px);
}

/* Zone de saisie — fond opaque pour la lisibilité */
.dsj--cinema .dsj__inputRow {
  background: rgba(4,12,28,0.6);
  border-radius: 12px;
  padding: 6px;
  backdrop-filter: blur(12px);
}

/* Messages — un peu plus hauts en mode cinéma car on a plus de place */
.dsj--cinema .dsj__messages {
  min-height: 260px;
  max-height: 340px;
}

/* ═══════════════════════════════════════════════════════
   Charlie IA — chatbot conversationnel
   ═══════════════════════════════════════════════════════ */

.dsj-avatar__hud--ia {
  font-size: 10px;
  letter-spacing: 1.2px;
  flex-wrap: wrap;
  row-gap: 4px;
  padding: 0 6px;
}

/* Indicateur de frappe — trois points qui pulsent */
.dsj-typing-ia {
  display: flex !important;
  align-items: center;
  gap: 5px;
  padding: 14px 18px !important;
}
.dsj-typing-ia span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(58,160,255,0.7);
  animation: dsjIaTyping 1.2s ease-in-out infinite;
}
.dsj-typing-ia span:nth-child(2) { animation-delay: 0.2s; }
.dsj-typing-ia span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dsjIaTyping {
  0%,60%,100% { transform: translateY(0); opacity: 0.3; }
  30%          { transform: translateY(-7px); opacity: 1; }
}

/* Confirmation ticket créé */
.dsj-ticket-created {
  margin: 12px 0;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(0,200,100,0.1);
  border: 1px solid rgba(0,200,100,0.3);
  color: rgba(100,255,160,0.95);
  font-size: 14px;
  line-height: 1.6;
  animation: dsjPop .35s both;
}
.dsj-ticket-created small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(100,255,160,0.6);
}

/* Textarea de saisie — légèrement plus haute que l'input texte */
.dsj--ia .dsj__input {
  min-height: 50px !important;
  max-height: 120px;
  overflow-y: auto;
  resize: none;
  line-height: 1.5;
  padding-top: 12px !important;
}

.dsj-charlie-filehint {
  font-size: 12px;
  color: rgba(160, 200, 255, 0.75);
  margin: -4px 0 10px;
}

/* Panneau confirmation ticket */
.dsj-charlie-confirm {
  margin: 10px 0 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(20, 45, 90, 0.45);
  border: 1px solid rgba(58, 160, 255, 0.35);
  animation: dsjPop 0.35s both;
}
.dsj-charlie-confirm__title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: #e8f0ff;
}
.dsj-charlie-confirm__body {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(220, 235, 255, 0.9);
  margin-bottom: 14px;
}
.dsj-charlie-confirm__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================
   ZONE PIÈCE JOINTE — Charlie dropzone
   ============================================================ */
.dsj__fileRow {
  margin-top: 10px;
}

/* Zone de drop — remplace l'ancien label sans style */
.dsj__dropzone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 2px dashed rgba(58,160,255,0.35);
  background: rgba(58,160,255,0.04);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  width: 100%;
  box-sizing: border-box;
}
.dsj__dropzone:hover,
.dsj__dropzone.is-dragover {
  border-color: rgba(58,160,255,0.75);
  background: rgba(58,160,255,0.10);
}
.dsj__dropzone input[type="file"] {
  position: fixed;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.dsj__dropzone-icon {
  font-size: 24px;
  flex-shrink: 0;
  line-height: 1;
}
.dsj__dropzone-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}
.dsj__dropzone-text strong {
  font-size: 13px;
  color: rgba(180,220,255,0.9);
  font-weight: 600;
}
.dsj__dropzone-text small {
  font-size: 11px;
  color: rgba(180,220,255,0.5);
}
.dsj__dropzone-types {
  color: rgba(180,220,255,0.35) !important;
}

/* Fichier sélectionné — remplace la dropzone */
.dsj__fileSelected {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(58,200,120,0.35);
  background: rgba(58,200,120,0.07);
}
.dsj__fileSelected-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.dsj__fileSelected-name {
  flex: 1;
  font-size: 13px;
  color: rgba(100,220,150,0.9);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
