/* HIALA IPTV — styles propres au site (en complément de styles.css / Tailwind) */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

.spinner { border-top-color: transparent !important; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Bouton WhatsApp flottant */
.wa-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #25D366; box-shadow: 0 8px 24px rgba(37,211,102,.45);
  transition: transform .2s ease; animation: waPulse 2.2s infinite;
}
.wa-fab:hover { transform: scale(1.08); }
@keyframes waPulse {
  0% { box-shadow: 0 8px 24px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.5); }
  70% { box-shadow: 0 8px 24px rgba(37,211,102,.45), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 8px 24px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,0); }
}
@media (max-width: 640px) { .wa-fab { width: 52px; height: 52px; right: 14px; bottom: 14px; } }

/* Réseaux sociaux (pied de page) */
.social-row { display: flex; flex-wrap: wrap; gap: 10px; }
.social-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #cbd5e1; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.social-btn:hover, .social-btn:focus-visible { transform: translateY(-2px); color: #fff; }
.social-facebook:hover  { background: #1877F2; }
.social-instagram:hover { background: linear-gradient(45deg,#F58529,#DD2A7B,#8134AF,#515BD4); }
.social-tiktok:hover    { background: #000; box-shadow: -2px -2px 0 #25F4EE, 2px 2px 0 #FE2C55; }
.social-youtube:hover   { background: #FF0000; }
.social-x:hover         { background: #000; }
.social-telegram:hover  { background: #26A5E4; }
.social-whatsapp:hover  { background: #25D366; }
.social-snapchat:hover  { background: #FFFC00; color: #000; }

/* Tuile de chaîne cliquable (aperçu) */
.channel-tile { cursor: pointer; position: relative; }
.channel-tile .play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(2,6,23,.55); opacity: 0; transition: opacity .15s ease; border-radius: 6px;
}
.channel-tile:hover .play-badge, .channel-tile:focus-visible .play-badge { opacity: 1; }

/* Lecteur (aperçu + lecteur web) */
.player-shell { position: relative; background: #000; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; }
.player-shell video { width: 100%; height: 100%; display: block; background: #000; }
.player-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 20px; gap: 10px; background: rgba(2,6,23,.82); backdrop-filter: blur(6px);
}
.player-overlay[hidden] { display: none; }
.preview-countdown {
  position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #fff; background: rgba(249,115,22,.9);
}
.preview-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: #f97316; width: 0; transition: width .25s linear; }
.blurred video { filter: blur(14px) brightness(.6); transform: scale(1.04); }

/* Grilles du lecteur web */
.scroll-thin { scrollbar-width: thin; scrollbar-color: #334155 transparent; }
.scroll-thin::-webkit-scrollbar { width: 6px; height: 6px; }
.scroll-thin::-webkit-scrollbar-thumb { background: #334155; border-radius: 6px; }
.item-active { border-color: #f97316 !important; background: rgba(249,115,22,.08) !important; }
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- Pages légales (mentions, CGV, remboursement, confidentialité, activation) ---- */
.legal h2 { font-size: 1.25rem; font-weight: 700; color: #fff; margin: 2rem 0 .6rem; }
.legal p, .legal li { color: #cbd5e1; line-height: 1.7; font-size: .95rem; }
.legal p { margin: 0 0 .9rem; }
.legal ul, .legal ol { margin: 0 0 1rem 1.25rem; }
.legal ul { list-style: disc; }
.legal ol { list-style: decimal; }
.legal li { margin: .25rem 0; }
.legal a { color: #fb923c; text-decoration: underline; text-underline-offset: 3px; }
.legal strong { color: #fff; }
/* Information d'entreprise non encore renseignée dans config.js */
.todo { color: #fbbf24; background: rgba(251,191,36,.12); border-radius: 4px; padding: 0 4px; font-style: italic; }

/* ---- Chat de l'assistant (chat.js) ---- */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 61; width: 56px; height: 56px; border-radius: 50%;
  border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FFB703, #FB5607 55%, #C1121F); box-shadow: 0 8px 24px rgba(251,86,7,.45); transition: transform .15s; }
.chat-fab:hover { transform: scale(1.06); }
.chat-fab-up { bottom: 88px; }
.chat-fab-open { transform: rotate(-8deg); }
.chat-box { position: fixed; right: 20px; bottom: 88px; z-index: 62; width: 370px; max-width: calc(100vw - 24px);
  height: 540px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; overflow: hidden;
  background: #0f172a; border: 1px solid #334155; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.55); color: #e2e8f0; }
.chat-box[hidden] { display: none; }
.chat-box-up { bottom: 156px; max-height: calc(100vh - 176px); }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px;
  background: linear-gradient(135deg, rgba(251,86,7,.25), rgba(193,18,31,.15)); border-bottom: 1px solid #1e293b; }
.chat-head b { display: block; color: #fff; font-size: 15px; }
.chat-head span { font-size: 12px; color: #94a3b8; }
.chat-x { background: none; border: 0; color: #94a3b8; font-size: 18px; cursor: pointer; }
.chat-x:hover { color: #fff; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; word-wrap: break-word; }
.chat-bot { align-self: flex-start; background: #1e293b; border-bottom-left-radius: 4px; }
.chat-admin { align-self: flex-start; background: #14532d; border-bottom-left-radius: 4px; }
.chat-admin small { display: block; font-size: 11px; color: #86efac; margin-bottom: 2px; }
.chat-me { align-self: flex-end; background: #ea580c; color: #fff; border-bottom-right-radius: 4px; }
.chat-typing i { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: #94a3b8; animation: chatdot 1s infinite; }
.chat-typing i:nth-child(2) { animation-delay: .15s; } .chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chatdot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; font-size: 12px; color: #94a3b8; }
.chat-quick button { background: transparent; border: 1px solid #475569; color: #e2e8f0; border-radius: 999px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.chat-quick button:hover { border-color: #fb923c; color: #fff; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #1e293b; }
.chat-form textarea { flex: 1; resize: none; background: #1e293b; border: 1px solid #334155; border-radius: 12px; color: #fff;
  padding: 9px 11px; font: inherit; font-size: 14px; max-height: 96px; }
.chat-form textarea:focus { outline: none; border-color: #fb923c; }
.chat-form button { width: 42px; border: 0; border-radius: 12px; background: #ea580c; color: #fff; font-size: 16px; cursor: pointer; }
.chat-note { margin: 0; padding: 0 12px 10px; font-size: 11px; color: #64748b; text-align: center; }
@media (max-width: 480px) {
  .chat-box, .chat-box-up { right: 12px; left: 12px; width: auto; bottom: 84px; height: auto; top: 70px; max-height: none; }
}
.chat-attach { width: 38px; display: flex; align-items: center; justify-content: center; border-radius: 12px; color: #94a3b8; cursor: pointer; border: 1px solid #334155; }
.chat-attach:hover { color: #fff; border-color: #fb923c; }
.chat-pending { display: flex; align-items: center; gap: 8px; margin: 0 10px; padding: 6px; border: 1px dashed #475569; border-radius: 10px; font-size: 12px; color: #94a3b8; }
.chat-pending[hidden] { display: none; }
.chat-pending img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.chat-pending button { margin-left: auto; background: none; border: 0; color: #94a3b8; cursor: pointer; font-size: 14px; }
.chat-img { display: block; max-width: 100%; max-height: 220px; border-radius: 10px; margin-bottom: 4px; }
.chat-imgtag { display: block; font-size: 12px; opacity: .85; margin-bottom: 2px; }
