/*
 * FormaSound Learning - CSS Principal
 * Adaptation du design FormaSound pour la plateforme d'apprentissage
 */

/* ==================== VARIABLES ==================== */
:root {
    --gold: #F5A623;
    --burgundy: #8A193D;
    --light-burgundy: #F7E6EB;
    --dark-gray: #333333;
    --light-gray: #F9F9F9;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-gray);
    overflow-x: hidden;
    background-color: #f8f9fa;
}

/* ==================== UTILITAIRES ==================== */
.text-gold {
    color: var(--gold) !important;
}

.text-burgundy {
    color: var(--burgundy) !important;
}

.bg-burgundy {
    background-color: var(--burgundy) !important;
}

.bg-light-burgundy {
    background-color: var(--light-burgundy) !important;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(245, 166, 35, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(245, 166, 35, 0);
    }
}

.animated {
    animation: fadeIn 0.8s ease forwards;
}

/* Animation d'apparition au scroll */
[data-animation] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-animation].animated {
    opacity: 1;
    transform: translateY(0);
}

/* Décalage des animations */
[data-animation="fade-up"]:nth-child(2) {
    transition-delay: 0.1s;
}

[data-animation="fade-up"]:nth-child(3) {
    transition-delay: 0.2s;
}

[data-animation="fade-up"]:nth-child(4) {
    transition-delay: 0.3s;
}

/* ==================== BOUTONS ==================== */
.btn {
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    text-transform: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn:hover::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.4rem 1.2rem;
    font-size: 0.9rem;
}

.btn-burgundy {
    background-color: var(--burgundy);
    color: white;
    border: none;
}

.btn-burgundy:hover {
    background-color: var(--burgundy);
    opacity: 0.9;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(138, 25, 61, 0.2);
}

.btn-outline-burgundy {
    color: var(--burgundy);
    border: 1px solid var(--burgundy);
    background-color: transparent;
}

.btn-outline-burgundy:hover {
    background-color: var(--burgundy);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(138, 25, 61, 0.2);
}

.btn-gold {
    background-color: var(--gold);
    color: var(--burgundy);
    border: none;
    font-weight: 600;
}

.btn-gold:hover {
    background-color: var(--gold);
    opacity: 0.9;
    color: var(--burgundy);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(245, 166, 35, 0.3);
}

/* ==================== NAVIGATION ==================== */
.navbar {
    padding: 15px 0;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    padding: 0;
    margin-right: 2rem;
    display: flex;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    margin: 0 10px;
    color: var(--dark-gray);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--burgundy);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -3px;
    left: 50%;
    background-color: var(--burgundy);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Logo styles */
.logo-container {
    height: 40px;
    margin-right: 12px;
}

.logo-container img {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .logo-container img {
    transform: scale(1.05);
}

/* ==================== CARTES ET CONTENEURS ==================== */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
}

/* ==================== TABLEAUX DE BORD ==================== */
.dashboard-card {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--burgundy);
    transition: height 0.3s ease;
}

.dashboard-card:hover::before {
    height: 10px;
}

.dashboard-icon {
    width: 50px;
    height: 50px;
    background-color: var(--light-burgundy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--burgundy);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.dashboard-card:hover .dashboard-icon {
    transform: scale(1.1) rotate(10deg);
    background-color: var(--burgundy);
    color: white;
}

.dashboard-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.dashboard-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--burgundy);
    margin-bottom: 0.5rem;
}

/* ==================== PROGRESS BARS ==================== */
.progress {
    height: 10px;
    border-radius: 5px;
    background-color: var(--light-gray);
    margin-bottom: 1rem;
}

.progress-bar {
    background-color: var(--burgundy);
    border-radius: 5px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.progress-label span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* ==================== LISTES ET BADGES ==================== */
.list-group-item {
    padding: 1rem 1.25rem;
    border-left: none;
    border-right: none;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: var(--light-gray);
    transform: translateX(5px);
}

.list-group-item.active {
    background-color: var(--burgundy);
    border-color: var(--burgundy);
}

.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
    border-radius: 50px;
}

.badge-burgundy {
    background-color: var(--burgundy);
    color: white;
}

.badge-gold {
    background-color: var(--gold);
    color: var(--dark-gray);
}

/* ==================== FORMULAIRES ==================== */
.form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--burgundy);
    box-shadow: 0 0 0 0.25rem rgba(138, 25, 61, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--burgundy);
    border-color: var(--burgundy);
}

.form-check-input:focus {
    border-color: var(--burgundy);
    box-shadow: 0 0 0 0.25rem rgba(138, 25, 61, 0.25);
}

/* ==================== PAGINATION ==================== */
.pagination {
    margin-bottom: 0;
}

.page-item.active .page-link {
    background-color: var(--burgundy);
    border-color: var(--burgundy);
}

.page-link {
    color: var(--burgundy);
}

.page-link:hover {
    color: var(--dark-gray);
    background-color: var(--light-gray);
}

.page-link:focus {
    box-shadow: 0 0 0 0.25rem rgba(138, 25, 61, 0.25);
}

/* ==================== BREADCRUMB ==================== */
.breadcrumb {
    padding: 0.75rem 1rem;
    background-color: var(--light-gray);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: var(--burgundy);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--dark-gray);
}

/* ==================== ALERTES ==================== */
.alert {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.alert-burgundy {
    background-color: var(--light-burgundy);
    color: var(--burgundy);
}

.alert-gold {
    background-color: rgba(245, 166, 35, 0.1);
    color: var(--gold);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning);
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.1);
    color: var(--info);
}

/* ==================== FOOTER ==================== */
footer {
    background-color: white;
    padding: 3rem 0 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 3rem;
}

footer h5 {
    font-weight: 600;
    margin-bottom: 1.25rem;
    position: relative;
    display: inline-block;
}

footer h5::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--burgundy);
}

footer ul {
    margin-bottom: 2rem;
}

footer ul li {
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--dark-gray);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--burgundy);
    text-decoration: none;
    transform: translateX(5px);
}

footer .social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

footer .social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

footer .social-icons a:hover {
    background-color: var(--burgundy);
    color: white;
    transform: translateY(-5px);
}

.footer-copyright {
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    color: #6c757d;
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 992px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .logo-container {
        height: 35px;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .dashboard-value {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 10px 0;
    }
    
    .logo-container {
        height: 30px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .dashboard-value {
        font-size: 1.5rem;
    }
    
    .dashboard-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    footer {
        padding: 2rem 0 1rem;
    }
}

@media (max-width: 576px) {
    .btn {
        padding: 0.5rem 1.25rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
    
    .dashboard-card {
        padding: 1.25rem;
    }
    
    .dashboard-value {
        font-size: 1.35rem;
    }
    
    .dashboard-title {
        font-size: 1.1rem;
    }
}

/* ==================== ÉLÉMENTS SPÉCIFIQUES ==================== */
/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Animations des icônes */
.card i, 
.btn i,
.list-group-item i {
    transition: transform 0.3s ease;
}

.card:hover i, 
.btn:hover i,
.list-group-item:hover i {
    transform: scale(1.2);
}

/* Effet de surbrillance */
.highlight {
    animation: highlight 2s ease-out;
}

@keyframes highlight {
    0% { background-color: rgba(245, 166, 35, 0.3); }
    100% { background-color: transparent; }
}

/* Effet d'ombre pour les cards au hover */
.card-hover-shadow {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card-hover-shadow:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

/* Loader spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-burgundy {
    color: var(--burgundy);
    width: 3rem;
    height: 3rem;
}

/* Badge de notification */
.badge-notification {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    padding: 0.25em 0.6em;
    font-size: 0.75rem;
    background-color: var(--danger);
    color: white;
    border-radius: 50px;
    border: 2px solid white;
}

/* Animation pour les compteurs */
.counter {
    transition: transform 0.3s ease;
}

.counter:hover {
    transform: scale(1.1);
}

/* Tooltip personnalisé */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: var(--dark-gray);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ===== SYSTÈME DE THÈME SOMBRE/CLAIR ===== */
/* À ajouter dans assets/css/style.css */

/* Variables CSS pour les thèmes */
:root {
  /* Thème clair (par défaut) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-muted: #adb5bd;
  --border-color: #dee2e6;
  --shadow: rgba(0, 0, 0, 0.1);
  --burgundy: #8B1538;
  --burgundy-light: #a61e42;
  --gold: #ffc107;
  --card-bg: #ffffff;
  --navbar-bg: #ffffff;
  --sidebar-bg: #f8f9fa;
}

/* Thème sombre */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #404040;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #999999;
  --border-color: #404040;
  --shadow: rgba(0, 0, 0, 0.3);
  --burgundy: #b8396b;
  --burgundy-light: #c4467a;
  --gold: #ffd43b;
  --card-bg: #2d2d2d;
  --navbar-bg: #1a1a1a;
  --sidebar-bg: #2d2d2d;
}

/* Application des variables aux éléments */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navbar */
.navbar {
  background-color: var(--navbar-bg) !important;
  border-bottom: 1px solid var(--border-color);
}

.navbar-brand,
.nav-link {
  color: var(--text-primary) !important;
}

.nav-link:hover {
  color: var(--burgundy) !important;
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.card-header {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
}

.card-footer {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
}

/* Textes */
.text-muted {
  color: var(--text-muted) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

/* Boutons */
.btn-burgundy {
  background-color: var(--burgundy);
  border-color: var(--burgundy);
  color: white;
}

.btn-burgundy:hover {
  background-color: var(--burgundy-light);
  border-color: var(--burgundy-light);
  color: white;
}

.btn-outline-burgundy {
  color: var(--burgundy);
  border-color: var(--burgundy);
}

.btn-outline-burgundy:hover {
  background-color: var(--burgundy);
  border-color: var(--burgundy);
  color: white;
}

.btn-gold {
  background-color: var(--gold);
  border-color: var(--gold);
  color: #000;
}

/* Forms */
.form-control,
.form-select {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--bg-secondary);
  border-color: var(--burgundy);
  color: var(--text-primary);
  box-shadow: 0 0 0 0.2rem rgba(139, 21, 56, 0.25);
}

/* Dropdown */
.dropdown-menu {
  background-color: var(--card-bg);
  border-color: var(--border-color);
}

.dropdown-item {
  color: var(--text-primary);
}

.dropdown-item:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

/* List groups */
.list-group-item {
  background-color: var(--card-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.list-group-item:hover {
  background-color: var(--bg-secondary);
}

.list-group-item.active {
  background-color: var(--burgundy);
  border-color: var(--burgundy);
}

/* Alerts */
.alert-success {
  background-color: rgba(25, 135, 84, 0.1);
  border-color: rgba(25, 135, 84, 0.2);
  color: var(--text-primary);
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.2);
  color: var(--text-primary);
}

.alert-warning {
  background-color: rgba(255, 193, 7, 0.1);
  border-color: rgba(255, 193, 7, 0.2);
  color: var(--text-primary);
}

.alert-info {
  background-color: rgba(13, 202, 240, 0.1);
  border-color: rgba(13, 202, 240, 0.2);
  color: var(--text-primary);
}

/* Progress bars */
.progress {
  background-color: var(--bg-tertiary);
}

.progress-bar {
  background-color: var(--burgundy);
}

/* Tables */
.table {
  color: var(--text-primary);
}

.table-striped > tbody > tr:nth-of-type(odd) > td,
.table-striped > tbody > tr:nth-of-type(odd) > th {
  background-color: var(--bg-secondary);
}

/* Pagination */
.page-link {
  background-color: var(--card-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.page-link:hover {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.page-item.active .page-link {
  background-color: var(--burgundy);
  border-color: var(--burgundy);
}

/* Badges */
.badge {
  color: white;
}

.bg-light {
  background-color: var(--bg-secondary) !important;
}

/* Spinner */
.spinner-burgundy {
  color: var(--burgundy);
}

/* Shadows */
.shadow,
.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem var(--shadow) !important;
}

/* Breadcrumb */
.breadcrumb {
  background-color: var(--bg-secondary);
}

.breadcrumb-item a {
  color: var(--burgundy);
}

/* Theme toggle button */
#theme-toggle {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

#theme-toggle:hover {
  background-color: var(--burgundy);
  border-color: var(--burgundy);
  color: white;
}

/* Animation pour le changement de thème */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Corrections spécifiques pour le thème sombre */
[data-theme="dark"] .bg-white {
  background-color: var(--card-bg) !important;
}

[data-theme="dark"] .text-dark {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .border {
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .navbar-light .navbar-toggler {
  border-color: var(--border-color);
}

[data-theme="dark"] .navbar-light .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Scrollbar pour le thème sombre */
[data-theme="dark"] ::-webkit-scrollbar {
  width: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Override des boutons burgundy en thème sombre */
[data-theme="dark"] .btn-burgundy:hover {
    background-color: var(--burgundy-light) !important;
    border-color: var(--burgundy-light) !important;
    color: white !important;
    /* Annuler le background blanc du hover */
    opacity: 1 !important;
}

[data-theme="dark"] .btn-outline-burgundy:hover {
    background-color: var(--burgundy) !important;
    border-color: var(--burgundy) !important;
    color: white !important;
}

/* Override des boutons gold en thème sombre */
[data-theme="dark"] .btn-gold:hover {
    background-color: var(--gold) !important;
    border-color: var(--gold) !important;
    color: #000 !important;
    opacity: 0.9 !important;
}

/* Override des autres boutons communs en thème sombre */
[data-theme="dark"] .btn-primary:hover {
    background-color: #0056b3 !important;
    border-color: #0056b3 !important;
    color: white !important;
}

[data-theme="dark"] .btn-secondary:hover {
    background-color: #545b62 !important;
    border-color: #545b62 !important;
    color: white !important;
}

[data-theme="dark"] .btn-success:hover {
    background-color: #1e7e34 !important;
    border-color: #1e7e34 !important;
    color: white !important;
}

[data-theme="dark"] .btn-danger:hover {
    background-color: #c82333 !important;
    border-color: #c82333 !important;
    color: white !important;
}

[data-theme="dark"] .btn-warning:hover {
    background-color: #e0a800 !important;
    border-color: #e0a800 !important;
    color: #000 !important;
}

[data-theme="dark"] .btn-info:hover {
    background-color: #117a8b !important;
    border-color: #117a8b !important;
    color: white !important;
}

[data-theme="dark"] .btn-light:hover {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .btn-dark:hover {
    background-color: #1a1a1a !important;
    border-color: #1a1a1a !important;
    color: white !important;
}

/* Override pour les boutons outline en thème sombre */
[data-theme="dark"] .btn-outline-primary:hover {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
}

[data-theme="dark"] .btn-outline-success:hover {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

[data-theme="dark"] .btn-outline-danger:hover {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

[data-theme="dark"] .btn-outline-warning:hover {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
}

[data-theme="dark"] .btn-outline-info:hover {
    background-color: #17a2b8 !important;
    border-color: #17a2b8 !important;
    color: white !important;
}

[data-theme="dark"] .btn-outline-light:hover {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .btn-outline-dark:hover {
    background-color: #343a40 !important;
    border-color: #343a40 !important;
    color: white !important;
}

/* Override spécifique pour les boutons link en thème sombre */
[data-theme="dark"] .btn-link:hover {
    color: var(--burgundy-light) !important;
    background-color: transparent !important;
    text-decoration: underline !important;
}

/* Override pour les petits boutons en thème sombre */
[data-theme="dark"] .btn-sm:hover,
[data-theme="dark"] .btn-lg:hover {
    transform: translateY(-2px) !important;
}

/* Correction pour les liens rapides (cards cliquables) */
[data-theme="dark"] .card:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] a.card:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    text-decoration: none !important;
}

[data-theme="dark"] a.card:hover .text-burgundy {
    color: var(--burgundy) !important;
}

/* Correction pour les éléments de liste cliquables */
[data-theme="dark"] .list-group-item-action:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Correction pour les badges au hover */
[data-theme="dark"] .badge:hover {
    opacity: 0.9 !important;
}

/* S'assurer que les icônes gardent leur couleur */
[data-theme="dark"] .btn:hover i {
    color: inherit !important;
}

/* Correction spécifique pour votre interface */
[data-theme="dark"] .btn:hover {
    /* Annuler tout background blanc forcé */
    background-color: inherit !important;
}

/* Override final pour s'assurer qu'aucun bouton ne devient blanc */
[data-theme="dark"] .btn:hover:not(.btn-light):not(.btn-outline-light) {
    background-color: inherit !important;
    filter: brightness(1.1) !important;
}




/* CSS Global d'override pour le thème sombre des cours */
/* À ajouter dans votre style.css principal */

/* ===== OVERRIDE GLOBAL POUR TOUS LES CONTENUS DE COURS ===== */

/* S'assurer que TOUT le texte est lisible en mode sombre */
[data-theme="dark"] .course-content,
[data-theme="dark"] .course-content *,
[data-theme="dark"] .chapter-content,
[data-theme="dark"] .chapter-content *,
[data-theme="dark"] .chapter-section,
[data-theme="dark"] .chapter-section *,
[data-theme="dark"] .highlight-info,
[data-theme="dark"] .highlight-info *,
[data-theme="dark"] .highlight-warning,
[data-theme="dark"] .highlight-warning *,
[data-theme="dark"] .highlight-success,
[data-theme="dark"] .highlight-success *,
[data-theme="dark"] .exercise-box,
[data-theme="dark"] .exercise-box *,
[data-theme="dark"] .formula,
[data-theme="dark"] .formula *,
[data-theme="dark"] .technical-note,
[data-theme="dark"] .technical-note *,
[data-theme="dark"] .flow-step,
[data-theme="dark"] .flow-step *,
[data-theme="dark"] .protools-section,
[data-theme="dark"] .protools-section *,
[data-theme="dark"] .mic-comparison,
[data-theme="dark"] .mic-comparison *,
[data-theme="dark"] .mic-legend,
[data-theme="dark"] .mic-legend * {
    color: #e0e0e0 !important;
}


/* Titres en blanc pour une meilleure lisibilité */
[data-theme="dark"] .course-content h1,
[data-theme="dark"] .course-content h2,
[data-theme="dark"] .course-content h3,
[data-theme="dark"] .course-content h4,
[data-theme="dark"] .course-content h5,
[data-theme="dark"] .course-content h6,
[data-theme="dark"] .chapter-content h1,
[data-theme="dark"] .chapter-content h2,
[data-theme="dark"] .chapter-content h3,
[data-theme="dark"] .chapter-content h4,
[data-theme="dark"] .chapter-content h5,
[data-theme="dark"] .chapter-content h6,
[data-theme="dark"] .chapter-section h1,
[data-theme="dark"] .chapter-section h2,
[data-theme="dark"] .chapter-section h3,
[data-theme="dark"] .chapter-section h4,
[data-theme="dark"] .chapter-section h5,
[data-theme="dark"] .chapter-section h6 {
    color: #ffffff !important;
}

/* Override des backgrounds pour le thème sombre */
[data-theme="dark"] .chapter-section {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
}

[data-theme="dark"] .highlight-info {
    background: linear-gradient(135deg, #1a3a4a 0%, #2a4a5a 100%) !important;
}

[data-theme="dark"] .highlight-warning {
    background: linear-gradient(135deg, #4a4a2a 0%, #5a5a3a 100%) !important;
}

[data-theme="dark"] .highlight-success {
    background: linear-gradient(135deg, #2a4a2a 0%, #3a5a3a 100%) !important;
}

[data-theme="dark"] .exercise-box {
    background: linear-gradient(135deg, #2a4a2a 0%, #3a5a3a 100%) !important;
}

/* Technical notes */
[data-theme="dark"] .technical-note {
    background: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%) !important;
    border-left: 5px solid #888 !important;
    color: #e0e0e0 !important;
}

/* Flow steps */
[data-theme="dark"] .flow-step {
    background: linear-gradient(135deg, #1a3a5a 0%, #2a4a6a 100%) !important;
    border: 2px solid #4a90e2 !important;
    color: #e0e0e0 !important;
}

/* ProTools sections */
[data-theme="dark"] .protools-section {
    background: linear-gradient(135deg, #4a2a5a 0%, #5a3a6a 100%) !important;
    border-left: 5px solid #b366cc !important;
    color: #e0e0e0 !important;
}

/* Mic comparison */
[data-theme="dark"] .mic-comparison {
    background: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%) !important;
    border-left: 5px solid #888 !important;
    color: #e0e0e0 !important;
}

/* Mic legend */
[data-theme="dark"] .mic-legend {
    background: linear-gradient(135deg, #4a3a6a 0%, #5a4a7a 100%) !important;
    border-left: 5px solid #a78bfa !important;
    color: #e0e0e0 !important;
}


/* Formules et code */
[data-theme="dark"] .formula {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
}

/* Tableaux en thème sombre */
[data-theme="dark"] table {
    background: #2d2d2d !important;
}

[data-theme="dark"] th {
    background: linear-gradient(90deg, #8B0000, #A52A2A) !important;
    color: white !important;
}

[data-theme="dark"] td {
    color: #e0e0e0 !important;
    border-bottom: 1px solid #555 !important;
    background-color: transparent !important;
}

[data-theme="dark"] tr:hover td {
    background-color: #404040 !important;
}

/* Liens */
[data-theme="dark"] .course-content a,
[data-theme="dark"] .chapter-content a,
[data-theme="dark"] .chapter-section a,
[data-theme="dark"] .highlight-info a,
[data-theme="dark"] .highlight-warning a,
[data-theme="dark"] .highlight-success a,
[data-theme="dark"] .exercise-box a {
    color: #ff6b6b !important;
}

[data-theme="dark"] .course-content a:hover,
[data-theme="dark"] .chapter-content a:hover,
[data-theme="dark"] .chapter-section a:hover,
[data-theme="dark"] .highlight-info a:hover,
[data-theme="dark"] .highlight-warning a:hover,
[data-theme="dark"] .highlight-success a:hover,
[data-theme="dark"] .exercise-box a:hover {
    color: #ff8e8e !important;
}

/* Border et shadows adaptés */
[data-theme="dark"] .chapter-section,
[data-theme="dark"] .highlight-info,
[data-theme="dark"] .highlight-warning,
[data-theme="dark"] .highlight-success,
[data-theme="dark"] .technical-note,
[data-theme="dark"] .flow-step,
[data-theme="dark"] .protools-section,
[data-theme="dark"] .mic-comparison,
[data-theme="dark"] .mic-legend,
[data-theme="dark"] .exercise-box,
[data-theme="dark"] table {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

/* ===== AJOUT AUX LIENS ===== */
[data-theme="dark"] .mic-comparison a,
[data-theme="dark"] .mic-legend a {
    color: #ff6b6b !important;
}

[data-theme="dark"] .mic-comparison a:hover,
[data-theme="dark"] .mic-legend a:hover {
    color: #ff8e8e !important;
}

[data-theme="dark"] .technical-note a,
[data-theme="dark"] .flow-step a,
[data-theme="dark"] .protools-section a {
    color: #ff6b6b !important;
}

[data-theme="dark"] .technical-note a:hover,
[data-theme="dark"] .flow-step a:hover,
[data-theme="dark"] .protools-section a:hover {
    color: #ff8e8e !important;
}

/* Titres spécifiques pour ces éléments */
[data-theme="dark"] .technical-note h3,
[data-theme="dark"] .flow-step h3,
[data-theme="dark"] .protools-section h3,
[data-theme="dark"] .mic-comparison h3,
[data-theme="dark"] .mic-legend h3 {
    color: white !important;
}

/* Override pour les backgrounds blancs génériques */
[data-theme="dark"] *[style*="background: white"],
[data-theme="dark"] *[style*="background-color: white"],
[data-theme="dark"] *[style*="background: #fff"],
[data-theme="dark"] *[style*="background-color: #fff"],
[data-theme="dark"] *[style*="background: #ffffff"],
[data-theme="dark"] *[style*="background-color: #ffffff"] {
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
}

/* Override pour les backgrounds gris clairs */
[data-theme="dark"] *[style*="background: #f5f5f5"],
[data-theme="dark"] *[style*="background-color: #f5f5f5"],
[data-theme="dark"] *[style*="background: #f8f9fa"],
[data-theme="dark"] *[style*="background-color: #f8f9fa"],
[data-theme="dark"] *[style*="background: #e9ecef"],
[data-theme="dark"] *[style*="background-color: #e9ecef"] {
    background: #404040 !important;
    background-color: #404040 !important;
}

/* Override pour les gradients les plus communs */
[data-theme="dark"] *[style*="linear-gradient(135deg, #f8f9fa"],
[data-theme="dark"] *[style*="linear-gradient(135deg, #d1ecf1"],
[data-theme="dark"] *[style*="linear-gradient(135deg, #fff3cd"],
[data-theme="dark"] *[style*="linear-gradient(135deg, #d4edda"],
[data-theme="dark"] *[style*="linear-gradient(135deg, #e8f5e8"] {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
}

/* Override spécial pour les éléments avec du texte noir forcé */
[data-theme="dark"] *[style*="color: black"],
[data-theme="dark"] *[style*="color: #000"],
[data-theme="dark"] *[style*="color: #000000"],
[data-theme="dark"] *[style*="color: #333"],
[data-theme="dark"] *[style*="color: #333333"] {
    color: #e0e0e0 !important;
}

/* Exceptions pour garder certaines couleurs importantes */
[data-theme="dark"] .chapter-section h3,
[data-theme="dark"] .highlight-info h3,
[data-theme="dark"] .highlight-warning h3,
[data-theme="dark"] .highlight-success h3,
[data-theme="dark"] .exercise-box h3,
[data-theme="dark"] th {
    color: white !important;
}

/* Transitions pour un changement fluide */
.course-content,
.chapter-content,
.chapter-section,
.highlight-info,
.highlight-warning,
.highlight-success,
.exercise-box,
.technical-note,
.flow-step,
.protools-section,
.mic-comparison,
.mic-legend,
.formula,
table,
th,
td {
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* NOUVEAU : Override ultra-agressif pour tous les éléments avec style inline */
[data-theme="dark"] div[style],
[data-theme="dark"] p[style],
[data-theme="dark"] span[style],
[data-theme="dark"] section[style],
[data-theme="dark"] article[style] {
    color: #e0e0e0 !important;
}

/* NOUVEAU : Override pour tous les conteneurs principaux */
[data-theme="dark"] .container div,
[data-theme="dark"] .container p,
[data-theme="dark"] .container span,
[data-theme="dark"] .container section,
[data-theme="dark"] .card-body div,
[data-theme="dark"] .card-body p,
[data-theme="dark"] .card-body span {
    color: #e0e0e0 !important;
}

/* CORRECTION : S'assurer que les listes sont lisibles */
[data-theme="dark"] ul,
[data-theme="dark"] ol,
[data-theme="dark"] li {
    color: #e0e0e0 !important;
}

[data-theme="dark"] ul li,
[data-theme="dark"] ol li {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
}

/* ==================== NOUVEL ACCUEIL DESIGN ==================== */

/* Hero Section Immersive */
.hero-immersive {
    /* Mettez ici le lien vers une belle image de studio sombre (console de mixage, enceintes, etc.) */
    background-image: url('../img/studio-bg.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Effet parralax léger */
    min-height: 85vh; /* Prend presque toute la hauteur de l'écran */
    margin-top: -80px; /* Compense la navbar si elle est transparente, sinon ajuster */
    padding-top: 80px;
}

/* Si vous n'avez pas d'image tout de suite, utilisez ce dégradé élégant en attendant */
.hero-immersive {
    background: linear-gradient(135deg, #1a050b 0%, #4a0e20 100%);
}

.hero-immersive .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dégradé sombre pour rendre le texte blanc lisible sur l'image */
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(50,10,20,0.8) 100%);
    z-index: 0;
}

.z-index-1 {
    z-index: 1;
}

.opacity-90 {
    opacity: 0.9;
}

.ls-1 {
    letter-spacing: 1px;
}

/* Séparateur en forme de vague en bas du hero */
.custom-shape-divider-bottom-1680000000 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.custom-shape-divider-bottom-1680000000 svg {
    position: relative;
    display: block;
    width: calc(138% + 1.3px);
    height: 60px;
}

.custom-shape-divider-bottom-1680000000 .shape-fill {
    fill: #FFFFFF;
}

/* Feature Icons Modernes */
.feature-icon-box {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--burgundy) 0%, #a61e42 100%);
    border-radius: 24px; /* Forme "Squircle" moderne */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto;
    box-shadow: 0 10px 20px rgba(138, 25, 61, 0.3);
    transition: transform 0.3s ease;
}

/* Effets de survol (Hover) */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

.hover-lift:hover .feature-icon-box {
    transform: rotate(15deg) scale(1.1);
}

/* Cartes Parcours */
.transform-scale {
    transition: transform 0.5s ease;
}

.group-hover:hover .transform-scale {
    transform: scale(1.05);
}

.bg-gradient-dark {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
}

/* Ajustements Responsive */
@media (min-width: 768px) {
    .border-start-md {
        border-left: 1px solid #eee;
    }
}