/* style.css - GOSPELSTREAM - Version responsive mobile */

/* --- 0. Variables et Base --- */
:root {
  --brand-orange: #ff6a00;
  --accent-dark: #1e0d02;
  --card-bg: #f6f6f6;
  --muted: #777;
  --primary-light: rgba(255, 106, 0, 0.1);
  --success-light: rgba(25, 135, 84, 0.1);
  --info-light: rgba(13, 202, 240, 0.1);
  --warning-light: rgba(255, 193, 7, 0.1);
  --danger-light: rgba(220, 53, 69, 0.1);
  --secondary-light: rgba(108, 117, 125, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #f8f9fa;
  color: #111;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-x: hidden;
}

main {
  flex: 1;
  width: 100%;
}

a {
  color: var(--brand-orange);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* --- 1. Container et Grille --- */
.container,
.container-fluid {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

.row {
  margin-right: -15px;
  margin-left: -15px;
}

.row > * {
  padding-right: 15px;
  padding-left: 15px;
}

/* --- 2. Header et Navigation --- */
.site-topbar {
  background: var(--brand-orange);
  color: #fff;
  padding: 10px 0;
  width: 100%;
}

.site-topbar .navbar-brand {
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff !important;
}

.site-topbar .nav-link {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
}

.site-topbar .nav-link:hover {
  opacity: .9;
}

.site-topbar .btn-outline-light {
  border-color: #fff;
  color: #fff;
}

.site-topbar .btn-outline-light:hover {
  background-color: #fff;
  color: var(--brand-orange);
}

/* --- 3. Section HERO (Index) --- */
.hero {
  background: #000;
  padding: 0;
  width: 100%;
  overflow: hidden;
}

.hero .carousel-item {
  height: 370px;
  background-size: cover;
  background-position: center;
}

.hero .overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.65));
  height: 100%;
  color: #fff;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.hero .overlay h2 {
  font-size: 1.75rem;
}

/* --- 4. Titres et Sections de Contenu --- */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #343a40;
  margin-bottom: 30px;
  text-align: center;
  width: 100%;
}

/* Style de la section d'appel à l'action Artiste (shop-cta) */
.shop-cta {
  background-color: #1e0d02;
  padding: 30px;
  border-radius: 8px;
  color: #fff;
  width: 100%;
}

.shop-cta p {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* --- 5. Cartes Produits (Singles) et Artistes --- */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  width: 100%;
  margin-bottom: 20px;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

.product-card .card-img-top {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* --- 6. Styles pour les Pages d'Authentification --- */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 120px);
  padding: 30px 15px;
  background-color: var(--card-bg);
  width: 100%;
}

.auth-card {
  max-width: 450px;
  width: 100%;
  padding: 30px;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
}

/* --- 7. Styles Dashboard --- */

.sidebar {
  min-height: 100vh;
  background: linear-gradient(180deg, #1e0d02 0%, #000 100%);
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  z-index: 1050;
  transition: transform 0.3s ease-in-out;
  transform: translateX(0);
  
  /* ****************************************************** */
  /* AJOUTS ESSENTIELS pour activer le Flexbox en colonne */
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: hidden; /* Le scroll est géré par l'élément enfant */
  /* ****************************************************** */
}

/* Nouvelles règles pour le conteneur interne de défilement */
.sidebar .flex-grow-1.overflow-y-auto {
    /* Prend l'espace restant entre le header/profile et le footer */
    flex-grow: 1; 
    /* Active le défilement vertical */
    overflow-y: auto;
    overflow-x: hidden;
}

/* S'assurer que le profil et le pied de page restent fixes */
.sidebar .profile-section,
.sidebar-footer {
    flex-shrink: 0; 
}

.sidebar .nav-link {
  color: rgba(255, 255, 255, 0.8);
  padding: 12px 20px;
  margin: 5px 0;
  border-radius: 5px;
  transition: all 0.3s;
  display: block;
  width: 100%;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background-color: var(--brand-orange);
  color: #fff;
}

.content-wrapper {
  margin-left: 250px;
  min-height: 100vh;
  background-color: #f8f9fa;
  padding: 20px;
  transition: margin-left 0.3s ease-in-out;
  width: calc(100% - 250px);
}

/* Bouton menu mobile */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1060;
  background: var(--brand-orange);
  border: none;
  border-radius: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.mobile-menu-btn i {
  transition: transform 0.3s;
}

.mobile-menu-btn.active i {
  transform: rotate(90deg);
}

/* Overlay pour mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040;
}

/* --- 8. Styles pour les Tableaux --- */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.table {
  min-width: 600px;
}

/* --- 9. Styles pour les Boutons --- */
.btn {
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s;
  white-space: nowrap;
}

/* --- 10. Styles pour le Lecteur Audio Fixe --- */
.audio-player-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 10px 20px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* --- 11. Footer --- */
footer {
  background-color: #343a40;
  color: #ffffff;
  padding: 40px 0 20px;
  margin-top: auto;
  width: 100%;
}

/* --- 12. Utilitaires --- */
.text-orange {
  color: var(--brand-orange) !important;
}

/* --- 13. Scrollbar personnalisée --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--brand-orange);
  border-radius: 4px;
}

/* =========================================== */
/* RÉACTIVITÉ MOBILE - CORRECTIONS PRINCIPALES */
/* =========================================== */

@media (max-width: 1200px) {
  .container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 992px) {
  /* Sidebar mobile */
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
  }
  
  .content-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    padding-top: 70px;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .sidebar-overlay.active {
    display: block;
  }
  
  /* Ajustements généraux */
  .section-title {
    font-size: 1.75rem;
  }
  
  .hero .carousel-item {
    height: 300px;
  }
  
  .hero .overlay h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  /* Correction des débordements */
  body, html {
    overflow-x: hidden;
    position: relative;
    width: 100%;
  }
  
  .container, .container-fluid {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
  }
  
  .row {
    margin-left: -10px !important;
    margin-right: -10px !important;
  }
  
  .row > * {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  /* Hero section */
  .hero .carousel-item {
    height: 250px;
  }
  
  .hero .overlay {
    padding: 15px;
  }
  
  .hero .overlay h2 {
    font-size: 1.2rem;
  }
  
  /* Cartes produits */
  .product-card {
    margin-bottom: 15px;
  }
  
  .product-card .card-img-top {
    height: 150px;
  }
  
  /* Dashboard */
  .sidebar {
    width: 100%;
    max-width: 300px;
  }
  
  .content-wrapper {
    padding: 15px;
  }
  
  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  /* Lecteur audio */
  .audio-player-fixed {
    padding: 10px 15px;
    flex-direction: column;
    align-items: stretch;
  }
  
  .audio-player-fixed .track-info {
    width: 100%;
    max-width: none;
    margin-bottom: 10px;
  }
  
  .audio-player-fixed .player-controls {
    position: static;
    transform: none;
    margin-left: 0;
    justify-content: center;
  }
  
  /* Authentification */
  .auth-container {
    min-height: calc(100vh - 80px);
    padding: 15px;
  }
  
  .auth-card {
    padding: 20px;
  }
  
  /* Footer */
  footer {
    padding: 30px 0 15px;
  }
  
  footer .row > div {
    margin-bottom: 20px;
  }
}

@media (max-width: 576px) {
  /* Corrections supplémentaires pour très petits écrans */
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }
  
  /* Boutons */
  .btn {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
  
  .btn-group .btn {
    padding: 5px 8px;
    font-size: 0.85rem;
  }
  
  /* Tableaux */
  .table-responsive {
    margin-left: -15px;
    margin-right: -15px;
    width: calc(100% + 30px);
  }
  
  .table {
    min-width: 500px;
    font-size: 0.9rem;
  }
  
  .table td, .table th {
    padding: 8px;
  }
  
  /* Cartes */
  .card-body {
    padding: 15px;
  }
  
  .card-header {
    padding: 12px 15px;
  }
  
  /* Shop CTA */
  .shop-cta {
    padding: 20px 15px;
  }
  
  /* Profile */
  .profile-section img {
    width: 70px;
    height: 70px;
  }
  
  /* Espacements mobiles */
  .mb-6, .mt-6, .pb-6, .pt-6 {
    margin-bottom: 2rem !important;
    margin-top: 2rem !important;
    padding-bottom: 2rem !important;
    padding-top: 2rem !important;
  }
}

@media (max-width: 400px) {
  /* Ultra-mobile */
  .hero .carousel-item {
    height: 200px;
  }
  
  .hero .overlay h2 {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.3rem;
  }
  
  .auth-card {
    padding: 15px;
  }
  
  .mobile-menu-btn {
    top: 10px;
    left: 10px;
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
  
  .sidebar {
    max-width: 100%;
  }
}

/* Correction pour les modales sur mobile */
@media (max-width: 768px) {
  .modal-dialog {
    margin: 10px;
    max-width: calc(100% - 20px);
  }
  
  .modal-content {
    border-radius: 5px;
  }
}

/* Empêcher le zoom sur les inputs sur iOS */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* =========================================== */
/* STYLES SPÉCIFIQUES PAGES AUTHENTIFICATION */
/* =========================================== */

/* --- Conteneur d'authentification amélioré --- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px 15px;
    background-color: var(--card-bg);
    width: 100%;
    position: relative;
}

.auth-card {
    max-width: 500px;
    width: 100%;
    padding: 30px;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    animation: fadeIn 0.5s ease-out;
}

.auth-card .page-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.auth-card .page-header h2 {
    color: var(--accent-dark);
    font-weight: 800;
    margin-bottom: 10px;
    font-size: 28px;
    text-align: center;
}

.auth-card .page-header p.text-muted {
    text-align: center;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* --- Formulaires améliorés --- */
.auth-card .form-group {
    margin-bottom: 25px;
    text-align: left;
    position: relative;
}

.auth-card .form-group label {
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-size: 0.95rem;
}

.auth-card .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fdfdfd;
}

.auth-card .form-control:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 106, 0, 0.15);
    background-color: #fff;
}

.auth-card .form-control::placeholder {
    color: #adb5bd;
    font-size: 0.9rem;
}

.auth-card .has-error .form-control {
    border-color: #dc3545;
    background-color: #fffafa;
}

.auth-card .has-error .form-control:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.auth-card .help-block {
    color: #dc3545;
    font-size: 0.85rem;
    display: block;
    margin-top: 6px;
    font-weight: 500;
}

/* --- Boutons améliorés --- */
.auth-card .btn-primary {
    background: linear-gradient(135deg, var(--brand-orange) 0%, #ff8533 100%);
    border: none;
    color: #ffffff;
    width: 100%;
    padding: 14px;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s ease;
    border-radius: 6px;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.auth-card .btn-primary:hover {
    background: linear-gradient(135deg, #e55a00 0%, var(--brand-orange) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 106, 0, 0.3);
}

.auth-card .btn-primary:active {
    transform: translateY(0);
}

.auth-card .btn-primary i {
    margin-right: 8px;
    font-size: 1rem;
}

/* --- Liens améliorés --- */
.auth-card a {
    color: var(--brand-orange);
    font-weight: 500;
    transition: all 0.2s;
}

.auth-card a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.auth-card .small {
    font-size: 0.85rem;
}

/* --- Sélecteurs améliorés --- */
.auth-card select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 40px;
}

/* --- Alertes améliorées --- */
.auth-card .alert {
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    text-align: left;
    border: none;
    animation: slideIn 0.3s ease-out;
}

.auth-card .alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.auth-card .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.auth-card .alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.auth-card .alert i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.auth-card .alert-link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.auth-card .alert-link:hover {
    color: inherit;
    text-decoration: none;
}

/* --- Séparateurs améliorés --- */
.auth-card hr {
    margin: 25px 0;
    border: none;
    height: 1px;
    background-color: #e9ecef;
}

/* --- Champs date améliorés --- */
.auth-card input[type="date"] {
    appearance: none;
    min-height: 44px;
}

.auth-card input[type="date"]::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.auth-card input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* --- Animation pour les alertes --- */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================== */
/* RESPONSIVE PAGES AUTHENTIFICATION */
/* =========================================== */

@media (max-width: 768px) {
    .auth-container {
        padding: 15px;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 30px;
    }
    
    .auth-card {
        padding: 25px 20px;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
        margin-top: 0;
    }
    
    .auth-card .page-header h2 {
        font-size: 24px;
    }
    
    .auth-card .form-group {
        margin-bottom: 20px;
    }
    
    .auth-card .form-control {
        padding: 14px;
        font-size: 16px; /* Empêche le zoom iOS */
    }
    
    .auth-card .btn-primary {
        padding: 16px;
        font-size: 16px;
    }
    
    .auth-card .alert {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    /* Correction pour iOS */
    input, select, textarea {
        font-size: 16px !important;
    }
}

@media (max-width: 576px) {
    .auth-container {
        padding: 10px;
        padding-top: 20px;
        min-height: calc(100vh - 20px);
    }
    
    .auth-card {
        padding: 20px 15px;
        border-radius: 8px;
        max-width: 100%;
    }
    
    .auth-card .page-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .auth-card .page-header h2 {
        font-size: 22px;
    }
    
    .auth-card .page-header p.text-muted {
        font-size: 0.9rem;
    }
    
    .auth-card .form-group label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .auth-card .btn-primary {
        padding: 14px;
        font-size: 15px;
    }
    
    .auth-card p {
        font-size: 0.9rem;
    }
    
    /* Champs plus compacts sur très petits écrans */
    .auth-card .form-group {
        margin-bottom: 15px;
    }
}

@media (max-width: 400px) {
    .auth-card {
        padding: 18px 12px;
    }
    
    .auth-card .page-header h2 {
        font-size: 20px;
    }
    
    .auth-card .btn-primary {
        padding: 12px;
        font-size: 14px;
    }
    
    .auth-card .form-control {
        padding: 12px;
    }
}

/* =========================================== */
/* STYLES SPÉCIFIQUES POUR MOT DE PASSE OUBLIÉ */
/* =========================================== */

.forgot-password-info {
    background-color: rgba(13, 202, 240, 0.1);
    border-left: 4px solid #0dcaf0;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.forgot-password-info i {
    color: #0dcaf0;
    margin-right: 8px;
}

/* =========================================== */
/* STYLES SPÉCIFIQUES POUR INSCRIPTION */
/* =========================================== */

/* Espacement entre les champs sur mobile */
@media (max-width: 768px) {
    .auth-card .form-group {
        margin-bottom: 15px;
    }
    
    /* Champs empilés pour économiser l'espace */
    .auth-card .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .auth-card .row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Amélioration de la lisibilité sur petits écrans */
@media (max-width: 576px) {
    .auth-card .form-group:last-child {
        margin-bottom: 25px; /* Plus d'espace avant le bouton */
    }
    
    /* Texte plus lisible */
    .auth-card p, 
    .auth-card .small, 
    .auth-card a {
        font-size: 0.9rem;
    }
}

/* =========================================== */
/* AMÉLIORATIONS GÉNÉRALES POUR TOUTES PAGES */
/* =========================================== */

/* Focus visible pour accessibilité */
.auth-card .form-control:focus-visible {
    outline: 2px solid var(--brand-orange);
    outline-offset: 2px;
}

/* État désactivé */
.auth-card .form-control:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Message de chargement (optionnel) */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none;
}

.loading-overlay.active {
    display: flex;
}

/* Logo/brand dans l'en-tête (optionnel) */
.auth-header-logo {
    text-align: center;
    margin-bottom: 20px;
}

.auth-header-logo h1 {
    color: var(--brand-orange);
    font-weight: 800;
    font-size: 28px;
    margin-bottom: 5px;
}

.auth-header-logo p {
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 576px) {
    .auth-header-logo h1 {
        font-size: 24px;
    }
}

/* =========================================== */
/* STYLES POUR LE FOOTER DASHBOARD */
/* =========================================== */

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--brand-orange);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(255, 106, 0, 0.3);
}

.back-to-top-btn:hover {
    background: #e55a00;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 106, 0, 0.4);
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dark Mode (optionnel) */
body.dark-mode {
    background-color: #121212;
    color: #f0f0f0;
}

body.dark-mode .card,
body.dark-mode .modal-content,
body.dark-mode .auth-card {
    background-color: #1e1e1e;
    color: #f0f0f0;
    border-color: #333;
}

body.dark-mode .table {
    color: #f0f0f0;
}

body.dark-mode .form-control {
    background-color: #2d2d2d;
    border-color: #444;
    color: #f0f0f0;
}

body.dark-mode .form-control:focus {
    background-color: #2d2d2d;
    color: #f0f0f0;
}

/* Overlay pour sidebar mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
}

/* Spinner pour les boutons */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* Position fixed pour les messages */
.z-index-9999 {
    z-index: 9999;
}

/* Responsive */
@media (max-width: 768px) {
    .back-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    /* Masquer les éléments non essentiels sur mobile */
    .d-none-mobile {
        display: none !important;
    }
    
    /* Ajuster les padding sur mobile */
    .content-wrapper {
        padding-bottom: 70px; /* Pour les boutons fixed */
    }
}

@media (max-width: 576px) {
    .back-to-top-btn {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* =========================================== */
/* STYLES AMÉLIORÉS POUR LE MENU DASHBOARD */
/* =========================================== */

/* Header mobile */
.mobile-header {
    display: none;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1030;
}

@media (max-width: 992px) {
    .mobile-header {
        display: block;
    }
    
    .content-wrapper {
        padding-top: 0 !important;
    }
}

/* Bouton notifications mobile */
.mobile-notifications-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1060;
    background: var(--brand-orange);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: none;
}

.mobile-notifications-btn.active {
    background: #e55a00;
}

@media (max-width: 768px) {
    .mobile-notifications-btn {
        display: flex;
    }
    
    .mobile-menu-btn {
        top: 15px;
        left: 15px;
    }
}

/* Breadcrumb amélioré */
.breadcrumb {
    background-color: #f8f9fa !important;
    border: 1px solid #e9ecef;
    padding: 0.75rem 1rem !important;
}

.breadcrumb-item a {
    color: var(--brand-orange);
    text-decoration: none;
    font-weight: 500;
}

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

/* Badges dans le menu */
.nav-link .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.6em;
    min-width: 20px;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none;
}

.loading-overlay.active {
    display: flex;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Améliorations du sidebar */
.sidebar .profile-section {
    padding: 25px 20px;
}

.stats-badge {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 15px;
}

.stats-badge .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
}

/* Sidebar footer */
.sidebar-footer {
    margin-top: auto;
    background: rgba(0, 0, 0, 0.2);
}

/* Animation de transition */
.content-wrapper {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bouton orange outline */
.btn-outline-orange {
    color: var(--brand-orange);
    border-color: var(--brand-orange);
}

.btn-outline-orange:hover {
    background-color: var(--brand-orange);
    color: white;
}

/* Page content spacing */
.page-content {
    min-height: calc(100vh - 200px);
    padding-bottom: 40px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        max-width: 300px;
    }
    
    .profile-section {
        padding: 20px 15px !important;
    }
    
    .profile-section img,
    .avatar-initial {
        width: 60px !important;
        height: 60px !important;
    }
    
    .stats-badge .badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .sidebar .nav-link {
        padding: 10px 15px !important;
        font-size: 0.9rem;
    }
}