/* ==================== STYLES GLOBAUX LAYOUT ==================== */

/* Body */
body { 
    background: #f7f7f7; 
}

/* Header/navbar TOUJOURS blanc */
.navbar, .navbar.bg-white, .navbar.navbar-light, .navbar.fixed-top {
    background: #fff !important;
    box-shadow: 0 2px 16px #2325260f;
    border-bottom: 1px solid #eee;
}

.navbar .nav-link, .navbar .navbar-brand, .navbar .btn {
    color: #232323 !important;
}

/* Style des sous-titres de navigation */
.nav-item {
    text-align: center;
    padding: 0.5rem 1rem;
}

.nav-subtitle {
    font-size: 0.75rem;
    color: #666;
    margin-top: -0.25rem;
    white-space: nowrap;
}

/* Liens cliquables dans les descriptions */
.nav-subtitle-link {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: -0.25rem;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-subtitle-link:hover {
    color: #0d6efd;
    text-decoration: underline;
}

.nav-link {
    padding: 0.25rem 0.5rem !important;
    font-weight: 500;
}

/* Effet hover sur les cartes */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Compensation pour le header fixe - UNIQUEMENT pour pages formations */
section.formation-detail-page {
    padding-top: 140px !important;
    padding-bottom: 3rem !important;
}

section.formation-detail-page > .container {
    padding-top: 2rem !important;
}

/* Les styles pour blog-article-page sont maintenant dans blog-layout.css */

/* Compensation pour toutes les pages principales (blog, formations, etc.) */
section.py-5:first-of-type:not(#hero):not(.bg-primary) {
    margin-top: 80px !important;
}

/* Footer - Les couleurs sont gérées dans le HTML avec les classes Bootstrap */

/* Hero arrows */
.hero-arrows { 
    position: absolute; 
    top: 50%; 
    left: 0; 
    width: 100%; 
    display: flex; 
    justify-content: space-between; 
    pointer-events: none; 
}

.hero-arrow { 
    font-size: 2.5rem; 
    color: #fff; 
    opacity: 0.7; 
    pointer-events: auto; 
    cursor: pointer; 
    padding: 0 1.5rem; 
    user-select: none; 
}

.hero-arrow:hover { 
    opacity: 1; 
}

/* Chatbot Styles */
#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

#chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 24px;
}

#chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.6);
}

#chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

#chatbot-window.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#chatbot-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chatbot-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

#chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

#chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

#chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-message {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.bot {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.chat-message.user .message-content {
    background: #0d6efd;
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.bot .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#chatbot-input-container {
    padding: 16px;
    border-top: 1px solid #e9ecef;
    background: white;
}

#chatbot-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#chatbot-input:focus {
    border-color: #0d6efd;
}

#chatbot-send {
    position: absolute;
    right: 24px;
    bottom: 22px;
    background: #0d6efd;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#chatbot-send:hover {
    background: #0a58ca;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* ==================== CLASSES UTILITAIRES ==================== */

/* Navigation sticky */
.sticky-nav {
    position: sticky;
    top: 80px;
    z-index: 100;
}

/* Icônes circulaires */
.icon-circle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.icon-circle-sm {
    width: 32px;
    height: 32px;
}

.icon-circle-lg {
    width: 48px;
    height: 48px;
}

/* Tailles d'icônes */
.icon-sm {
    font-size: 1rem !important;
}

.icon-md {
    font-size: 1.5rem !important;
}

.icon-lg {
    font-size: 2rem !important;
}

.icon-xl {
    font-size: 3rem !important;
}

.icon-xxl {
    font-size: 5rem !important;
}
