/* ============================================================
   SportGPT – Widget CSS – Thème Cyberpunk Cyan
   sportpourtous.net
   ============================================================ */

#sportgpt-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 52px;
    height: 52px;
    background: #050510;
    border: 1px solid #00ffff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 18px rgba(0,255,255,0.35);
    transition: box-shadow 0.2s, transform 0.15s;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: bold;
    color: #00ffff;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.2;
}
#sportgpt-fab:hover {
    box-shadow: 0 0 28px rgba(0,255,255,0.65);
    transform: scale(1.06);
}
#sportgpt-fab.open {
    background: #00ffff;
    color: #050510;
}

#sportgpt-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9998;
}
#sportgpt-overlay.visible { display: block; }

#sportgpt-modal {
    display: none;
    position: fixed;
    bottom: 88px;
    right: 24px;
    width: 360px;
    max-height: 520px;
    z-index: 9999;
    background: #03050f;
    border: 1px solid #00ffff;
    box-shadow: 0 0 40px rgba(0,255,255,0.18), inset 0 0 40px rgba(0,255,255,0.02);
    flex-direction: column;
    font-family: 'Courier New', monospace;
    animation: sgpt-appear 0.18s ease;
}
#sportgpt-modal.visible { display: flex; }

@keyframes sgpt-appear {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

#sportgpt-modal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    animation: sgpt-scan 3s linear infinite;
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}
@keyframes sgpt-scan {
    0%   { top: 0; }
    100% { top: 100%; }
}

#sportgpt-header {
    background: #000d1a;
    border-bottom: 1px solid #00ffff;
    padding: 9px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.sgpt-avatar {
    width: 30px; height: 30px;
    border: 1px solid #00ffff;
    border-radius: 50%;
    background: #000d1a;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: bold; color: #00ffff;
    flex-shrink: 0;
    position: relative;
}
.sgpt-avatar::after {
    content: '';
    position: absolute; bottom: 0; right: 0;
    width: 7px; height: 7px;
    background: #00ffff;
    border-radius: 50%;
    box-shadow: 0 0 6px #00ffff;
}
.sgpt-info { flex: 1; }
.sgpt-name   { font-size: 12px; font-weight: bold; letter-spacing: 2px; color: #00ffff; }
.sgpt-status { font-size: 9px; color: #007a7a; letter-spacing: 1px; }
#sportgpt-close {
    background: transparent; border: none;
    color: #007a7a; cursor: pointer; font-size: 16px;
    line-height: 1; padding: 2px 4px;
    transition: color 0.15s;
}
#sportgpt-close:hover { color: #00ffff; }

#sportgpt-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex; flex-direction: column; gap: 10px;
    min-height: 240px;
    max-height: 280px;
    scroll-behavior: smooth;
}
#sportgpt-messages::-webkit-scrollbar { width: 3px; }
#sportgpt-messages::-webkit-scrollbar-track { background: #03050f; }
#sportgpt-messages::-webkit-scrollbar-thumb { background: #00ffff; }

.sgpt-msg { display: flex; gap: 7px; align-items: flex-start; }
.sgpt-msg.user { flex-direction: row-reverse; }

.sgpt-bubble {
    max-width: 84%;
    padding: 8px 11px;
    font-size: 12px; line-height: 1.6;
    border: 1px solid #00ffff;
    word-break: break-word;
}
.sgpt-msg.bot  .sgpt-bubble { background: #000d1a; color: #00ffff; border-radius: 0 7px 7px 7px; }
.sgpt-msg.user .sgpt-bubble { background: #001a2e; color: #00ffff; border-radius: 7px 0 7px 7px; }

.sgpt-icon {
    width: 22px; height: 22px; flex-shrink: 0;
    border: 1px solid #00ffff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: bold; color: #00ffff;
    background: #000d1a; margin-top: 2px;
}
.sgpt-msg.user .sgpt-icon { background: #001a2e; }

.sgpt-dots span {
    display: inline-block;
    width: 4px; height: 4px;
    background: #00ffff; border-radius: 50%;
    margin: 0 2px;
    animation: sgpt-blink 1.2s infinite;
}
.sgpt-dots span:nth-child(2) { animation-delay: 0.2s; }
.sgpt-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes sgpt-blink { 0%,80%,100%{opacity:0.2} 40%{opacity:1} }

#sportgpt-quick {
    padding: 6px 12px;
    display: flex; gap: 5px; flex-wrap: wrap;
    border-top: 1px solid rgba(0,255,255,0.15);
}
.sgpt-quick-btn {
    font-size: 9px; font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    background: #000d1a; color: #007a7a;
    border: 1px solid #007a7a;
    padding: 3px 8px; cursor: pointer;
    transition: all 0.15s;
}
.sgpt-quick-btn:hover { background: #001a2e; color: #00ffff; border-color: #00ffff; }

#sportgpt-input-area {
    border-top: 1px solid #00ffff;
    padding: 9px 12px;
    display: flex; gap: 7px; align-items: center;
    background: #000d1a;
    flex-shrink: 0;
}
.sgpt-prompt { color: #007a7a; font-size: 12px; flex-shrink: 0; }
#sportgpt-input {
    flex: 1;
    background: transparent; border: none; outline: none;
    color: #00ffff;
    font-family: 'Courier New', monospace; font-size: 12px;
    caret-color: #00ffff;
}
#sportgpt-input::placeholder { color: #004d4d; }
#sportgpt-input:disabled { opacity: 0.4; }

#sportgpt-send {
    background: #000d1a; color: #00ffff;
    border: 1px solid #00ffff;
    padding: 5px 11px;
    font-family: 'Courier New', monospace;
    font-size: 11px; font-weight: bold;
    letter-spacing: 1px; cursor: pointer;
    transition: all 0.15s; flex-shrink: 0;
}
#sportgpt-send:hover:not(:disabled) { background: #00ffff; color: #03050f; }
#sportgpt-send:disabled { opacity: 0.4; cursor: not-allowed; }

#sportgpt-footer {
    border-top: 1px solid rgba(0,255,255,0.15);
    padding: 5px 12px;
    display: flex; justify-content: space-between; align-items: center;
    background: #03050f; flex-shrink: 0;
}
.sgpt-footer-l { font-size: 8px; color: #003d3d; letter-spacing: 1px; }
.sgpt-footer-r { font-size: 8px; color: #003d3d; }
.sgpt-quota-val { color: #007a7a; font-weight: bold; }

@media (max-width: 480px) {
    #sportgpt-modal { right: 10px; left: 10px; bottom: 80px; width: auto; }
    #sportgpt-fab   { bottom: 16px; right: 16px; }
}
