/* ============================================= */
/* == STYLE DÉFINITIF POUR LE POP-UP BOTMATH   == */
/* ============================================= */
#botmath-popup-overlay { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.5); z-index: 99998; justify-content: center; align-items: center; }
#botmath-popup-overlay[style*="display: flex"] { display: flex !important; }
#botmath-popup-container { background: #ffffff; color: #333; max-width: 95%; width: 1000px; height: 100vh; border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); z-index: 99999; display: flex; flex-direction: column; }
#botmath-popup-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; border-bottom: 1px solid #e0e0e0; position: relative; height: 55px; }
#botmath-popup-header h3 { margin: 0; font-size: 1.2em; position: absolute; left: 50%; transform: translateX(-50%); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#botmath-popup-close { position: absolute; right: 10px; top: 10px; background: none; border: none; font-size: 2.2em; cursor: pointer; color: #444; padding: 5px; line-height: 1; z-index: 10000; }
#botmath-popup-content { flex-grow: 1; padding: 0; position: relative; overflow: hidden; }
#botmath-popup-content iframe { width: 100%; height: 100%; border: none; }
#botmath-popup-footer { display: none !important; }
.loader { border: 8px solid #f3f3f3; border-radius: 50%; border-top: 8px solid #3498db; width: 60px; height: 60px; animation: spin 2s linear infinite; position: absolute; top: 50%; left: 50%; margin-top: -30px; margin-left: -30px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ============================================= */
/* == MASQUAGE DES ÉLÉMENTS GEOGEBRA           == */
/* ============================================= */
.geogebra-header, .gjs-header, .ggb-header, .header, .GeoGebraHeader,
.GeoGebraNavigationBar, .TopBar, .ggb-top-bar, .geogebra-footer, .gjs-footer,
.ggb-footer, .footer, .GeoGebraFooter, .GeoGebraResourceList, .GeoGebraLogoBar,
.resource-list, .ggb-bottom-bar { display: none !important; }

/* ============================================= */
/* == STYLE POUR LA NAVIGATION SÉQUENTIELLE    == */
/* ============================================= */
.botmath-sequence-nav { display: flex; justify-content: space-between; align-items: center; padding: 5px 15px; background: #f8f9fa; border-bottom: 1px solid #ddd; height: 45px; box-sizing: border-box; }
.botmath-sequence-nav a { color: #0073aa; text-decoration: none; display: flex; align-items: center; justify-content: center; width: 35px; height: 35px; border-radius: 50%; transition: background-color 0.2s; }
.botmath-sequence-nav a:hover { background-color: #e0e0e0; }
.botmath-sequence-nav .dashicons { font-size: 28px; width: auto; height: auto; }
.botmath-sequence-nav .nav-left, .botmath-sequence-nav .nav-right { flex: 1; }
.botmath-sequence-nav .nav-right { display: flex; justify-content: flex-end; }
.botmath-sequence-nav .nav-center { flex: 0 1 auto; }

/* ==========================================================================
  STYLE DE LA PAGE PROFIL ÉLÈVE
========================================================================== */
.botmath-profil-page .profil-container { max-width: 800px; margin: 40px auto; padding: 40px; background-color: #fdfaf3; border-radius: 15px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); border: 1px solid #e0d9c7; }
.profil-header { text-align: center; margin-bottom: 40px; padding-bottom: 20px; border-bottom: 2px solid #e0d9c7; }
.profil-header h2 { font-size: 2.5em; color: #6b4f2c; margin: 0; }
.profil-header p { font-size: 1.1em; color: #8c7b60; }
.profil-details { display: flex; align-items: center; gap: 40px; }
.profil-avatar { flex-shrink: 0; width: 120px; height: 120px; border-radius: 50%; background-color: #d4ae28; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 48px; font-weight: bold; }
.profil-info { width: 100%; }
.profil-info .info-item { margin-bottom: 20px; }
.profil-info .info-item label { display: block; font-size: 0.9em; font-weight: bold; color: #8c7b60; margin-bottom: 5px; }
.profil-info .info-item span { font-size: 1.2em; color: #333; padding: 10px; display: block; background-color: #fff; border-radius: 8px; border: 1px solid #e0d9c7; }
.profil-actions { margin-top: 40px; text-align: center; }
.bouton-deconnexion { background-color: #d95f76; color: #fff; padding: 12px 25px; border-radius: 8px; text-decoration: none; font-weight: bold; transition: background-color 0.2s; }
.bouton-deconnexion:hover { background-color: #c85066; }

/* ============================================= */
/* == BOUTON FLOTTANT "RETOUR ESPACE ELEVE"    == */
/* ============================================= */
.botmath-back-to-hub-btn { position: fixed; bottom: 25px; right: 25px; z-index: 999; background-color: #61ce70; color: #ffffff; width: 55px; height: 55px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.25); text-decoration: none; transition: transform 0.2s ease-in-out, background-color 0.2s; }
.botmath-back-to-hub-btn:hover { transform: scale(1.1); background-color: #78913e; color: #ffffff; }
.botmath-back-to-hub-btn .dashicons { font-size: 28px; width: auto; height: auto; }

/* ==========================================================================
   STYLE POUR LE TABLEAU HISTORIQUE DES ÉVALUATIONS
========================================================================== */
.botmath-history-table-wrapper { margin-top: 20px; }
.botmath-history-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.botmath-history-table th, .botmath-history-table td { padding: 12px 15px; border: 1px solid #e0d9c7; text-align: left; vertical-align: middle; }
.botmath-history-table th { background-color: #f2e4b8; color: #6b4f2c; font-weight: bold; }
.botmath-history-table tr:nth-child(even) { background-color: #fdfaf3; }
.botmath-history-action-btn { display: inline-block; padding: 6px 12px; margin-right: 5px; margin-bottom: 5px; border-radius: 5px; color: #fff !important; text-decoration: none; font-weight: bold; font-size: 13px; text-align: center; transition: opacity 0.2s; }
.botmath-history-action-btn:hover { opacity: 0.85; }
.review-btn { background-color: #6c757d; }
.redo-btn { background-color: #0073aa; }

@media screen and (max-width: 768px) {
    .botmath-history-table thead { display: none; }
    .botmath-history-table, .botmath-history-table tbody, .botmath-history-table tr, .botmath-history-table td { display: block; width: 100%; }
    .botmath-history-table tr { margin-bottom: 15px; border: 2px solid #bfa132; border-radius: 5px; overflow: hidden; }
    .botmath-history-table td { text-align: right; padding-left: 50%; position: relative; border: none; border-bottom: 1px solid #f2e4b8; }
    .botmath-history-table td:last-child { border-bottom: none; }
    .botmath-history-table td::before { content: attr(data-label); position: absolute; left: 10px; width: calc(50% - 20px); padding-right: 10px; white-space: nowrap; text-align: left; font-weight: bold; color: #6b4f2c; }
}
/* --- 1. GRILLE DE BASE (Mobile & Tablette) --- */
.botmath-hub-menu,
.cartes-container,       /* <--- J'AI AJOUTÉ CETTE LIGNE ICI */
.card-container,
.portal-menu-grid,
.students-container,
.periods-container,
.botmath-parcours-container, 
.botmath-lecon-menu-container {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    justify-content: center;
    margin-bottom: 40px;
}
/* ==========================================================================
   CSS GLOBAL UNIFIÉ POUR TOUTES LES CARTES DE LA PLATEFORME
========================================================================== */

/* --- 2. FORCE 4 CARTES PAR LIGNE SUR PC --- */
@media (min-width: 1024px) {
    .botmath-hub-menu, 
    .cartes-container,   /* <--- J'AI AJOUTÉ CETTE LIGNE ICI */
    .card-container, 
    .portal-menu-grid, 
    .students-container, 
    .periods-container, 
    .botmath-parcours-container, 
    .botmath-lecon-menu-container {
        grid-template-columns: repeat(4, 1fr) !important; 
    }
}
   

/* --- 2. STYLE MAÎTRE APPLIQUÉ À TOUTES LES CARTES --- */
.botmath-card, .portal-card, .student-summary-card, .period-item {
    display: flex; text-decoration: none !important; background: #fff; border-radius: 12px; border-width: 5px; border-style: solid; box-shadow: 5px 5px 10px 5px rgba(0, 0, 0, 0.15) !important; min-height: 180px; transition: transform 0.2s, box-shadow 0.2s; padding: 15px;
}
.botmath-card:hover, .portal-card:hover, .student-summary-card:hover, .period-item:hover {
    transform: translateY(-8px); box-shadow: 8px 8px 15px 5px rgba(0, 0, 0, 0.2) !important;
}

/* --- 3. STYLE DU CONTENU INTERNE --- */
.botmath-card-content, .portal-card-content, .student-summary-card, .period-item { width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.botmath-card-icon, .portal-card-icon, .period-item .dashicons { font-size: 39px !important; margin-bottom: 20px !important; height: auto !important; width: auto !important; }
.botmath-card-title, .portal-card-title, .student-summary-card h3, .period-item h3 { font-size: 1.2em !important; font-weight: 600 !important; text-align: center !important; margin: 0 !important; padding: 0 !important; }
.student-summary-card p { font-size: 0.9em; color: #666; text-align: center; margin-top: 15px; margin-bottom: 0; }
.period-item .botmath-progress-bar { width: 90%; height: 12px; background-color: #e9ecef; border-radius: 6px; margin: 15px auto 5px auto; overflow: hidden; }
.period-item .botmath-progress-bar-inner { height: 100%; background-color: #28a745; border-radius: 6px; transition: width 0.5s ease-in-out; }
.period-item .botmath-progress-label { font-size: 0.85em; color: #6c757d; text-align: center; }
.card-step-header { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 15px; margin-bottom: 15px; color: #61ce70; }
.card-step-number { font-size: 2.8em; font-weight: bold; line-height: 1; }
.card-step-icon { font-size: 2.2em; line-height: 1; }
.botmath-parcours-step .botmath-card-title { font-size: 1.1em !important; }

/* --- 4. APPLICATION DES COULEURS SPÉCIFIQUES --- */
.botmath-card, .period-item { border-color: #61ce70; }
.botmath-card-icon, .period-item .dashicons { color: #61ce70; }
.botmath-card-title, .period-item h3 { color: #78913e; }
.botmath-parent-portal .portal-card, .botmath-parent-dashboard .student-summary-card { border-color: #bfa132; }
.botmath-parent-portal .portal-card-icon { color: #bfa132; }
.botmath-parent-portal .portal-card-title, .botmath-parent-dashboard .student-summary-card h3 { color: #8c6d1f; }
.botmath-teacher-portal .portal-card, .botmath-teacher-dashboard .student-summary-card { border-color: #74a4bf; }
.botmath-teacher-portal .portal-card-icon { color: #74a4bf; }
.botmath-teacher-portal .portal-card-title, .botmath-teacher-dashboard .student-summary-card h3 { color: #4a7891; }

/* --- 5. STYLES SPÉCIFIQUES POUR LE JEU DE CARTES --- */
.botmath-card.size-numeric { width: 150px !important; height: 200px !important; font-size: 60px; aspect-ratio: auto; }
.botmath-card.size-large { width: 100%; max-width: 350px; font-size: 40px; text-align: center; padding: 10px; }
.botmath-card img, .botmath-card video { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.botmath-card.is-disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.25); }
.botmath-card.correct { border-color: #43b047 !important; box-shadow: 0 0 16px #4CAF5066; transform: scale(1.05); background: #edffe4; }
.botmath-card.incorrect { border-color: #f44336 !important; animation: shake 0.45s; background: #fff4f3; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* --- 6. HEADER D'ÉVALUATION POUR LE JEU DE CARTES --- */
.evaluation-header { margin-bottom: 20px; padding: 15px; background: #f0f0f0; border-radius: 8px; text-align: center; }
#question-display-area { font-size: 1.5em; font-weight: bold; min-height: 50px; margin-bottom: 15px; display: flex; align-items: center; justify-content: center; }
#next-question-btn { font-size: 1.1em; padding: 8px 16px; cursor: pointer; }
#eval-feedback-area { margin-top: 10px; font-size: 1.2em; font-weight: bold; }


/* ==========================================================================
   CONTENEUR PRINCIPAL ET CORRECTION FINALE DES ESPACES
   ========================================================================== */
.botmath-main-container { max-width: 1200px; margin: 20px auto 40px auto; padding: 40px; background: #fff; border-radius: 12px; box-shadow: 5px 5px 10px 5px rgba(0, 0, 0, 0.1); }
.single-botmath_lecon .content-area, .tax-periode .content-area { padding-top: 5px !important; }
.single-botmath_lecon .botmath-main-container h2, .tax-periode .botmath-main-container h1 { margin-top: 0; margin-bottom: 25px; }
.page-title { display: none !important; }

/* ==========================================================================
   STYLE GLOBAL UNIFIÉ POUR LES BOUTONS (STYLE DIAPORAMA)
   ========================================================================== */
.scene-validate-button, .retry-scene-button, .botmath-validate-button, .botmath-restart-button, .guardian-actions a, .student-summary-card .details-link, .botmath-history-action-btn, .botmath-demo-wrapper .button, .bouton-deconnexion, .diapo-btn {
    text-decoration: none !important; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; outline: none; background-color: #d4af37; color: white !important; border: 4px solid white; border-radius: 8px; box-shadow: inset 0 -3px 0 0 rgba(0,0,0,0.25), 0 2px 4px rgba(0,0,0,0.2); padding: 10px 20px; font-weight: bold; text-shadow: 1px 1px 1px rgba(0,0,0,0.2); transition: all 0.15s ease-in-out;
}
.scene-validate-button:hover, .retry-scene-button:hover, .botmath-validate-button:hover, .botmath-restart-button:hover, .guardian-actions a:hover, .student-summary-card .details-link:hover, .botmath-history-action-btn:hover, .botmath-demo-wrapper .button:hover, .bouton-deconnexion:hover, .diapo-btn:hover {
    background-color: #e4c151; border-color: white; transform: translateY(-2px); box-shadow: inset 0 -2px 0 0 rgba(0,0,0,0.25), 0 4px 8px rgba(0,0,0,0.25);
}
.scene-validate-button:active, .retry-scene-button:active, .botmath-validate-button:active, .botmath-restart-button:active, .guardian-actions a:active, .student-summary-card .details-link:active, .botmath-history-action-btn:active, .botmath-demo-wrapper .button:active, .bouton-deconnexion:active, .diapo-btn:active {
    transform: translateY(1px); box-shadow: inset 0 -1px 0 0 rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.15);
}
.bouton-deconnexion { background-color: #d95f76 !important; }
.bouton-deconnexion:hover { background-color: #c85066 !important; }
.botmath-history-action-btn.review-btn { background-color: #6c757d !important; }
.botmath-history-action-btn.review-btn:hover { background-color: #5a6268 !important; }
.botmath-history-action-btn.redo-btn { background-color: #0073aa !important; }
.botmath-history-action-btn.redo-btn:hover { background-color: #005a87 !important; }

/* ==========================================================================
   STYLE POUR LA PAGE DE CONNEXION PERSONNALISÉE (/connexion/)
   ========================================================================== */
body.page-slug-connexion #login { max-width: 420px; margin: 40px auto; padding: 40px; background: #fff; border-radius: 12px; box-shadow: 5px 5px 10px 5px rgba(0, 0, 0, 0.1); }
.page-slug-connexion #loginform { margin: 0; padding: 0; border: none; box-shadow: none; }
.page-slug-connexion #login label { font-size: 1.1em; font-weight: bold; color: #110f19; margin-bottom: 8px; display: block; }
.page-slug-connexion #login input[type="text"], .page-slug-connexion #login input[type="password"] { width: 100%; padding: 12px; font-size: 1.1em; border: 2px solid #ddd; border-radius: 8px; background-color: #f9f9f9; transition: border-color 0.2s, box-shadow 0.2s; box-sizing: border-box; }
.page-slug-connexion #login input[type="text"]:focus, .page-slug-connexion #login input[type="password"]:focus { border-color: #bfa132; box-shadow: 0 0 0 3px rgba(191, 161, 50, 0.2); outline: none; }
.page-slug-connexion #login .wp-submit { width: 100%; background: linear-gradient(to right, #d9a900, #fceabb) !important; color: #110f19 !important; border: 2px solid #000 !important; border-radius: 3px !important; box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.4) !important; padding: 10px 20px !important; font-weight: bold !important; font-size: 1.2em !important; text-shadow: none !important; height: auto !important; transition: all 0.3s ease-in-out !important; }
.page-slug-connexion #login .wp-submit:hover { background: linear-gradient(to right, #fceabb, #d9a900) !important; box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2) !important; border-top-right-radius: 25px !important; border-bottom-left-radius: 25px !important; }
.page-slug-connexion #nav, .page-slug-connexion #backtoblog { text-align: center; padding: 10px 0 0 0; }
.page-slug-connexion #nav a, .page-slug-connexion #backtoblog a { color: #8c6d1f; text-decoration: none; }
.page-slug-connexion #nav a:hover, .page-slug-connexion #backtoblog a:hover { text-decoration: underline; }
.page-slug-connexion .must-log-in { display: none; }
/* Style pour le badge de notification */
.botmath-notif-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #d9534f; /* Rouge */
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid white;
    min-width: 12px;
    text-align: center;
    line-height: 1.2;
    display: none; /* Caché par défaut */
}

/* Positionnement relatif pour que le badge se place correctement */
.botmath-card-content, .portal-card-content {
    position: relative;
}
/* ============================================= */
/* == STYLE POUR LE POP-UP DE RÉVISION         == */
/* ============================================= */
#botmath-review-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
#botmath-review-popup-container {
    background: #ffffff;
    color: #333;
    max-width: 90%;
    width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 100001;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 25px;
}
#botmath-review-popup-close {
    position: absolute;
    right: 10px;
    top: 10px;
    background: #eee;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #444;
    width: 30px;
    height: 30px;
    line-height: 1;
    border-radius: 50%;
}
#botmath-review-popup-close:hover {
    background: #ddd;
}
#botmath-review-popup-container h3 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}
.review-content h4 {
    color: #005a87;
    margin-top: 15px;
    margin-bottom: 5px;
}
.review-content ul {
    margin: 0;
    padding-left: 20px;
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 10px 10px 10px 30px;
    border-radius: 4px;
}
.review-content ul li {
    margin-bottom: 5px;
}

/* ============================================= */
/* == STYLE POP-UP : BASE (Améliorée)          == */
/* ============================================= */
#botmath-popup-overlay { 
    /* ... styles existants ... */
    display: none; /* Assurez-vous qu'il est caché par défaut */
    align-items: center; /* Centrer verticalement par défaut */
}
#botmath-popup-container {
    /* ... styles existants ... */
    max-height: 95vh; /* Limiter la hauteur */
    overflow: hidden; /* Empêcher le conteneur de déborder */
    display: flex; /* S'assurer que c'est flex */
    flex-direction: column; /* Header en haut, content en bas */
}
#botmath-popup-header {
    /* ... styles existants ... */
    position: relative; /* Pour positionner les enfants */
    flex-shrink: 0; /* Empêcher le header de rétrécir */
    z-index: 10; /* Au-dessus du contenu */
}
#botmath-popup-header h3 {
     /* Centrage amélioré */
     position: absolute;
     left: 50%;
     top: 50%;
     transform: translate(-50%, -50%);
     max-width: calc(100% - 140px); /* Laisser place aux boutons */
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
     margin: 0;
}
#botmath-popup-nav-controls {
    position: absolute; /* Positionner par rapport au header */
    left: 15px; /* À gauche */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}
.popup-nav-btn { /* Style pour boutons Préc/Suiv */
    font-size: 18px; background: #e6e6e6; color: #444; border: none;
    border-radius: 50%; width: 32px; height: 32px; display: inline-flex;
    align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.popup-nav-btn:hover { background: #d0d0d0; }

#botmath-popup-close {
    /* ... styles existants ... */
    position: absolute; /* Positionner par rapport au header */
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 11; /* Au-dessus de tout */
    font-size: 1.8em; /* Un peu plus petit */
    padding: 0; line-height: 1; width: 32px; height: 32px; /* Taille fixe */
    background: #eee; border-radius: 50%;
}
#botmath-popup-close:hover { background: #ddd; }

#botmath-popup-content {
    /* ... styles existants ... */
    flex-grow: 1; /* Prendre l'espace restant */
    overflow-y: auto; /* Ajouter scroll si contenu dépasse */
     padding: 15px; /* Ajouter un peu de padding par défaut */
}
#botmath-popup-content iframe {
     padding: 0; /* Pas de padding pour les iframes */
     width: 100%;
     height: 100%;
     display: block; /* Éviter espace blanc sous l'iframe */
}

/* ============================================= */
/* == STYLE POUR LE POP-UP "SCÈNE SIMPLE" (TYPE 1) == */
/* ============================================= */
#botmath-popup-container.popup-mode-simple {
    width: auto; /* S'adapte au contenu */
    max-width: 90%; /* Limite max */
    height: auto; /* S'adapte au contenu */
    max-height: 90vh; /* Limite max */
    overflow: visible; /* Permettre au bouton X de sortir un peu */
}
/* Masquer le titre et la nav Préc/Suiv */
#botmath-popup-container.popup-mode-simple #botmath-popup-header h3,
#botmath-popup-container.popup-mode-simple #botmath-popup-nav-controls {
    display: none;
}
/* Rendre le header transparent et sans hauteur pour Type 1 */
#botmath-popup-container.popup-mode-simple #botmath-popup-header {
    height: 0;
    padding: 0;
    border-bottom: none;
    overflow: visible; /* Permettre au bouton X de sortir */
}
/* Repositionner le bouton 'X' pour Type 1 */
#botmath-popup-container.popup-mode-simple #botmath-popup-close {
    top: -15px; /* Au-dessus du conteneur */
    right: -15px; /* À droite du conteneur */
    transform: none; /* Annuler le centrage vertical */
    background: #555; /* Plus visible */
    color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}
#botmath-popup-container.popup-mode-simple #botmath-popup-close:hover {
     background: #333;
}
/* Le contenu prend toute la place pour Type 1 */
#botmath-popup-container.popup-mode-simple #botmath-popup-content {
    overflow-y: auto; /* Scroll si nécessaire */
     padding: 20px; /* Padding intérieur */
}
/* Styles spécifiques pour le contenu de scène simple (ajustez si besoin) */
#botmath-popup-container.popup-mode-simple .botmath-scene-interactive-wrapper .scene-area {
    min-height: 300px; /* Hauteur minimum pour la scène simple */
    border: none; /* Pas de bordure pointillée dans le popup */
}
/* 1. Ajustement du wrapper de l'activité (Annule la remontée excessive) */
.botmath-activity-wrapper {
    /* Abaisser le contenu pour qu'il ne soit pas sous l'en-tête du site */
    margin-top: -20px !important; 
    padding-top: 0 !important;
}

/* 2. Ajustement spécifique au thème Astra (pour la balise article) */
.site-main article {
    /* Abaisser l'article pour qu'il ne soit pas sous l'en-tête du site */
    margin-top: -20px !important; 
}
/* Laisse un petit espace sous l'entête pour éviter qu'elle cache le contenu */
.site-content,
.elementor-location-single,
.elementor {
  margin-top: 20px !important; /* Espace léger – augmente si nécessaire */
}
/* Cache les titres des pages et des articles */
.entry-title {
  display: none;
}
/* --- Styles des Boutons d'Historique (Mise à jour) --- */

/* 1. Style Général (Forme et Ombres) */
.botmath-history-action-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    margin-bottom: 8px;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: bold;
    border: 2px solid white; 
    transition: all 0.2s ease;

    /* Ombre portée : Etat Normal (5px 5px 10px 5px) */
    box-shadow: 5px 5px 10px 5px rgba(0,0,0,0.15);
}

/* Interaction au survol */
.botmath-history-action-btn:hover {
    transform: translateY(2px); /* Effet d'appui */
    
    /* Ombre portée : Survol (3px 3px 6px 3px) */
    box-shadow: 3px 3px 6px 3px rgba(0,0,0,0.25);
}

/* 2. BOUTON 1 : Rapport Visuel (Vert #61ce70) */
.botmath-history-action-btn.rapport-btn {
    background-color: #61ce70;
    color: #fff !important; /* Texte blanc */
}
.botmath-history-action-btn.rapport-btn:hover {
    background-color: #51b05f; 
}

/* 3. BOUTON 2 : Rapport Écrit (Or #bfa132) */
.botmath-history-action-btn.rapport-btn-ecrit {
    background-color: #bfa132;
    color: #fff !important; /* Texte blanc */
}
.botmath-history-action-btn.rapport-btn-ecrit:hover {
    background-color: #a3882a;
}

/* 4. BOUTON 3 : Refaire (Beige #f4e1ae) */
/* Note : J'ai mis le texte en noir car le beige est clair */
.botmath-history-action-btn.redo-btn {
    background-color: #f4e1ae;
    color: #000 !important; /* Texte noir pour la lisibilité */
}
.botmath-history-action-btn.redo-btn:hover {
    background-color: #e0cd9a;
}