/* ============================================================
   THÈME DÉFAUT TchatPassion • Version Moderne 2025
   Base blanche • Accents gradient • Touches colorées vivantes
   ============================================================ */

/* === PALETTE DE RÉFÉRENCE ===
   Primaire  : #03add8  (cyan signature)
   Accent 2  : #7c3aed  (violet profond)
   Accent 3  : #f43f5e  (rose vif)
   Succès    : #22c55e
   Warning   : #f97316
   Neutre BG : #f8fafc
   Neutre MID: #e2e8f0
   ========================== */

/* Sécurité globale anti-débordement horizontal sur mobile */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

body {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='%23ffffff' stroke='%23000000' stroke-width='1.5'><path d='M12 2a8 8 0 0 0-8 8v11l3-2 3 2 4-2 3 2V10a8 8 0 0 0-5-8z'/><circle cx='9' cy='9' r='1.5' fill='%23000000'/><circle cx='15' cy='9' r='1.5' fill='%23000000'/></svg>") 16 16, auto;
}

/* Mode normal (Clair) */
.crew_header .bcell {
    background-image: url("https://tchatpassion.com/css/themes/Halloween/images/1957393_c60fc.gif") !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
}

/* Mode sombre Halloween — Ultra-prioritaire */
html body.boom-night-mode #container_user #mpc_lists div.crew_header div.bcell {
    background-image: url("https://tchatpassion.com/css/themes/Halloween/images/bat-after-bat.gif") !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
}

/* Mode Clair — GIF adouci avec voile clair */
#container_show_chat {
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(255, 255, 255, 1)), url("https://tchatpassion.com/css/themes/Halloween/images/507ae9_6abedefe876b4d25985a773156b08598~mv2.gif") !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
}

/* Mode Sombre (boom-night-mode) — GIF assombri avec voile noir */
html body.boom-night-mode div#container_show_chat {
    background-image: linear-gradient(rgba(24, 24, 24, 0.95), rgba(24, 24, 24, 0.95)), url("https://tchatpassion.com/css/themes/Halloween/images/fuego.gif") !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
}

/* Mode Clair — Taille réduite et voile clair */
html body div#wrap_footer {
    background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)), url("https://tchatpassion.com/css/themes/Halloween/images/1624566896_183185_gif-url.gif") !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 150px auto !important; 
}

/* Mode Sombre (boom-night-mode) — Taille réduite et voile sombre */
html body.boom-night-mode div#wrap_footer {
    background-image: linear-gradient(rgba(24, 24, 24, 0), rgba(24, 24, 24, 0.7)), url("https://tchatpassion.com/css/themes/Halloween/images/1624566896_183185_gif-url.gif") !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 150px auto !important;
}

a { color: #03add8; transition: color 0.2s; }
a:hover { color: #7c3aed; }
body { background: #f0f4f8; }
button { background: transparent; color: #fff; }
input, textarea, .post_input_container {
  background: #ffffff;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus {
  border-color: #03add8 !important;
  box-shadow: 0 0 0 3px rgba(3, 173, 216, 0.12) !important;
  outline: none;
}
.setdef { color: #1e293b; }

/* item with background no effect */
.bback { background: rgba(15, 23, 42, 0.04); border-radius: 8px; }

/* item with background no effect with border */
.bbackb {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 8px;
}

/* item with no background and hover effect */
.bhover:hover, .bhoverr:hover {
  background: rgba(3, 173, 216, 0.06);
  border-radius: 6px;
  transition: background 0.18s;
}

/* item with background and hover effect */
.bbackhover { background: rgba(15, 23, 42, 0.04); border-radius: 8px; transition: background 0.18s; }
.bbackhover:hover { background: rgba(3, 173, 216, 0.07); }

/* item with background and hover effect with a border */
.bbackhoverb { background: rgba(15, 23, 42, 0.04); border-radius: 8px; transition: background 0.18s; }
.bbackhoverb:hover {
  background: rgba(3, 173, 216, 0.07);
  border: 1px solid rgba(3, 173, 216, 0.2);
}

/* item with no background with line separator and hover effect */
.blisting { border-bottom: 1px solid rgba(15, 23, 42, 0.06); transition: background 0.15s; }
.blisting:hover { background: rgba(3, 173, 216, 0.06); }

/* item with no background with line separator */
.blist { border-bottom: 1px solid rgba(15, 23, 42, 0.06); }

/* private panel top */
.back_ptop {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #fff;
}

/* page menu & page sub menu */
.bpmenu:hover { background: rgba(255, 255, 255, 0.12); border-radius: 6px; }
.bsub { background: rgba(0, 0, 0, 0.12); border-radius: 6px; }
.bsub:hover { background: rgba(0, 0, 0, 0.22); }

/* sub menus for card, logs, wall, news */
.bmenu, .submenu { border-bottom: 1px solid rgba(15, 23, 42, 0.06); }
.bmenu:hover, .submenu:hover { background: rgba(3, 173, 216, 0.06); }

/* box shadow — plus douce et moderne */
.bshadow, .page_element, .float_menu, .btnshadow, .pboxed {
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08), 0 4px 16px rgba(15, 23, 42, 0.06);
}

/* main item selected */
.bselected {
  background: linear-gradient(135deg, rgba(3, 173, 216, 0.12), rgba(124, 58, 237, 0.08));
  border-radius: 0px;
}

/* reg menu selected */
.rselected {
  background: rgba(3, 173, 216, 0.1);
  border-left: 3px solid #03add8;
  border-radius: 0 6px 6px 0;
}

/* page selected */
.pselected { color: #03add8; font-weight: 600; }

/* current item selected */
.cselected, .liked {
  background: linear-gradient(135deg, rgba(3, 173, 216, 0.08), rgba(124, 58, 237, 0.06));
  border-radius: 6px;
}

/* paginate */
.pag_btn {
  background: rgba(15, 23, 42, 0.05);
  color: #64748b;
  border-radius: 6px;
  transition: all 0.15s;
}
.pagselected, .pag_btn:hover {
  background: linear-gradient(135deg, #03add8, #7c3aed);
  color: #fff;
  box-shadow: 0 2px 8px rgba(3, 173, 216, 0.3);
}

/* count and gold tag */
.gtag {
  background: #fff;
  color: #000;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* border colors */
.bborder {border-bottom: 1px solid rgba(15, 23, 42, 0.07);}
.tborder  { border-top:    1px solid rgba(15, 23, 42, 0.07); }
.lborder, .ppanel {border-left:  1px solid rgba(15, 23, 42, 0.07);}
.rborder  { border-right:  1px solid rgba(15, 23, 42, 0.07); }
.fborder  { border:        1px solid rgba(15, 23, 42, 0.07); border-radius: 8px; }

/* float top color */
.float_top  { border-bottom: 1px solid rgba(15, 23, 42, 0.07); }
.float_ctop { border-bottom: 1px solid rgba(15, 23, 42, 0.07); }

/* === HEADERS, SIDEBAR, FOOTER === */
.bhead {
  background: #ffffff;
  color: #1e293b;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  height: 54px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.06);
}
.bsidebar {
  background: #ffffff;
  color: #334155;
  border-right: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 2px 0 12px rgba(15, 23, 42, 0.04);
}
.modal_top {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  border-radius: 12px 12px 0 0;
}
.pro_top {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #fff;
}
.bfoot {
  background: #fbfbfc;
  color: #1e293b;
  border-top: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 -5px 80px rgba(15, 23, 42, 0.05);
}
.foot {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: #e2e8f0;
}

.back_chat {
  background: #ffffff;
  position: relative !important;
  overflow: hidden !important; /* Prévient les débordements sur mobile */
}

.back_chat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0; /* Plus stable que inset: 0 pour certains mobiles */
  background-image: url('https://tchatpassion.com/css/themes/Halloween/images/bg.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.back_chat > * {
  position: relative;
  z-index: 1;
}

.back_priv  { background: #ffffff; }
.back_panel { background: #ffffff; }
.back_menu  { background: #fbfbfb; }
.back_pmenu {
  background: linear-gradient(160deg, #1e1b4b 0%, #312e81 60%, #1e293b 100%);
  color: #e2e8f0;
}
.back_box   { background: #ffffff; border-radius: 12px; }
.back_input {
  background: #ffffff;
  border-top: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 0 0 12px 12px;
}
.back_modal { background: #ffffff; border-radius: 20px; }
.page_element { background: #ffffff; border-radius: 12px; }
.back_quote {
  background: linear-gradient(135deg, rgba(3, 173, 216, 0.06), rgba(124, 58, 237, 0.04));
  border-left: 3px solid #03add8;
  border-radius: 0 8px 8px 0;
}

/* === COULEURS THÈME === */
.theme_color   { color: #03add8; }
.default_color { color: #6f6f6f; }
.error   { color: #f43f5e; }
.success { color: #22c55e; }
.warn    { color: #f97316; }

/* === BOUTONS === */
.theme_btn, .back_theme {
  background: linear-gradient(135deg, #03add8 0%, #0284c7 100%);
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(3, 173, 216, 0.3);
  transition: all 0.2s;
}
.theme_btn:hover, .back_theme:hover {
  box-shadow: 0 4px 16px rgba(3, 173, 216, 0.45);
  transform: translateY(-1px);
}
.default_btn, .back_default {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
  transition: all 0.2s;
}
.defaultd_btn {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  color: #fff;
  border-radius: 8px;
}
.ok_btn {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}
.ok_btn_keno {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}
.warn_btn {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}
.delete_btn {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.3);
}
.send_btn {
  color: #03add8;
  transition: color 0.15s;
}
.send_btn:hover { color: #7c3aed; }

/* default username color */
.user { color: #1e293b; font-weight: 500; }

/* chat system message */
.chat_system { color: #94a3b8; }

/* offline users */
.offline { opacity: 0.45; }

/* menu icons */
.menui { color: #4dabe9; }
.subi  { color: #4dabe9; }
.menui2 { color: #ffffff; }

/* wall reply background */
.reply_item {
  background: linear-gradient(135deg, #f8fafc 0%, #f0f4f8 100%);
  border-radius: 8px;
  border-left: 3px solid rgba(3, 173, 216, 0.3);
}

/* main post item option */
.main_post_item { color: rgba(30, 41, 59, 0.45); }

/* input option */
.input_item { color: #94a3b8; }

/* === BULLES MESSAGES PRIVÉS === */
.target_private, .hunt_quote {
  color: #fff;
  background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}
.hunter_private, .targ_quote {
  color: #334155;
  background: #f1f5f9;
  border-radius: 16px 16px 16px 4px;
  border: 1px solid rgba(15, 23, 42, 0.07);
}

/* quote in chat */
.cquote {
  background: linear-gradient(135deg, rgba(3, 173, 216, 0.08), rgba(124, 58, 237, 0.05));
  border-left: 3px solid #03add8;
  border-radius: 0 8px 8px 0;
}

/* === TAB MENU === */
.tab_menu {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08), 0 4px 16px rgba(15, 23, 42, 0.04);
  border-radius: 10px;
}
.tab_menu_item { transition: background 0.15s; }
.tab_selected {
  background: linear-gradient(135deg, rgba(3, 173, 216, 0.1), rgba(124, 58, 237, 0.08));
  border-radius: 8px;
  color: #03add8;
  font-weight: 600;
}

/* === MODAL MENU === */
.modal_mback   { background: rgba(15, 23, 42, 0.04); }
.modal_mborder { border-bottom: 1px solid rgba(15, 23, 42, 0.07); }
.modal_selected {
  background: linear-gradient(135deg, rgba(3, 173, 216, 0.1), rgba(124, 58, 237, 0.07));
  border-radius: 6px;
  font-weight: 600;
}

/* modal overlay */
.modal_back { background-color: rgba(15, 23, 42, 0.5); backdrop-filter: blur(4px); }

/* === CHAT LOGS === */
.mbubble {
  border-radius: 0px 9px 9px 5px !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .05) !important;
}
.my_log {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}
.topic_log {
    background: linear-gradient(135deg, #4dabe9, #eb5b85);
    color: #ffffff;
    border-radius: 8px;
    border-left: 3px solid #e9e9e9;
    width: 94%;
    max-width: 600px;
    margin: 12px auto; 
    padding: 12px 16px;
    box-sizing: border-box;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    animation: levitate 3s ease-in-out infinite;
}

@keyframes levitate {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: translateY(-5px);
        box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
    }
}
.sys_log { }

/* duotone logs */
ul li.ch_dlogs:nth-child(odd of .ch_logs) { background: rgba(15, 23, 42, 0.02); }

/* upload progress */
.bprogress {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border-radius: 4px;
}

/* === NOTIFICATIONS === */
.bnotify {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.4);
  animation: notif-pulse 2s infinite;
}
@keyframes notif-pulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(244, 63, 94, 0.4); }
  50%      { box-shadow: 0 2px 16px rgba(244, 63, 94, 0.65); }
}
.foot_notify, .head_notify {
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(244, 63, 94, 0.3);
}

/* date colors */
.sub_date { color: #94a3b8; font-size: 0.85em; }
.sub_chat, .sub_priv { color: rgba(149, 149, 149, 0.5); }

/* secondary text */
.sub_text, .list_mood { color: #94a3b8; }

/* profile likes */
.plikes {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.6), rgba(3, 173, 216, 0.5));
  color: #fff;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

/* spinner */
.bspin { color: rgba(3, 173, 216, 0.5); }

/* special chat items */
.my_notice {
  color: #fff;
  background: linear-gradient(135deg, #03add8, #0284c7);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(3, 173, 216, 0.3);
}
.system_text {
  background: linear-gradient(135deg, #f0f4f8, #e2e8f0);
  color: #64748b;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  font-style: italic;
}

/* outside pages background */
.back_page {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  color: #e2e8f0;
}

/* video background */
.post_video { background: #000; border-radius: 8px; }

/* === SLIDER === */
.boom_slider .ui-widget-content { background: #e2e8f0; border-radius: 4px; }
.boom_slider .ui-state-default  { background: #03add8 !important; border-radius: 50%; box-shadow: 0 1px 4px rgba(3,173,216,0.4); }
.boom_slider .ui-state-active   { background: #7c3aed !important; }
.boom_slider .ui-slider-range   { background: linear-gradient(90deg, #03add8, #7c3aed); border-radius: 4px; }

/* === SELECT INPUT === */
.selectboxit-list, .selectboxit-btn {
  background-color: #ffffff;
  color: #334155;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  transition: border-color 0.2s;
}
.selectboxit-list .selectboxit-focus .selectboxit-option-anchor {
  background-color: rgba(3, 173, 216, 0.08);
  color: #03add8;
}
.selectboxit-default-arrow { border-top: 4px solid #94a3b8; }
.selectboxit-btn.selectboxit-enabled:hover,
.selectboxit-btn.selectboxit-enabled:focus,
.selectboxit-btn.selectboxit-enabled:active {
  background: #f8fafc;
  color: #334155;
  border-color: #03add8 !important;
}
.selectboxit-options {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.selectboxit-list .selectboxit-option-anchor { color: #334155; }


/* ============================================================
   === RESPONSIVENESS (Mobiles & Tablettes) === 
   ============================================================ */
@media (max-width: 768px) {
    /* Ajustement du background dans la fenêtre de tchat */
    .back_chat::before {
        background-size: 85% auto !important;
        opacity: 0.06 !important;
        max-height: 100% !important;
    }

    /* Désactive les comportements d'image de fond qui causent des bugs sur iOS/Android */
    #container_show_chat, 
    body.boom-night-mode #container_show_chat {
        background-attachment: scroll !important;
        background-position: center top !important;
    }

    /* Adapte l'image du footer pour éviter qu'elle soit rognée */
    html body div#wrap_footer,
    html body.boom-night-mode div#wrap_footer {
        background-size: contain !important; 
    }
    
    /* Ajustement de la bulle d'animation pour qu'elle ne touche pas les bords sur petit écran */
    .topic_log {
        width: 90%;
        padding: 10px;
    }
}