:root {
    /* Couleurs Actu - charte graphique */
    --primary: #30a1ef;
    --primary-dark: #2487cc;
    --primary-light: #5bb4f2;
    --secondary: #2c3e50;
    --accent: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --error: #c62828;
    
    /* Arrière-plans */
    --grey-light: #f8f9fa;
    --grey-border: #dfe6e9;
    --bg-white: #ffffff;
    
    /* Texte */
    --text: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #bdc3c7;
    
    /* Autres */
    --border-radius: 8px;
    --shadow-sm: 0 1px 3px rgba(48, 161, 239, 0.05);
    --shadow-md: 0 4px 12px rgba(48, 161, 239, 0.08);
    --shadow-lg: 0 4px 16px rgba(48, 161, 239, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--grey-light);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    font-weight: 400;
}

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

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.site-header {
    background: var(--secondary);
    border-bottom: none;
    box-shadow: var(--shadow-md);
}

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

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.site-title a {
    color: white;
    transition: opacity 0.2s;
}

.site-title a:hover {
    opacity: 0.9;
    text-decoration: none;
}

.site-nav a {
    margin-left: 1.5rem;
    font-weight: 500;
    color: white;
    transition: opacity 0.2s;
}

.site-nav a:hover {
    opacity: 0.9;
    text-decoration: none;
}

/* Bouton de déconnexion stylisé comme un lien */
.btn-link-nav {
    background: none;
    border: none;
    margin-left: 1.5rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
    transition: opacity 0.2s;
}

.btn-link-nav:hover {
    opacity: 0.9;
    text-decoration: none;
}

.card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    border: 1px solid var(--grey-border);
}

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

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

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--grey-border);
    border-radius: var(--border-radius);
    background: var(--bg-white);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(48, 161, 239, 0.1);
}

textarea {
    resize: vertical;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
}

.table-responsive--wide {
    margin: 0 -1rem;
    padding: 0 1rem;
}

.table-responsive--wide table {
    width: 100%;
    min-width: 1000px;
}

th, td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--grey-border);
    white-space: normal;
    word-break: normal;
}

.table-nowrap th,
.table-nowrap td {
    white-space: nowrap;
}

.table-nowrap .cell-wrap {
    white-space: normal;
}

.cell-wrap {
    word-break: break-word;
}

.nowrap {
    white-space: nowrap;
}

.email-cell {
    word-break: break-all;
}

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

.table-full th:last-child,
.table-full td:last-child {
    width: 120px;
    text-align: right;
}

.table-full td:last-child .btn {
    min-width: 100px;
}

th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    background: var(--secondary);
    font-weight: 600;
}

tr:hover {
    background: rgba(48, 161, 239, 0.05);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #fff;
    border: 1px solid var(--grey-border);
    color: var(--text);
}

.btn-link {
    background: transparent;
    color: var(--primary);
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
}

.actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: nowrap;
}

.actions form {
    display: inline-flex;
}

.row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.row-full {
    grid-column: 1 / -1;
    margin-bottom: 1.2rem;
}

.row > div {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.option-field {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

.option-field .option-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--grey-border);
    border-radius: 8px;
    background: #fff;
}

.option-field .option-item label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.option-field .option-item input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
}

.row + .row,
.row + .row-full,
.row-full + .row {
    margin-top: 0.5rem;
}

.messages {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
}

.toast {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--grey-border);
}

.toast-success {
    border-left: 4px solid var(--success);
    background: #d4edda;
    color: #155724;
}

.toast-error, .toast-warning {
    border-left: 4px solid var(--error);
    background: #f8d7da;
    color: #721c24;
}

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

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

.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--grey-border);
    background: var(--bg-white);
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
}

.pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    text-decoration: none;
}

.pagination .current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

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

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

    .table-full,
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-full th,
    .table-full td {
        padding: 0.65rem 0.4rem;
        white-space: normal;
    }
}
.table-full th,
.table-full td {
    padding: 0.75rem 0.5rem;
}
