/* --- VARIABLES (mode clair) --- */
:root {
    --bg: #f5f6fa;
    --bg-card: #fff;
    --text: #333;
    --text-muted: #666;
    --text-light: #999;
    --primary: #007bff;
    --primary-hover: #0056b3;
    --secondary: #34495e;
    --secondary-hover: #1abc9c;
    --success: #28a745;
    --success-hover: #1e7e34;
    --cancel: #666;
    --cancel-hover:#333;
    --danger:#fa4747;
    --danger-hover:#860808;
    --header-bg: #2c3e50;
    --header-text: #ecf0f1;
    --shadow: rgba(0,0,0,0.1);
  }
  
/* --- VARIABLES (mode sombre acidulé) --- */
html.dark {
  --bg: #0f1115;
  --bg-card: #1b1e24;
  --text: #e4e6eb;
  --text-muted: #bbb;
  --text-light: #999;
  --primary: #ff6ec7;       /* rose flashy */
  --primary-hover: #ff2e9d;
  --secondary: #00e5ff;     /* cyan lumineux */
  --secondary-hover: #00b8cc;
  --success: #00ff85;       /* vert fluo */
  --success-hover: #00cc6b;
  --header-bg: #1b1e24;
  --header-text: #f2f2f2;
  --shadow: rgba(0,0,0,0.6);
}
  
  /* --- RESET GLOBAL --- */
  body {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.4s linear;
  }

  html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
  }

  /* Par défaut : menu masqué */
.menu {
  display: none;
}

/* --- LIENS GÉNÉRAUX --- */
  a {
      text-decoration: none;   /* enlève le soulignement */
      color: var(--primary);   /* garde ta couleur principale */
  }
  
  a:hover {
      text-decoration: underline; /* facultatif : un petit soulignement au survol */
      color: var(--primary-hover);
  }


/* --- EFFET DE BALAYAGE CIRCULAIRE --- */

/* body = thème actuel */
body {
  position: relative;
  overflow-x: hidden;
  background: var(--current-bg);
  color: var(--current-text);
  transition: none;
}

/* masque du prochain thème */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--next-bg);
  color: var(--next-text);
  clip-path: circle(0% at var(--toggle-x, 50%) var(--toggle-y, 50%));
  pointer-events: none;
  z-index: 9999;
  transition: clip-path 0.7s ease-in-out;
}

/* quand actif */
body.transitioning::before {
  clip-path: circle(150% at var(--toggle-x, 50%) var(--toggle-y, 50%));
}

/* Le masque est en fait une copie du body avec le thème suivant */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  clip-path: circle(0% at var(--toggle-x, 50%) var(--toggle-y, 50%));
  transition: clip-path 0.6s ease-out;
}

/* Quand transition active, on applique directement les variables du prochain thème */
body.transitioning::after {
  clip-path: circle(150% at var(--toggle-x, 50%) var(--toggle-y, 50%));
  background: var(--next-bg);     /* <== provisoire, remplacé par variables complètes */
  color: var(--next-text);
}
    
/* --- TOGGLE THEME --- */
/* Conteneur du bouton toggle = transparent */
#themeToggle {
  background: none;
  border: none;
  padding: 6px;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* L’icône seule */
#themeToggle i {
  font-size: 20px;
  border-radius: 50%; /* cercle arrondi */
  padding: 6px;
  transition: transform 0.5s ease, color 0.5s ease, text-shadow 0.5s ease;
  text-decoration: none;
}

/* Styles moon/sun */
#themeToggle i.fa-moon {
  color: #4a90e2;
  text-shadow: 0 0 6px rgba(74,144,226,0.6), 0 0 12px rgba(74,144,226,0.4);
}
#themeToggle i.fa-sun {
  color: #f1c40f;
  text-shadow: 0 0 6px rgba(241,196,15,0.6), 0 0 12px rgba(241,196,15,0.4);
}

/* Hover */
#themeToggle:hover i {
  text-shadow: 0 0 10px rgba(255,255,255,0.9), 0 0 20px rgba(255,255,255,0.6);
}

/* Rotation au changement */
#themeToggle i.rotate {
  transform: rotate(180deg);
}

  
  /* --- HEADER --- */
/* barre du haut */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between; /* hamburger à gauche / menu à droite */
  padding: 0 10px;
}

/* le menu à droite */
.top-bar .menu {
  margin-left: auto;           /* pousse tout à droite */
  display: flex;
  gap: 15px;                   /* espace entre les icônes */
  align-items: center;
}

/* style des liens */
.top-bar .menu a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;                    /* espace entre icône et texte */
  font-size: 32px;
  padding: 6px 12px;
  background: none;
  border-radius: 5px;
  color: var(--header-text);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.top-bar .menu a:hover {
  background: none;
  color: #fff;
}
  
  
  /* --- CONTENEUR GÉNÉRAL --- */
.container {
  flex: 1;
  width: 95%;          /* occupe 95% de l’écran */
  max-width: 1400px;   /* limite lisible sur desktop large */
  margin: 0 auto;      /* centre le contenu */
  padding: 0 20px;     /* petite marge interne */
}
  
  
  /* --- FIL D’ARIANE --- */
  .breadcrumb {
    margin: 15px 0 25px;
    font-size: 14px;
    color: var(--text-muted);
  }
  .breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
  }
  .breadcrumb a:hover {
    text-decoration: underline;
  }
  .breadcrumb span {
    margin: 0 5px;
    color: var(--text-light);
  }
  
  /* --- LISTE DE FORUMS --- */
.forum-list {
    display: flex;
    flex-direction: column;
    gap: 25px; /* espace entre chaque forum */
}

.forum-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px var(--shadow);
    transition: transform 0.2s ease, background 0.3s;
    margin-bottom: 20px; /* force un espace entre les blocs */
}

/* Survol avec léger effet */
.forum-card:hover {
    transform: translateY(-2px);
}
  
  .forum-card h2 {
    margin: 0 0 10px;
    font-size: 20px;
  }
  .forum-card p {
    margin: 0 0 10px;
    color: var(--text-muted);
  }
  .subforums {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
  }
  .subforums li {
    margin: 5px 0;
  }
  .subforums a {
    color: var(--primary);
    text-decoration: none;
  }
  .subforums a:hover {
    text-decoration: underline;
  }
  
  /* --- LAYOUT AVEC SIDEBAR --- */
  .forum-layout {
    display: flex;
    gap: 20px;
  }
  .sidebar {
    width: 220px;
    background: var(--bg-card);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow);
    flex-shrink: 0;
  }
  .sidebar h3 {
    margin-top: 0;
    font-size: 16px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
  }
  .sidebar ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
  }
  .sidebar li {
    margin: 8px 0;
  }
  .sidebar a {
    color: var(--primary);
    text-decoration: none;
  }
  .sidebar a.active {
    font-weight: bold;
    color: var(--primary-hover);
  }
  .sidebar a:hover {
    text-decoration: underline;
  }

  
  /* --- TABLE DES SUJETS --- */
  .topics-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
    background: var(--bg-card);
    box-shadow: 0 2px 5px var(--shadow);
    border-radius: 8px;
    overflow: hidden;
    table-layout: fixed; /* force largeur fixe des colonnes */
  }
  
  .topics-table th,
  .topics-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top; /* tout aligne en haut */
  }
  
  .topics-table th {
    background: var(--primary);
    color: #fff;
    text-align: left;
    font-weight: 600;
  }
  
  /* Largeurs fixes pour les colonnes */
  .topics-table th:nth-child(1), .topics-table td:nth-child(1) { width: 20%; }
  .topics-table th:nth-child(2), .topics-table td:nth-child(2) { width: 30%; }
  .topics-table th:nth-child(3), .topics-table td:nth-child(3) { width: 15%; }
  .topics-table th:nth-child(4), .topics-table td:nth-child(4) { width: 10%; }
  .topics-table th:nth-child(5), .topics-table td:nth-child(5) { width: 15%; }
  .topics-table th:nth-child(6), .topics-table td:nth-child(6) { width: 10%; }
  
  .topics-table tr:hover {
    background: rgba(0, 123, 255, 0.05);
  }
  
  .topics-table td.center {
    text-align: center;
    font-weight: bold;
  }

/* ===== Tableau Users ===== */
#usersTable {
  table-layout: fixed; /* important pour figer les largeurs */
  width: 100%;
}

#usersTable th, #usersTable td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* Largeurs : adapte si besoin, mais bien 8 colonnes */
#usersTable th:nth-child(1), #usersTable td:nth-child(1) { width: 6%; }   /* ID */
#usersTable th:nth-child(2), #usersTable td:nth-child(2) { width: 16%; }  /* Pseudo */
#usersTable th:nth-child(3), #usersTable td:nth-child(3) { width: 28%; }  /* Email */
#usersTable th:nth-child(4), #usersTable td:nth-child(4) { width: 10%; }  /* Rôle */
#usersTable th:nth-child(5), #usersTable td:nth-child(5) { width: 10%; }  /* Statut */
#usersTable th:nth-child(6), #usersTable td:nth-child(6) { width: 10%; }  /* Inscription */
#usersTable th:nth-child(7), #usersTable td:nth-child(7) { width: 10%; }  /* Dernier login */
#usersTable th:nth-child(8), #usersTable td:nth-child(8) { width: 10%; }  /* Actions */

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-action {
  font-size: 13px;
  color: #333;
  text-decoration: none;
}

.user-action i {
  margin-right: 4px;
}

/* variantes sobres */
.user-action.edit    { color: #007bff; }
.user-action.warn    { color: #e67e22; }
.user-action.success { color: #28a745; }
.user-action.danger  { color: #c62828; }

.user-action:hover {
  text-decoration: underline;
}
  
  /* --- TOPICS ET POSTS --- */
  .post {
    position: relative;
  }
  
  .post-link {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #999;
    font-size: 14px;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
  }
  
  .post:hover .post-link {
    opacity: 1;
  }
  
  .post-link:hover {
    color: #007bff;
  }
  
  /* Notification de copie */
  .copy-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #007bff;
    color: #fff;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
  
  .copy-toast.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1); /* petit zoom fluide */
  }
   
  .topic-card {
    background: var(--bg-card);
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow);
    transition: transform 0.2s ease, background 0.3s;
  }
  .topic-card:hover {
    transform: translateY(-2px);
  }
  .topic-card h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text);
  }
  .topic-meta {
    font-size: 13px;
    color: var(--text-light);
  }
  .reply-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 2px 5px var(--shadow);
  }
  .reply-meta {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
  }
  .reply-meta strong {
    color: var(--text);
  }
  .reply-date {
    float: right;
    font-size: 12px;
    color: var(--text-light);
  }
  .reply-content {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 12px;
  }
  
  /* --- FORMULAIRES --- */
form, .reply-form {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px var(--shadow);
  margin-top: 20px;
}

/* Supprimer le double fond de la page connexion */
.container .reply-form {
  background: none !important;
  box-shadow: none !important;
  border: none !important;
  padding: 20px 0; /* garder un peu d’air autour des champs */
}


/* Champs texte + textarea */
input[type="text"], textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 18px;        /* ✅ homogène */
  font-size: 15px;
  box-sizing: border-box;
  background: #fff;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Mode sombre */
html.dark input[type="text"],
html.dark textarea {
  background: #3a3b3c;
  border-color: #555;
  color: var(--text);
}

/* Focus */
input[type="text"]:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.3);
  outline: none;
}

/* Taille par défaut de la zone de saisie */
textarea {
  min-height: 200px;   
  resize: vertical;    /* extensible */
}

/* Uniformiser largeur des champs */
input[type="text"], textarea, .sceditor-container {
  width: 100% !important;
  box-sizing: border-box;
  border-radius: 18px; /* même arrondi que les boutons */
}

/* Agrandir la zone de texte (SCEditor inclus) */
textarea, .sceditor-container {
  min-height: 300px !important;  /* augmente la taille */
}

/* Harmoniser marges pour que les champs soient alignés */
input[type="text"], textarea, .sceditor-container {
  margin-bottom: 15px;
}


  
/* Bouton par défaut */
button, .btn {
  background: var(--primary);
  color: #fff;                  /* texte blanc car fond violet/bleu */
  padding: 10px 20px;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none !important;
}

button, .btn, .btn-cancel, .btn-success, .btn-danger {
  border-radius: 18px !important;  /* force sur tous */
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  text-decoration: none !important;
  border: none;
}

/* Hover */
button:hover, .btn:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-1px);
}

/* Bouton success (vert) */
.btn-success {
  /* hériter du style .btn */
  padding: 10px 20px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none !important;

  background: var(--success);
  color: #fff;
}
.btn-success:hover {
  background: var(--success-hover);
}

/* Bouton danger (rouge) */
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: var(--danger-hover);
}

.btn-cancel {
  /* hériter du style .btn */
  padding: 10px 20px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none !important;

  background: var(--cancel);
  color: #fff;
}

.btn-cancel:hover {
  background: var(--cancel-hover);
}

/* --- LIENS CONNEXION --- */
.login-hint {
  text-align: center;
  margin: 20px 0;
  font-size: 14px;
}
.login-hint a {
  color: var(--primary);
  font-weight: bold;
}

/* --- Réorganisation du fofo --- */
#forumList tr {
  cursor: grab;
}

#forumList tr:active {
  cursor: grabbing;
  background: rgba(0,123,255,0.1);
}

#forumList tr td:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}
  
/* --- Bloc derniers messages --- */
.latest-posts {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px var(--shadow);
    margin-bottom: 30px;
}

.latest-posts h2 {
    margin-top: 0;
    font-size: 20px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.latest-posts ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.latest-posts li {
    padding: 10px 0 10px 25px; /* espace à gauche pour l'icône */
    border-bottom: 1px solid var(--border-color, #ddd);
    position: relative;
}

.latest-posts li:last-child {
    border-bottom: none;
}

.latest-posts li.unread a {
    font-weight: bold;
    color: var(--primary);
  }
  

/* Icône avant chaque message */
.latest-posts li::before {
    content: "💬";
    position: absolute;
    left: 0;
    top: 10px;
    font-size: 16px;
}

.latest-posts a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.latest-posts a:hover {
    text-decoration: underline;
}

.latest-posts small {
    display: block;
    color: var(--text-muted);
    margin-top: 3px;
    font-size: 13px;
}

/* Bloc catégories */
.sidebar {
    background: var(--bg-card);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px var(--shadow);
}

.sidebar h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}

/* Liste principale */
.sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar ul li {
    margin: 8px 0;
}

/* Lien principal */
.sidebar ul li > a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.sidebar ul li > a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

/* Icône devant les forums */
.sidebar ul li > a::before {
    content: "\f07b"; /* fa-folder (FontAwesome) */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--primary);
}

/* Sous-forums */
.sidebar .subforums {
    margin-top: 4px;
    margin-left: 18px;
    border-left: 1px dashed var(--border);
    padding-left: 12px;
}

.sidebar .subforums li {
    margin: 5px 0;
}

.sidebar .subforums a::before {
    content: "\f086"; /* fa-comments */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
    color: var(--text-muted);
}

blockquote {
    border-left: 4px solid #007BFF;
    padding: 8px 12px;
    margin: 8px 0;
    background: #f9f9f9;
    border-radius: 5px;
}

.bbcode-img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  margin: 14px 0;
  border-radius: 8px;
  background: var(--bg-color, #fff);
  box-shadow: 0 6px 8px -5px rgba(0, 0, 0, 0.4);
  transform-origin: top center;
  transform: rotateX(1.5deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* effet au survol : l’image se décolle davantage */
.bbcode-img:hover {
  transform: rotateX(6deg) translateY(-3px);
  box-shadow: 0 18px 15px -8px rgba(0, 0, 0, 0.55);
}

/* petit effet de “scotch” au-dessus */
.bbcode-img::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 10px;
  background: rgba(255, 255, 200, 0.6);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

body.dark .bbcode-img {
  background: #222;
  box-shadow: 0 6px 10px -5px rgba(0, 0, 0, 0.8);
}

body.dark .bbcode-img::before {
  background: rgba(120, 120, 120, 0.4);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.local-img {
  display: block;
  max-width: 300px;
  height: auto;
  margin: 12px 0;
  cursor: zoom-in;
  border-radius: 15px;
  border: 1px solid #ccc;
  background: #fff;

  /* effet d'étiquette décollée */
  box-shadow: 0 6px 10px -5px rgba(0, 0, 0, 0.25);
  transform-origin: top center;
  transform: rotateX(1.5deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* effet au survol : elle se décolle un peu plus */
.local-img:hover {
  transform: rotateX(6deg) translateY(-3px);
  box-shadow: 0 18px 15px -8px rgba(0, 0, 0, 0.45);
}

/* effet visuel : scotch transparent au-dessus */
.local-img::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 10px;
  background: rgba(255, 255, 200, 0.5);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

/* Version sombre */
body.dark .local-img {
  border-color: #444;
  background: #222;
  box-shadow: 0 6px 12px -5px rgba(0, 0, 0, 0.7);
}

body.dark .local-img:hover {
  box-shadow: 0 18px 18px -8px rgba(0, 0, 0, 0.85);
}

body.dark .local-img::before {
  background: rgba(150, 150, 150, 0.3);
}

.search-full img {
  max-width: 300px;
  height: auto;
  cursor: zoom-in;
  border-radius: 15px;
  transition: transform 0.2s ease;
}

/* --- Champ de réponse --- */
.reply-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
  }
  
/* --- Bouton répondre --- */
/* Centre le bouton comme les champs */
.reply-form form {
  text-align: center; /* centre tout ce qui est dedans */
}

.reply-form button {
  margin-top: 15px;
  padding: 10px 20px;
  border: none;
  border-radius: 20px;
  background: #0d6efd; /* bleu bootstrap */
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.reply-form button:hover {
  background: #0b5ed7;
}
  
/* --- Citations --- */
.reply-content blockquote {
  border-left: 4px solid #007BFF;
  background: #f8f9fa;
  padding: 8px 12px;
  margin: 8px 0;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
}

.reply-content blockquote strong {
  color: #007BFF;
}

/* --- Lien "Citer" plus discret --- */
.reply-actions {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}

.reply-actions a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6c757d; /* gris discret */
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

.reply-actions a:hover {
  color: var(--primary); /* bleu en clair, rose en sombre */
}

/* style quand un like est actif */
.reply-actions .btn-like.liked {
  color: var(--primary);
}


.reply-actions .quote-link {
  font-size: 13px;
  color: #007BFF;
  text-decoration: none;
  cursor: pointer;
}

.reply-actions .quote-link:hover {
  text-decoration: underline;
}

.emoji {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin: 0 2px;
}

.bbcode-video, .bbcode-audio {
    max-width: 100%;
    margin: 10px 0;
  }
  
  .bbcode-code {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: monospace;
  }
  
  details summary {
    cursor: pointer;
    font-weight: bold;
    color: #007BFF;
  }
  
/* Toolbar épurée */
.sceditor-toolbar {
    background: transparent;
    border: none;
    padding: 2px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Boutons */
.sceditor-button {
    background: none !important;
    border: none !important;
    padding: 4px !important;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.1s ease;
}

/* Icônes Font Awesome */
.sceditor-button i {
    font-size: 14px;  /* plus petit */
    color: #444;
    transition: color 0.2s ease, transform 0.1s ease;
}

/* Hover : juste la couleur */
.sceditor-button:hover i {
    color: #007bff;
    transform: scale(1.1);
}

/* Bouton actif (gras, italique, etc.) */
.sceditor-button.active i {
    color: #007bff !important;
}

/* Supprimer tous les fonds et bordures */
.sceditor-button,
.sceditor-button * {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Icônes FA */
.sceditor-button i {
    font-size: 14px;
    color: #444;
    transition: color 0.2s ease, transform 0.1s ease;
}

/* Hover */
.sceditor-button:hover i {
    color: #007bff;
    transform: scale(1.1);
}

/* Actif */
.sceditor-button.active i {
    color: #007bff !important;
}

/* Supprimer le fond gris des conteneurs internes */
.sceditor-button div,
.sceditor-group {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* --- Respnsive --- */
/* Layout principal */
.forum-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
  
/* Sidebar et contenu */
.sidebar {
  width: 250px;
  flex-shrink: 0;
}

.forum-content {
  flex: 1;
  min-width: 0; /* évite les débordements */
}
  
/* --- Gestion des avatars --- */
.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 10px 0;
    border: 2px solid #ddd;
  }
 
  .reply-meta {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
/* Menu utilisateur */
/* Avatar bien rond et aligné */
.avatar-small {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    border: 2px solid #ddd;
  }
  
.user-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  transition: background 0.2s;
}

.user-toggle:hover {
  background: rgba(255,255,255,0.15);
}

.user-toggle span {
  font-size: 14px;
  font-weight: 500;
  color: #fff; /* ou #333 en clair */
}
  
.user-toggle .avatar-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
}

.user-toggle i {
  font-size: 12px;
  color: #ccc;
}

.user-menu {
  position: relative;
  z-index: 9999;
}

/* Menu utilisateur fermé par défaut */
.user-menu .dropdown {
  display: none;               /* caché par défaut */
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  min-width: 180px;
  z-index: 10000;              /* priorité */
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* Quand on ajoute la classe open → visible */
.user-menu.open .dropdown {
  display: block;
}

/* Header dans le dropdown */
.dropdown-user {
  padding: 10px;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
  z-index: 999 !important;
}

.dropdown-user strong {
  display: block;
  font-size: 14px;
}

.dropdown-user small {
  font-size: 12px;
  color: #666;
}

/* Liens */
.user-menu .dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text, #333);
  font-size: 0.9rem;
}

.user-menu .dropdown a:hover {
  background: #007bff;
  color: #fff;
  transform: none !important; 
}
.user-toggle {
  cursor: pointer;   /* indispensable pour montrer que c'est cliquable */
  border: none;
  background: rgba(255,255,255,0.05);
}

/* En-tête */
.user-menu .dropdown-user {
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
  padding: 10px;
}
.user-menu .dropdown-user strong {
  color: #333;
}
.user-menu .dropdown-user small {
  color: #777;
}

/* Liens clairs par défaut */
.user-menu .dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  text-decoration: none;
  color: #333;
  background: #fff;
  transition: background 0.2s, color 0.2s;
}

/* Hover */
.user-menu .dropdown a:hover {
  background: #007bff;
  color: #fff;
}

/* Icônes dans les liens */
.user-menu .dropdown a i {
  width: 18px;
  text-align: center;
}
/* Forcer tout le menu sur une seule ligne */
header nav {
  display: flex;
  align-items: center; /* aligne verticalement */
  gap: 10px;
}

/* Liens classiques */
header nav a {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  background: rgba(255,255,255,0.05);
  transition: background 0.2s;
}

/* Uniformiser l’avatar menu avec les autres liens */
.user-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;   /* même taille que les autres liens */
  border-radius: 6px;
  cursor: pointer;
}

/* Avatar aligné */
.user-toggle .avatar-small {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
nav {
  display: flex;
  align-items: center;
  gap: 12px; /* espace entre boutons */
}

.user-menu {
  position: relative;
  display: inline-block;
}

.user-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
  
.btn-edite i { color: #28a745; }
.btn-delete i { color: #dc3545; }

.reply-edited {
  color: #777;
  font-size: 0.85em;
  margin-left: 10px;
  font-style: italic;
}

/* Supprime le style "carte" hérité du form global */
.sidebar {
  margin-top: 30px !important;
}
.sidebar .search-form {
  background: none !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 0 12px !important;
  display: flex;
  align-items: center;
  position: relative; /* nécessaire pour placer la loupe */
}

/* Conteneur relatif */
.sidebar .search-form {
  position: relative;
  margin: 0 0 12px;
}

/* Champ de recherche */
.sidebar .search-form input {
  width: 100%;
  padding: 8px 42px 8px 14px; /* place pour la loupe */
  border: 1px solid #ccc;
  border-radius: 999px;
  font-size: 14px;
  outline: none;
  background: var(--bg-card);
}

/* Loupe avec correction optique */
.sidebar .search-form button {
  --bias-x: 22px;   /* petit décalage horizontal */
  --bias-y: -15px;    /* petit décalage vertical */

  position: absolute;
  right: 12px;
  top: 50%;
  transform: translate(calc(var(--bias-x)), calc(-50% + var(--bias-y)));
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, transform 0.2s;
}

/* Hover */
.sidebar .search-form button:hover {
  color: var(--primary);
  transform: translate(var(--bias-x), calc(-50% + var(--bias-y))) scale(1.2);
}

/* Hover & focus : change la couleur */
.sidebar .search-form button:hover,
.sidebar .search-form input:focus + button {
  color: var(--primary);
}

.search-results {
  list-style: none;
  margin: 20px 0;
  padding: 0;
}

.search-results li {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 4px var(--shadow);
}

.search-results .search-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--primary);
  text-decoration: none;
}

.search-results .search-title:hover {
  text-decoration: underline;
}

.search-results .search-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.search-results .search-snippet {
  font-size: 14px;
  color: var(--text);
  margin-top: 6px;
}

.search-item {
  position: relative;
}

.toggle-details {
  margin-top: 6px;
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.toggle-details:hover {
  text-decoration: underline;
}

/* --- formulaire d'Incriptions --- */
.form-check {
  margin: 10px 0;
  text-align: center; /* centre la case + texte */
}

.form-check label {
  display: inline-flex;      /* pour que case + texte restent groupés */
  align-items: center;       /* alignement vertical propre */
  gap: 6px;                  /* petit espace entre la case et le texte */
  cursor: pointer;
  font-size: 14px;
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

form button[type="submit"] {
  display: block;          /* le bouton occupe toute la ligne */
  margin: 15px auto;       /* auto centre horizontalement */
}

/* --- Champs de saisie inscription --- */
form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="number"] {
  display: block;
  width: 100%;
  max-width: 400px;        /* largeur homogène */
  padding: 10px;
  margin: 10px auto;       /* centre et espace entre les champs */
  border: 1px solid #ccc;
  border-radius: 20px;     /* arrondi identique au champ pseudo */
  font-size: 15px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Effet focus */
form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form input[type="number"]:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.captcha-group {
  display: flex;
  justify-content: center;   /* centre le bloc entier */
  align-items: center;       /* aligne verticalement */
  gap: 12px;                 /* espace entre texte et champ */
  margin: 15px 0;
  font-size: 15px;
}

.captcha-group span {
  font-weight: 500;
  color: #333;
}

.captcha-group input[type="number"] {
  width: 80px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 15px;
  text-align: center;
  box-sizing: border-box;

  /* ✅ on neutralise les règles globales */
  display: inline-block;
  margin: 0;
  max-width: none;
}

/* -------------------------- */
/* --------- HEADER --------- */
/* -------------------------- */
/* --- Variables header --- */
.technifree-header{
  --violet:#6f3bbd;
  --rose:#f84cbd;
  --blanc:#fcfcfc;
  --logo-desktop:40px;
  --logo-mobile:20px;
  --topbar-h:64px;
  --bottombar-h:52px;

  position:relative;
  font-size:16px;
  background: linear-gradient(135deg, #9a4ce0,#6f3bbd );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 -2px 12px rgba(0,0,0,.3);
  color:#fff;
  padding-top: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.technifree-header a{ color:inherit; text-decoration:none; }

/* Dark: fond noir + texte violet */
html.dark .technifree-header{
  background: linear-gradient(135deg, #0f1115,#000000 );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
   color:var(--rose); }
html.dark .technifree-header a{ color:var(--rose); }
html.dark .technifree-header a:hover{ color:var(--blanc); }

/* Logo chevauchant la jonction des barres */
.logo{
  position:absolute;
  left:16px;
  top:calc(var(--topbar-h) - var(--logo-desktop)/2);
  z-index:2;
}
.logo img{ height:var(--logo-desktop); display:block; }

/* Ligne 1 : menu centré */
.top-bar{
  height:var(--topbar-h);
  display:flex; 
  align-items:center; 
  justify-content:center;
  text-align: center;
  position:relative; 
  padding: 16px 0 8px 0; /* 16px en haut, 8px en bas */
}

.menu{ display:flex; justify-content:center; gap:22px; }

.menu a i {
  line-height: 1;
  transition: transform 0.2s ease; /* pour l’effet zoom */
}

.menu a {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 32px;
  padding: 6px;
  position: relative;
  transition: transform 0.2s ease;
}

.menu a span {
  font-size: 12px;
  margin-top: 16px;
  height: 16px;            /* réserve la place du texte */
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  color: inherit;
}

.menu a:hover span {
  opacity: 1;
  transform: translateY(0);
}

/* Au survol → zoom + texte */
.menu a:hover i {
  transform: scale(1.5);
}

/* Ligne 2 : user à droite */
.bottom-bar{
  height:var(--bottombar-h);
  display:flex; align-items:center; justify-content:flex-end;
  padding:0 16px;
}
.bottom-bar .user-area{
  margin-left:auto; display:flex; align-items:center; gap:15px;
}
/* Hover scale sur éléments user (pas tout le bloc) */
.bottom-bar .user-area a,
.bottom-bar .user-area button{
  transition:transform .2s ease;
}
.bottom-bar .user-area a:hover,
.bottom-bar .user-area button:hover{
  transform:scale(1.25);
}

/* ===== Footer ===== */
/* Footer plein écran */
.tf-footer {
  position: relative;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;               /* largeur 100% de la page, sans dépassement */
  margin: 0;
  padding: 18px 0;
  box-sizing: border-box;
  color: #fff;

  background: linear-gradient(135deg, #6f3bbd, #9a4ce0);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 -2px 12px rgba(0,0,0,.3);
}

.tf-footer-inner {
  max-width: 1200px;         /* contenu centré */
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
  font-size: .95rem;
  line-height: 1.6;
}

.tf-footer a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s ease;
}

.tf-footer a:hover {
  color: #ffd6ff; /* survol plus clair */
}

/* Mode sombre → footer encore plus foncé */
html.dark .tf-footer {
  background: linear-gradient(135deg, #4b287f, #6f3bbd);
  box-shadow: 0 -2px 15px rgba(0,0,0,.6);
}

/* ===== Bouton retour haut ===== */
.tf-top {
  position: fixed;
  right: 18px; bottom: 18px;
  width: 46px; height: 46px;
  border: 0; border-radius: 999px;
  background: #6f3bbd; color: #fff;
  box-shadow: 0 10px 20px rgba(0,0,0,.25);
  display: grid; place-items: center;
  cursor: pointer;
  opacity: 0; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease, background .2s ease;
  z-index: 9999;
}
.tf-top i { font-size: 18px; }
.tf-top.show { opacity: 1; transform: translateY(0); }
.tf-top:hover { background: #e6528d; box-shadow: 0 16px 30px rgba(230,82,141,.35); }
.tf-top:focus-visible { outline: 2px dashed #fff; outline-offset: 2px; }

/* --- effets lightbox --- */
.lightbox {
  display: none;           /* caché par défaut */
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
  text-align: center;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80vh;
  margin: auto;
  border-radius: 6px;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* --- Formulaire d'édition --- */
/* Formulaire d'édition */
/* Espacement spécifique pour la page d'édition */
.edit-container {
  margin-top: 30px; /* espace sous le header */
}

/* Zone de texte plus grande */
.edit-form textarea {
  width: 100%;
  min-height: 320px;
  font-size: 15px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #ccc;
  resize: vertical;
  box-sizing: border-box;
}

/* Alignement des boutons */
.form-actions .btn,
.form-actions .btn-cancel {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  float: none !important;      /* empêche de se coller à droite */
  margin: 0;                   /* retire marges bizarres */
}

/* ----------------------
   RESPONSIVE
   ---------------------- */

/* Tablettes (≤ 992px) */
@media (max-width: 992px) {
  .forum-layout {
    flex-direction: column; /* Sidebar au-dessus */
  }

  .sidebar {
    width: 100%;
    margin-bottom: 20px;
  }

  .topic-card,
  .reply-card,
  .reply-form,
  .forum-content {
    width: 100%;
  }
}

/* Toujours masquer le menu par défaut */
.menu {
  display: none !important;
}

/* --- Version bureau (≥ 769px) --- */
@media (min-width: 769px) {
  .hamburger {
    display: none !important; /* cacher le bouton burger */
  }

  .menu {
    display: flex !important; /* montrer le menu en horizontal */
    flex-direction: row;
    gap: 20px;
    position: static;
    background: transparent;
    padding: 0;
    margin: 0;
  }
}

/* --- Version mobile (≤ 768px) --- */
@media (max-width: 768px) {
  .hamburger {
    display: block !important;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1001;
  }

  .menu {
    display: none !important; /* masqué par défaut */
    flex-direction: column;
    gap: 12px;
    background: var(--violet);
    padding: 12px;
    border-radius: 8px;
    position: absolute;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    margin: 0 10px;
    z-index: 1000;
  }

  .menu.active {
    display: flex !important; /* affiché seulement quand actif */
  }
}

  /* Cartes / contenu */
  .forum-layout, .topic-card, .category-card {
    margin: 0 10px;
    border-radius: 10px;
  }

/* Mobiles portrait (≤ 600px) */
@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .topic-card h2 {
    font-size: 1.2rem;
  }

  .reply-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .reply-meta .reply-date {
    margin-top: 4px;
    font-size: 0.8rem;
  }

  /* Toolbar SCEditor compacte */
  .sceditor-toolbar {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .sceditor-button i {
    font-size: 12px;
  }

  /* Boutons sous formulaire */
  .form-actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .form-actions .btn {
    width: 100%;
    max-width: 250px;
    justify-content: center;
  }
}

/* Très petits écrans (≤ 500px) */
@media (max-width: 500px) {
  .reply-meta img.avatar-small {
    width: 32px;
    height: 32px;
  }
  .reply-meta strong,
  .reply-meta span {
    font-size: 13px;
  }
}


/* --- Bloc d'annonce --- */
.forum-announcement {
  background: #fff3cd;         /* jaune clair (style alerte) */
  border: 1px solid #ffeeba;   /* bord jaune */
  color: #856404;              /* texte brun */
  padding: 12px 16px;
  margin: 15px 0;
  border-radius: 15px;
  font-size: 15px;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 20px rgba(0,0,0,.25);
}

.forum-announcement i {
  color: #856404;
  font-size: 18px;
}

/* --- Modale forum privé --- */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;   /* <— */
  align-items: center;       /* <— */
}

/* Contenu de la modale */
.modal-content {
  background: var(--modal-bg, #fff);
  color: var(--modal-text, #222);
  margin: 15% auto;
  padding: 20px;
  border-radius: 8px;
  width: 400px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  animation: popup 0.4s ease;
}

.modal-content h2 {
  color: #e53935; /* rouge plus visible */
  margin-bottom: 10px;
}

.modal .close {
  float: right;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}

.modal .close:hover {
  opacity: 1;
}

/* Animation */
@keyframes popup {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

/* Colonnes permissions */
#permForm th, 
#permForm td {
  text-align: center;
  vertical-align: middle;
  padding: 8px;
}

/* Largeur fixe colonnes Voir / Poster / Répondre */
#permForm th:nth-child(2), #permForm td:nth-child(2),
#permForm th:nth-child(3), #permForm td:nth-child(3),
#permForm th:nth-child(4), #permForm td:nth-child(4) {
  width: 90px;
}

/* En-têtes alignés avec les cases */
#permForm th {
  line-height: 1.2;
  padding-bottom: 4px;
}

#permForm th:nth-child(2),
#permForm th:nth-child(3),
#permForm th:nth-child(4) {
  padding-top: 0.6em;
}

.btn-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-save {
  background: #1976d2;
  color: #fff;
}

.btn-save:hover {
  background: #1565c0;
}

.btn-cancel {
  background: #e0e0e0;
  color: #333;
}

.btn-cancel:hover {
  background: #d5d5d5;
}

/* Thème clair */
body:not(.dark) {
  --modal-bg: #fff;
  --modal-text: #222;
}

/* Thème sombre */
html.dark {
  --modal-bg: #2c2c2c;
  --modal-text: #f1f1f1;
}

/* --- marquer tout comme lu --- */
.mark-read-btn {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-color, #333);
  background: transparent;
  transition: all 0.3s ease;
  max-width: 28px;
  overflow: hidden;
  white-space: nowrap;
}

.mark-read-btn i {
  color: var(--link-color, #0d6efd);
}

.mark-read-btn span {
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  color: var(--text-color, #333);
}

/* Au survol → halo + texte visible */
.mark-read-btn:hover {
  background: rgba(13, 110, 253, 0.1); /* halo doux */
  max-width: 200px;
  padding: 4px 12px;
  text-decoration: none;
}

.mark-read-btn:hover span {
  opacity: 1;
  width: auto;
  text-decoration: none;
}

/* Mode sombre */
html.dark .mark-read-btn {
  color: #ddd;
}

html.dark .mark-read-btn i {
  color: #66b2ff;
}

html.dark .mark-read-btn:hover {
  background: rgba(102, 178, 255, 0.15);
}

.mark-read-btn,
.mark-read-btn:hover,
.mark-read-btn:focus,
.mark-read-btn:active {
  text-decoration: none !important; /* ✅ force la suppression du soulignement */
  outline: none;
}

/* --- Marquer tout comme lu --- */
.mark-read-btn.done {
  background: #28a745 !important;
  color: #fff !important;
}

.mark-read-btn.done i {
  color: #fff !important;
}

/* --- statististiques --- */
.forum-stats-box {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #ddd);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.forum-stats-box h3 {
  margin-top: 0;
  font-size: 16px;
  color: var(--text-color, #333);
  display: flex;
  align-items: center;
  gap: 6px;
}

.forum-stats-box ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 14px;
  color: var(--text-color, #555);
}

.forum-stats-box li {
  margin: 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Bloc stats - mode sombre */
html.dark .forum-stats-box {
  background: rgba(20,20,20,0.7);     /* fond semi-transparent */
  backdrop-filter: blur(6px);         /* homogène avec timeline */
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.08);  /* bordure discrète */
  box-shadow: 0 6px 18px rgba(0,0,0,.6);     /* ombre douce */
  color: #fff;                        /* texte blanc par défaut */
}

html.dark .forum-stats-box h3 {
  color: var(--primary);              /* rose flashy du thème */
  font-weight: 600;
  margin-bottom: 10px;
}

html.dark .forum-stats-box ul {
  color: #ddd;                        /* texte gris clair */
}

html.dark .forum-stats-box li i {
  color: var(--primary);              /* icônes en rose */
}

html.dark .forum-stats-box a {
  color: var(--primary);              /* dernier inscrit = rose */
  font-weight: 600;
  text-decoration: none;
}

html.dark .forum-stats-box a:hover {
  color: var(--primary-hover);        /* éclairci au hover */
}

html.dark .forum-stats-box ul li {
  color: #ddd;
}
html.dark .forum-stats-box ul li strong,
html.dark .forum-stats-box ul li span,
html.dark .forum-stats-box ul li b {
  font-weight: bold;
  color: #fff; /* bien visibles */
}


/* Bloc stats - mode clair */
body:not(.dark) .forum-stats-box {
  background: rgba(255,255,255,0.9);     /* blanc lumineux */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(0,0,0,0.08);    /* bordure subtile */
  box-shadow: 0 4px 12px rgba(0,0,0,.08); /* ombre douce */
  color: #333;                           /* texte gris foncé */
}

body:not(.dark) .forum-stats-box h3 {
  color: #0d6efd;                        /* bleu cohérent avec pilule */
  font-weight: 600;
  margin-bottom: 10px;
}

body:not(.dark) .forum-stats-box ul {
  color: #444;                           /* gris un peu plus doux */
}

body:not(.dark) .forum-stats-box li i {
  color: #0d6efd;                        /* icônes bleues */
}

body:not(.dark) .forum-stats-box a {
  color: #0d6efd;                        /* dernier inscrit = bleu */
  font-weight: 600;
  text-decoration: none;
}

body:not(.dark) .forum-stats-box a:hover {
  color: #3690ff;                        /* bleu clair au hover */
}

body:not(.dark) .forum-stats-box ul li {
  color: #444;
}
body:not(.dark) .forum-stats-box ul li strong,
body:not(.dark) .forum-stats-box ul li span,
body:not(.dark) .forum-stats-box ul li b {
  font-weight: bold;
  color: #222; /* un peu plus sombre pour contraste */
}

.forum-stats .counter {
  color: #777; /* gris neutre */
  font-size: 0.9em; /* un peu plus discret */
  margin-right: 10px;
}

.forum-stats .counter i {
  margin-right: 4px;
  color: #999; /* icônes aussi en gris clair */
}

/* Bloc principal */
.timeline {
  position: fixed;
  top: 150px;
  right: 30px;
  width: 80px;
  z-index: 100;
  border-radius: 18px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;                 /* cachée par défaut */
  transition: opacity 0.5s;
  pointer-events: none;
  text-align: center;
  padding: 10px 12px;         /* aère le texte */
  font: 500 13px/1.35 "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
}

/* Visible */
.timeline.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ----- éléments internes ----- */
.timeline-top,
.timeline-bottom {
  font-size: 12px;
  cursor: pointer;
  margin: 4px 0;
}

.timeline-bar {
  position: relative;
  width: 2px;
  margin: 18px auto;
  height: 200px;
  border-radius: 1px;
}

.timeline-handle {
  position: absolute;
  left: -5px;
  width: 12px;
  height: 40px;
  border-radius: 6px;
  cursor: grab;
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transition: background-color 0.3s ease; /* transition douce */
}

.timeline-info {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: .2px;
}

/* ----- Thèmes ----- */
/* === MODE SOMBRE (via html.dark) === */
html.dark aside.timeline {
  background: rgba(20,20,20,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 6px 24px rgba(0,0,0,.7);
}

html.dark aside.timeline,
html.dark aside.timeline * {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}

/* Ligne blanche en sombre */
html.dark aside.timeline .timeline-bar {
  background: #fff;
  box-shadow: 0 0 6px rgba(255,255,255,.4);
}

/* Pilule rose avec liseret blanc */
html.dark aside.timeline .timeline-handle,
html.dark aside.timeline .timeline-handle[style] {
  background: #ff00aa;
  border: 1px solid #fff;
  box-shadow: 0 0 10px #ff00aa, 0 2px 8px rgba(0,0,0,.6);
  transition: transform 0.2s ease, background-color 0.3s ease;
}

html.dark aside.timeline .timeline-handle:hover {
  background: #ff33bb;
  transform: scale(1.1);
}

/* === MODE CLAIR (body:not(.dark)) === */
body:not(.dark) aside.timeline {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #222;
  border: 1px solid rgba(0,0,0,.1);
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
}

body:not(.dark) aside.timeline,
body:not(.dark) aside.timeline * {
  color: #222;
  text-shadow: none;
}

/* Ligne foncée en clair */
body:not(.dark) aside.timeline .timeline-bar {
  background: rgba(0,0,0,.85);
  box-shadow: 0 0 6px rgba(0,0,0,.2);
}

/* Pilule bleue avec liseret blanc */
body:not(.dark) aside.timeline .timeline-handle,
body:not(.dark) aside.timeline .timeline-handle[style] {
  background: #0d6efd;
  border: 1px solid #fff;
  box-shadow: 0 0 6px #0d6efd, 0 2px 6px rgba(0,0,0,.25);
}

body:not(.dark) aside.timeline .timeline-handle:hover {
  background: #3690ff;
  transform: scale(1.1);
}

/* === Liens Timeline === */

/* Mode sombre → rose */
html.dark aside.timeline .timeline-top,
html.dark aside.timeline .timeline-bottom {
  color: #ff00aa !important;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
  cursor: pointer;
  transition: color 0.2s ease;
}

html.dark aside.timeline .timeline-top:hover,
html.dark aside.timeline .timeline-bottom:hover {
  color: #ff33bb !important; /* un peu plus clair au survol */
}

/* Mode clair → bleu */
body:not(.dark) aside.timeline .timeline-top,
body:not(.dark) aside.timeline .timeline-bottom {
  color: #0d6efd !important;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

body:not(.dark) aside.timeline .timeline-top:hover,
body:not(.dark) aside.timeline .timeline-bottom:hover {
  color: #3690ff !important;
}

/* --- Likes --- */
.post-likes {
  margin-top: 6px;
}

.btn-like {
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-like:hover {
  color: var(--primary); /* rose en sombre, bleu en clair */
}

/* --- Mes contributions --- */
/* --- Container des onglets --- */
.tabs {
  display: flex;
  margin-bottom: 15px;
  gap: 8px;
}

/* --- Onglet --- */
.tab-link {
  padding: 8px 18px;
  border: 1px solid #ccc;
  border-radius: 20px 20px 0 0; /* arrondi en haut */
  background: #f8f9fa;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-link:hover {
  background: #e9ecef;
}

.tab-link.active {
  background: #fff;
  border-color: #0d6efd;
  color: #0d6efd;
  font-weight: 600;
}

/* --- Contenu --- */
.tab-content {
  display: none;
  padding: 15px;
  border: 1px solid #ddd;
  border-top: none;
  background: #fff;
  border-radius: 15px;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Mode sombre --- */
html.dark .tab-link {
  background: #222;
  border: 1px solid #444;
  color: #bbb;
}

html.dark .tab-link:hover { background: #2c2c2c; }

html.dark .tab-link.active {
  background: #1a1a1a;
  border-color: #ff00aa;
  color: #ff00aa;
}

html.dark .tab-content {
  background: #1a1a1a;
  border: 1px solid #444;
  color: #eee;
}

/* === Correction du menu utilisateur qui passe sous les posts === */
.user-menu .dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 99999 !important;   /* priorité maximale */
}

header,
.technifree-header,
.top-bar,
.bottom-bar {
  position: relative;
  z-index: 10000; 
}

/* -- Effet après réponse ou modif -- */
/* Mise en évidence temporaire d'un post modifié */
.reply-card.highlight {
  animation: highlightFade 2s ease-out;
}

@keyframes highlightFade {
  0%   { background-color: #fff3cd; }   /* jaune clair */
  100% { background-color: transparent; }
}

/* -- partie admin -- */
.btn-action i,
.btn-icon i {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900; /* solid */
  font-style: normal;
  font-size: 16px;
  line-height: 1;
}

.actions {
  display: flex;
  flex-direction: row;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.actions form {
  all: unset;
  display: inline-block;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  height: 36px;
  border-radius: 25px;
  transition: all 0.3s ease;
  overflow: hidden;
  width: 36px;              /* état initial = icône seule */
  justify-content: center;
  color: #fff;
  padding: 0 10px;
}

.btn-action i {
  font-size: 16px;
  min-width: 16px;
  text-align: center;
}

.btn-action span {
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

/* Expansion au survol */
.btn-action:hover {
  width: 130px;             /* s’élargit pour montrer le texte */
  justify-content: flex-start;
}

.btn-action:hover span {
  opacity: 1;
}

/* Couleurs */
.btn-edit   { background: #0d6efd; }
.btn-warning{ background: #ffc107; color: #222; }
.btn-success{ background: #28a745; }
.btn-danger { background: #dc3545; }

.btn-action:hover { filter: brightness(1.1); }

.alert {
  padding: 10px 15px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.alert.hide {
  opacity: 0;
}


.alert.success {
  background: #d1f7d1;
  border: 1px solid #5cb85c;
  color: #2e7d32;
}

.alert.error {
  background: #fdd;
  border: 1px solid #d9534f;
  color: #a94442;
}

/* Bouton "Nouvel utilisateur" */
.btn-new-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #0d6efd; /* bleu principal */
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-new-user:hover {
  background: #0b5ed7;
}

.btn-new-user i {
  font-size: 15px;
}
/* Boutons dans modale */

.modal .modal-actions button {
  all: unset; /* reset complet */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: center;
  margin-top: 15px;
}

/* Bouton Enregistrer */
.modal .modal-actions .btn-save {
  background: #0d6efd;
  color: #fff;
}

.modal .modal-actions .btn-save:hover {
  background: #0b5ed7;
}

/* Bouton Annuler */
.modal .modal-actions .btn-cancel {
  background: #6c757d;
  color: #fff;
}

.modal .modal-actions .btn-cancel:hover {
  background: #5c636a;
}

/* --- Affichage des droits dans l'admin--- */
.forum-perms {
  font-size: 12px;
  color: #555;
  display: flex;
  flex-direction: column; /* 1 ligne par groupe */
  gap: 4px;
}

.forum-perms .perm-badge {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  background: #f9f9f9;
  border-radius: 6px;
  padding: 2px 6px;
}
.forum-perms .perm-badge strong {
  min-width: 90px; /* même largeur pour aligner les noms des groupes */
  display: inline-block;
}


.perm-badge {
  display: block;       /* un groupe par ligne (Invités, Membres, etc.) */
  margin: 2px 0;
  padding: 2px 6px;
  border-radius: 6px;
  background: #f9f9f9;
}
.forum-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px; /* espace entre les boutons */
}

.forum-actions .action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  text-decoration: none;
  background: #f1f1f1;
  color: #333;
  transition: background 0.2s, color 0.2s;
}

.forum-actions .action-btn:hover {
  background: #e0e0e0;
  color: #000;
}

/* Couleurs spécifiques par action */
.forum-actions .action-btn.toggle { background: #dff0d8; color: #28a745; }
.forum-actions .action-btn.edit   { background: #d9edf7; color: #007bff; }
.forum-actions .action-btn.delete { background: #f2dede; color: #d9534f; }
.forum-actions .action-btn.rights { background: #f9f9f9; color: #555; }

.flash {
  padding: 12px 18px;
  border-radius: 6px;
  margin: 15px auto;
  width: 90%;
  max-width: 800px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.3s ease-out;
}

.flash.success {
  background: #dff0d8;
  color: #2e7d32;
  border: 1px solid #c3e6cb;
}

.flash.error {
  background: #f8d7da;
  color: #c62828;
  border: 1px solid #f5c6cb;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==================== */
/*  MODE SOMBRE — BLOG  */
/* ==================== */

html.dark {
  background: #121212;
  color: #e0e0e0;
  color-scheme: dark;
}

/* Cartes & articles */
html.dark .blog-card,
html.dark .blog-article,
html.dark .comment,
html.dark .blog-timeline {
  background: #1e1e1e !important;
  color: #e6e6e6 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* Titres */
html.dark .blog-card h2 a,
html.dark .blog-article h1 {
  color: #fff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

/* Texte du contenu */
html.dark .blog-content p,
html.dark .blog-content li,
html.dark .blog-content h2,
html.dark .blog-content h3,
html.dark .blog-info p {
  color: #e6e6e6;
}

/* Métadonnées & stats */
html.dark .blog-meta,
html.dark .blog-meta i,
html.dark .comment-body span,
html.dark .blog-stats {
  color: #b3b3b3 !important;
}

/* Catégories */
html.dark .blog-cats a {
  color: #e6e6e6;
  background: #2a2a2a;
}
html.dark .blog-cats a:hover { background: #383838; color: #fff; }
html.dark .blog-cats a.active {
  background: var(--current-primary, #6f3bbd);
  color: #fff !important;
}

/* Résumé encadré */
html.dark .blog-summary {
  background: #232323;
  color: #e0e0e0;
  border-left-color: var(--current-primary, #6f3bbd);
}

/* Formulaire */
html.dark .comment-form textarea {
  background: #1b1b1b;
  border: 1px solid #3a3a3a;
  color: #eee;
}

/* Pagination */
html.dark .pagination a {
  background: #1e1e1e;
  border: 1px solid #3a3a3a;
  color: #ddd;
}
html.dark .pagination a.active {
  background: var(--current-primary, #0d6efd);
  border-color: var(--current-primary, #0d6efd);
  color: #fff;
}

/* Boutons / actions */
html.dark .read-more {
  background: #0d6efd;
  color: #fff;
}
html.dark .read-more:hover {
  background: #0b5ed7;
}
html.dark .action-btn:hover,
html.dark .like-btn:hover {
  color: #d0d0d0;
}

/* Timeline hover */
html.dark .timeline-header:hover {
  background: #232323;
  color: var(--current-primary, #0d6efd);
}

/* Icônes */
html.dark .blog-stats i { color: var(--current-primary, #0d6efd); }
html.dark .like-btn i   { color: #e91e63; }

textarea.sceditor-source {
  display: none !important;
}
textarea[name="content"] {
  display: none !important;
}

/* --- adaptation pour l'éditeur ---*/
/* Forcer le textarea source à se comporter comme l'éditeur */
.sceditor-container {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Mode source : le textarea doit occuper tout l'espace dispo */
.sceditor-container textarea.sceditor-source {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box;
  resize: none; /* empêche de casser la mise en page */
  border: none;
  background: #fff;
  color: #000;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.4em;
  z-index: 10;
}

/* --- groupe d'appartenance --- */
.user-info {
  display: flex;
  flex-direction: column;
}

.user-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-role {
  font-size: 0.8em;
  margin-top: 4px;   /* espace entre la date et le rôle */
  opacity: 0.9;      /* un peu plus discret */
}

.role-admin {
  color: #d9534f;
  font-weight: bold;
}
.role-mod {
  color: #337ab7;
  font-weight: bold;
}
.role-user {
  color: #4af805;
  font-weight: bold;
}
.role-banned {
  color: #999;
  text-decoration: line-through;
}

/* ========================= */
/*   MESSAGERIE PRIVÉE       */
/* ========================= */

/* Liste des conversations (inbox/outbox) */
.msg-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.msg-item {
  border-bottom: 1px solid #ddd;
  padding: 12px 10px;
  transition: background 0.3s;
}

.msg-item.unread {
  background: #f8f9ff;
  font-weight: bold;
}

.msg-item:hover {
  background: #f1f1f1;
}

.msg-item a {
  text-decoration: none;
  color: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.msg-info {
  flex-grow: 1;
}

.msg-meta {
  display: block;
  color: #777;
  font-size: 13px;
  margin-top: 2px;
}

.msg-badge-list {
  background: #e74c3c;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
}

/* Fil de discussion */
.msg-thread {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg {
  border-radius: 8px;
  padding: 10px 15px;
  max-width: 70%;
  word-wrap: break-word;
  transition: transform 0.3s ease;
}

.msg.me {
  background: #d8f3dc;
  margin-left: auto;
  align-self: flex-end;
}

.msg.other {
  background: #e9ecef;
  margin-right: auto;
  align-self: flex-start;
}

.msg-header {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
}

.msg-content {
  white-space: pre-wrap;
}

/* Effet apparition nouveau message */
.msg.new {
  animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Formulaire de réponse */
.reply-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
  padding: 15px;
}

.reply-form textarea {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  min-height: 120px;
}

.reply-form button.btn-reply {
  align-self: flex-start;
  background: #007bff;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

.reply-form button.btn-reply:hover {
  background: #0056b3;
}

/* Message de confirmation d’envoi */
.reply-success {
  background: #e8f8ee;
  color: #2c7a36;
  border: 1px solid #b9e4c2;
  border-radius: 8px;
  padding: 10px 15px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeInOut 3s ease forwards;
}

.reply-success i {
  color: #2ecc71;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(-5px); }
  10%, 80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-5px); }
}

.msg-preview {
  display: block;
  color: #999;
  font-size: 12px;
  margin-top: 4px;
  font-style: italic;
}
.msg-actions {
  margin: 10px 0 20px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-color, #007bff);
  color: #fff !important;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-back:hover {
  background: var(--primary-hover, #0056b3);
  transform: translateX(-2px);
}

/* Mode sombre */
html.dark .btn-back {
  background: #ff4fa3;
  color: #fff !important;
}

html.dark .btn-back:hover {
  background: #ff2e8a;
}

.msg-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 10px;
  border-bottom: 1px solid #ddd;
  transition: background 0.2s, opacity 0.3s;
}
.msg-item:hover {
  background: rgba(0,0,0,0.02);
}
.msg-item .btn-delete {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 16px;
  cursor: pointer;
  transition: color 0.2s;
}
.msg-item .btn-delete:hover {
  color: #c0392b;
}

.btn-delete-msg {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 14px;
  cursor: pointer;
  float: right;
  margin-top: 4px;
  transition: color 0.2s ease;
}
.btn-delete-msg:hover {
  color: #c0392b;
}

/* === Blocs principaux : Activité + Forums === */
.forum-activity,
.global-forum {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  padding: 20px;
  margin-top: 25px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

html.dark .forum-activity,
html.dark .global-forum {
  background: #1c1d23;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Titres principaux des blocs --- */
.forum-activity h3,
.global-forum h3,
.latest-posts h2 {
  color: #d368c8 !important;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

html.dark .forum-activity h3,
html.dark .global-forum h3,
html.dark .latest-posts h2 {
  text-shadow: 0 0 6px rgba(211, 104, 200, 0.3);
}

.forum-activity h3 i,
.global-forum h3 i,
.latest-posts h2 i {
  color: #d368c8;
}

/* Barre décorative sous les titres */
.forum-activity h3::after,
.global-forum h3::after,
.latest-posts h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #d368c8, transparent);
  margin-top: 4px;
  border-radius: 2px;
}

/* === Bloc activité du forum === */
.forum-activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.activity-col h4 {
  font-size: 1.15em;
  margin-bottom: 10px;
  color: var(--text-color, #333);
  display: flex;
  align-items: center;
  gap: 8px;
}

html.dark .activity-col h4 {
  color: #cfc8ff;
}

.activity-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.activity-col li {
  margin-bottom: 8px;
}

.activity-col a {
  font-weight: 500;
  color: var(--link-color, #0078d7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.activity-col a:hover {
  text-decoration: underline;
}

.activity-col .meta {
  display: block;
  font-size: 0.85em;
  color: #777;
}

html.dark .activity-col .meta {
  color: #aaa;
}

/* === Accordéon Forums === */
.forums-accordion {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Carte globale qui entoure la liste (OK de la garder) */
.forum-card.accordion {
  border-radius: 12px;
  background: var(--card-bg, #fff);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.forum-card.accordion:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
html.dark .forum-card.accordion {
  background: #1e1e23;
  box-shadow: 0 0 10px rgba(255,255,255,0.05);
}

/* --- Chaque entrée de forum --- */
.forum-item {
  border-radius: 12px;
  background: var(--card-bg, #fff);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.forum-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
html.dark .forum-item {
  background: #1e1e23;
  box-shadow: 0 0 10px rgba(255,255,255,0.05);
}

/* --- En-tête cliquable --- */
.forum-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.03);
  border: none;
  padding: 14px 20px;
  font-size: 1.05em;
  font-weight: 600;
  color: var(--text-color, #222);
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.25s ease, color 0.25s ease;
}
.forum-header:hover { background: rgba(125, 105, 255, 0.12); }

html.dark .forum-header { background: rgba(255,255,255,0.04); color: #eee; }
html.dark .forum-header:hover { background: rgba(150,130,255,0.15); color: #fff; box-shadow: 0 0 10px rgba(150,130,255,0.2); }

.forum-header i.fa-folder { margin-right: 8px; color: #6b5cff; }
html.dark .forum-header i.fa-folder { color: #9b8fff; }

.forum-header .chevron { color: var(--text-muted, #666); transition: transform 0.3s ease, color 0.3s ease; }

/* État ouvert (cible l'item, pas la card globale) */
.forum-item.open .forum-header { background: rgba(125, 105, 255, 0.08); }
.forum-item.open .forum-header .chevron { transform: rotate(180deg); color: #6b5cff; }

/* --- Contenu dépliant --- */
.forum-item .forum-content {
  max-height: 0;
  opacity: 0;
  transform: translateY(-5px);
  overflow: hidden;
  padding: 0 20px;
  transition:
    max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.4s ease,
    transform 0.4s ease,
    padding 0.4s ease;
}
.forum-item.open .forum-content {
  max-height: 2000px;
  opacity: 1;
  transform: translateY(0);
  padding: 16px 20px 20px;
}

/* Halo sur l’item ouvert */
.forum-item.open { box-shadow: 0 0 12px rgba(211, 104, 200, 0.15); transition: box-shadow 0.4s ease; }
html.dark .forum-item.open { box-shadow: 0 0 18px rgba(211, 104, 200, 0.25); }

/* Texte/desc/stats/sous-forums (inchangé) */
.forum-description { margin: 10px 0; color: var(--text-muted, #666); }
html.dark .forum-description { color: #aaa; }

.forum-stats { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.9em; color: #777; margin-bottom: 10px; }
html.dark .forum-stats { color: #a3a0b7; }

.subforums { list-style: none; padding: 0; margin: 10px 0 0; }
.subforums li { margin-bottom: 6px; padding-left: 4px; }
.subforums a { color: var(--link-color, #5a4eff); text-decoration: none; font-weight: 500; transition: color 0.2s ease; }
.subforums a:hover { color: #2e19ff; text-decoration: underline; }
html.dark .subforums a { color: #c8baff; }
html.dark .subforums a:hover { color: #fff; }
