/**
 * BASE STYLES
 * Layout global, sidebar, navigation, buttons, info boxes
 */

/* ==================== RESET & BASE ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.qslpro-app-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
    overflow: hidden;
}

.qslpro-app-container {
    display: flex;
    height: 100vh;
}

/* ==================== SIDEBAR ==================== */

.qslpro-sidebar {
    width: 280px;
    background: linear-gradient(135deg, #002a55 0%, #007fff 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

/* 🆕 v5.7.8: Couleur sidebar par formation */
body.formation-advanced .qslpro-sidebar,
body.formation-advanced .qslpro-burger-drawer {
    background: linear-gradient(135deg, #113509 0%, #0f910b 100%);
}

.qslpro-sidebar-header {
    padding: 15px 20px; /* Réduit vertical: 20px → 15px */
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* 🔧 v2.8.3: Logo réduit à 110px pour éviter scroll avec 7 items menu */
/* ⚙️ AJUSTEMENT LOGO: Change la valeur "max-width" ci-dessous pour ajuster la taille */
.qslpro-sidebar-logo {
    max-width: 110px;  /* 🎯 Réduit de 150px → 110px pour gagner espace vertical */
    height: auto;
    margin-bottom: 2px; /* 🆕 v6.7.1: resserré (8px → 2px) entre logo et QSL-Pro */
}

.qslpro-sidebar-header h2 {
    margin: 0 0 4px 0; /* Réduit de 5px → 4px */
    font-size: 18px; /* Réduit de 20px → 18px */
    font-weight: 600;
}

.qslpro-user-name {
    font-size: 14px;
    opacity: 0.8;
}

.qslpro-formation-name {
    font-size: 17px;
    opacity: 1;
    margin: 8px 0 0 0;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-weight: 500;
}

/* Récompenses section */

.qslpro-rewards-section {
    padding: 12px 20px; /* Réduit vertical: 20px → 12px */
    display: flex;
    flex-direction: column;
    gap: 12px; /* Réduit de 20px → 12px */
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.qslpro-reward-item {
    text-align: center;
    position: relative; /* 🆕 Pour le positionnement des éléments enfants */
}

.qslpro-reward-label {
    font-size: 12px; /* Réduit de 13px → 12px */
    opacity: 0.8;
    margin-top: 20px; /* Réduit de 25px → 20px */
    display: block;
}

/* 🆕 v6.7.1: rangée de 3 ronds (Série | Cartes prêtes | %) — PC/tablette */
.qslpro-circles-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
}
.qslpro-circle-item {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
}
.qslpro-circle-label {
    font-size: 11px;
    line-height: 1.2;
    opacity: 0.85;
    margin: 5px 0 0; /* 🎯 resserré entre le rond et son titre */
    display: block;
}
/* Ronds « cartes prêtes » et « % » (mêmes dimensions que le rond de série, en plus compact) */
.qslpro-ready-circle {
    width: 62px;
    height: 62px;
    margin: 0 auto;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 3px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.qslpro-ready-circle-val {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}
/* 🆕 v6.7.2: fraction verticale (prêtes / trait / total) pour ne jamais déborder du rond */
.qslpro-ready-frac {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 700;
    line-height: 1.05;
}
.qslpro-ready-num {
    font-size: 17px;
}
.qslpro-ready-den {
    font-size: 17px;        /* 🆕 v6.7.3 */
    margin-top: 2px;
    padding-top: 2px;
    border-top: 2px solid rgba(255,255,255,0.75);
    min-width: 30px;
    opacity: 0.9;
}
.qslpro-ready-circle-pct {
    border-color: rgba(120, 220, 150, 0.55); /* accent vert = « prêt » */
    background: rgba(46, 158, 91, 0.18);
}

/* Navigation */

.qslpro-sidebar-nav {
    flex: 1;
    padding: 8px 10px; /* Réduit vertical: 10px → 8px */
    overflow-y: auto;
}

.qslpro-nav-btn {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 8px 12px; /* 🔧 v2.8.3: Réduit de 10px → 8px verticalement */
    margin-bottom: 4px; /* 🔧 v2.8.3: Réduit de 5px → 4px */
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px; /* 🔧 v2.8.3: Réduit de 10px → 8px */
    font-size: 13px; /* 🔧 v2.8.3: Réduit de 14px → 13px */
    transition: all 0.2s ease;
}

.qslpro-nav-btn:hover {
    background: rgba(255,255,255,0.15);
    transform: translateX(5px);
}

.qslpro-nav-btn.active {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}

.qslpro-nav-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.qslpro-sidebar-footer {
    padding: 10px 15px; /* v2.8.3: Réduit vertical 15px → 10px */
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ==================== MAIN CONTENT ==================== */

.qslpro-main-content {
    flex: 1;
    overflow-y: auto;
    background: #fff;
}

.qslpro-tab-panel {
    display: none;
    padding: 30px 30px 30px 150px !important; /* 🔧 !important pour override le reset * {} ligne 8 */
    max-width: 1400px; /* 🔧 Contraindre largeur SANS centrer - éléments restent à gauche */
    margin: 0 !important; /* 🔧 Pas de centrage - reste à gauche */
}

.qslpro-tab-panel.active {
    display: block;
}

.qslpro-tab-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #0073aa;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qslpro-tab-header h1 {
    margin: 0;
    color: #0073aa;
    font-size: 32px;
    flex: 1;
}

/* 🆕 VERSION 4.7.0: Bouton retour (flèche gauche) dans header - ROUGE UNIFORMISÉ */
.qslpro-btn-back {
    background: transparent;
    border: 2px solid #d32f2f;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    margin-right: 15px;
    flex-shrink: 0;
}

.qslpro-btn-back .dashicons {
    color: #d32f2f;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.qslpro-btn-back:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.qslpro-btn-back:hover .dashicons {
    color: #fff;
}

/* 🆕 VERSION 3.0: Bouton fermeture session (X) dans header */
.qslpro-btn-close-session {
    background: transparent;
    border: 2px solid #d32f2f;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.qslpro-btn-close-session .dashicons {
    color: #d32f2f;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.qslpro-btn-close-session:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.qslpro-btn-close-session:hover .dashicons {
    color: #fff;
}

/* 🆕 VERSION 3.0: Cacher bouton PC sur mobile (afficher seulement sur desktop) */
@media (max-width: 768px) {
    .qslpro-btn-close-session {
        display: none !important;
    }
}

/* 🔧 MODIFIÉ: Bouton Rafraîchir grossi et stylé */
.qslpro-btn-refresh {
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.qslpro-btn-refresh:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.4);
}

.qslpro-btn-refresh .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.qslpro-btn-refresh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==================== BUTTONS ==================== */

.qslpro-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.qslpro-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.qslpro-btn-primary {
    background: #0073aa;
    color: #fff;
}

.qslpro-btn-primary:hover {
    background: #005a87;
}

.qslpro-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.qslpro-btn-secondary:hover {
    background: #5a6268;
}

.qslpro-btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.qslpro-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* 🆕 NOUVEAU: Bouton "Voir le guide complet" avec style custom */
.qslpro-btn-guide-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.qslpro-btn-guide-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.qslpro-btn-guide-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ==================== INFO BOXES ==================== */

.qslpro-info-box {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #e5f5fa;
    border-left: 4px solid #00a0d2;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.qslpro-info-box .dashicons {
    color: #00a0d2;
    font-size: 24px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.qslpro-warning-box {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.qslpro-warning-box .dashicons {
    color: #856404;
    font-size: 24px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* ============================================
   TOGGLE SWITCH (Dark Mode)
   ============================================ */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: #ddd;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch:hover {
    background: #ccc;
}

.toggle-switch.active {
    background: #2271b1;
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(30px);
}

/* ============================================
   🆕 v5.7.58 LANGUAGE SWITCHER (flag buttons)
   ============================================ */
.qslpro-lang-flags {
    display: flex;
    gap: 10px;
}

.qslpro-lang-flag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #f5f5f5;
    color: #999;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    filter: grayscale(80%);
    opacity: 0.7;
}

.qslpro-lang-flag .qslpro-flag-svg {
    width: 26px;
    height: 18px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.qslpro-lang-flag:hover {
    border-color: #2271b1;
    opacity: 0.9;
    filter: grayscale(30%);
}

.qslpro-lang-flag.active {
    border-color: #2271b1;
    background: #f0f6fc;
    color: #1d2327;
    filter: grayscale(0%);
    opacity: 1;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.2);
    cursor: default;
}

/* Blocs conditionnels FR/EN — gérés par la classe body (pas de flash) */
.lang-fr .qslpro-lang-en { display: none !important; }
.lang-en .qslpro-lang-fr { display: none !important; }
.lang-en .qslpro-lang-en { display: block !important; }
/* Inline elements (span, a) */
.lang-en span.qslpro-lang-en,
.lang-en a.qslpro-lang-en { display: inline !important; }

.qslpro-lang-fallback-badge {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    margin-bottom: 10px;
}

/* ═══════════════════════════════════════════════════════════════════════
   🎓 FORMATIONS HUB - Page principale avec cartes compactes
   VERSION 4.7.0 - Layout horizontal compact (icône gauche, contenu droite)
   Cartes côte à côte, même hauteur, textes sur 2 lignes max
   ═══════════════════════════════════════════════════════════════════════ */

.qslpro-formations-intro {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

/* ══════════════════════════════════════════════════════════════
   VERSION 4.7.0 - HUB FORMATIONS - GRILLE 2 COLONNES
   ══════════════════════════════════════════════════════════════ */
.qslpro-formations-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);  /* 2 colonnes égales */
    gap: 20px;
    max-width: 850px;
    margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════
   CARTE HUB - Layout horizontal compact, même hauteur
   ══════════════════════════════════════════════════════════════ */
.qslpro-hub-card {
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 200px;  /* Hauteur minimum pour uniformité */
}

.qslpro-hub-card:hover {
    transform: translateY(-3px);
}

/* Header: Icône à gauche, titre+description à droite */
.qslpro-hub-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

/* Icône en cercle - compacte */
.qslpro-hub-card-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.qslpro-hub-card-icon .dashicons {
    color: #fff;
    font-size: 26px;
    width: 26px;
    height: 26px;
}

/* Zone info (titre + description) */
.qslpro-hub-card-info {
    flex: 1;
    text-align: left;
}

/* Titre - commun */
.qslpro-hub-card-title {
    color: #fff;
    font-size: 16px;
    margin: 0 0 4px;
    font-weight: 600;
    line-height: 1.2;
}

/* Description - 2 lignes max avec ellipsis */
.qslpro-hub-card-desc {
    color: #fff;  /* Blanc pur, plus clair */
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Zone de contenu flexible (dropdown ou stats) */
.qslpro-hub-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 12px;
}

/* Bouton en bas - pleine largeur, aligné en bas */
.qslpro-hub-card-btn {
    width: 100%;
    justify-content: center;
    margin-top: auto;
}

/* ══════════════════════════════════════════════════════════════
   CARTE FICHES PÉDAGOGIQUES - Violet
   ══════════════════════════════════════════════════════════════ */
#card-fiches {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

#card-fiches:hover {
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

/* Dropdown chapitre - version compacte */
#card-fiches .qslpro-formation-dropdown,
.qslpro-hub-card .qslpro-formation-dropdown {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qslpro-hub-card .qslpro-formation-dropdown:hover,
.qslpro-hub-card .qslpro-formation-dropdown:focus {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.25);
    outline: none;
}

.qslpro-hub-card .qslpro-formation-dropdown option {
    background: #333;
    color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   CARTE MÉMORISATION - Dégradé orangé chaud
   ══════════════════════════════════════════════════════════════ */
#card-memorisation {
    background: linear-gradient(135deg, #f7971e 0%, #e44d26 100%);
    box-shadow: 0 4px 20px rgba(228, 77, 38, 0.3);
}

#card-memorisation:hover {
    box-shadow: 0 6px 25px rgba(228, 77, 38, 0.4);
}

/* Stats rapides - centrées, version compacte */
.qslpro-hub-card-stats {
    display: flex;
    gap: 12px;
    justify-content: center;  /* Centré horizontalement */
}

.qslpro-hub-stat {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    flex: 1;
    max-width: 120px;
}

.qslpro-hub-stat-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.qslpro-hub-stat-label {
    font-size: 10px;
    color: #fff;  /* Blanc pur, plus clair */
    opacity: 1;   /* Pas de transparence */
    margin-top: 4px;
    text-transform: none;
    text-align: center;
    line-height: 1.2;
}

/* ══════════════════════════════════════════════════════════════
   VERSION 5.6.4 - HUB FORMATIONS - GRILLE 3 CARTES (rangée haut)
   ══════════════════════════════════════════════════════════════ */
.qslpro-formations-cards-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Rangée bas: 1 carte centrée */
.qslpro-formations-cards-bottom {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.qslpro-formations-cards-bottom .qslpro-hub-card {
    max-width: 380px;
    width: 100%;
}

/* ══════════════════════════════════════════════════════════════
   VERSION 4.9.0 - HUB FORMATIONS - GRILLE 4 CARTES (2x2)
   ══════════════════════════════════════════════════════════════ */
.qslpro-formations-cards-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 850px;
    margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════
   VERSION 5.3.1 - HUB FORMATIONS - GRILLE 6 CARTES (3x2)
   ══════════════════════════════════════════════════════════════ */
.qslpro-formations-cards-6 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════
   CARTE FORMATION MODULAIRE - Bleu royal
   ══════════════════════════════════════════════════════════════ */
#card-modulaire {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}

#card-modulaire:hover {
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.4);
}

/* ══════════════════════════════════════════════════════════════
   VERSION 4.9.0 - CARTE DICTÉES - Gradient Teal
   ══════════════════════════════════════════════════════════════ */
#card-dictees {
    background: linear-gradient(135deg, #0891b2, #06b6d4, #22d3ee);
    box-shadow: 0 4px 20px rgba(8, 145, 178, 0.3);
}

#card-dictees:hover {
    box-shadow: 0 6px 25px rgba(8, 145, 178, 0.4);
}

.qslpro-hub-card-dictees-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: 14px;
}

.qslpro-hub-card-dictees-info .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ══════════════════════════════════════════════════════════════
   VERSION 5.3.1 - CARTE CASSE-TÊTE SCHÉMA - Gradient rose/magenta
   ══════════════════════════════════════════════════════════════ */
#card-casse-tete {
    background: linear-gradient(135deg, #e91e63 0%, #9c27b0 100%);
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.3);
}

#card-casse-tete:hover {
    box-shadow: 0 6px 25px rgba(233, 30, 99, 0.4);
}

/* ══════════════════════════════════════════════════════════════
   VERSION 5.3.1 - VUE CASSE-TÊTE SCHÉMA - Écran sélection
   ══════════════════════════════════════════════════════════════ */
.qslpro-casse-tete-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qslpro-casse-tete-intro {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
}

.qslpro-casse-tete-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qslpro-casse-tete-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.qslpro-casse-tete-dropdown {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid #999;
    border-radius: 8px;
    background: #f8f8f8;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: menulist;
    appearance: menulist;
}

.qslpro-casse-tete-dropdown:hover {
    border-color: #9c27b0;
    background: #fff;
    outline: none;
}

.qslpro-casse-tete-dropdown:focus {
    border-color: #9c27b0;
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.15);
    background: #fff;
    outline: none;
}

.qslpro-casse-tete-loading,
.qslpro-casse-tete-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.qslpro-casse-tete-loading .dashicons,
.qslpro-casse-tete-empty .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto 10px;
}

/* ══════════════════════════════════════════════════════════════
   VERSION 5.3.4 - CASSE-TÊTE MOTEUR DE JEU
   ══════════════════════════════════════════════════════════════ */
/* Fenetre flottante plein ecran */
.ct-no-scroll { overflow: hidden !important; }

.ct-fullscreen-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999;
    background: #f5f5f5;
    display: flex; flex-direction: column;
}

.ct-fullscreen-inner {
    display: flex; flex-direction: column; height: 100%;
}

.ct-fs-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px; background: #1F3A6B; color: #fff; flex-shrink: 0;
}
.ct-fs-header-left { display: flex; align-items: center; gap: 14px; }
.ct-fs-header h2 { margin: 0; font-size: 18px; color: #fff; }
.ct-fs-header .ct-level-badge { background: rgba(255,255,255,0.2); color: #fff; }
.ct-fs-close {
    background: none; border: none; color: #fff; font-size: 32px; cursor: pointer;
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    border-radius: 8px; transition: background 0.2s;
}
.ct-fs-close:hover { background: rgba(255,255,255,0.15); }

.ct-fs-body {
    flex: 1; overflow-y: auto; padding: 20px;
}

.ct-fs-footer {
    display: flex; gap: 12px; justify-content: center; padding: 12px 20px;
    background: #fff; border-top: 1px solid #ddd; flex-shrink: 0;
}

/* Layout: sidebar gauche (palettes) + grille droite */
.ct-layout {
    display: flex; gap: 20px; height: 100%; min-height: 0;
}

.ct-sidebar-left {
    width: 200px; min-width: 200px; flex-shrink: 0;
    display: flex; flex-direction: column; gap: 16px;
    overflow-y: auto;
}

.ct-palette-panel {
    background: #fff; border: 1px solid #ddd; border-radius: 10px;
    padding: 12px; flex: 1; min-height: 0; overflow-y: auto;
}

.ct-palette-panel h4 {
    font-size: 13px; color: #1F3A6B; margin: 0 0 10px;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 2px solid #e8eaf6; padding-bottom: 6px;
}

/* Sous-hub 2 cartes */
.ct-sub-hub {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
    max-width: 750px; margin: 0 auto;
}

.ct-sub-card {
    border-radius: 12px; padding: 18px; display: flex; flex-direction: column;
    color: #fff; transition: transform 0.3s ease, box-shadow 0.3s ease; min-height: 200px;
}
.ct-sub-card:hover { transform: translateY(-3px); }

#ct-card-study {
    background: linear-gradient(135deg, #1e3a5f 0%, #2980b9 100%);
    box-shadow: 0 4px 20px rgba(41,128,185,0.3);
}
#ct-card-study:hover { box-shadow: 0 6px 25px rgba(41,128,185,0.4); }

#ct-card-puzzle {
    background: linear-gradient(135deg, #e91e63 0%, #9c27b0 100%);
    box-shadow: 0 4px 20px rgba(233,30,99,0.3);
}
#ct-card-puzzle:hover { box-shadow: 0 6px 25px rgba(233,30,99,0.4); }

.ct-sub-card select option { background: #333; color: #fff; }

/* Dropdown switch en mode etude */
.ct-study-switch {
    padding: 6px 12px; font-size: 15px; font-weight: 600;
    border: 2px solid rgba(255,255,255,0.3); border-radius: 8px;
    background: rgba(255,255,255,0.15); color: #fff; cursor: pointer;
    max-width: 400px;
}
.ct-study-switch:hover { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.25); }
.ct-study-switch option { background: #1F3A6B; color: #fff; }

/* Mode etude: description a gauche, schema a droite, tout sur 1 ecran */
.ct-study-layout {
    display: flex; gap: 20px; height: 100%; min-height: 0;
}
.ct-study-desc-area {
    width: 320px; min-width: 280px; flex-shrink: 0; overflow-y: auto;
    order: -1;
}
.ct-study-grid-area {
    flex: 1; min-width: 0; overflow: auto;
    display: flex; align-items: flex-start; justify-content: center;
}

@media (max-width: 1024px) {
    .ct-study-layout { flex-direction: column; }
    .ct-study-desc-area { width: 100%; min-width: 100%; order: 1; }
}

/* Encadre description schema (en bas du schema) */
.ct-schema-desc {
    margin: 20px auto 0; padding: 20px 24px; border-radius: 12px;
    max-width: 900px; border-left: 5px solid #2980b9;
}
.ct-desc-recepteur { border-left-color: #2980b9; background: #eaf2f8; }
.ct-desc-emetteur { border-left-color: #27ae60; background: #eafaf1; }
.ct-desc-alimentation { border-left-color: #e67e22; background: #fef5e7; }

.ct-schema-desc-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.ct-schema-desc-icon { font-size: 24px; }
.ct-schema-desc-flow {
    font-size: 14px; font-weight: 700; color: #1F3A6B;
    background: rgba(255,255,255,0.6); padding: 4px 12px; border-radius: 20px;
    letter-spacing: 1px;
}
.ct-schema-desc-text { font-size: 14px; line-height: 1.65; color: #333; margin: 0; }
.ct-schema-desc-hint {
    margin-top: 10px; font-size: 12px; color: #888; font-style: italic;
}
.ct-hint-cursor {
    display: inline-block; width: 18px; height: 18px; line-height: 18px;
    text-align: center; background: #1F3A6B; color: #fff; border-radius: 50%;
    font-size: 11px; font-style: normal; font-weight: 700; vertical-align: middle;
}

/* Slot cliquable en mode etude */
.ct-slot-clickable { cursor: help !important; transition: box-shadow 0.2s, transform 0.2s; }
.ct-slot-clickable:hover { box-shadow: 0 0 0 3px rgba(41,128,185,0.4); transform: scale(1.05); }

/* Popup description composant */
.ct-comp-popup {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10001;
    display: flex; align-items: center; justify-content: center;
}
.ct-comp-popup-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); cursor: pointer;
}
.ct-comp-popup-box {
    position: relative; background: #fff; border-radius: 16px;
    padding: 28px 32px; max-width: 520px; width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); z-index: 1;
    animation: ct-popup-enter 0.25s ease;
}
@keyframes ct-popup-enter {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.ct-comp-popup-close {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none; font-size: 26px; color: #aaa;
    cursor: pointer; line-height: 1; transition: color 0.2s;
}
.ct-comp-popup-close:hover { color: #333; }

.ct-comp-popup-header {
    display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.ct-comp-popup-icon {
    width: 60px; height: 53px; min-width: 60px;
    background: #f0f4f8; border-radius: 10px; display: flex;
    align-items: center; justify-content: center; padding: 2px;
}
.ct-comp-popup-icon svg { display: block; }

.ct-comp-popup-box h3 {
    font-size: 18px; color: #1F3A6B; margin: 0; padding-right: 30px;
    line-height: 1.3;
}
.ct-comp-popup-divider {
    height: 2px; background: linear-gradient(90deg, #2980b9, transparent);
    margin-bottom: 14px; border-radius: 2px;
}
.ct-comp-popup-box p {
    font-size: 15px; line-height: 1.7; color: #444; margin: 0;
}

@media (max-width: 768px) {
    .ct-sub-hub { grid-template-columns: 1fr; }
}

.ct-palette-empty {
    text-align: center; color: #999; font-size: 12px; font-style: italic; margin: 10px 0;
}

.ct-main-area {
    flex: 1; overflow: hidden; min-width: 0;
}

.ct-game { max-width: 1100px; margin: 0 auto; }

/* Palette items en colonne dans la sidebar */
.ct-sidebar-left .ct-palette-items {
    display: flex; flex-direction: column; gap: 6px;
}

.ct-sidebar-left .ct-piece-svg {
    display: flex; align-items: center; justify-content: center;
    padding: 4px; background: #fafafa;
}

.ct-sidebar-left .ct-piece-label {
    font-size: 11px; padding: 6px 8px; text-align: center;
}

@media (max-width: 768px) {
    .ct-layout { flex-direction: column; }
    .ct-sidebar-left {
        width: 100%; min-width: 100%;
        flex-direction: row; gap: 10px; overflow-x: auto;
    }
    .ct-palette-panel { flex: 1; min-width: 160px; }
    .ct-sidebar-left .ct-palette-items { flex-direction: row; flex-wrap: wrap; }
}

.ct-level-badge {
    display: inline-block; padding: 4px 14px; border-radius: 20px;
    background: #e8eaf6; color: #3949ab; font-size: 13px; font-weight: 600;
}

/* Banniere resultats (inline, ne cache pas le schema) */
.ct-result-banner { flex-shrink: 0; }

.ct-banner-content {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
    padding: 12px 20px;
}
.ct-banner-success { background: #d4edda; border-bottom: 3px solid #2E9E5C; }
.ct-banner-fail { background: #fff3cd; border-bottom: 3px solid #f59e0b; }
.ct-banner-solution { background: #d1ecf1; border-bottom: 3px solid #2563eb; }

.ct-banner-icon { font-size: 28px; }
.ct-banner-text { flex: 1; font-size: 14px; color: #333; min-width: 200px; }
.ct-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.ct-grid-container { overflow-x: auto; padding: 10px 0; margin-bottom: 20px; }

.ct-grid { position: relative; margin: 0 auto; min-height: 200px; }

.ct-slot {
    position: absolute; border: 2px dashed #ccc; border-radius: 8px;
    background: #fafafa; display: flex; flex-direction: column;
    align-items: center; justify-content: center; cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.ct-slot:hover { border-color: #9c27b0; background: #f3e5f5; }
.ct-slot-decoy { border-color: #ccc; background: #fafafa; cursor: default; }
.ct-slot-decoy:hover { border-color: #ccc; background: #fafafa; }
.ct-slot-hover { border-color: #9c27b0 !important; background: #e1bee7 !important; box-shadow: 0 0 10px rgba(156,39,176,0.3); }
.ct-slot-locked { border-style: solid; border-color: #2E9E5C; background: #e8f5e9; cursor: default; }
.ct-slot-locked:hover { border-color: #2E9E5C; background: #e8f5e9; }

.ct-slot-student { border: 2px dashed #2563eb !important; background: #eff6ff; }
.ct-slot-student:hover { border-color: #1d4ed8 !important; background: #dbeafe; cursor: pointer; }

.ct-slot-valid { border-color: #2E9E5C !important; border-style: solid !important; background: #c8e6c9 !important; box-shadow: 0 0 8px rgba(46,158,92,0.4); }
.ct-slot-invalid { border-color: #D94141 !important; border-style: solid !important; background: #ffebee !important; box-shadow: 0 0 8px rgba(217,65,65,0.4); }

.ct-label-student { cursor: grab; padding: 2px 6px; border-radius: 4px; border: 1px dashed #2563eb; background: rgba(239,246,255,0.8); pointer-events: auto !important; }
.ct-label-student:hover { background: #dbeafe; }

.ct-draggable-comp { cursor: grab; }
.ct-draggable-comp:hover svg { filter: drop-shadow(0 0 3px rgba(37,99,235,0.5)); }

.ct-slot-svg { line-height: 0; }
.ct-slot-svg svg { display: block; }

.ct-slot-label {
    pointer-events: none;
    z-index: 2;
}
.ct-leader-line {
    z-index: 1;
    pointer-events: none;
}

/* ct-slot-empty supprime - plus d'indices s1/s2 */

/* Palette */
.ct-palette-container { margin-bottom: 20px; }
.ct-palette-container h3 { font-size: 16px; margin: 0 0 10px; color: #333; }
.ct-palette-section { margin-bottom: 16px; }
.ct-palette-section h4 { font-size: 13px; color: #666; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.5px; }

.ct-palette-items { display: flex; flex-wrap: wrap; gap: 8px; }

.ct-piece {
    cursor: grab; border: 2px solid #ccc; border-radius: 8px;
    background: #fff; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    user-select: none; -webkit-user-select: none;
}
.ct-piece:hover { border-color: #9c27b0; box-shadow: 0 2px 8px rgba(156,39,176,0.2); transform: translateY(-2px); }
.ct-piece-selected { border-color: #9c27b0 !important; background: #f3e5f5 !important; box-shadow: 0 0 0 3px rgba(156,39,176,0.3); }
.ct-piece.ct-dragging { opacity: 0.4; }

.ct-piece-svg { padding: 6px; display: flex; align-items: center; justify-content: center; }
.ct-piece-label { padding: 8px 14px; font-size: 12px; font-weight: 500; color: #333; }

/* Actions */
.ct-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* (Ancien overlay supprime - remplace par banniere inline) */

/* Animation solution */
.ct-slot-solution-anim {
    animation: ct-solution-pop 0.6s ease both;
}
.ct-slot-solution-anim:nth-child(2) { animation-delay: 0.1s; }
.ct-slot-solution-anim:nth-child(3) { animation-delay: 0.2s; }
.ct-slot-solution-anim:nth-child(4) { animation-delay: 0.3s; }
.ct-slot-solution-anim:nth-child(5) { animation-delay: 0.4s; }
.ct-slot-solution-anim:nth-child(6) { animation-delay: 0.5s; }
.ct-slot-solution-anim:nth-child(7) { animation-delay: 0.6s; }
.ct-slot-solution-anim:nth-child(8) { animation-delay: 0.7s; }
.ct-slot-solution-anim:nth-child(9) { animation-delay: 0.8s; }
.ct-slot-solution-anim:nth-child(10) { animation-delay: 0.9s; }

@keyframes ct-solution-pop {
    0% { transform: scale(0.8); opacity: 0.3; }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════
   VERSION 4.9.0 - VUE DICTÉES DE FRÉQUENCES
   ══════════════════════════════════════════════════════════════ */
.qslpro-dictees-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qslpro-dictees-loading,
.qslpro-dictees-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.qslpro-dictees-loading .dashicons,
.qslpro-dictees-empty .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #0891b2;
    display: block;
    margin: 0 auto 15px;
}

.qslpro-dictees-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Chaque dictée: titre pleine largeur, puis vidéo + PDF côte à côte */
.qslpro-dictee-item {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 25px;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    padding-bottom: 30px;
    border-bottom: 3px solid #e5e7eb;
}

/* Titre centré, gros, avec espacement */
.qslpro-dictee-item h3 {
    margin: 0 0 25px;
    font-size: 24px;
    font-weight: 700;
    color: #0e7490;
    grid-column: 1 / -1;
    text-align: center;
    letter-spacing: -0.3px;
}

/* Conteneur vidéo responsive 16:9 - plus grand */
.qslpro-dictee-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
}

.qslpro-dictee-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 10px;
}

/* Zone PDF à droite du vidéo - fond gris foncé, texte blanc */
.qslpro-dictee-pdf {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: #374151;
    border-radius: 10px;
    padding: 25px 20px;
    border: 2px solid #4b5563;
}

.qslpro-dictee-pdf .dashicons {
    font-size: 56px;
    width: 56px;
    height: 56px;
    color: #93c5fd;
    margin-bottom: 14px;
}

.qslpro-dictee-pdf-title {
    font-weight: 700;
    font-size: 16px;
    color: #f1f5f9;
    margin-bottom: 6px;
}

.qslpro-dictee-pdf-desc {
    font-size: 13px;
    color: #cbd5e1;
    margin-bottom: 16px;
    line-height: 1.4;
}

.qslpro-dictee-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2563eb;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: background 0.2s, transform 0.2s;
}

.qslpro-dictee-pdf-btn:hover {
    background: #1d4ed8;
    color: #fff;
    transform: translateY(-1px);
}

.qslpro-dictee-pdf-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #fff;
    margin-bottom: 0;
}

/* Séparateur entre dictées */
.qslpro-dictee-separator {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 0;
}

/* Dictée sans PDF - vidéo pleine largeur */
.qslpro-dictee-item.no-pdf {
    grid-template-columns: 1fr;
}

/* ══════════════════════════════════════════════════════════════
   LECTEUR DE CHAPITRE - Layout deux colonnes avec scroll indépendant
   ══════════════════════════════════════════════════════════════ */
.qslpro-chapitre-reader,
.qslpro-modulaire-reader {
    display: flex;
    flex-direction: column;
    /* 🆕 Hauteur viewport fixe pour permettre scroll indépendant */
    height: calc(100vh - 120px); /* 120px = header app + marges */
    max-height: calc(100vh - 120px);
    overflow: hidden;
}

.qslpro-chapitre-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.qslpro-chapitre-header h1 {
    font-size: 1.3rem;
    margin: 0;
    color: #333;
}

.qslpro-phase-select {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1565c0;
    background: #eef3fa;
    border: 2px solid #bbdefb;
    border-radius: 8px;
    padding: 8px 40px 8px 12px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='%231565c0'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 24px;
    flex: 1;
    min-width: 0;
}

.qslpro-phase-select:focus {
    outline: none;
    border-bottom-color: #ff9800;
}

/* Layout principal: nav gauche + contenu droite */
.qslpro-chapitre-layout {
    display: flex;
    flex: 1;
    min-height: 0; /* 🆕 Important pour que flex-1 fonctionne avec overflow */
    overflow: hidden;
}

/* Navigation TOC (gauche) - SCROLL INDÉPENDANT */
.qslpro-chapitre-nav {
    width: 280px;
    min-width: 280px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%; /* 🆕 Prend toute la hauteur du layout */
}

.qslpro-chapitre-nav-header {
    padding: 12px 15px;
    background: #667eea;
    color: white;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qslpro-chapitre-nav-header .dashicons {
    font-size: 18px;
}

.qslpro-chapitre-nav-content,
.qslpro-modulaire-nav-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    min-height: 0; /* 🆕 Permet le scroll dans un flex container */
}

/* Items de navigation */
.qslpro-chapitre-nav-part {
    padding: 10px 15px;
    background: #e3f2fd;
    color: #1565c0;
    font-weight: 600;
    font-size: 13px;
    margin-top: 5px;
    border-left: 4px solid #1971c2;
}

.qslpro-chapitre-nav-part:first-child {
    margin-top: 0;
}

.qslpro-chapitre-nav-item {
    padding: 10px 15px 10px 20px;
    cursor: pointer;
    font-size: 13px;
    color: #444;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.qslpro-chapitre-nav-item:hover {
    background: #fff8e1;
    border-left-color: #ffb74d;
    color: #e65100;
}

.qslpro-chapitre-nav-item.active {
    background: #fff3e0;
    border-left-color: #ff9800;
    color: #e65100;
    font-weight: 600;
}

.qslpro-chapitre-nav-loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

/* Contenu du chapitre (droite) - SCROLL INDÉPENDANT */
.qslpro-chapitre-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: white;
    height: 100%; /* 🆕 Prend toute la hauteur du layout */
    min-height: 0; /* 🆕 Permet le scroll dans un flex container */
}

.qslpro-chapitre-content-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.qslpro-chapitre-content-body {
    padding: 0;
}

/* Message d'accueil */
.qslpro-chapitre-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    color: #888;
    text-align: center;
}

.qslpro-chapitre-welcome .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    color: #ccc;
}

/* ══════════════════════════════════════════════════════════════
   STYLES DU CONTENU DE FORMATION (importés du style.css original)
   ══════════════════════════════════════════════════════════════ */
.qslpro-chapitre-content-body .container {
    max-width: 100%;
    padding: 30px 40px;
    margin: 0;
    box-shadow: none;
    background: white;
}

.qslpro-chapitre-content-body h2.chapter-title {
    font-size: 24px;
    color: #1971c2;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e7f5ff;
}

.qslpro-chapitre-content-body h3 {
    font-size: 18px;
    color: #333;
    margin-top: 25px;
    margin-bottom: 15px;
}

.qslpro-chapitre-content-body .chapter-intro {
    font-size: 16px;
    color: #444;
    font-style: italic;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #1971c2;
    border-radius: 0 8px 8px 0;
}

/* Encadrés pédagogiques */
.qslpro-chapitre-content-body .box {
    border-radius: 10px;
    padding: 18px 22px;
    margin: 20px 0;
    border: 2px solid;
}

.qslpro-chapitre-content-body .box-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
}

.qslpro-chapitre-content-body .box-objectifs {
    background: #e7f5ff;
    border-color: #339af0;
}

.qslpro-chapitre-content-body .box-objectifs .box-title {
    color: #1971c2;
}

.qslpro-chapitre-content-body .box-retenir {
    background: #d3f9d8;
    border-color: #2f9e44;
}

.qslpro-chapitre-content-body .box-retenir .box-title {
    color: #2f9e44;
}

.qslpro-chapitre-content-body .warning {
    background: #ffe0e0;
    border: 2px solid #c92a2a;
    border-radius: 10px;
    padding: 15px 20px;
    margin: 20px 0;
}

.qslpro-chapitre-content-body .warning-title {
    color: #c92a2a;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Figures et images */
.qslpro-chapitre-content-body .figure {
    margin: 25px 0;
    text-align: center;
}

.qslpro-chapitre-content-body .figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.qslpro-chapitre-content-body .figure-caption {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

/* Tableaux */
.qslpro-chapitre-content-body .formulas-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.qslpro-chapitre-content-body .formulas-table th,
.qslpro-chapitre-content-body .formulas-table td {
    border: 1px solid #dee2e6;
    padding: 10px 14px;
    text-align: left;
}

.qslpro-chapitre-content-body .formulas-table th {
    background: #e7f5ff;
    color: #1971c2;
    font-weight: bold;
}

/* ═══════════════════════════════════════════════════════════════════════
   🆘 HUB AIDE - VERSION 4.7.2
   3 cartes côte à côte (Guide, Guide Avancé, Signaler un bug)
   ═══════════════════════════════════════════════════════════════════════ */

/* Grille 3 colonnes pour Hub Aide */
.qslpro-aide-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* 3 colonnes égales */
    gap: 20px;
    max-width: 950px;
    margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════
   CARTE GUIDE - Bleu
   ══════════════════════════════════════════════════════════════ */
#card-guide {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 20px rgba(79, 172, 254, 0.3);
}

#card-guide:hover {
    box-shadow: 0 6px 25px rgba(79, 172, 254, 0.4);
}

/* ══════════════════════════════════════════════════════════════
   CARTE GUIDE AVANCÉ - Vert
   ══════════════════════════════════════════════════════════════ */
#card-advanced-guide {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 4px 20px rgba(17, 153, 142, 0.3);
}

#card-advanced-guide:hover {
    box-shadow: 0 6px 25px rgba(17, 153, 142, 0.4);
}

/* ══════════════════════════════════════════════════════════════
   CARTE SIGNALER UN BUG - Rouge/Orange
   ══════════════════════════════════════════════════════════════ */
#card-bug-report {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    box-shadow: 0 4px 20px rgba(235, 51, 73, 0.3);
}

#card-bug-report:hover {
    box-shadow: 0 6px 25px rgba(235, 51, 73, 0.4);
}

/* ══════════════════════════════════════════════════════════════
   PAGE BUG REPORT - Styles du formulaire (tab)
   ══════════════════════════════════════════════════════════════ */
.qslpro-bug-report-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

.qslpro-bug-report-intro {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
}

.qslpro-bug-form .qslpro-form-group {
    margin-bottom: 20px;
}

.qslpro-bug-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.qslpro-bug-form select,
.qslpro-bug-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.qslpro-bug-form select:focus,
.qslpro-bug-form textarea:focus {
    border-color: #0073aa;
    outline: none;
}

.qslpro-bug-form .qslpro-form-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #f0f7ff;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #0073aa;
    font-size: 13px;
}

.qslpro-bug-form .qslpro-form-actions {
    text-align: center;
}

.qslpro-bug-success {
    text-align: center;
    padding: 40px 20px;
}

.qslpro-bug-success .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #28a745;
    margin-bottom: 20px;
}

.qslpro-bug-success h3 {
    color: #28a745;
    margin: 0 0 10px;
}

.qslpro-bug-success p {
    color: #666;
    margin: 0 0 20px;
}

/* ══════════════════════════════════════════════════════════════
   CARTE RECHERCHE - Gradient cyan/bleu
   ══════════════════════════════════════════════════════════════ */
#card-recherche {
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 50%, #66bb6a 100%);
    box-shadow: 0 4px 20px rgba(67, 160, 71, 0.3);
}

#card-recherche:hover {
    box-shadow: 0 6px 25px rgba(67, 160, 71, 0.4);
}

/* ══════════════════════════════════════════════════════════════
   VUE RECHERCHE - Layout principal
   ══════════════════════════════════════════════════════════════ */
.qslpro-recherche-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qslpro-recherche-content {
    max-width: 700px;
    margin: 20px auto 0;
    padding: 0 20px;
}

/* Mode selector cards */
.qslpro-recherche-mode-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.qslpro-recherche-mode-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    position: relative;
}

.qslpro-recherche-mode-card:hover {
    border-color: #90caf9;
    background: #f8fbff;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.1);
}

.qslpro-recherche-mode-card.active {
    border-color: #1976d2;
    background: #f0f7ff;
    box-shadow: 0 2px 12px rgba(25, 118, 210, 0.15);
}

.qslpro-recherche-mode-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f0f0f0;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.qslpro-recherche-mode-card.active .qslpro-recherche-mode-icon {
    background: #1976d2;
}

.qslpro-recherche-mode-icon .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: #888;
    transition: color 0.25s ease;
}

.qslpro-recherche-mode-card.active .qslpro-recherche-mode-icon .dashicons {
    color: #fff;
}

.qslpro-recherche-mode-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.qslpro-recherche-mode-title {
    font-size: 15px;
    font-weight: 700;
    color: #555;
    transition: color 0.25s ease;
    line-height: 1.3;
}

.qslpro-recherche-mode-card.active .qslpro-recherche-mode-title {
    color: #1565c0;
}

.qslpro-recherche-mode-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.4;
    transition: color 0.25s ease;
}

.qslpro-recherche-mode-card.active .qslpro-recherche-mode-desc {
    color: #5a9bd5;
}

.qslpro-recherche-mode-check {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #d0d0d0;
    transition: all 0.25s ease;
    opacity: 0;
}

.qslpro-recherche-mode-card.active .qslpro-recherche-mode-check {
    color: #1976d2;
    opacity: 1;
}

/* Search box */
.qslpro-recherche-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.qslpro-recherche-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.qslpro-recherche-input-icon {
    position: absolute;
    left: 14px;
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #b0b0b0;
    pointer-events: none;
    transition: color 0.25s ease;
}

.qslpro-recherche-input-wrapper:focus-within .qslpro-recherche-input-icon {
    color: #1976d2;
}

.qslpro-recherche-panel {
    display: none;
}

.qslpro-recherche-panel.active {
    display: block;
}

.qslpro-recherche-input {
    width: 100%;
    padding: 13px 14px 13px 42px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #fff;
    color: #333;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.qslpro-recherche-input:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
    background: #fff;
    outline: none;
}

.qslpro-recherche-input::placeholder {
    color: #aaa;
}

.qslpro-recherche-help {
    font-size: 13px;
    color: #999;
    margin-bottom: 18px;
    line-height: 1.5;
    padding-left: 2px;
}

@media (max-width: 520px) {
    .qslpro-recherche-mode-selector {
        flex-direction: column;
        gap: 10px;
    }
    .qslpro-recherche-mode-desc {
        display: none;
    }
    .qslpro-recherche-search-box {
        flex-direction: column;
        align-items: stretch;
    }
    .qslpro-recherche-search-box .qslpro-btn {
        justify-content: center;
    }
}

/* ISDE result card */
.qslpro-recherche-result {
    display: none;
    margin-top: 20px;
}

.qslpro-recherche-result-card {
    background: #f0f7ff;
    border: 1px solid #bbdefb;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qslpro-recherche-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1976d2;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    align-self: flex-start;
}

.qslpro-recherche-result-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.qslpro-recherche-result-detail {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qslpro-recherche-result-info {
    font-size: 14px;
    color: #555;
}

.qslpro-recherche-result-info strong {
    color: #333;
}

.qslpro-recherche-open-module {
    align-self: flex-start;
    margin-top: 4px;
}

.qslpro-recherche-error {
    display: none;
    padding: 12px 16px;
    background: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    color: #c62828;
    font-size: 14px;
    margin-top: 12px;
}

/* Glossary panel */
.qslpro-recherche-count {
    display: none;
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.qslpro-recherche-loading {
    display: none;
    text-align: center;
    padding: 30px 20px;
    color: #999;
}

.qslpro-recherche-loading .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    display: block;
    margin: 0 auto 8px;
    animation: qslpro-spin 1s linear infinite;
}

@keyframes qslpro-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.qslpro-recherche-glossary-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - 360px);
    overflow-y: auto;
}

.qslpro-recherche-glossary-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qslpro-recherche-glossary-item:hover {
    background: #e3f2fd;
    border-color: #90caf9;
}

.qslpro-recherche-glossary-item.expanded {
    background: #e3f2fd;
    border-color: #1976d2;
}

.qslpro-recherche-glossary-term {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.qslpro-recherche-glossary-phase {
    font-size: 11px;
    color: #fff;
    background: #1976d2;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
}

/* Accordéon inline */
.qslpro-recherche-glossary-detail {
    width: 100%;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qslpro-recherche-glossary-def {
    padding: 12px 14px;
    background: #fff;
    border-radius: 8px;
    border-left: 3px solid #1976d2;
}

.qslpro-recherche-glossary-def-phase {
    font-size: 12px;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 4px;
}

.qslpro-recherche-glossary-def-text {
    font-size: 13px;
    color: #444;
    line-height: 1.6;
    margin: 0 0 8px;
}

.qslpro-recherche-glossary-def .qslpro-recherche-open-module {
    font-size: 13px;
    padding: 6px 12px;
}

.qslpro-recherche-empty {
    display: none;
    text-align: center;
    padding: 30px 20px;
    color: #999;
    font-size: 14px;
}

/* ═══ Animation boxes dans modules ═══ */
.qslpro-anim-box {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: #fdf6e8;
    border: 2px solid #e6c98a;
    border-radius: 12px;
    padding: 14px 24px;
    margin: 16px 0;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.qslpro-anim-box:hover {
    background: #fcefd4;
    border-color: #d4a84b;
    box-shadow: 0 2px 12px rgba(184,146,79,0.25);
}
.qslpro-anim-box .vproj {
    flex-shrink: 0;
}
.qslpro-anim-title {
    font-size: 20px;
    font-weight: 600;
    color: #5a3e1a;
    line-height: 1.3;
}

/* Projecteur SVG animations */
.vproj { overflow: visible; }
.vp-reel { transform-box: fill-box; transform-origin: center; }
.vp-reel--big { animation: vp-spin 3.4s linear infinite; }
.vp-reel--small { animation: vp-spin 1.9s linear infinite; }
@keyframes vp-spin { to { transform: rotate(360deg); } }
.vp-beam { transform-box: fill-box; transform-origin: left center; }
.vp-beam--1 { animation: vp-flick 2.4s ease-in-out infinite; }
.vp-beam--2 { animation: vp-flick 1.5s ease-in-out infinite reverse; }
.vp-beam--core { animation: vp-core .8s steps(3,end) infinite; }
@keyframes vp-flick { 0%,100%{opacity:.5;transform:scaleY(.94);} 45%{opacity:.92;transform:scaleY(1.06);} 70%{opacity:.7;transform:scaleY(1);} }
@keyframes vp-core { 0%,100%{opacity:.95;} 50%{opacity:.55;} }
.vp-ray { transform-box: fill-box; transform-origin: left center; }
.vp-ray--a { animation: vp-ray 1.3s ease-in-out infinite; }
.vp-ray--b { animation: vp-ray 1.9s ease-in-out infinite .3s; }
.vp-ray--c { animation: vp-ray 1.6s ease-in-out infinite .6s; }
@keyframes vp-ray { 0%,100%{opacity:.08;} 50%{opacity:.5;} }
.vp-mote { transform-box: fill-box; animation: vp-mote 3.2s linear infinite; }
.vp-mote--2 { animation-duration: 4.1s; animation-delay: -1.2s; }
.vp-mote--3 { animation-duration: 2.7s; animation-delay: -.6s; }
@keyframes vp-mote { 0%{opacity:0;transform:translate(0,0);} 12%{opacity:.85;} 70%{opacity:.45;} 100%{opacity:0;transform:translate(26px,-7px);} }
.vp-lamp { transform-box: fill-box; transform-origin: center; animation: vp-lamp 1.1s ease-in-out infinite; }
@keyframes vp-lamp { 0%,100%{opacity:.85;} 50%{opacity:1;} }
@media (prefers-reduced-motion: reduce) {
    .vp-reel,.vp-beam,.vp-ray,.vp-mote,.vp-lamp { animation: none; }
}

/* ═══ Animation popup (iframe) ═══ */
.qslpro-anim-popup {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qslpro-anim-popup-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
}
.qslpro-anim-popup-container {
    position: relative;
    width: 96vw;
    height: 94vh;
    max-width: 1600px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}
.qslpro-anim-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #f8f0e0;
    border-bottom: 2px solid #e6c98a;
}
.qslpro-anim-popup-title {
    font-size: 16px;
    font-weight: 700;
    color: #5a3e1a;
}
.qslpro-anim-popup-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #7c5a2d;
    line-height: 1;
    padding: 0 4px;
}
.qslpro-anim-popup-close:hover {
    color: #c92a2a;
}
.qslpro-anim-popup-iframe {
    flex: 1;
    width: 100%;
    border: none;
}