:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333333;
    --body-bg: #f5f7fa;
    --card-bg: #ffffff;
    --border-color: #e1e4e8;
    --hover-bg: #f8f9fa;
    --focus-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --border-radius: 0.25rem;
    --container-width: 1200px;
}

/* Réinitialisation et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--body-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--dark-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #217dbb;
    text-decoration: underline;
}

.text-muted {
    color: #6c757d;
}

.text-center {
    text-align: center;
}

.required {
    color: var(--danger-color);
}

/* En-tête */
.site-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo h1 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.header-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.header-nav li {
    margin-right: 1.5rem;
}

.header-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.header-nav a:hover, .header-nav a.active {
    color: white;
}

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

.user-name {
    margin-right: 1rem;
    color: white;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
}

.dropdown-toggle .fa-caret-down {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    display: none;
    min-width: 12rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 1rem;
    color: var(--text-color);
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: var(--border-radius);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
}

.dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 1.5rem;
    clear: both;
    font-weight: 400;
    color: var(--text-color);
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    text-decoration: none;
}

.dropdown-item i {
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
}

.dropdown-item:hover, .dropdown-item:focus, .dropdown-item.active {
    color: var(--secondary-color);
    text-decoration: none;
    background-color: #f8f9fa;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid #e9ecef;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown:hover .fa-caret-down {
    transform: rotate(180deg);
}

/* Contenu principal */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* Pied de page */
.site-footer {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    margin-top: 2rem;
    text-align: center;
}

/* Formulaires */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.form-row > .form-group {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
textarea,
select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: var(--secondary-color);
    outline: 0;
    box-shadow: var(--focus-shadow);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.input-with-icon input {
    padding-left: 2.5rem;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.text-right {
    text-align: right;
}

.form-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.form-footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

.form-actions {
    margin-top: 2rem;
}

/* Boutons */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.btn:hover, .btn:focus {
    text-decoration: none;
}

.btn-primary {
    color: white;
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: #217dbb;
    border-color: #217dbb;
}

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

.btn-danger:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}

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

.btn-success:hover {
    background-color: #218c5d;
    border-color: #218c5d;
}

.btn-outline {
    color: var(--secondary-color);
    background-color: transparent;
    border-color: var(--secondary-color);
}

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

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-group {
    display: inline-flex;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

.btn-group .btn:last-child {
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.btn-logout {
    color: rgba(255, 255, 255, 0.8);
}

.btn-logout:hover {
    color: white;
}

/* Cartes */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
}

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

.card-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.card-body {
    padding: 1.5rem;
}

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

.mt-4 {
    margin-top: 2rem;
}

/* Tableaux */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

.table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid var(--border-color);
    text-align: left;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.03);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Alertes */
.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

#alert-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    max-width: 400px;
}

#alert-container .alert {
    position: relative;
    margin-bottom: 1rem;
    padding-right: 3rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 1;
    transition: opacity 0.5s ease;
}

#alert-container .alert.fade-out {
    opacity: 0;
}

.alert-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    border: none;
    background: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition);
}

.alert-close:hover {
    opacity: 1;
}

/* Page de connexion */
.login-page {
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-form-wrapper {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.login-logo {
    background-color: var(--secondary-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-logo h1 {
    margin: 0;
    color: white;
}

.login-form {
    padding: 2rem;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 2rem;
}

/* Zone de dépôt de fichiers */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.drop-zone-hover {
    background-color: var(--hover-bg);
    border-color: var(--secondary-color);
}

.drop-zone-prompt {
    color: #6c757d;
}

.drop-zone i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.upload-btn-wrapper {
    position: relative;
    display: inline-block;
    margin: 0.5rem 0;
}

.upload-btn-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-name {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* Sujets de discussion */
.topics-list {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.topic-item {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.topic-item:last-child {
    border-bottom: none;
}

.topic-icon {
    margin-right: 1rem;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.topic-content {
    flex: 1;
}

.topic-title {
    margin: 0 0 0.5rem;
}

.topic-description {
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.topic-meta {
    font-size: 0.875rem;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
}

.topic-meta span {
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
}

.topic-meta i {
    margin-right: 0.25rem;
}

.topic-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.topic-actions .btn {
    margin-right: 0.5rem;
}

/* Messages */
.messages-list {
    margin-bottom: 2rem;
}

.message-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
}

.message-header {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.02);
}

.message-author {
    display: flex;
    align-items: center;
}

.message-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 0.75rem;
}

.message-author-name {
    font-weight: 500;
}

.message-date {
    color: #6c757d;
    font-size: 0.875rem;
}

.message-actions {
    display: flex;
}

.message-actions .btn {
    margin-left: 0.5rem;
}

.message-content {
    padding: 1.5rem;
}

.message-attachments {
    padding: 0 1.5rem 1.5rem;
}

.attachment-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.attachment-item {
    margin: 0.5rem;
}

.attachment-item img {
    max-width: 150px;
    max-height: 150px;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.attachment-file {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--hover-bg);
    border-radius: var(--border-radius);
}

.attachment-file i {
    margin-right: 0.5rem;
}

.message-versions {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--hover-bg);
    border-radius: var(--border-radius);
    display: none;
}

.version-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border-color);
}

.version-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.version-date {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Éditeur Markdown */
.markdown-editor {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.markdown-toolbar {
    display: flex;
    flex-wrap: wrap;
    padding: 0.5rem;
    background-color: var(--hover-bg);
    border-bottom: 1px solid var(--border-color);
    gap: 0.5rem;
}

.markdown-toolbar .toolbar-group {
    display: flex;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: white;
}

.markdown-toolbar .toolbar-group button {
    margin: 0;
    border: none;
    border-right: 1px solid var(--border-color);
    border-radius: 0;
    background-color: transparent;
    min-width: auto;
    padding: 0.25rem 0.75rem;
}

.markdown-toolbar .toolbar-group button:last-child {
    border-right: none;
}

.markdown-toolbar button {
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    min-width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.markdown-toolbar button i {
    font-size: 1rem;
    margin-right: 0.25rem;
}

.markdown-toolbar button .format-text {
    font-family: serif;
    margin-left: 0.2rem;
    font-size: 1.1rem;
}

.markdown-toolbar .btn-bold .format-text {
    font-weight: bold;
}

.markdown-toolbar .btn-italic .format-text {
    font-style: italic;
}

.markdown-toolbar .btn-underline .format-text {
    text-decoration: underline;
}

.markdown-toolbar .toolbar-group.text-style button {
    min-width: 2.5rem;
    font-size: 1.1rem;
}

.markdown-toolbar .toolbar-group.heading-style button {
    min-width: 2.5rem;
    font-weight: bold;
    font-size: 1.1rem;
    font-family: serif;
}

.markdown-toolbar .toolbar-group.insert-style button {
    min-width: 5rem;
}

.markdown-toolbar button:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.markdown-toolbar button.active {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.markdown-toolbar .btn-h1,
.markdown-toolbar .btn-h2,
.markdown-toolbar .btn-h3 {
    font-weight: bold;
    font-family: serif;
}

.markdown-toolbar .btn-h1 {
    font-size: 1.1rem;
}

.markdown-toolbar .btn-h2 {
    font-size: 1rem;
}

.markdown-toolbar .btn-h3 {
    font-size: 0.9rem;
}

.markdown-textarea {
    width: 100%;
    padding: 1rem;
    border: none;
    resize: vertical;
    min-height: 150px;
}

.markdown-preview-toggle {
    padding: 0.5rem;
    text-align: right;
    border-top: 1px solid var(--border-color);
    background-color: var(--hover-bg);
}

.markdown-preview {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--hover-bg);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: pointer;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

/* Dashboard */
.welcome-message {
    margin-bottom: 2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.document-list, .topic-list {
    display: flex;
    flex-direction: column;
}

.document-item, .topic-item {
    display: flex;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.document-item:last-child, .topic-item:last-child {
    border-bottom: none;
}

.document-icon, .topic-icon {
    margin-right: 1rem;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.document-content, .topic-content {
    flex: 1;
}

.document-title, .topic-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.document-notes {
    margin-bottom: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

/* Admin */
.admin-tabs {
    margin-bottom: 2rem;
}

.tab-navigation {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-button {
    padding: 0.75rem 1.25rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    color: #6c757d;
    position: relative;
}

.tab-button.active {
    color: var(--secondary-color);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    display: flex;
    align-items: center;
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-right: 1.5rem;
}

.stat-content h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: #6c757d;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--dark-color);
}

.logs-container {
    display: flex;
    flex-direction: column;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.logs-filter {
    display: flex;
    gap: 1rem;
}

.logs-pagination {
    display: flex;
    align-items: center;
}

.logs-pagination button {
    margin: 0 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-primary {
    color: #fff;
    background-color: var(--secondary-color);
}

.badge-secondary {
    color: #fff;
    background-color: #6c757d;
}

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

.badge-danger {
    color: #fff;
    background-color: var(--danger-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-dialog {
    width: 100%;
    max-width: 500px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-dialog.modal-open {
    transform: translateY(0);
    opacity: 1;
}

.modal-dialog.modal-close {
    transform: translateY(20px);
    opacity: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.topic-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.topic-header-actions h2 {
    margin: 0;
}

/* Checkbox */
.checkbox {
    display: flex;
    align-items: center;
}

.checkbox input[type="checkbox"] {
    margin-right: 0.5rem;
    width: auto;
}

/* Media queries */
@media (max-width: 991.98px) {
    .container {
        max-width: 100%;
    }
    
    .site-header .container {
        flex-direction: column;
    }
    
    .header-logo, .header-nav, .header-user {
        margin-bottom: 1rem;
    }
}

@media (max-width: 767.98px) {
    .header-nav ul {
        flex-wrap: wrap;
    }
    
    .header-nav li {
        margin-bottom: 0.5rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .topic-meta {
        flex-direction: column;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .logs-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .logs-filter {
        flex-direction: column;
        margin-bottom: 1rem;
    }
}

.table-responsive {
    overflow-x: auto;
}

.table .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.table td .btn {
    white-space: nowrap;
    margin-bottom: 0.25rem;
}

/* Styles spécifiques pour le tableau des documents */
.table td .document-notes {
    max-height: 80px;
    overflow-y: auto;
}

.table td.date-col,
.table td.user-col {
    white-space: nowrap;
    font-size: 0.9rem;
}

.table td.user-col {
    font-weight: 500;
}

/* Boutons d'icônes pour le tableau des documents */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    color: #495057;
    margin-right: 0.25rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-icon:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0,0,0,0.15);
}

.btn-icon i {
    font-size: 1.1rem;
}

.table th {
    text-align: center;
}

.table th:first-child,
.table td:first-child {
    text-align: left;
}

.document-flag-emoji {
    font-size: 1.2rem;
}

.btn-icon.btn-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.btn-icon.btn-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Styles spécifiques pour les icônes */
.btn-icon .fa-eye {
    color: var(--secondary-color);
}

.btn-icon .fa-download {
    color: var(--success-color);
}

.btn-icon .fa-external-link-alt {
    color: var(--primary-color);
}

.btn-icon .fa-edit {
    color: var(--warning-color);
}

.btn-icon:hover i {
    color: white;
}

/* Styles pour les icônes SVG */
.btn-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
}

.btn-icon:hover svg {
    fill: white;
}

/* Couleurs spécifiques pour chaque type d'icône SVG */
.icon-eye {
    fill: #3498db;  /* Bleu vif */
}

.icon-download {
    fill: #27ae60;  /* Vert vif */
}

.icon-external-link {
    fill: #2c3e50;  /* Bleu foncé */
}

.icon-edit {
    fill: #f39c12;  /* Orange */
}

.icon-trash {
    fill: #e74c3c;  /* Rouge */
}

.btn-danger .icon-trash {
    fill: #842029;  /* Rouge foncé pour contraste sur fond rouge */
}

.btn-danger:hover .icon-trash {
    fill: white;
}

/* Styles pour les drapeaux */
.flag-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flag-container svg {
    width: 35px;
    height: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border-radius: 3px;
}

.us-flag svg, .fr-flag svg {
    transform: scale(1.3);
}

/* Amélioration des emojis drapeaux et des boutons icônes */
.table th:nth-child(2),
.table th:nth-child(3) {
    font-size: 1.8rem;
    line-height: 1;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.flag-emoji {
    font-size: 2.8rem;
    display: inline-block;
    transform: scale(1.2);
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 0 auto;
}

/* Centre le contenu des cellules du tableau */
.text-center {
    text-align: center;
}

.text-center .btn-group {
    display: flex;
    justify-content: center;
}

/* Styles pour le tri des tableaux */
.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 18px;
    transition: background-color 0.2s;
}

.sortable:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.sortable::after {
    content: '⇕';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
    font-size: 0.85em;
}

.sortable.sort-asc::after {
    content: '↑';
    opacity: 1;
    color: var(--secondary-color);
}

.sortable.sort-desc::after {
    content: '↓';
    opacity: 1;
    color: var(--secondary-color);
}

.sortable.active {
    background-color: rgba(52, 152, 219, 0.1);
}

/* Animation pour le tri des tableaux */
.table-sorted tr {
    animation: highlightRow 0.3s ease-in-out;
}

@keyframes highlightRow {
    0% {
        background-color: rgba(52, 152, 219, 0.2);
    }
    100% {
        background-color: transparent;
    }
}

/* Texte d'aide pour le tri */
.sort-hint {
    display: block;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    color: #6c757d;
    font-size: 0.875rem;
    font-style: italic;
    background-color: #f8f9fa;
    border-left: 3px solid var(--secondary-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Disposition flexbox */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

/* Styles pour l'en-tête de page avec le bouton d'ajout */
.page-header .d-flex {
    width: 100%;
}

.page-header h2 {
    margin-bottom: 0;
}

.page-header .btn {
    margin-left: 1rem;
}

/* Rating slider styles */
.rating-container {
    margin: 15px 0;
    position: relative;
    padding: 0 10px;
}

.rating-slider {
    width: 100%;
    height: 20px;
    margin: 10px 0;
    cursor: pointer;
    -webkit-appearance: none;
    background: linear-gradient(to right, 
        #d32f2f 0%, #d32f2f 14.3%,       /* Rouge foncé pour -3 */
        #ff5722 14.3%, #ff5722 28.6%,     /* Orange pour -2 */
        #ffc107 28.6%, #ffc107 42.9%,     /* Ambre pour -1 */
        #9e9e9e 42.9%, #9e9e9e 57.1%,     /* Gris neutre pour 0 */
        #8bc34a 57.1%, #8bc34a 71.4%,     /* Vert clair pour +1 */
        #4caf50 71.4%, #4caf50 85.7%,     /* Vert pour +2 */
        #2196f3 85.7%, #2196f3 100%       /* Bleu pour +3 */
    );
    border-radius: 10px;
}

.rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    background: #fff;
    border: 2px solid #333;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.rating-slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    background: #fff;
    border: 2px solid #333;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    padding: 0 10px;
}

.rating-label {
    font-weight: bold;
    font-size: 12px;
}

.rating-minus-3 { color: #d32f2f; } /* Rouge foncé */
.rating-minus-2 { color: #ff5722; } /* Orange */
.rating-minus-1 { color: #ffc107; } /* Ambre */
.rating-zero { color: #9e9e9e; }    /* Gris neutre */
.rating-plus-1 { color: #8bc34a; }  /* Vert clair */
.rating-plus-2 { color: #4caf50; }  /* Vert */
.rating-plus-3 { color: #2196f3; }  /* Bleu */

.rating-description {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.rating-color--3 {
    border-left: 5px solid #d32f2f;
    background-color: rgba(211, 47, 47, 0.1);
}

.rating-color--2 {
    border-left: 5px solid #ff5722;
    background-color: rgba(255, 87, 34, 0.1);
}

.rating-color--1 {
    border-left: 5px solid #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
}

.rating-color-0 {
    border-left: 5px solid #9e9e9e;
    background-color: rgba(158, 158, 158, 0.1);
}

.rating-color-1 {
    border-left: 5px solid #8bc34a;
    background-color: rgba(139, 195, 74, 0.1);
}

.rating-color-2 {
    border-left: 5px solid #4caf50;
    background-color: rgba(76, 175, 80, 0.1);
}

.rating-color-3 {
    border-left: 5px solid #2196f3;
    background-color: rgba(33, 150, 243, 0.1);
}

/* Indicateur de notation dans le tableau */
.rating-indicator {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin: 0 auto;
    display: block;
}

.rating-col {
    width: 40px;
    text-align: center;
}

.rating--3 { background-color: #d32f2f; } /* Rouge foncé */
.rating--2 { background-color: #ff5722; } /* Orange */
.rating--1 { background-color: #ffc107; } /* Ambre */
.rating-0 { background-color: #9e9e9e; }  /* Gris neutre */
.rating-1 { background-color: #8bc34a; }  /* Vert clair */
.rating-2 { background-color: #4caf50; }  /* Vert */
.rating-3 { background-color: #2196f3; }  /* Bleu */