/* ==========================================================================
   CHARTE GRAPHIQUE - PASSERELLE ONPBF
   ========================================================================== */

:root {
    --primary-color: #059669;
    --primary-hover: #047857;
    --secondary-color: #2563eb;
    --secondary-hover: #1d4ed8;
    --dark-color: #0f172a;
    --card-bg: #ffffff;
    --body-bg: #f8fafc;
    --text-main: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* En-tête / Header */
header {
    background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #0d9488 100%);
    color: #ffffff;
    padding: 2.5rem 1.5rem 3.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

header p {
    color: #e2e8f0;
    font-size: 1rem;
    font-weight: 300;
}

/* Conteneur principal */
main, .main-container {
    max-width: 1100px;
    margin: -1.5rem auto 2rem auto;
    padding: 0 1.5rem;
    flex: 1;
    width: 100%;
}

/* Cartes & Zone de Filtre */
.card, .filter-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

/* Alignement spécifique du formulaire de filtre en ligne */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.filter-bar input[type="text"],
.filter-bar select,
.filter-bar button {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    height: 44px;
}

.filter-bar input[type="text"] {
    flex: 2;
    min-width: 200px;
}

.filter-bar select {
    flex: 1.2;
    min-width: 180px;
}

.filter-bar button {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0 1.25rem;
}

/* Champs de Formulaire Génériques */
input[type="text"],
input[type="search"],
select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: #ffffff;
    margin-bottom: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* Boutons universels */
.btn, input[type="submit"], button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background-color: var(--primary-color);
    color: #ffffff;
    transition: all 0.2s ease;
}

.btn:hover, input[type="submit"]:hover, button:hover {
    background-color: var(--primary-hover);
}

/* Tableau */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f8fafc;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f1f5f9;
}

/* Liens dans la table (Bouton Voir Profil) */
td a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

td a:hover {
    background-color: #eff6ff;
    color: var(--secondary-hover);
    text-decoration: none;
}

/* Footer */
footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* Adaptation écran mobile */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
}