* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background: #f4f6f9;
    color: #222;
}

/* Page connexion */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    background: #fff;
    padding: 35px;
    width: 380px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.login-container h1 {
    margin-bottom: 10px;
    color: #1f3b5c;
}

.login-container p {
    margin-bottom: 20px;
    color: #666;
}

.login-form label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-weight: bold;
}

.login-form input {
    width: 100%;
    padding: 11px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.login-form button {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: #1f3b5c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.login-form button:hover {
    background: #2b537f;
}

.alert.error {
    background: #ffe3e3;
    color: #a10000;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert.success {
    background: #e4f7e7;
    color: #17652c;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Barre du haut */
.topbar {
    background: #1f3b5c;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    font-size: 22px;
    font-weight: bold;
}

.navbar {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.navbar a,
.nav-dropdown-toggle {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    background: transparent;
    font-size: 16px;
    cursor: pointer;
}

.navbar a:hover,
.navbar a.active,
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active {
    background: rgba(255,255,255,0.15);
}

.nav-dropdown {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: -10px;
}

.nav-dropdown::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 12px;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    min-width: 180px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.14);
    padding: 8px;
    z-index: 50;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    color: #1f3b5c;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    background: #edf4fb;
}

.user-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logout-btn {
    background: #d9534f;
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 6px;
}

.logout-btn:hover {
    background: #c9302c;
}

/* Contenu principal */
.main-content {
    padding: 25px;
}

.main-content h1 {
    color: #1f3b5c;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.page-title {
    margin: 0;
    font-size: 32px;
    line-height: 44px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.search-form input {
    width: 280px;
    max-width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #cfd7e3;
    border-radius: 8px;
    background: white;
    color: #222;
    font-size: 15px;
}

.search-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: #1f3b5c;
    color: white;
    text-decoration: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.search-icon-btn:hover {
    background: #2b537f;
}

.clear-search-btn {
    background: #8c98a8;
}

.clear-search-btn:hover {
    background: #748195;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

.form-card {
    padding: 22px;
}

.form-card h2 {
    margin-bottom: 18px;
    color: #1f3b5c;
}

.article-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #274767;
}

.article-form input,
.article-form select {
    width: 100%;
    padding: 11px;
    border: 1px solid #cfd7e3;
    border-radius: 8px;
    background: white;
}

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

.form-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
}

.form-actions button,
.delete-btn {
    padding: 11px 16px;
    background: #1f3b5c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.form-actions button:hover,
.delete-btn:hover {
    background: #2b537f;
}

.secondary-link,
.action-link {
    color: #1f3b5c;
    text-decoration: none;
    font-weight: bold;
}

.primary-link {
    display: inline-block;
    min-height: 44px;
    padding: 11px 16px;
    background: #1f3b5c;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
}

.secondary-link:hover,
.action-link:hover {
    text-decoration: underline;
}

.primary-link:hover {
    background: #2b537f;
}

.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    overflow-x: auto;
}

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

thead {
    background: #e9eef4;
}

th, td {
    padding: 14px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

tbody tr:hover {
    background: #f8fbff;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover td {
    background: #f1f7ff;
}

.actions-cell {
    white-space: nowrap;
    width: 70px;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.delete-btn {
    background: #d9534f;
    padding: 9px 12px;
}

.delete-btn:hover {
    background: #c9302c;
}

.icon-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 999px;
    font-size: 16px;
    line-height: 1;
}

.simple-config-form {
    width: 100%;
}

.simple-form-row {
    display: flex;
    align-items: end;
    gap: 16px;
    flex-wrap: wrap;
}

.simple-form-field {
    flex: 1 1 320px;
}

.simple-form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #274767;
}

.simple-form-field input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #cfd7e3;
    border-radius: 8px;
    background: white;
}

.compact-actions {
    margin-top: 0;
}
