/* ============================================================
 * CoderPlus - Feuille de styles complémentaire
 * ============================================================ */

/* Sélecteur de langue - top bar */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.lang-switch a {
    color: #ccc;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}
.lang-switch a:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}
.lang-switch a.active {
    color: #fff;
    font-weight: 600;
}
.lang-switch .lang-sep {
    color: #555;
}
.lang-switch .lang-flag {
    margin-right: 2px;
}

/* Cookie consent */
#cookieConsent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1b1d52;
    color: #fff;
    padding: 16px 24px;
    z-index: 10000;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
#cookieConsent button {
    background: #0d6efd;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}
#cookieConsent button:nth-of-type(2) {
    background: transparent;
    border: 1px solid #fff;
}

/* Mobile language links */
.mobile-lang-links a.active,
.mobile-lang a.active {
    color: #0d6efd !important;
    font-weight: 700;
}

/* Chatbot container */
#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: "Segoe UI", Arial, sans-serif;
}
#chatbot-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #0047ab);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 22px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    transition: transform 0.2s;
}
#chatbot-toggle:hover { transform: scale(1.05); }

#chatbot {
    width: 340px;
    height: 460px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 12px;
}

#chatbot-header {
    background: linear-gradient(135deg, #0d6efd, #0047ab);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chatbot-title span {
    display: block;
    font-size: 12px;
    opacity: 0.9;
}
#chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

#chat {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    background: #f7f9fc;
    display: flex;
    flex-direction: column;
}

.user-msg {
    align-self: flex-end;
    background: #0d6efd;
    color: #fff;
    padding: 8px 12px;
    border-radius: 12px 12px 0 12px;
    margin-bottom: 8px;
    max-width: 85%;
    font-size: 14px;
    word-wrap: break-word;
}
.bot-msg {
    align-self: flex-start;
    background: #ffffff;
    color: #333;
    padding: 8px 12px;
    border-radius: 12px 12px 12px 0;
    margin-bottom: 8px;
    max-width: 85%;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    word-wrap: break-word;
    white-space: pre-wrap;
}

#chat-input {
    display: flex;
    border-top: 1px solid #e0e0e0;
    padding: 8px;
    background: #fff;
}
#chat-input input {
    flex: 1;
    border: none;
    padding: 10px;
    font-size: 14px;
    outline: none;
}
#chat-input button {
    background: #0d6efd;
    border: none;
    color: #fff;
    padding: 0 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
}
#chat-input button:hover { background: #0047ab; }

/* Mobile topbar */
#mobile-topbar-tab,
#mobile-topbar-drawer {
    display: none !important;
}
@media only screen and (max-width: 768px) {
    .header-topbar {
        display: none !important;
    }
    #mobile-topbar-tab {
        display: flex !important;
        position: fixed !important;
        right: 0 !important;
        top: 72% !important;
        transform: translateY(-50%) !important;
        width: 34px !important;
        height: 90px !important;
        background: #1b1d52 !important;
        color: #fff !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 12px 0 0 12px !important;
        z-index: 10001 !important;
        cursor: pointer !important;
        font-size: 18px !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.2) !important;
    }
    #mobile-topbar-drawer {
        display: block !important;
        position: fixed !important;
        right: -260px !important;
        top: 0 !important;
        width: 260px !important;
        height: 100vh !important;
        background: #ffffff !important;
        box-shadow: -10px 0 30px rgba(0,0,0,0.18) !important;
        z-index: 10000 !important;
        padding: 90px 20px 20px !important;
        transition: right 0.3s ease !important;
    }
    #mobile-topbar-drawer.open { right: 0 !important; }
    #mobile-topbar-drawer a {
        display: block !important;
        color: #6f42c1 !important;
        text-decoration: none !important;
        font-size: 18px !important;
        margin-bottom: 18px !important;
        font-weight: 500 !important;
    }
    #mobile-topbar-drawer .mobile-lang-links {
        display: flex !important;
        gap: 12px !important;
        margin-bottom: 18px !important;
    }
    #mobile-topbar-drawer .mobile-lang-links a {
        margin-bottom: 0 !important;
    }

    #chatbot {
        width: calc(100vw - 40px);
        max-width: 340px;
    }
}

/* Boutons */
.octf-btn-primary {
    background: #0d6efd;
    color: #fff;
    padding: 12px 28px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.octf-btn-primary:hover {
    background: #0047ab;
    color: #fff;
}

/* Utilités */
.mt-65 { margin-top: 65px; }
.mb-30 { margin-bottom: 30px; }
.space-5 { height: 15px; }
.space-20 { height: 20px; }
.font14 { font-size: 14px; }

/* ============================================================
   COMPOSANT : Citation/Highlight pour intro de page
   Usage : <div class="cp-intro-highlight">
              <div class="cp-intro-quote-mark">"</div>
              <p class="cp-intro-text">Ton texte ici</p>
           </div>
   ============================================================ */
.cp-intro-highlight {
    position: relative;
    max-width: 850px;
    margin: 40px auto 20px;
    padding: 36px 50px 36px 80px;
    background: linear-gradient(135deg, #f4f8ff 0%, #ffffff 100%);
    border-left: 5px solid #0d6efd;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(13, 110, 253, 0.08);
    overflow: hidden;
}
.cp-intro-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
.cp-intro-quote-mark {
    position: absolute;
    top: 10px;
    left: 28px;
    font-family: Georgia, serif;
    font-size: 90px;
    line-height: 1;
    color: #0d6efd;
    opacity: 0.25;
    font-weight: 700;
}
.cp-intro-text {
    position: relative;
    font-size: 19px;
    line-height: 1.7;
    color: #2a3548;
    margin: 0;
    font-weight: 500;
    font-style: italic;
    z-index: 1;
}
@media (max-width: 768px) {
    .cp-intro-highlight {
        padding: 28px 24px 28px 50px;
        margin: 30px 15px 15px;
    }
    .cp-intro-quote-mark {
        font-size: 60px;
        top: 5px;
        left: 14px;
    }
    .cp-intro-text {
        font-size: 16px;
    }
}

/*============================*/

/* ============================================================
   COMPOSANT : Bouton CTA forcé blanc (anti "visited" rouge)
   Usage : <a href="..." class="cp-cta-btn">Mon texte</a>
   ============================================================ */
.cp-cta-btn,
.cp-cta-btn:link,
.cp-cta-btn:visited,
.cp-cta-btn:hover,
.cp-cta-btn:focus,
.cp-cta-btn:active {
    display: inline-block;
    background: #fff !important;
    color: #0d6efd !important;
    padding: 14px 36px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid #fff;
}
.cp-cta-btn:hover,
.cp-cta-btn:focus {
    background: transparent !important;
    color: #fff !important;
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
/* Variante violette pour la page XR */
.cp-intro-highlight--purple {
    background: linear-gradient(135deg, #f5f0ff 0%, #ffffff 100%);
    border-left-color: #8b5cf6;
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.1);
}
.cp-intro-highlight--purple .cp-intro-quote-mark {
    color: #8b5cf6;
}
.cp-intro-highlight--purple::before {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
}
/* ============================================================
   VARIANTE VIOLETTE - Page XR / Immersive
   ============================================================ */
.cp-intro-highlight--purple {
    background: linear-gradient(135deg, #f5f0ff 0%, #ffffff 100%);
    border-left-color: #8b5cf6;
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.1);
}
.cp-intro-highlight--purple::before {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
}
.cp-intro-highlight--purple .cp-intro-quote-mark {
    color: #8b5cf6;
}
