/* ========================================
   JOHNNY IA - STYLES SPÉCIFIQUES CHATBOT
   ======================================== */

/* ========================================
   HERO SECTION CHATBOT
   ======================================== */
.chatbot-hero {
    min-height: 60vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #2d0a0a 0%, #1a0000 50%, #0f0000 100%);
    overflow: hidden;
    margin-top: 70px;
    padding: 4rem 2rem;
}

.hero-content-chatbot {
    text-align: center;
    position: relative;
    z-index: 10;
    max-width: 900px;
}

.hero-logo-bot {
    margin-bottom: 2rem;
    display: inline-block;
}

.logo-circle {
    width: 120px;
    height: 120px;
    background: var(--gradient-fire);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    position: relative;
    box-shadow: var(--shadow-glow);
    animation: float 3s ease-in-out infinite;
}

.logo-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient-fire);
    opacity: 0.3;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}

.hero-title-bot {
    font-family: 'Oswald', sans-serif;
    margin-bottom: 1.5rem;
}

.hero-title-bot .title-line {
    display: block;
    font-size: 3rem;
    color: var(--white-pure);
}

.hero-title-bot .title-line.main {
    font-size: 5rem;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 8px;
}

.hero-description-bot {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 107, 53, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 107, 53, 0.3);
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.feature-badge:hover {
    background: rgba(255, 107, 53, 0.2);
    transform: translateY(-2px);
}

.feature-badge i {
    color: var(--orange-fire);
    font-size: 1.2rem;
}

.feature-badge span {
    color: var(--white-pure);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ========================================
   SECTION PRINCIPALE CHATBOT
   ======================================== */
.chatbot-main-section {
    padding: 4rem 0 6rem;
    background: linear-gradient(180deg, var(--primary-black) 0%, var(--soft-black) 100%);
}

/* ========================================
   MESSAGE DE CONNEXION
   ======================================== */
.login-prompt-wrapper {
    animation: fadeInUp 0.6s ease;
}

.login-prompt-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 30px;
    padding: 4rem 3rem;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.prompt-icon {
    width: 100px;
    height: 100px;
    background: var(--gradient-fire);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
    color: white;
    box-shadow: var(--shadow-glow);
}

.prompt-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: var(--white-pure);
    margin-bottom: 1rem;
}

.prompt-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
}

.prompt-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.prompt-feature {
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 107, 53, 0.1);
    transition: var(--transition-smooth);
}

.prompt-feature:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 107, 53, 0.3);
    transform: translateY(-5px);
}

.prompt-feature i {
    font-size: 2rem;
    color: var(--orange-fire);
    margin-bottom: 1rem;
}

.prompt-feature h3 {
    color: var(--white-pure);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.prompt-feature p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.4;
}

.prompt-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.prompt-note {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ========================================
   CONTENU CHATBOT
   ======================================== */
.chatbot-content-wrapper {
    animation: fadeInUp 0.6s ease;
}

.chatbot-info-header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.info-header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.info-header-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-fire);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.info-header-text h2 {
    color: var(--white-pure);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.info-header-text p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.mode-selector {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 50px;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.mode-btn:hover {
    color: var(--orange-fire);
    background: rgba(255, 107, 53, 0.1);
}

.mode-btn.active {
    background: var(--gradient-fire);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* ========================================
   INTERFACE CHATBOT
   ======================================== */
.chatbot-interface {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start; /* Alignement en haut */
}

/* ========================================
   SIDEBAR
   ======================================== */
.chatbot-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: auto;
    max-height: none;
    overflow: visible;
    align-self: start; /* S'aligne en haut */
    position: sticky; /* Reste en place au scroll */
    top: 2rem; /* Distance du haut */
}

/* Pas d'ascenseur pour la sidebar */

.sidebar-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 107, 53, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
}

.sidebar-section h3 {
    color: var(--white-pure);
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-section h3 i {
    color: var(--orange-fire);
}

.example-questions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.question-suggestion {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    text-align: left;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.question-suggestion:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.4);
    color: var(--orange-fire);
    transform: translateX(5px);
}

.info-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-card-small {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.info-card-small i {
    color: var(--orange-fire);
    font-size: 1.2rem;
}

.info-card-small p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.3;
}

.sidebar-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-box {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 15px;
    padding: 1rem;
    text-align: center;
}

.stat-box i {
    color: var(--orange-fire);
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    color: var(--white-pure);
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
}

.stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* ========================================
   ZONE DE CHAT PRINCIPALE
   ======================================== */
.chatbot-main {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%; /* Prend 100% de la hauteur de la grille */
    min-height: 700px;
}

.chat-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 107, 53, 0.2);
    flex-shrink: 0; /* Ne se réduit pas */
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bot-avatar-header {
    width: 50px;
    height: 50px;
    background: var(--gradient-fire);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    position: relative;
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #00ff00;
    border: 2px solid rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.bot-info-header h3 {
    color: var(--white-pure);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.bot-status {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.chat-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 10px;
    color: var(--orange-fire);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: rgba(255, 107, 53, 0.2);
    transform: translateY(-2px);
}

/* ========================================
   WEBCHAT CONTAINER
   ======================================== */
.webchat-container {
    flex: 1;
    overflow-y: auto; /* Ascenseur vertical */
    overflow-x: hidden;
    min-height: 0; /* Important pour le scroll */
}

/* Styles pour le WebChat Azure */
.webchat-container > * {
    height: 100% !important;
}

/* Style de l'ascenseur personnalisé */
.webchat-container::-webkit-scrollbar {
    width: 10px;
}

.webchat-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.webchat-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    border-radius: 10px;
}

.webchat-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff8c42 0%, #ffd700 100%);
}

.chat-footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 107, 53, 0.2);
    flex-shrink: 0; /* Ne se réduit pas */
}

.footer-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.footer-info i {
    color: var(--orange-fire);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1200px) {
    .chatbot-interface {
        grid-template-columns: 250px 1fr;
    }
    
    .chatbot-main {
        height: 600px;
        max-height: 80vh;
    }
}

@media (max-width: 968px) {
    .chatbot-hero {
        min-height: 50vh;
        padding: 3rem 1rem;
    }
    
    .hero-title-bot .title-line {
        font-size: 2.5rem;
    }
    
    .hero-title-bot .title-line.main {
        font-size: 4rem;
        letter-spacing: 4px;
    }
    
    .chatbot-interface {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: stretch; /* Force les éléments à avoir la même hauteur */
}
    
    .chatbot-sidebar {
        order: 2;
    }
    
    .chatbot-main {
        order: 1;
        height: 600px;
    }
    
    .chatbot-info-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mode-selector {
        width: 100%;
    }
    
    .mode-btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .logo-circle {
        width: 90px;
        height: 90px;
        font-size: 2.5rem;
    }
    
    .hero-title-bot .title-line {
        font-size: 2rem;
    }
    
    .hero-title-bot .title-line.main {
        font-size: 3rem;
        letter-spacing: 2px;
    }
    
    .hero-features {
        flex-direction: column;
        align-items: stretch;
    }
    
    .feature-badge {
        justify-content: center;
    }
    
    .prompt-features-grid {
        grid-template-columns: 1fr;
    }
    
    .login-prompt-card {
        padding: 2rem 1.5rem;
    }
    
    .prompt-title {
        font-size: 2rem;
    }
    
    .prompt-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-hero {
        width: 100%;
    }
    
    .chatbot-info-header {
        padding: 1.5rem;
    }
    
    .info-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .sidebar-stats {
        grid-template-columns: 1fr;
    }
    
    .chat-actions {
        flex-wrap: wrap;
    }
    
    .chatbot-main {
        height: 500px; /* Hauteur réduite sur mobile */
        max-height: 70vh;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

/* ========================================
   ACCESSIBILITÉ
   ======================================== */
.question-suggestion:focus-visible,
.mode-btn:focus-visible,
.action-btn:focus-visible {
    outline: 2px solid var(--orange-fire);
    outline-offset: 2px;
}

/* ========================================
   ÉTATS DE CHARGEMENT
   ======================================== */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 107, 53, 0.3);
    border-top-color: var(--orange-fire);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}