/* ==================== STYLES GLOBAUX PREMIUM (DIGITA v2) ==================== */

:root {
    /* Palette de Couleurs */
    --gold: #D4AF37;
    --gold-glow: rgba(212, 175, 55, 0.4);
    --blue: #2563eb;
    --blue-glow: rgba(37, 99, 235, 0.4);
    --dark: #050505;
    --dark-alt: #0a0f1a;
    
    /* Typographie */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Textes */
    --text-white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.8);
    
    /* Effets Vitre (Glassmorphism) */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(12px);
    
    /* Layout */
    --sidebar-width: 280px;
}

/* Base Body Premium */
body { 
    background-color: var(--dark);
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

/* Titres Premium */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* 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;
}

/* --- Animations de Fond Premium --- */

.bg-premium-grid {
    background-color: var(--dark);
    background-image: 
        linear-gradient(rgba(212, 175, 55, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    position: relative;
}

.bg-premium-grid.animated {
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

.bg-premium-dark-blue {
    background: linear-gradient(135deg, #020617 0%, #0a0f1a 100%);
    position: relative;
}

.bg-premium-glow {
    background: var(--dark);
    background-image: radial-gradient(circle at 50% -20%, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
}

/* Texte Lueur Or */
.glow-text-gold {
    text-shadow: 0 0 10px var(--gold-glow);
}

/* --- Fin des Utilitaires --- */

/* --- Utilitaires de Design Premium --- */

/* Glassmorphism */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.glass-card:hover {
    border-color: var(--gold);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px var(--gold-glow);
    transform: translateY(-5px);
}

/* Boutons Premium */
.btn-premium {
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-premium-gold {
    background: var(--gold);
    color: var(--dark) !important;
    box-shadow: 0 4px 15px var(--gold-glow);
}

.btn-premium-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--gold-glow);
    background: #e5c158;
}

.btn-premium-blue {
    background: var(--blue);
    color: white !important;
    box-shadow: 0 4px 15px var(--blue-glow);
}

.btn-premium-blue:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--blue-glow);
    filter: brightness(1.1);
}

/* Gradients de Texte */
.text-gradient-gold {
    background: linear-gradient(135deg, var(--gold), #f3d47c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-blue {
    background: linear-gradient(135deg, #60a5fa, var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 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;
}
