/* Variables CSS */
:root {
    --primary-color: #7628e8;
    --secondary-color: #64748b;
    --success-color: #16a34a;
    --danger-color: #dc2626;
    --bg-color: #07060b;
    --surface-color: #ffffff;
    --border-color: #e2e8f0;
    --text-color: #1e293b;
    --text-light: #64748b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}

/* Header */
.header {
    background-color: rgba(7, 6, 11, 0.94);
    border-bottom: 1px solid rgba(133, 66, 226, 0.26);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    cursor: pointer;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.7rem;
    height: 2.7rem;
    border: 1px solid rgba(168, 85, 247, 0.7);
    border-radius: 0.75rem;
    background: linear-gradient(145deg, #8b35f0, #5520b3);
    font-size: 1.75rem;
    line-height: 1;
    box-shadow: 0 0 28px rgba(118, 40, 232, 0.28);
}

.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong { font-size: 1.05rem; letter-spacing: -0.02em; }
.brand-copy small { margin-top: 0.27rem; color: #a89fb4; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-items {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.user-info {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-right: 0.5rem;
}

/* Main Content */
.main {
    min-height: calc(100vh - 80px);
    padding: 0;
}

.content-section {
    animation: fadeIn 0.3s ease;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background-color: #1d4ed8;
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background-color: #475569;
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background-color: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

.btn-success:hover {
    background-color: #15803d;
    box-shadow: var(--shadow-md);
}

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

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

/* Forms */
.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.button-group {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modalFadeIn 0.3s ease;
}

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

.modal-content {
    background-color: var(--surface-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

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

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

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-color);
}

/* Welcome Box */
.welcome-box {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 34%, rgba(123, 49, 218, 0.2), transparent 34%),
        linear-gradient(125deg, #06050a 0%, #0b0713 58%, #120923 100%);
    color: white;
    border-bottom: 1px solid rgba(149, 78, 237, 0.23);
    border-radius: 0;
    padding: clamp(4.5rem, 9vw, 8rem) max(1.25rem, calc((100vw - 1120px) / 2));
    text-align: left;
    min-height: calc(100vh - 75px);
    margin-bottom: 0;
}

.welcome-box::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.26;
    background-image: linear-gradient(rgba(141, 77, 217, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(141, 77, 217, .13) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to right, transparent 5%, black 72%);
}

.welcome-box > * { position: relative; z-index: 1; }

.hero-kicker {
    color: #b997e7;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    margin-bottom: 1.7rem;
}

.welcome-box h2 {
    max-width: 860px;
    font-size: clamp(2.8rem, 6vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
    margin-bottom: 1.6rem;
}

.welcome-box h2 span { color: #a855f7; }

.welcome-box p.hero-lead {
    max-width: 770px;
    color: #c2bacb;
    font-size: clamp(1.05rem, 1.7vw, 1.28rem);
    line-height: 1.7;
    opacity: 1;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2rem;
}

.hero-actions .btn { min-height: 3.3rem; padding: 0.8rem 1.45rem; border-radius: 999px; font-size: 0.95rem; }
.hero-primary { background: linear-gradient(135deg, #8b35f0, #5c20be); box-shadow: 0 12px 35px rgba(118, 40, 232, .3); }
.hero-secondary { color: #fff; border-color: rgba(255,255,255,.24); }
.hero-secondary:hover { color: #fff; background: rgba(255,255,255,.08); border-color: #a855f7; }
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3.6rem;
    max-width: 1120px;
}

.feature {
    background: rgba(255, 255, 255, 0.035);
    padding: 1.6rem;
    border: 1px solid rgba(168, 85, 247, .22);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
}

.feature:hover { transform: translateY(-4px); border-color: rgba(168,85,247,.65); background: rgba(118,40,232,.1); }

.feature .icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.feature h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.feature p {
    font-size: 0.875rem;
    opacity: 0.8;
}

.impact-signature {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,.12);
    color: #aaa1b4;
    text-align: center;
}

.impact-signature > div { display: flex; align-items: center; justify-content: center; }
.impact-signature img { width: 150px; height: 48px; object-fit: contain; background: white; border-radius: .55rem; padding: .28rem .55rem; }
.impact-signature p { color: #d5cddd; font-size: .95rem; line-height: 1.75; }

#dashboard-content, #config-content, #notifications-content { background: #f8fafc; min-height: calc(100vh - 80px); padding: 2rem 0; }

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.toolbar h2 {
    font-size: 1.5rem;
    color: var(--text-color);
}

/* Dashboard Statistiques */
.dashboard-header {
    margin-bottom: 2rem;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), #4a90e2);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.dashboard-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.dashboard-section h3 {
    margin-top: 0;
    color: var(--text-primary);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--primary-color);
}

/* Configuration Form Styles */
.config-form-group {
    margin-bottom: 1.5rem;
}

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

.config-form-group input,
.config-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
}

.config-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.config-form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

.config-form-group input:focus,
.config-form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h3 {
    margin: 0;
    color: var(--text-primary);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}


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

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.dashboard-table thead {
    background-color: var(--primary-color);
    color: white;
}

.dashboard-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 3px solid var(--primary-color);
}

.dashboard-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-table tbody tr:hover {
    background-color: var(--bg-light);
}

.dashboard-table tbody tr:nth-child(even) {
    background-color: var(--bg-light);
}

.table-status {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.table-status.active {
    background-color: #d4edda;
    color: #155724;
}

.table-status.inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* Searches */
.searches-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.search-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.search-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.search-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.search-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state p {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

/* Settings */
.settings-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.settings-card h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

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

.users-table table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th {
    background-color: var(--bg-color);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.users-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.users-table tr:hover {
    background-color: var(--bg-color);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background-color: var(--surface-color);
    padding: 1rem;
    border-radius: 0.375rem;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

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

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.info {
    border-left-color: var(--primary-color);
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-light);
}

/* ==================== RESPONSIVE - MOBILE & TABLET ==================== */

/* Très petits écrans (< 480px) */
@media (max-width: 480px) {
    :root {
        --header-padding: 0.75rem 1rem;
        --container-padding: 0.75rem;
    }
    
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0.75rem;
        max-width: 100%;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    .welcome-box { padding: 3.5rem 1.15rem 2rem; min-height: auto; }
    .welcome-box h2 { font-size: 2.65rem; }
    .features { grid-template-columns: 1fr; gap: .85rem; margin-top: 2.5rem; }
    .impact-signature { align-items: center; }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .searches-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .search-card {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .search-card-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .btn-sm {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .dashboard-table {
        font-size: 0.75rem;
    }
    
    .dashboard-table th,
    .dashboard-table td {
        padding: 0.5rem;
    }
    
    /* Résultats */
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .results-header h3 {
        font-size: 1.2rem;
    }
    
    .results-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .selection-info {
        flex-direction: column;
        font-size: 0.85rem;
    }
    
    .action-buttons {
        width: 100%;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .results-table {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.5rem;
    }
    
    .results-table th {
        font-size: 0.7rem;
    }
    
    .result-actions {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .result-actions .btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 0.75rem;
        width: calc(100% - 1.5rem);
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .button-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .button-group .btn {
        width: 100%;
    }
}

/* Petits écrans (480px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 1rem;
        max-width: 100%;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .searches-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .dashboard-table {
        font-size: 0.85rem;
    }
    
    .dashboard-table th,
    .dashboard-table td {
        padding: 0.75rem;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .results-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }
    
    .selection-info {
        flex-direction: column;
        font-size: 0.9rem;
    }
    
    .action-buttons {
        width: 100%;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .results-table {
        font-size: 0.85rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.75rem;
    }
    
    .result-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .result-actions .btn {
        width: 100%;
        font-size: 0.8rem;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group .btn {
        width: 100%;
    }
}

/* Tablettes et au-dessus (> 768px) */
@media (min-width: 769px) {
    .searches-container {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
    
    .stats-cards {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .results-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .results-toolbar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .result-actions {
        flex-direction: row;
        gap: 0.5rem;
    }
}

/* Grands écrans (> 1024px) */
@media (min-width: 1024px) {
    .form-row {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Résultats - Annonces */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    width: 100%;
    box-sizing: border-box;
}

.results-header h3 {
    margin: 0;
}

.results-toolbar {
    background-color: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.selection-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selection-info input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background: white;
    table-layout: fixed;
    min-width: 1400px;  /* ← Force une largeur minimale! */
}

/* Container avec scroll horizontal */
.results-table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.results-table thead {
    background-color: var(--primary-color);
    color: white;
}

.results-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 3px solid var(--primary-color);
    overflow: hidden;
    text-overflow: ellipsis;
}

.results-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Largeurs des colonnes - VRAIMENT AGRANDIES CETTE FOIS! */
.results-table th:nth-child(1),
.results-table td:nth-child(1) { width: 50px; }

.results-table th:nth-child(2),
.results-table td:nth-child(2) { width: 250px; }  /* Titre - TRÈS AGRANDI */

.results-table th:nth-child(3),
.results-table td:nth-child(3) { width: 130px; } /* Source - AGRANDI */

.results-table th:nth-child(4),
.results-table td:nth-child(4) { width: 150px; } /* Lieu - AGRANDI */

.results-table th:nth-child(5),
.results-table td:nth-child(5) { width: 130px; } /* Prix - AGRANDI */

.results-table th:nth-child(6),
.results-table td:nth-child(6) { width: 150px; } /* Surface - VRAIMENT AGRANDI */

.results-table th:nth-child(7),
.results-table td:nth-child(7) { width: 140px; } /* Pièces - AGRANDI */

.results-table th:nth-child(8),
.results-table td:nth-child(8) { width: 160px; } /* Découverte - VRAIMENT AGRANDI */

.results-table th:nth-child(9),
.results-table td:nth-child(9) { width: 160px; } /* Publication - VRAIMENT AGRANDI */

.results-table th:nth-child(10),
.results-table td:nth-child(10) { width: 170px; } /* Candidaté le - VRAIMENT AGRANDI */

.results-table th:nth-child(11),
.results-table td:nth-child(11) { width: 140px; } /* Statut - AGRANDI */

.results-table th:nth-child(12),
.results-table td:nth-child(12) { width: 180px; } /* Actions - AGRANDI */

/* En-têtes - pas de wrap, toujours visibles */
.results-table th {
    white-space: nowrap;
}

/* Tooltips CSS */
.results-table td[title] {
    position: relative;
    cursor: help;
}

.results-table td[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: normal;
    max-width: 250px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    word-break: break-word;
}

.results-table td[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

.results-table tbody tr {
    transition: background-color 0.2s ease;
}

.results-table tbody tr:hover {
    background-color: var(--bg-light);
}

.results-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.results-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.result-status {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.result-status.new {
    background-color: #e3f2fd;
    color: #1976d2;
}

.result-status.applied {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.result-status.closed {
    background-color: #ffebee;
    color: #c62828;
}

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

.result-actions .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.pagination .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
