
/* Style pour le mode clair par défaut */
body.light-mode {
  background-color: #f4f4f9;
  color: #333;
}

/* Style pour le mode sombre */
body.dark-mode {
  background-color: #1e1e2e;
  color: #fff;
}

body.light-mode .text-muted {
  color: #6c757d !important;
}

body.dark-mode .text-muted {
  color: #fff !important;
}

/* Styles généraux pour les deux modes */
.rounded-box {
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
}

/* Mode clair : effet de dégradé, couleurs plus légères */
body.light-mode .rounded-box {
  background: linear-gradient(135deg, #ffffff, #eaeaea);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Mode sombre : effet de dégradé sombre et ombres plus prononcées */
body.dark-mode .rounded-box {
  background: linear-gradient(135deg, #3c3c54, #26263e);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Effet de hover sur les box pour plus d'interactivité */
.rounded-box:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  z-index: 2; /* Ajoutez un z-index modéré pour éviter les conflits */
}

/* Style pour les titres */
h2, h4 {
  font-weight: bold;
}

/* Badges et boutons dans les deux modes */
.badge {
  background-color: #00bcd4;
  font-size: 1rem;
}

/* Style des boutons */
.btn-primary {
  background-color: #ff5722;
  border: none;
}

/* Hover sur les boutons */
.btn-primary:hover {
  background-color: #e64a19;
}

/* Style du bouton pour basculer entre clair/sombre */
.toggle-theme {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #00bcd4;
  border: none;
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  z-index: 1000;
}

/* Bouton en mode sombre */
body.dark-mode .toggle-theme {
  background-color: #ff5722;
}

/* Styles de la navbar pour le mode clair */
body.light-mode .navbar {
  background-color: #f8f9fa; /* Couleur de fond claire */
}
body.light-mode .navbar .nav-link,
body.light-mode .navbar .navbar-brand {
  color: #333; /* Texte sombre */
}
body.light-mode .navbar .nav-link:hover,
body.light-mode .navbar .navbar-brand:hover {
  color: #000; /* Texte légèrement plus sombre au survol */
}
body.light-mode .navbar .navbar-toggler-icon {
  filter: invert(0); /* Icône du toggler en noir */
}

/* Styles de la navbar pour le mode sombre */
body.dark-mode .navbar {
  background-color: #343a40; /* Couleur de fond sombre */
}
body.dark-mode .navbar .nav-link,
body.dark-mode .navbar .navbar-brand {
  color: #fff; /* Texte clair */
}
body.dark-mode .navbar .nav-link:hover,
body.dark-mode .navbar .navbar-brand:hover {
  color: #ccc; /* Texte légèrement plus clair au survol */
}
body.dark-mode .navbar .navbar-toggler-icon {
  filter: invert(1); /* Icône du toggler en blanc */
}

/* Styles du menu déroulant en mode sombre */
body.dark-mode .navbar .dropdown-menu {
  background-color: #343a40;
}
body.dark-mode .navbar .dropdown-menu .dropdown-item {
  color: #fff;
}
body.dark-mode .navbar .dropdown-menu .dropdown-item:hover {
  background-color: #495057;
}

/* Ajustements pour le formulaire de recherche en mode sombre */
body.dark-mode .navbar .form-control {
  background-color: #495057;
  color: #fff;
  border-color: #6c757d;
}
body.dark-mode .navbar .form-control::placeholder {
  color: #ced4da;
}
body.dark-mode .navbar .btn-primary {
  background-color: #007bff;
  border-color: #007bff;
}

/* Ajustements pour le formulaire de recherche en mode clair */
body.light-mode .navbar .form-control {
  background-color: #fff;
  color: #333;
  border-color: #ced4da;
}
body.light-mode .navbar .form-control::placeholder {
  color: #6c757d;
}

/* ... vos styles existants ... */

/* Styles personnalisés pour l'interrupteur */
.form-switch .form-check-input {
  width: 50px;
  height: 25px;
  background-color: #ccc;
  border-radius: 15px;
  position: relative;
  transition: background-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  -webkit-appearance: none;
  margin-left: 0;
}

.form-switch .form-check-input:focus {
  outline: none;
  box-shadow: none;
}

.form-switch .form-check-input::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 21px;
  height: 21px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.form-switch .form-check-input:checked {
  background-color: #00bcd4;
}

.form-switch .form-check-input:checked::before {
  transform: translateX(25px);
}

body.dark-mode .form-switch .form-check-input:checked {
  background-color: #ff5722;
}

body.dark-mode .form-switch .form-check-input:checked::before {
  background-color: #fff;
}

.form-switch .form-check-label {
  margin-left: 0.5em;
  user-select: none;
  color: inherit;
}

/* Médias queries pour mobile */
@media (max-width: 576px) {
  .form-switch .form-check-input {
    width: 40px;
    height: 20px;
  }

  .form-switch .form-check-input::before {
    width: 16px;
    height: 16px;
    top: 2px;
    left: 2px;
  }

  .form-switch .form-check-input:checked::before {
    transform: translateX(20px);
  }

  .form-switch .form-check-label {
    font-size: 0.9rem;
  }
}

/* Styles des cartes en mode clair */
body.light-mode .card {
  background-color: #fff;
  color: #333;
}

body.light-mode .card .card-title,
body.light-mode .card .card-text,
body.light-mode .card .card-body {
  color: #333;
}

body.light-mode .card .text-muted {
  color: #6c757d;
}

/* Styles des cartes en mode sombre */
body.dark-mode .card {
  background-color: #2c2c2c;
  color: #fff;
  border-color: #444;
}

body.dark-mode .card .card-title,
body.dark-mode .card .card-text,
body.dark-mode .card .card-body {
  color: #fff;
}

body.dark-mode .card .text-muted {
  color: #fff;
}

/* Styles pour le bouton en mode sombre */
body.dark-mode .card a.btn-primary {
  background-color: #007bff;
  border-color: #007bff;
}

body.dark-mode .card a.btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

/* Optionnel : Ajuster l'ombre des cartes */
body.light-mode .card {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .card {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* Optionnel : Ajuster la luminosité des images en mode sombre */
body.dark-mode .card-img-top {
  filter: brightness(0.9);
}

/* --- Styles généraux pour les deux modes --- */

/* Transition pour un effet fluide lors du changement de mode */
body {
  transition: all 0.2s ease;
}

/* Styles pour les titres */
h1 {
  font-weight: bold;
}

/* Styles pour les tables */
.table {
  width: 100%;
  margin-bottom: 1rem;
  color: inherit;
}

.table th,
.table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid;
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid;
}

/* --- Mode clair --- */
body.light-mode {
  background-color: #f4f4f9;
  color: #333;
}

body.light-mode .table {
  background-color: #fff;
}

body.light-mode .table th,
body.light-mode .table td {
  border-color: #dee2e6;
}

body.light-mode .table thead th {
  border-color: #dee2e6;
}

body.light-mode .form-control,
body.light-mode .form-select {
  background-color: #fff;
  color: #333;
  border: 1px solid #ced4da;
}

body.light-mode .form-check-input {
  background-color: #fff;
  border-color: #ced4da;
}

body.light-mode .form-check-label {
  color: #333;
}

body.light-mode .btn-primary {
  background-color: #007bff;
  border-color: #007bff;
  color: #fff;
}

body.light-mode .btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

/* --- Mode sombre --- */
body.dark-mode {
  background-color: #1e1e2e;
  color: #fff;
}

body.dark-mode .table {
  background-color: #2c2c2c;
}

body.dark-mode .table th,
body.dark-mode .table td {
  border-color: #444;
}

body.dark-mode .table thead th {
  border-color: #444;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
  background-color: #333;
  color: #fff;
  border: 1px solid #555;
}

body.dark-mode .form-control::placeholder,
body.dark-mode .form-select::placeholder {
  color: #ccc;
}

body.dark-mode .form-check-input {
  background-color: #333;
  border-color: #555;
}

body.dark-mode .form-check-input:checked {
  background-color: #007bff;
  border-color: #007bff;
}

body.dark-mode .form-check-label {
  color: #fff;
}

body.dark-mode .btn-primary {
  background-color: #007bff;
  border-color: #007bff;
  color: #fff;
}

body.dark-mode .btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

/* Liens à l'intérieur du tableau */
body.dark-mode .table a {
  color: #66afe9;
}

body.dark-mode .table a:hover {
  color: #a8d0f0;
}

/* Contrôles de pagination */
body.light-mode .pagination .page-link {
  background-color: #fff;
  color: #007bff;
  border: 1px solid #dee2e6;
}

body.dark-mode .pagination .page-link {
  background-color: #333;
  color: #fff;
  border: 1px solid #555;
}

body.dark-mode .pagination .page-link:hover {
  background-color: #444;
  color: #fff;
}

body.dark-mode .pagination .page-item.active .page-link {
  background-color: #007bff;
  border-color: #007bff;
}

/* Ajustements pour les titres et les labels */
body.dark-mode h1,
body.dark-mode label {
  color: #fff;
}

body.dark-mode .form-group label {
  color: #fff;
}

body.light-mode .form-group label {
  color: #333;
}

/* --- Mode clair --- */
body.light-mode .accordion-item {
  background-color: #fff;
  color: #212529;
}

body.light-mode .accordion-button {
  background-color: #fff;
  color: #212529;
}

body.light-mode .accordion-button:not(.collapsed) {
  background-color: #e7f1ff;
  color: #212529;
}

body.light-mode .accordion-button::after {
  filter: invert(0);
}

body.light-mode .accordion-body {
  background-color: #fff;
  color: #212529;
}

/* --- Mode sombre --- */
body.dark-mode .accordion-item {
  background-color: #343a40;
  color: #fff;
  border: 1px solid #454d55;
}

body.dark-mode .accordion-button {
  background-color: #343a40;
  color: #fff;
  border: none;
}

body.dark-mode .accordion-button:not(.collapsed) {
  background-color: #454d55;
  color: #fff;
}

body.dark-mode .accordion-button::after {
  filter: invert(1);
}

body.dark-mode .accordion-body {
  background-color: #343a40;
  color: #fff;
}

/* --- Styles généraux --- */

/* Styles pour Bubulle */
.bubulle-container {
    border: 2px dashed;
    padding: 15px;
    border-radius: 8px;
}

.bubulle-image {
    width: 100px;
    height: auto;
    margin-right: 20px;
}

.bubulle-text {
    margin: 0;
    font-size: 16px;
}

/* --- Mode clair --- */
body.light-mode .bubulle-container {
    border-color: #ccc;
    background-color: #f9f9f9;
}

body.light-mode .bubulle-text {
    color: #333;
}

/* --- Mode sombre --- */
body.dark-mode .bubulle-container {
    border-color: #555;
    background-color: #2c2c2c;
}

body.dark-mode .bubulle-text {
    color: #fff;
}

/* Champs de formulaire en mode sombre */
body.dark-mode .form-control {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
}

body.dark-mode .form-control::placeholder {
    color: #ccc;
}

body.dark-mode .form-label {
    color: #fff;
}

/* Boutons en mode sombre */
body.dark-mode .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

body.dark-mode .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

body.dark-mode .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

body.dark-mode .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

/* Messages d'alerte en mode sombre */
body.dark-mode .alert {
    background-color: #2c2c2c;
    color: #fff;
    border-color: #444;
}

body.dark-mode .alert a {
    color: #66afe9;
}

body.dark-mode .alert a:hover {
    color: #a8d0f0;
}

/* --- Styles généraux pour le Trix Editor --- */

/* Taille minimale et styles de base */
.trix-editor {
    min-height: 200px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 10px;
    font-size: 1rem;
}

/* --- Mode clair --- */
body.light-mode .trix-editor {
    background-color: #fff;
    color: #212529;
}

body.light-mode .trix-toolbar {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
}

body.light-mode .trix-button-group .trix-button {
    color: #212529;
}

body.light-mode .trix-button-group .trix-button:hover {
    background-color: #e2e6ea;
}

/* --- Mode sombre --- */
body.dark-mode .trix-editor {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
}

body.dark-mode .trix-toolbar {
    background-color: #444;
    border: 1px solid #555;
}

body.dark-mode .trix-button-group .trix-button {
    color: #fff;
}

body.dark-mode .trix-button-group .trix-button:hover {
    background-color: #555;
}

/* Placeholder en mode sombre */
body.dark-mode .trix-editor::placeholder {
    color: #ccc;
}

/* Icônes du Trix Editor en mode sombre */
body.dark-mode .trix-button svg {
    fill: #fff;
}

/* Ajustements pour les bordures actives */
body.dark-mode .trix-button--icon trix-button--state-active,
body.dark-mode .trix-button--icon trix-active {
    background-color: #666;
}

/* Ajustement des menus déroulants */
body.dark-mode .trix-dialog {
    background-color: #444;
    color: #fff;
    border: 1px solid #555;
}

body.dark-mode .trix-dialog input {
    background-color: #555;
    color: #fff;
    border: 1px solid #666;
}

/* --- Styles for Trix Editor Toolbar --- */

/* General styles */
.trix-toolbar {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 5px;
    background-color: #f8f9fa;
}

/* Toolbar buttons */
.trix-toolbar .trix-button {
    border: none;
    background: transparent;
    color: #333;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.trix-toolbar .trix-button:hover {
    background-color: #e2e6ea;
    color: #000;
}

.trix-toolbar .trix-button:disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* Dialogs (e.g., for inserting links) */
.trix-toolbar .trix-dialog {
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 10px;
}

.trix-toolbar .trix-dialog input.trix-input {
    background-color: #fff;
    color: #212529;
    border: 1px solid #ced4da;
    padding: 5px;
    width: 100%;
    margin-bottom: 10px;
}

/* Dialog buttons */
.trix-toolbar .trix-dialog .trix-button--dialog {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
}

.trix-toolbar .trix-dialog .trix-button--dialog:hover {
    background-color: #0056b3;
}

/* --- Dark Mode Styles --- */
body.dark-mode .trix-toolbar {
    background-color: #333;
    border: 1px solid #555;
}

body.dark-mode .trix-toolbar .trix-button {
    color: #fff;
}

body.dark-mode .trix-toolbar .trix-button:hover {
    background-color: #555;
}

body.dark-mode .trix-toolbar .trix-button:disabled {
    color: #666;
}

body.dark-mode .trix-toolbar .trix-dialog {
    background-color: #444;
    border: 1px solid #666;
}

body.dark-mode .trix-toolbar .trix-dialog input.trix-input {
    background-color: #555;
    color: #fff;
    border: 1px solid #666;
}

body.dark-mode .trix-toolbar .trix-dialog .trix-button--dialog {
    background-color: #007bff;
}

body.dark-mode .trix-toolbar .trix-dialog .trix-button--dialog:hover {
    background-color: #0056b3;
}

/* SVG Icons */
body.dark-mode .trix-toolbar .trix-button svg {
    fill: #fff;
}

body.light-mode .trix-toolbar .trix-button svg {
    fill: #333;
}

/* --- Styles généraux pour les boutons du Trix Editor --- */
.trix-toolbar .trix-button {
    border: none;
    background: transparent;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Icônes des boutons en mode clair */
body.light-mode .trix-button--icon {
    /* Aucun filtre en mode clair */
}

/* Icônes des boutons en mode sombre */
body.dark-mode .trix-button--icon {
    filter: brightness(0) invert(1) grayscale(1);
}

/* --- Styles généraux pour le modal Bootstrap --- */

/* Modal backdrop (arrière-plan foncé lorsque le modal est ouvert) */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Contenu du modal */
.modal-content {
    background-color: #fff;
    color: #212529;
    border: none;
    border-radius: 0.3rem;
}

/* Titre du modal */
.modal-header .modal-title {
    color: #212529;
}

/* Bouton de fermeture */
.modal-header .btn-close {
    background: transparent;
    border: none;
    opacity: 0.5;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

/* --- Styles pour le mode sombre --- */
body.dark-mode .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}

body.dark-mode .modal-content {
    background-color: #343a40;
    color: #f8f9fa;
}

body.dark-mode .modal-header .modal-title {
    color: #f8f9fa;
}

body.dark-mode .modal-header .btn-close {
    color: #ffffff;
    opacity: 0.5;
}

body.dark-mode .modal-header .btn-close:hover {
    opacity: 1;
}

body.light-mode .form-check-input[type="checkbox"]:checked {
    background-color: #0d6efd; /* Couleur de fond lorsqu'elle est cochée */
    border-color: #0d6efd;     /* Couleur de bordure */
    /* Si besoin, forcez l'affichage d'un symbole de check */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M13.485 1.965a.75.75 0 00-1.06.025L6.477 7.94 3.574 5.066a.75.75 0 00-1.06 1.06l3.454 3.454a.75.75 0 001.06 0l6.457-6.457a.75.75 0 00-.025-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.75em 0.75em;
}

body.light-mode .form-check-input[type="checkbox"]:before {
    background-color: #0d6efd;
    border-color: #0d6efd;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.75em 0.75em;
}

/* ==============================================
   GLOBAL DESIGN SYSTEM — GAMARIUM MODERN UI
   ============================================== */

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
body.dark-mode  ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
body.light-mode ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 4px; }

/* ---- PAGE TITLES ---- */
.page-header {
    margin-bottom: 1.8rem;
}

.page-header-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    margin: 0 0 0.3rem 0;
    line-height: 1.2;
    position: relative;
    display: inline-block;
}

body.dark-mode  .page-title { color: #fff; }
body.light-mode .page-title { color: #1a1a2e; }

.page-title::after {
    content: '';
    display: block;
    height: 3px;
    width: 50px;
    background: linear-gradient(90deg, #ff5722, #ff9800);
    border-radius: 3px;
    margin-top: 6px;
}

.page-subtitle {
    font-size: 0.9rem;
    margin: 0;
}

body.dark-mode  .page-subtitle { color: rgba(255,255,255,0.48); }
body.light-mode .page-subtitle { color: #888; }

/* ---- GLOBAL h1 ---- */
h1:not(.hero-title):not(.page-title):not(.navbar-brand) {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

body.dark-mode  h1:not(.hero-title):not(.page-title) { color: #fff; }
body.light-mode h1:not(.hero-title):not(.page-title) { color: #1a1a2e; }

h1:not(.hero-title):not(.page-title)::after {
    content: '';
    display: block;
    height: 3px;
    width: 44px;
    background: linear-gradient(90deg, #ff5722, #ff9800);
    border-radius: 3px;
    margin-top: 5px;
}

/* ---- ROUNDED-BOX (rétrocompat) ---- */
.rounded-box {
    border-radius: 18px !important;
    padding: 1.4rem !important;
    margin-bottom: 1.2rem;
    border: 1px solid transparent !important;
}

body.dark-mode .rounded-box {
    background: linear-gradient(135deg, #2a2a3e, #1e1e30) !important;
    border-color: rgba(255,255,255,0.07) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.22) !important;
}

body.light-mode .rounded-box {
    background: #fff !important;
    border-color: rgba(0,0,0,0.08) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.055) !important;
}

body.dark-mode  h2, body.dark-mode  h3, body.dark-mode  h4, body.dark-mode  h5 { color: #fff; }
body.light-mode h2, body.light-mode h3, body.light-mode h4, body.light-mode h5 { color: #1a1a2e; }

/* ---- FILTER PANEL ---- */
.filter-panel {
    border-radius: 16px;
    padding: 1.4rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}

body.dark-mode .filter-panel {
    background: linear-gradient(135deg, #2a2a3e, #1e1e30);
    border-color: rgba(255,255,255,0.07);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

body.light-mode .filter-panel {
    background: #fff;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

/* ---- FORM CONTROLS (global) ---- */
.form-control, .form-select {
    border-radius: 10px !important;
    font-size: 0.88rem;
    transition: border-color 0.18s, box-shadow 0.18s;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background-color: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: #fff !important;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
    background-color: rgba(255,255,255,0.09) !important;
    border-color: rgba(255,87,34,0.55) !important;
    box-shadow: 0 0 0 3px rgba(255,87,34,0.12) !important;
    color: #fff !important;
}

body.light-mode .form-control:focus,
body.light-mode .form-select:focus {
    border-color: rgba(255,87,34,0.45) !important;
    box-shadow: 0 0 0 3px rgba(255,87,34,0.1) !important;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 5px;
}

body.dark-mode  .form-label { color: rgba(255,255,255,0.65) !important; }
body.light-mode .form-label { color: #555 !important; }

/* ---- BUTTONS ---- */
.btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.87rem;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, #ff5722, #ff9800) !important;
    border: none !important;
    box-shadow: 0 2px 10px rgba(255,87,34,0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 18px rgba(255,87,34,0.4) !important;
    opacity: 0.93;
}

.btn-secondary {
    background: rgba(108,117,125,0.85) !important;
    border: none !important;
}

body.dark-mode .btn-outline-secondary {
    color: rgba(255,255,255,0.65) !important;
    border-color: rgba(255,255,255,0.2) !important;
}

body.dark-mode .btn-outline-secondary:hover {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.3) !important;
}

body.dark-mode .btn-outline-primary {
    color: #ff7043 !important;
    border-color: rgba(255,87,34,0.45) !important;
}

body.dark-mode .btn-outline-primary:hover {
    background: rgba(255,87,34,0.12) !important;
    color: #ff7043 !important;
}

body.dark-mode .btn-outline-warning {
    color: #ffb74d !important;
    border-color: rgba(255,183,77,0.4) !important;
}

body.dark-mode .btn-outline-warning:hover {
    background: rgba(255,183,77,0.1) !important;
    color: #ffb74d !important;
}

.btn-danger {
    background: linear-gradient(135deg, #e53935, #f44336) !important;
    border: none !important;
}

/* ---- CARDS (global) ---- */
body.dark-mode .card {
    background: linear-gradient(135deg, #2a2a3e, #1e1e30) !important;
    border-color: rgba(255,255,255,0.07) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25) !important;
    border-radius: 16px !important;
    overflow: hidden;
}

body.light-mode .card {
    background: #fff !important;
    border-color: rgba(0,0,0,0.08) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06) !important;
    border-radius: 16px !important;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-3px);
    transition: transform 0.2s, box-shadow 0.2s;
}

body.dark-mode .card-header {
    background: rgba(255,255,255,0.04) !important;
    border-bottom-color: rgba(255,255,255,0.07) !important;
}

body.light-mode .card-header {
    background: rgba(0,0,0,0.02) !important;
    border-bottom-color: rgba(0,0,0,0.07) !important;
}

body.dark-mode .card-footer {
    background: rgba(255,255,255,0.03) !important;
    border-top-color: rgba(255,255,255,0.07) !important;
}

body.light-mode .card-footer {
    background: rgba(0,0,0,0.02) !important;
    border-top-color: rgba(0,0,0,0.07) !important;
}

.card-img-top {
    object-fit: cover;
    height: 180px;
}

/* ---- BADGES ---- */
.badge {
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* ---- LIST GROUP ---- */
body.dark-mode .list-group-item {
    background-color: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.08) !important;
    color: rgba(255,255,255,0.8) !important;
}

body.dark-mode .list-group-item:hover {
    background-color: rgba(255,255,255,0.07) !important;
}

body.light-mode .list-group-item {
    border-color: rgba(0,0,0,0.08) !important;
}

/* ---- ALERTS ---- */
body.dark-mode .alert-info {
    background: rgba(0,188,212,0.1) !important;
    border-color: rgba(0,188,212,0.25) !important;
    color: #80deea !important;
}

body.dark-mode .alert-success {
    background: rgba(76,175,80,0.1) !important;
    border-color: rgba(76,175,80,0.25) !important;
    color: #a5d6a7 !important;
}

body.dark-mode .alert-warning {
    background: rgba(255,152,0,0.1) !important;
    border-color: rgba(255,152,0,0.25) !important;
    color: #ffcc80 !important;
}

body.dark-mode .alert-danger {
    background: rgba(244,67,54,0.1) !important;
    border-color: rgba(244,67,54,0.25) !important;
    color: #ef9a9a !important;
}

/* ---- PROGRESS BARS ---- */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

body.dark-mode .progress {
    background: rgba(255,255,255,0.08) !important;
}

body.light-mode .progress {
    background: rgba(0,0,0,0.07) !important;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* ---- ACCORDION ---- */
.accordion-item { border-radius: 12px !important; overflow: hidden; margin-bottom: 6px; }
.accordion-button { font-weight: 600; font-size: 0.9rem; }
.accordion-button:not(.collapsed) { box-shadow: none !important; }

body.dark-mode .accordion-button:not(.collapsed) { color: #ff7043 !important; }
body.light-mode .accordion-button:not(.collapsed) { color: #ff5722 !important; }

/* ---- LINKS ---- */
body.dark-mode  a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item):not(.page-link) { color: #64b5f6; }
body.light-mode a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item):not(.page-link) { color: #1565c0; }
body.dark-mode  a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item):not(.page-link):hover { color: #90caf9; }
body.light-mode a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item):not(.page-link):hover { color: #0d47a1; }

/* ---- PAGINATION ---- */
.page-item .page-link {
    border-radius: 10px !important;
    margin: 0 2px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.15s, border-color 0.15s;
}

body.dark-mode .page-item .page-link {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.1) !important;
    color: rgba(255,255,255,0.7) !important;
}

body.dark-mode .page-item .page-link:hover {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
}

body.dark-mode .page-item.active .page-link {
    background: linear-gradient(135deg, #ff5722, #ff9800) !important;
    border-color: transparent !important;
    color: #fff !important;
}

body.light-mode .page-item.active .page-link {
    background: linear-gradient(135deg, #ff5722, #ff9800) !important;
    border-color: transparent !important;
    color: #fff !important;
}

/* ---- TABLE ---- */
body.dark-mode  .table { color: rgba(255,255,255,0.8); }
body.dark-mode  .table > :not(caption) > * > * { background: transparent; }
body.dark-mode  .table-striped > tbody > tr:nth-of-type(odd) > * { background: rgba(255,255,255,0.03) !important; }
body.dark-mode  .table thead th { border-color: rgba(255,255,255,0.1) !important; color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
body.light-mode .table thead th { color: #888; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- AUTH PAGES (login/register) ---- */
.auth-wrapper {
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    border-radius: 20px;
    padding: 2.2rem;
    border: 1px solid transparent;
}

body.dark-mode .auth-card {
    background: linear-gradient(135deg, #2a2a3e, #1e1e30);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

body.light-mode .auth-card {
    background: #fff;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.auth-card-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.8rem;
}

.auth-card-logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #ff5722, #ff9800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 3px 12px rgba(255,87,34,0.35);
}

.auth-card-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
}

body.dark-mode  .auth-card-title { color: #fff; }
body.light-mode .auth-card-title { color: #1a1a2e; }

.auth-card-subtitle {
    font-size: 0.85rem;
    margin: 0 0 1.5rem 0;
}

body.dark-mode  .auth-card-subtitle { color: rgba(255,255,255,0.45); }
body.light-mode .auth-card-subtitle { color: #888; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.2rem 0;
    font-size: 0.8rem;
}

body.dark-mode  .auth-divider { color: rgba(255,255,255,0.3); }
body.light-mode .auth-divider { color: #bbb; }

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
}

body.dark-mode  .auth-divider::before,
body.dark-mode  .auth-divider::after { background: rgba(255,255,255,0.08); }
body.light-mode .auth-divider::before,
body.light-mode .auth-divider::after { background: rgba(0,0,0,0.08); }

/* ---- PROFILE CARD ---- */
.profile-card {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid transparent;
}

body.dark-mode .profile-card {
    background: linear-gradient(135deg, #2a2a3e, #1e1e30);
    border-color: rgba(255,255,255,0.07);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

body.light-mode .profile-card {
    background: #fff;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.profile-cover {
    height: 110px;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    position: relative;
    overflow: hidden;
}

.profile-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(255,87,34,0.2) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(0,188,212,0.2) 0%, transparent 60%);
}

.profile-avatar-wrap {
    position: relative;
    margin-top: -45px;
    display: flex;
    justify-content: center;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid transparent;
}

body.dark-mode  .profile-avatar { border-color: #1e1e30; }
body.light-mode .profile-avatar { border-color: #fff; }

.stat-box {
    text-align: center;
    padding: 12px 8px;
    border-radius: 14px;
    text-decoration: none !important;
    transition: transform 0.18s;
    display: block;
}

.stat-box:hover { transform: translateY(-3px); }

body.dark-mode .stat-box {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
}

body.light-mode .stat-box {
    background: #f8f8fb;
    border: 1px solid rgba(0,0,0,0.07);
}

.stat-box-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.stat-box-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 3px;
}

body.dark-mode  .stat-box-label { color: rgba(255,255,255,0.4); }
body.light-mode .stat-box-label { color: #aaa; }

/* ---- FORUM CARDS ---- */
.forum-card {
    border-radius: 16px;
    padding: 1.4rem;
    border: 1px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.forum-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff5722, #ff9800);
}

.forum-card:hover { transform: translateY(-4px); }

body.dark-mode .forum-card {
    background: linear-gradient(135deg, #2a2a3e, #1e1e30);
    border-color: rgba(255,255,255,0.07);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

body.dark-mode .forum-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,0.4); }

body.light-mode .forum-card {
    background: #fff;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

body.light-mode .forum-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,0.12); }

/* ---- TOPIC ROWS ---- */
.topic-row {
    padding: 12px 16px;
    border-radius: 12px;
    transition: background 0.15s;
    border: 1px solid transparent;
    margin-bottom: 6px;
}

body.dark-mode .topic-row {
    border-color: rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}

body.dark-mode .topic-row:hover { background: rgba(255,255,255,0.05); }

body.light-mode .topic-row {
    border-color: rgba(0,0,0,0.07);
    background: rgba(0,0,0,0.01);
}

body.light-mode .topic-row:hover { background: rgba(0,0,0,0.03); }

/* ---- NAVBAR MODERNE ---- */
.navbar-modern {
    padding: 0.7rem 1.5rem;
    border-bottom: 1px solid transparent;
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: background 0.2s, border-color 0.2s;
}
body.dark-mode .navbar-modern { background: rgba(30,30,46,0.88); border-color: rgba(255,255,255,0.07); }
body.light-mode .navbar-modern { background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,0.08); box-shadow: 0 1px 12px rgba(0,0,0,0.06); }
.navbar-modern .navbar-brand { font-size:1.35rem; font-weight:800; letter-spacing:-0.02em; text-decoration:none; display:flex; align-items:center; gap:8px; padding:0; }
.brand-logo-icon { width:32px; height:32px; border-radius:9px; background:linear-gradient(135deg,#ff5722,#ff9800); display:flex; align-items:center; justify-content:center; color:#fff; font-size:1rem; flex-shrink:0; box-shadow:0 2px 10px rgba(255,87,34,0.4); }
.brand-text { background:linear-gradient(90deg,#ff5722,#ff9800); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
body.dark-mode .navbar-modern .nav-link { color:rgba(255,255,255,0.72) !important; font-size:0.88rem; font-weight:500; padding:0.45rem 0.75rem; border-radius:8px; transition:color 0.15s,background 0.15s; }
body.light-mode .navbar-modern .nav-link { color:#444 !important; font-size:0.88rem; font-weight:500; padding:0.45rem 0.75rem; border-radius:8px; transition:color 0.15s,background 0.15s; }
body.dark-mode .navbar-modern .nav-link:hover, body.dark-mode .navbar-modern .nav-link.active { color:#fff !important; background:rgba(255,255,255,0.08); }
body.light-mode .navbar-modern .nav-link:hover, body.light-mode .navbar-modern .nav-link.active { color:#ff5722 !important; background:rgba(255,87,34,0.06); }
body.dark-mode .navbar-modern .dropdown-menu { background:#1e1e30; border:1px solid rgba(255,255,255,0.09); border-radius:14px; padding:8px; box-shadow:0 12px 35px rgba(0,0,0,0.45); margin-top:6px !important; }
body.light-mode .navbar-modern .dropdown-menu { background:#fff; border:1px solid rgba(0,0,0,0.09); border-radius:14px; padding:8px; box-shadow:0 12px 35px rgba(0,0,0,0.12); margin-top:6px !important; }
body.dark-mode .navbar-modern .dropdown-item { color:rgba(255,255,255,0.75); font-size:0.86rem; padding:8px 12px; border-radius:8px; transition:background 0.15s,color 0.15s; }
body.light-mode .navbar-modern .dropdown-item { color:#444; font-size:0.86rem; padding:8px 12px; border-radius:8px; transition:background 0.15s,color 0.15s; }
body.dark-mode .navbar-modern .dropdown-item:hover { background:rgba(255,255,255,0.08); color:#fff; }
body.light-mode .navbar-modern .dropdown-item:hover { background:rgba(255,87,34,0.06); color:#ff5722; }
.navbar-modern .dropdown-header { font-size:0.72rem; font-weight:700; letter-spacing:0.07em; text-transform:uppercase; padding:6px 12px 4px; opacity:0.45; }
.navbar-modern .dropdown-divider { margin:6px 8px; opacity:0.1; }
.navbar-search-input { font-size:0.86rem; padding:7px 14px; border-radius:50px; border:1px solid transparent; outline:none; transition:border-color 0.2s,background 0.2s; min-width:180px; }
body.dark-mode .navbar-search-input { background:rgba(255,255,255,0.07); color:#fff; border-color:rgba(255,255,255,0.1); }
body.dark-mode .navbar-search-input::placeholder { color:rgba(255,255,255,0.35); }
body.dark-mode .navbar-search-input:focus { background:rgba(255,255,255,0.1); border-color:rgba(255,87,34,0.5); box-shadow:none; color:#fff; }
body.light-mode .navbar-search-input { background:#f4f4f9; color:#333; border-color:rgba(0,0,0,0.1); }
body.light-mode .navbar-search-input:focus { background:#fff; border-color:rgba(255,87,34,0.4); box-shadow:none; }
.navbar-search-btn { background:linear-gradient(135deg,#ff5722,#ff9800); border:none; color:#fff; padding:7px 16px; border-radius:50px; font-size:0.86rem; font-weight:600; cursor:pointer; transition:opacity 0.2s,transform 0.2s; }
.navbar-search-btn:hover { opacity:0.9; transform:translateY(-1px); }
.theme-toggle { display:flex; align-items:center; gap:6px; cursor:pointer; padding:5px 10px; border-radius:50px; border:1px solid transparent; transition:background 0.2s; }
body.dark-mode .theme-toggle { border-color:rgba(255,255,255,0.1); color:rgba(255,255,255,0.6); }
body.light-mode .theme-toggle { border-color:rgba(0,0,0,0.1); color:#666; }
.theme-toggle:hover { opacity:0.8; }
.theme-toggle-icon { font-size:0.95rem; }
body.dark-mode .navbar-toggler { border-color:rgba(255,255,255,0.2); }
body.light-mode .navbar-toggler { border-color:rgba(0,0,0,0.2); }
.nav-btn-connect { background:linear-gradient(135deg,#ff5722,#ff9800); color:#fff !important; padding:7px 18px; border-radius:50px; font-weight:600; font-size:0.86rem; text-decoration:none !important; display:inline-flex; align-items:center; gap:6px; transition:opacity 0.2s,transform 0.2s; border:none; box-shadow:0 2px 10px rgba(255,87,34,0.3); }
.nav-btn-connect:hover { opacity:0.9; transform:translateY(-1px); color:#fff !important; }
.nav-btn-register { font-size:0.86rem; font-weight:600; padding:7px 16px; border-radius:50px; border:1px solid transparent; text-decoration:none !important; display:inline-flex; align-items:center; gap:6px; transition:background 0.2s; }
body.dark-mode .nav-btn-register { border-color:rgba(255,255,255,0.15); color:rgba(255,255,255,0.75) !important; }
body.dark-mode .nav-btn-register:hover { background:rgba(255,255,255,0.08); color:#fff !important; }
body.light-mode .nav-btn-register { border-color:rgba(0,0,0,0.12); color:#444 !important; }
body.light-mode .nav-btn-register:hover { background:rgba(0,0,0,0.04); color:#222 !important; }

/* ---- BUBULLE MODERNE ---- */
.bubulle-modern {
    border-radius: 18px;
    padding: 1.4rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}
body.dark-mode .bubulle-modern { background: linear-gradient(135deg,#2a2a3e,#1e1e30); border-color: rgba(255,255,255,0.07); }
body.light-mode .bubulle-modern { background: linear-gradient(135deg,#f0f4ff,#e8f0fe); border-color: rgba(99,102,241,0.15); }
.bubulle-modern::after { content:''; position:absolute; right:-40px; top:-40px; width:180px; height:180px; border-radius:50%; background:radial-gradient(circle,rgba(0,188,212,0.07) 0%,transparent 70%); pointer-events:none; }
.bubulle-modern img { width:72px; height:auto; flex-shrink:0; filter:drop-shadow(0 4px 10px rgba(0,188,212,0.2)); }
.bubulle-modern-text { font-size:0.93rem; line-height:1.7; }
body.dark-mode .bubulle-modern-text { color:rgba(255,255,255,0.78); }
body.light-mode .bubulle-modern-text { color:#333; }
.bubulle-modern-text strong { color:#26c6da; }
.bubulle-modern-text a { color:#ff7043; font-weight:600; text-decoration:none; border-bottom:1px dashed rgba(255,112,67,0.45); transition:border-color 0.2s; }
.bubulle-modern-text a:hover { border-color:#ff7043; }
@media (max-width:768px) { .bubulle-modern { flex-direction:column; text-align:center; } }

/* ---- SECTION HEADERS ---- */
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:1.1rem; }
.section-title { font-size:1.05rem; font-weight:700; display:flex; align-items:center; gap:9px; margin:0; }
body.dark-mode .section-title { color:#fff; }
body.light-mode .section-title { color:#1a1a2e; }
.section-dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.section-dot.orange { background:linear-gradient(135deg,#ff5722,#ff9800); }
.section-dot.cyan   { background:linear-gradient(135deg,#00bcd4,#26c6da); }
.section-dot.purple { background:linear-gradient(135deg,#7c3aed,#a855f7); }
.section-see-all { font-size:0.8rem; font-weight:600; color:#ff7043; text-decoration:none; display:inline-flex; align-items:center; gap:4px; transition:gap 0.18s; }
.section-see-all:hover { color:#ff5722; gap:8px; }

/* ---- CONTENT PANELS ---- */
.content-panel { border-radius:18px; padding:1.4rem; height:100%; border:1px solid transparent; }
body.dark-mode .content-panel { background:linear-gradient(135deg,#2a2a3e,#1e1e30); border-color:rgba(255,255,255,0.07); box-shadow:0 4px 20px rgba(0,0,0,0.22); }
body.light-mode .content-panel { background:#fff; border-color:rgba(0,0,0,0.08); box-shadow:0 4px 20px rgba(0,0,0,0.055); }

/* ---- BREADCRUMB ---- */
.breadcrumb {
    font-size: 0.82rem;
    margin-bottom: 0.6rem;
    padding: 0;
    background: transparent;
}

body.dark-mode .breadcrumb-item { color: rgba(255,255,255,0.45); }
body.light-mode .breadcrumb-item { color: #999; }

body.dark-mode .breadcrumb-item a { color: rgba(255,255,255,0.55); }
body.light-mode .breadcrumb-item a { color: #888; }

body.dark-mode .breadcrumb-item.active { color: rgba(255,255,255,0.7); }

.breadcrumb-item + .breadcrumb-item::before {
    opacity: 0.4;
}


