:root {
    /* Palette de couleurs inspirée de GestionDesStocks */
    --primary-color: #1f1f1f;
    --accent-color: rgb(249, 55, 5);
    --accent-hover: rgb(249, 55, 5);
    --accent-orange: #ff8c00;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: rgb(249, 55, 5);
    --info-color: rgb(249, 55, 5);
    --bg-color: #1f1f1f;
    --card-bg: #1f1f1f;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --text-secondary: #808080;
    --border-color: rgba(148, 163, 184, 0.1);
    --border-dark: #3a3a3a;
    --hover-bg: #303030;
    --sidebar-bg: #2a2a2a;
    --sidebar-width: 260px;
    --transition: all 0.3s ease;
}

[data-theme="light"] {
    --primary-color: #ffffff;
    --accent-color: rgb(249, 55, 5);
    --accent-hover: rgb(220, 45, 0);
    --accent-orange: #ff8c00;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: rgb(249, 55, 5);
    --info-color: rgb(249, 55, 5);
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --border-dark: #d1d5db;
    --hover-bg: #f3f4f6;
    --sidebar-bg: #ffffff;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
}

/* ========== PAGE DE CONNEXION ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent-orange) 100%);
    padding: 1rem;
}

.login-card {
    background: var(--background-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
}

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

.login-header h1 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.login-form input {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--background-white);
    color: var(--text-dark);
}

.login-form input:focus {
    outline: none;
    border-color: var(--accent-orange);
}

.btn-block {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.error-message {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

/* ========== LAYOUT PRINCIPAL ========== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ========== LAYOUT ========== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.sidebar-title-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1;
}

.sidebar-subtitle {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-color);
    margin: 0;
    margin-top: 2px;
    line-height: 1;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
    font-weight: 500;
    position: relative;
    cursor: pointer;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar-link.active {
    background: var(--accent-color);
    color: #ffffff;
}

.sidebar-link-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-link-label {
    flex: 1;
}

.sidebar-badge {
    background: var(--accent-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    min-width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

/* Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-user {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-theme {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-theme:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: scale(1.05);
}

.btn-logout {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    border: none;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

/* En-têtes de sections catégorisées */
.page-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.card-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.section-icon {
    font-size: 1.5rem;
}

.card-section-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

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

.rapport-bottom-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Scrollbar pour la sidebar */
.sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Thème clair - Sidebar */
[data-theme="light"] .sidebar {
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .sidebar-header {
    border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .sidebar-title {
    color: var(--text-color);
}

[data-theme="light"] .sidebar-link {
    color: var(--text-secondary);
}

[data-theme="light"] .sidebar-link:hover {
    background: var(--hover-bg);
    color: var(--text-color);
}

[data-theme="light"] .sidebar-link.active {
    background: var(--accent-color);
    color: #ffffff;
}

[data-theme="light"] .sidebar-footer {
    border-top: 1px solid var(--border-color);
}

[data-theme="light"] .user-name {
    color: var(--text-color);
}

[data-theme="light"] .user-role {
    color: var(--text-secondary);
}

[data-theme="light"] .btn-theme {
    background: var(--hover-bg);
    color: var(--text-secondary);
}

[data-theme="light"] .btn-theme:hover {
    background: var(--border-color);
    color: var(--text-color);
}

/* ========== CONTENU PRINCIPAL ========== */
.main-content {
    flex: 1;
    background: var(--bg-color);
    padding: 2rem;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-content > * {
    width: 100%;
    max-width: 1400px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

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

.page-header h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-light);
    font-size: 1rem;
}

/* ========== CARDS ========== */
.card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-dark);
}

.card h3 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-color);
}

.card-description {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(249, 55, 5, 0.1);
}

input.field-error, select.field-error, textarea.field-error {
    border: 1px solid var(--accent-orange) !important;
}

/* ========== AUTOCOMPLETE RÉFÉRENCE ========== */
.autocomplete-container {
    position: relative;
}

.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

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

.autocomplete-item:hover {
    background: var(--hover-bg);
}

.autocomplete-item.selected {
    background: var(--hover-bg);
}

.autocomplete-item-ref {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.autocomplete-item-des {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.autocomplete-no-results {
    padding: 0.75rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.autocomplete-item mark {
    background: rgba(249, 55, 5, 0.2);
    color: var(--accent-color);
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
}

/* Nouveau layout du formulaire */
.rapport-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section-compact {
    background: var(--hover-bg);
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.form-section-compact .form-section-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.form-section-compact .form-group {
    margin-bottom: 1rem;
}

.form-section-compact .form-group:last-child {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .rapport-form-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

[data-theme="dark"] .form-group input:hover,
[data-theme="dark"] .form-group select:hover,
[data-theme="dark"] .form-group textarea:hover {
    background-color: #3a3a3a;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.form-row-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-group-flex {
    margin-bottom: 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* ========== BOUTONS ========== */
.btn {
    padding: 0.625rem 1.25rem;
    border: 1px solid var(--border-dark);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--card-bg);
    color: white;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--hover-bg);
    border-color: var(--accent-color);
}

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

.btn-success:hover {
    background-color: #16a34a;
}

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

.btn-green:hover {
    background-color: #16a34a;
}

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

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

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

.btn-edit {
    background-color: var(--primary-light);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-edit:hover {
    opacity: 0.9;
}

.btn-delete {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: var(--transition);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-delete:hover {
    background-color: #e74c3c;
    color: white;
}

/* ========== DÉFAUTS ========== */
.defauts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.defauts-header h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.3rem;
}

.defaut-form-container {
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

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

.card-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-orange);
}

.card-header-inline h3 {
    margin: 0;
    padding: 0;
    border: none;
}

.close-inline {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-inline:hover {
    color: var(--accent-orange);
    background-color: var(--background-light);
}

.defauts-list {
    min-height: 50px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.defaut-item {
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid var(--accent-color);
}

.defaut-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.defaut-type {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.05rem;
}

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

.defaut-details {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.defaut-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.defaut-photo {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition);
}

.defaut-photo:hover {
    transform: scale(1.05);
    border-color: var(--accent-orange);
}

/* ========== DROP ZONE ========== */
.photos-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.drop-zone {
    border: 3px dashed var(--border-dark);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent-color);
    background: var(--hover-bg);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.drop-zone-icon {
    font-size: 1.5rem;
    opacity: 0.5;
}

.drop-zone-text {
    color: var(--text-muted);
    font-size: 0.65rem;
    line-height: 1.2;
}

.drop-zone-text strong {
    color: var(--text-color);
    font-size: 0.7rem;
    display: block;
}

/* Drop zone compact (discret) */
.drop-zone-compact {
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    background: var(--background-white);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.drop-zone-compact:hover,
.drop-zone-compact.drag-over {
    border-color: var(--accent-orange);
    background: rgba(161, 58, 32, 0.03);
}

.drop-zone-compact-text {
    color: var(--text-light);
    font-size: 0.9rem;
}

.photos-preview {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    width: 100%;
}

.photo-preview {
    position: relative;
    display: inline-block;
}

.photo-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-light);
}

.photo-preview .remove-photo {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.photo-preview .remove-photo:hover {
    opacity: 0.8;
}

.generate-pdf-btn {
    margin-top: 2rem;
}

/* ========== HISTORIQUE & ADMIN ========== */
.rapports-list,
.admin-rapports-list {
    display: block;
}

.rapports-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-dark);
    border-radius: 0.75rem;
    overflow: hidden;
}

.rapports-table thead {
    background: var(--hover-bg);
}

.rapports-table thead th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-dark);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rapports-table tbody tr {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.rapports-table tbody tr:hover {
    background-color: var(--hover-bg);
    transform: translateX(2px);
}

.rapports-table tbody tr:last-child {
    border-bottom: none;
}

.rapports-table tbody td {
    padding: 1rem;
    color: var(--text-color);
    font-size: 0.875rem;
    vertical-align: middle;
    border-right: 1px solid var(--border-dark);
}

.rapports-table tbody td:last-child {
    border-right: none;
}

.rapports-table .rapport-numero {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent-orange);
}

.rapports-table .rapport-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.rapports-table .rapport-status {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.rapport-card {
    transition: var(--transition);
    cursor: pointer;
}

.rapport-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 52, 54, 0.1);
}

.rapport-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rapport-info {
    flex: 1;
}

.rapport-numero {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent-orange);
    margin-bottom: 0.5rem;
}

.rapport-details {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.rapport-label {
    font-weight: 600;
    color: var(--text-light);
}

.rapport-date {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.rapport-status {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0;
}

.status-en_attente,
.status-a_traiter {
    background: rgba(249, 55, 5, 0.15);
    color: var(--accent-color);
}

.status-attente_reponse {
    background: rgba(255, 193, 7, 0.15);
    color: #ff9800;
}

.status-traite {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.status-resolu {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.rapport-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-icon-only {
    background: var(--background-light);
    border: 1px solid var(--border-light);
    cursor: pointer;
    font-size: 1.4rem;
    width: 42px;
    height: 42px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon-only svg {
    display: block;
    width: 18px;
    height: 18px;
}

.btn-icon-only {
    color: #6c757d;
}

.btn-icon-only:hover {
    background-color: var(--background-light);
    transform: translateY(-1px);
}

.btn-delete-icon:hover {
    background-color: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.btn-primary-icon {
    color: var(--primary-color);
}

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

/* ========== FILTRES ADMIN ========== */
.admin-filters {
    margin-bottom: 1.5rem;
}

.filter-select {
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--card-bg);
    color: var(--text-dark);
    cursor: pointer;
    min-width: 220px;
    transition: none;
    font-weight: 500;
}

.filter-select:focus {
    outline: none;
    border-color: var(--border-color);
}

/* ========== GESTION UTILISATEURS ========== */
.users-list {
    display: grid;
    gap: 1rem;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 6px;
    border: 1px solid var(--border-light);
}

.user-item-info h4 {
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.user-item-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

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

/* ========== PAGE PARAMÈTRES - NOUVEAU DESIGN ========== */
.settings-header {
    background: var(--hover-bg);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.settings-header-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .settings-header-content h2 {
    color: #c0c0c0;
}

[data-theme="light"] .settings-header-content h2 {
    color: var(--text-dark);
}

.settings-subtitle {
    color: var(--text-light);
    font-size: 1.05rem;
    margin: 0;
}

.settings-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-section {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.settings-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.settings-section-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.75rem 2rem 1rem;
    border-bottom: 2px solid var(--border-color);
    background: var(--hover-bg);
}

.settings-section-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent-orange) 0%, #d64104 100%);
    color: white;
}

.settings-section-icon.clients-icon {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.settings-section-icon.contacts-icon {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.settings-section-icon.defauts-icon {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.settings-section-icon.import-icon {
    background: linear-gradient(135deg, #16a085 0%, #1abc9c 100%);
}

.settings-section-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
}

[data-theme="dark"] .settings-section-header h3 {
    color: #c0c0c0;
}

[data-theme="light"] .settings-section-header h3 {
    color: var(--text-dark);
}

.settings-section-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.settings-section-description {
    color: var(--text-light);
    font-size: 0.925rem;
    margin: 0.375rem 0 0;
    line-height: 1.5;
}

.settings-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    background: var(--accent-orange);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.settings-card {
    padding: 2rem;
}

/* Formulaires */
.settings-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--background-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.settings-form-label label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    display: block;
    margin-bottom: 0.25rem;
}

.settings-form-hint {
    color: var(--text-light);
    font-size: 0.875rem;
}

.settings-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-dark);
    font-size: 1rem;
    min-width: 200px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-select:hover {
    border-color: var(--accent-orange);
}

.settings-select:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(249, 55, 5, 0.1);
}

/* Formulaires d'ajout */
.settings-add-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.settings-add-form.contacts-form {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr auto;
    gap: 1rem;
}

.settings-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--background-light);
    color: var(--text-dark);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.settings-input:hover {
    border-color: var(--accent-orange);
    background: var(--card-bg);
}

.settings-input:focus {
    outline: none;
    border-color: var(--accent-orange);
    background: var(--card-bg);
    box-shadow: 0 0 0 3px rgba(249, 55, 5, 0.1);
}

.settings-input::placeholder {
    color: var(--text-light);
}

.settings-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-orange) 0%, #d64104 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.settings-btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.settings-btn-add:active {
    transform: translateY(0);
}

/* Grilles d'items */
.settings-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.item-card {
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
    cursor: pointer;
}

.item-card.add-card {
    border-style: dashed;
    justify-content: center;
    color: var(--text-light);
    font-weight: 600;
}

.item-card.add-card:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

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

.item-card:hover {
    background: var(--card-bg);
    border-color: #666;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .item-card:hover {
    border-color: #999;
}

.item-card.removing {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(20px) scale(0.9);
    }
}

.item-card-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    flex: 1;
}

.item-card-delete {
    background: transparent;
    border: 2px solid transparent;
    color: var(--text-light);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.item-card-delete:hover {
    background: rgba(231, 76, 60, 0.12);
    border-color: #e74c3c;
    color: #e74c3c;
    transform: scale(1.05);
}

/* Contacts - Design sobre */
.contact-client-card {
    flex-direction: column;
    align-items: flex-start;
    cursor: default;
}

.contact-client-card:hover {
    transform: translateY(-2px);
}

.contact-client-title {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

.contact-client-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.contact-item-info {
    flex: 1;
}

.contact-item-email {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.contact-item-name {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.125rem;
}

/* Section Import */
.import-info-box {
    background: linear-gradient(135deg, rgba(249, 55, 5, 0.05), rgba(249, 55, 5, 0.02));
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.import-info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.import-info-header svg {
    color: var(--accent-orange);
}

.import-format-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.import-format-list li {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border-left: 3px solid var(--accent-orange);
    color: var(--text-dark);
}

.format-label {
    font-weight: 600;
    color: var(--accent-orange);
    min-width: 100px;
}

.import-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.settings-btn-import {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 1.75rem;
    background: linear-gradient(135deg, #16a085 0%, #1abc9c 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.settings-btn-import:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.import-filename {
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
}

.import-stats {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(22, 160, 133, 0.08), rgba(26, 188, 156, 0.05));
    border: 2px solid rgba(22, 160, 133, 0.2);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.import-stats-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dark);
    font-size: 1rem;
}

.import-stats-content svg {
    color: #16a085;
}

.settings-btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    color: #e74c3c;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.settings-btn-danger:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .settings-add-form.contacts-form {
        grid-template-columns: 1fr 1fr;
    }

    .settings-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .settings-header {
        padding: 2rem 1.5rem;
    }

    .settings-header-content h2 {
        font-size: 1.75rem;
    }

    .settings-section-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }

    .settings-card {
        padding: 1.5rem;
    }

    .settings-add-form,
    .settings-add-form.contacts-form {
        grid-template-columns: 1fr;
    }

    .settings-form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .settings-select {
        width: 100%;
    }

    .settings-items-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== MODALS ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 0.75rem;
    max-width: 450px;
    width: 90%;
    border: 1px solid var(--border-dark);
}

.modal-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-dark);
    border-radius: 0.5rem;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    transition: all 0.2s;
}

.modal-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(249, 55, 5, 0.1);
}

.modal-content {
    background: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-dark);
}

.modal-content.modal-sm {
    max-width: 450px;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

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

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: var(--accent-orange);
    background: var(--background-light);
}

.pdf-modal {
    max-width: 400px;
    text-align: center;
}

.pdf-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pdf-modal-icon {
    font-size: 3.5rem;
}

.pdf-modal h3 {
    margin: 0;
}

.pdf-modal p {
    color: var(--text-light);
    font-size: 0.95rem;
    word-break: break-word;
}

/* ========== NOTIFICATIONS ========== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 3000;
    transform: translateX(100%);
    opacity: 0;
    transition: var(--transition);
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    background-color: var(--accent-green);
}

.notification-error {
    background-color: #e74c3c;
}

.notification-info {
    background-color: var(--accent-green-blue);
}

/* ========== CARROUSEL PHOTOS ========== */
.carousel-modal {
    background: var(--background-white);
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
}

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

.carousel-header h3 {
    margin: 0;
    color: var(--text-dark);
}

.close-carousel {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-carousel:hover {
    color: var(--accent-orange);
    background: var(--background-light);
}

.carousel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: auto;
}

.carousel-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-info {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-dark);
}

.carousel-info p {
    margin: 0.5rem 0;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.carousel-btn {
    background: var(--accent-orange);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    opacity: 0.9;
    transform: scale(1.1);
}

/* ========== MODAL GÉNÉRATION MAIL ========== */
.mail-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contacts-email-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--hover-bg);
    border-radius: 8px;
}

.contact-email-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.contact-email-badge:hover {
    border-color: var(--accent-orange);
    transform: translateX(2px);
}

.contact-email-badge svg {
    width: 14px;
    height: 14px;
    fill: var(--accent-orange);
}

.contact-email-text {
    font-weight: 500;
    color: var(--text-dark);
}

.contact-email-name {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-left: 0.25rem;
}

.form-row-inline {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.form-row-inline .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-row-inline .btn {
    flex-shrink: 0;
    margin-bottom: 0;
}

.label-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.label-with-action label {
    margin-bottom: 0;
}

.btn-copy {
    background-color: var(--accent-orange);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-copy:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.admin-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 300px;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--card-bg);
    color: var(--text-dark);
    transition: none;
}

.search-input:focus {
    outline: none;
    border-color: var(--border-color);
}

.search-input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.modal-body {
    padding: 1rem 0;
}

.modal-details-large {
    max-width: 900px;
    width: 90%;
}

.details-section {
    margin-bottom: 2rem;
}

.details-section h4 {
    color: var(--accent-orange);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.details-item {
    display: flex;
    flex-direction: column;
}

.details-item label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.details-item span {
    color: var(--text-dark);
    font-size: 1rem;
}

.defaut-details-item {
    background: var(--background-light);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent-orange);
}

.defaut-details-item h5 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.defaut-details-item p {
    margin: 0.25rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.photos-carousel {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.carousel-photo {
    display: none;
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    background: #000;
}

.carousel-photo.active {
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background-color: white;
    width: 12px;
    height: 12px;
}

.indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

#mailObjet,
#mailCorps {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    background-color: var(--background-light);
    color: var(--text-dark);
    resize: vertical;
}

#mailObjet:focus,
#mailCorps:focus {
    outline: none;
    border-color: var(--accent-orange);
}

/* ========== TIMETONIC ========== */
.section-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.timetonic-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.timetonic-loader {
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-top: 1rem;
    background: var(--background-light);
    border-radius: 0.5rem;
    color: var(--text-secondary);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Table d'aperçu Timetonic */
.timetonic-preview {
    padding: 1rem 0;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 0.5rem;
    overflow: hidden;
}

.preview-table thead {
    background: var(--background-light);
}

.preview-table th,
.preview-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.preview-table th {
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.preview-table tbody tr:hover {
    background: var(--background-light);
}

.preview-table tbody tr:last-child td {
    border-bottom: none;
}

.preview-table td {
    color: var(--text-primary);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .sidebar-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .form-row-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .page-header h2 {
        font-size: 1.5rem;
    }

    .card {
        padding: 1rem;
    }

    .defauts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .defauts-header h3 {
        font-size: 1.1rem;
    }

    .defaut-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .defaut-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .rapport-card-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .rapport-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }

    .user-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .user-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .sidebar-header h1 {
        font-size: 1.1rem;
    }

    .nav-text {
        font-size: 0.9rem;
    }

    .page-header h2 {
        font-size: 1.3rem;
    }

    .login-card {
        padding: 1.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }
}

/* ========== BOUTON ICON + ========== */
.btn-icon {
    background: var(--accent-color);
    border: none;
    border-radius: 0.375rem;
    padding: 0.375rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: 0.5rem;
}

.btn-icon:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.btn-icon svg {
    stroke: white;
}

.label-with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.label-with-action label {
    margin-bottom: 0;
}

/* ========== MODAL LARGE POUR ÉDITEUR D'IMAGE ========== */
.modal-large {
    max-width: 95vw;
    max-height: 95vh;
    width: 1200px;
}

.image-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--hover-bg);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toolbar-group label {
    font-weight: 600;
    margin: 0;
}

.btn-tool {
    background: var(--card-bg);
    border: 2px solid var(--border-dark);
    border-radius: 0.375rem;
    padding: 0.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-tool:hover {
    background: var(--hover-bg);
    border-color: var(--accent-color);
}

.btn-tool.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-tool.active svg {
    stroke: white;
}

.btn-tool svg {
    stroke: var(--text-color);
    transition: stroke 0.2s;
}

.color-picker {
    width: 50px;
    height: 35px;
    border: 2px solid var(--border-dark);
    border-radius: 0.375rem;
    cursor: pointer;
    background: var(--card-bg);
}

.image-editor-container {
    position: relative;
    width: 100%;
    max-height: 60vh;
    overflow: auto;
    background: var(--bg-color);
    border: 2px solid var(--border-dark);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#imageCanvas {
    max-width: 100%;
    max-height: 100%;
    cursor: crosshair;
    display: block;
}

/* ========== PHOTO PREVIEW CLICKABLE ========== */
.photos-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid var(--border-dark);
    transition: all 0.2s;
}

.photo-item:hover {
    border-color: var(--accent-color);
    transform: scale(1.02);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.photo-item .remove-photo {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s;
    z-index: 2;
}

.photo-item .remove-photo:hover {
    background: rgb(185, 28, 28);
    transform: scale(1.1);
}

.photo-item .edit-icon {
    position: absolute;
    bottom: 0.25rem;
    right: 0.25rem;
    background: rgba(249, 55, 5, 0.9);
    color: white;
    border: none;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.photo-item .edit-icon:hover {
    background: rgb(220, 45, 0);
}

.photo-item .edit-icon svg {
    width: 12px;
    height: 12px;
}
/* ========== MENU BURGER MOBILE ========== */
.menu-toggle {
    display: none;
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1002;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.5rem;
    cursor: pointer;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: var(--hover-bg);
    transform: scale(1.05);
}

.menu-toggle:active {
    transform: scale(0.95);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Overlay pour fermer le menu en cliquant à côté */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* ========== RESPONSIVE DESIGN ========== */

/* Tablettes et petits écrans (max 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 260px;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
        will-change: transform;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .menu-toggle {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
        padding-top: 4rem; /* Espace pour le bouton burger */
    }

    .page-header {
        margin-top: 0;
    }

    .rapport-form-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Smartphones et très petits écrans (max 768px) */
@media (max-width: 768px) {
    /* Ajustement des titres */
    .page-header h2 {
        font-size: 1.5rem;
    }

    .page-description {
        font-size: 0.875rem;
    }

    /* Cartes */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .card-section-header h3 {
        font-size: 1.1rem;
    }

    /* Formulaires */
    .form-row-grid {
        grid-template-columns: 1fr !important;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-group label {
        font-size: 0.875rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 1rem; /* Plus grand pour mobile */
    }

    /* Boutons */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .form-actions button {
        width: 100%;
    }

    /* Photos */
    .drop-zone {
        min-height: 120px;
    }

    .photos-preview {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    /* Défauts */
    .defaut-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .defaut-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }

    .defaut-actions button {
        flex: 1;
        font-size: 0.875rem;
        padding: 0.5rem;
    }

    .defaut-photos {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    /* Tableaux */
    .rapports-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .rapports-table table {
        min-width: 600px;
    }

    .admin-rapports-list {
        padding: 0.5rem;
    }

    .rapport-card {
        padding: 1rem;
    }

    /* Modals */
    .modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }

    .modal-large {
        width: calc(100% - 2rem);
    }

    .image-editor-toolbar {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .toolbar-group {
        flex-wrap: wrap;
    }

    /* Sidebar mobile - ajustement largeur */
    .sidebar {
        width: 260px;
    }

    .sidebar-title {
        font-size: 1.25rem;
    }

    .sidebar-link-label {
        font-size: 0.95rem;
    }

    .sidebar-footer {
        padding: 1rem;
    }

    /* Main content avec plus d'espace en haut */
    .main-content {
        padding: 0.75rem;
        padding-top: 3.5rem;
    }

    .page-header h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    /* Section compactes */
    .form-section-compact {
        padding: 1rem;
    }

    .form-section-compact .form-section-title {
        font-size: 0.8rem;
    }
}

/* Très petits smartphones (max 480px) */
@media (max-width: 480px) {
    .menu-toggle {
        top: 0.625rem;
        left: 0.625rem;
        width: 38px;
        height: 38px;
        padding: 0.45rem;
    }

    .menu-toggle span {
        width: 18px;
        height: 2px;
    }

    .main-content {
        padding: 0.5rem;
        padding-top: 3.25rem;
    }

    .sidebar {
        width: 240px;
    }

    .page-header {
        padding: 1rem 0;
    }

    .page-header h2 {
        font-size: 1.25rem;
    }

    .card {
        padding: 0.75rem;
        border-radius: 0.5rem;
    }

    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.625rem 0.875rem;
        font-size: 1rem;
    }

    .photos-preview {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 0.5rem;
    }

    .drop-zone {
        min-height: 100px;
        padding: 0.75rem;
    }

    .drop-zone-icon {
        font-size: 1.25rem;
    }

    .modal-content {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
        padding: 1rem;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    /* Tableaux en mode carte pour mobile */
    .rapports-table table {
        font-size: 0.875rem;
    }

    .rapports-table th,
    .rapports-table td {
        padding: 0.5rem;
    }

    /* Utilisateurs */
    .user-card {
        padding: 0.875rem;
    }

    .user-card-header h3 {
        font-size: 1rem;
    }
}

/* Mode paysage pour smartphones */
@media (max-height: 600px) and (orientation: landscape) {
    .sidebar {
        overflow-y: auto;
    }

    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }

    .image-editor-container {
        max-height: 50vh;
    }
}


/* ========== OCR SCAN MODAL ========== */
.btn-scan {
    background: linear-gradient(135deg, var(--accent-color), #ff6b35);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-scan:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 55, 5, 0.3);
}

.ocr-upload-zone {
    text-align: center;
    padding: 3rem 2rem;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--hover-bg);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.ocr-hint {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.ocr-preview-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.ocr-progress {
    margin: 2rem 0;
    text-align: center;
}

.ocr-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--hover-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.ocr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #ff6b35);
    transition: width 0.3s ease;
    width: 0%;
}

#ocrProgressText {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.ocr-results {
    background: var(--hover-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.ocr-results h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.ocr-result-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.ocr-result-item label {
    font-weight: 600;
    color: var(--text-color);
}

.ocr-result-input {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 4px;
    color: var(--text-color);
    font-family: inherit;
}

.ocr-result-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.modal-large {
    max-width: 700px;
    width: 90%;
}

.card-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}


/* ========== CARTES RAPPORTS ========== */
.rapports-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.rapport-card {
    background: var(--card-bg);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    transition: all 0.2s ease;
    min-height: 160px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rapport-card:hover {
    border-color: var(--border-dark);
    background: var(--card-bg);
    box-shadow: 0 4px 12px rgba(45, 52, 54, 0.1);
}

.rapport-card-content {
    display: flex;
    align-items: stretch;
    height: 100%;
    min-height: 180px;
    cursor: pointer;
}

.rapport-card-photo {
    width: 200px;
    height: 160px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rapport-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rapport-card-no-photo {
    color: var(--text-light);
    font-size: 0.875rem;
    text-align: center;
}

.rapport-card-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    background: var(--card-bg);
}

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

.rapport-card-numero {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.3px;
}

.rapport-card-body {
    flex: 1;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.rapport-card-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rapport-field-label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rapport-field-value {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 600;
}

.rapport-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem;
    border-left: 1px solid var(--border-color);
    justify-content: center;
    background: transparent;
}

.btn-rapport-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-rapport-action svg {
    width: 16px;
    height: 16px;
}

.btn-rapport-action:hover {
    background: var(--hover-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

.btn-rapport-action.btn-delete {
    color: #e74c3c;
}

.btn-rapport-action.btn-delete:hover {
    background: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
    color: #e74c3c;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-dark);
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--accent-color);
}

.pagination-btn:disabled {
    background: var(--border-light);
    color: var(--text-light);
    cursor: not-allowed;
}

.pagination-info {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

/* ========== RESPONSIVE CARTES ========== */
@media (max-width: 1024px) {
    .rapport-card-content {
        flex-direction: column;
        min-height: auto;
    }

    .rapport-card-photo {
        width: calc(100% - 2rem);
        height: 140px;
        border-radius: 12px;
        margin: 1rem;
    }

    .rapport-card-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .rapport-card-actions {
        flex-direction: row;
        border-left: none;
        border-top: 1px solid var(--border-dark);
        padding: 1rem 1.5rem;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .pagination-btn {
        width: 100%;
    }

    .rapport-card-numero {
        font-size: 1.5rem;
    }

    .rapport-field-value {
        font-size: 1rem;
    }
}

/* ========== CLASSES CONDITIONNELLES ========== */
.user-only {
    display: none;
}
