/* ============================================================
   REMI - Styles principaux
   Palette : #388eb7 (bleu), #204D62 (fonce), #38AFB7 (turquoise)
   Fond : #f7f4f1 (creme), #ffffff
   Polices : Josefin Sans (corps), Poppins (nav/titres)
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bleu: #388eb7;
    --bleu-hover: #2d7a9f;
    --bleu-fonce: #204D62;
    --turquoise: #38AFB7;
    --turquoise-hover: #2e9da5;
    --fond-creme: #f7f4f1;
    --fond-blanc: #ffffff;
    --fond-gris: #f0eded;
    --texte: #333333;
    --texte-light: #666666;
    --texte-muted: #999999;
    --border: #e0dcd8;
    --border-light: #ece9e5;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
    --transition: 0.3s ease;
    --header-height: 80px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--texte);
    background: var(--fond-creme);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--bleu); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--bleu-hover); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--bleu-fonce);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--fond-blanc);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--turquoise);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--fond-blanc);
    box-shadow: var(--shadow);
    height: var(--header-height);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo { display: flex; align-items: center; }
.logo-img { height: 55px; width: auto; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--bleu-fonce);
    padding: 8px 14px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--bleu);
    background: rgba(56, 142, 183, 0.08);
}

.nav-btn {
    background: var(--bleu);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
}

.nav-btn:hover {
    background: var(--bleu-hover);
    color: #fff !important;
}

.mobile-menu-btn,
.mobile-close-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--bleu-fonce);
}

.mobile-menu-btn svg,
.mobile-close-btn svg { width: 28px; height: 28px; }

/* --- Main content offset for fixed header --- */
.site-main {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height) - 300px);
}

/* --- Hero --- */
.hero {
    background: linear-gradient(135deg, var(--bleu-fonce) 0%, var(--bleu) 100%);
    color: #fff;
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(56, 175, 183, 0.15);
}

.hero h1 {
    color: #fff;
    font-size: 2.8rem;
    margin-bottom: 15px;
    position: relative;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
    position: relative;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

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

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
}
.btn-secondary:hover { border-color: #fff; color: #fff; }

.btn-outline {
    background: transparent;
    color: var(--bleu);
    border: 2px solid var(--bleu);
}
.btn-outline:hover { background: var(--bleu); color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c0392b; color: #fff; }

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

/* --- Stats Counter --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.stat-card {
    text-align: center;
    padding: 30px 15px;
    background: var(--fond-blanc);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}

.stat-card:hover { transform: translateY(-4px); }

.stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--bleu);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--texte-light);
    margin-top: 5px;
}

/* --- Cards --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: var(--fond-blanc);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body { padding: 25px; }

.card-date {
    font-size: 0.8rem;
    color: var(--texte-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.card-title {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: var(--bleu-fonce);
}

.card-title a { color: inherit; }
.card-title a:hover { color: var(--bleu); }

.card-excerpt {
    font-size: 0.9rem;
    color: var(--texte-light);
    margin-bottom: 15px;
}

.card-link {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bleu);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.card-link:hover { gap: 10px; }

/* --- Values section --- */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.value-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--fond-blanc);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.value-icon {
    width: 60px;
    height: 60px;
    background: rgba(56, 142, 183, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--bleu);
}

.value-icon svg { width: 28px; height: 28px; }

.value-card h3 { margin-bottom: 10px; }

.value-card p {
    font-size: 0.95rem;
    color: var(--texte-light);
}

/* --- Advantages section --- */
.advantages-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.advantage-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: var(--fond-blanc);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.advantage-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(56, 175, 183, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--turquoise);
}

.advantage-icon svg { width: 20px; height: 20px; }

/* --- Page Header (sous-pages) --- */
.page-header {
    background: linear-gradient(135deg, var(--bleu-fonce) 0%, var(--bleu) 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    color: #fff;
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.page-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--bleu-fonce);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--fond-blanc);
    transition: border-color var(--transition);
    color: var(--texte);
}

.form-control:focus {
    outline: none;
    border-color: var(--bleu);
    box-shadow: 0 0 0 3px rgba(56, 142, 183, 0.15);
}

textarea.form-control { resize: vertical; min-height: 120px; }

select.form-control { cursor: pointer; }

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--bleu);
}

.form-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* --- Contact Form Container --- */
.contact-form-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--fond-blanc);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.pagination a {
    background: var(--fond-blanc);
    color: var(--bleu-fonce);
    border: 1px solid var(--border);
}

.pagination a:hover {
    background: var(--bleu);
    color: #fff;
    border-color: var(--bleu);
}

.pagination .current {
    background: var(--bleu);
    color: #fff;
    border: 1px solid var(--bleu);
}

/* --- Article Detail --- */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.article-detail img {
    border-radius: var(--radius-lg);
    margin: 20px 0;
}

.article-detail .article-date {
    color: var(--texte-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.article-detail .article-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-detail .article-content p { margin-bottom: 15px; }

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    margin-bottom: 30px;
    color: var(--bleu);
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
}

.badge-success { background: rgba(39, 174, 96, 0.12); color: var(--success); }
.badge-warning { background: rgba(243, 156, 18, 0.12); color: var(--warning); }
.badge-danger { background: rgba(231, 76, 60, 0.12); color: var(--danger); }
.badge-secondary { background: rgba(153, 153, 153, 0.12); color: var(--texte-muted); }
.badge-info { background: rgba(56, 142, 183, 0.12); color: var(--bleu); }

/* --- Flash Messages --- */
.flash {
    position: fixed;
    top: 90px;
    right: 20px;
    padding: 15px 45px 15px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.flash-success { background: #d4edda; color: #155724; border-left: 4px solid var(--success); }
.flash-danger { background: #f8d7da; color: #721c24; border-left: 4px solid var(--danger); }
.flash-warning { background: #fff3cd; color: #856404; border-left: 4px solid var(--warning); }
.flash-info { background: #d1ecf1; color: #0c5460; border-left: 4px solid var(--bleu); }

.flash-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.5;
}

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

/* --- Footer --- */
.site-footer {
    background: var(--bleu-fonce);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.footer-logo { height: 50px; width: auto; margin-bottom: 15px; filter: brightness(0) invert(1); }
.footer-tagline { font-size: 0.85rem; opacity: 0.7; }

.footer-social { display: flex; gap: 12px; margin-top: 15px; }
.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background var(--transition);
}
.footer-social a:hover { background: var(--turquoise); color: #fff; }
.footer-social svg { width: 18px; height: 18px; }

.footer-col h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-col h3::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--turquoise);
    margin-top: 8px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }

.footer-col p {
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col p svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--turquoise); }

.footer-bottom {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ============================================================
   ESPACE ADHERENT
   ============================================================ */

/* --- Login Page --- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bleu-fonce) 0%, var(--bleu) 100%);
    padding: 20px;
}

.login-box {
    background: var(--fond-blanc);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

.login-logo {
    display: block;
    height: 60px;
    margin: 0 auto 30px;
}

.login-title {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--bleu-fonce);
}

.login-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 20px;
    border-left: 4px solid var(--danger);
}

.login-links {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
}

.login-links a { color: var(--bleu); }

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--bleu);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}

.btn-login:hover { background: var(--bleu-hover); }

/* --- Espace Adherent Layout --- */
.espace-layout {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.espace-sidebar {
    width: 280px;
    background: var(--bleu-fonce);
    color: #fff;
    padding: 30px 0;
    flex-shrink: 0;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.espace-sidebar-logo {
    height: 50px;
    margin: 0 auto 30px;
    display: block;
    filter: brightness(0) invert(1);
}

.espace-sidebar .sidebar-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.4);
    padding: 0 25px;
    margin-bottom: 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    color: rgba(255,255,255,0.7);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

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

.sidebar-link.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: var(--turquoise);
}

.sidebar-link svg { width: 20px; height: 20px; }

.sidebar-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 20px 0;
}

.espace-content {
    flex: 1;
    padding: 30px;
    background: var(--fond-gris);
    min-width: 0;
}

.espace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

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

/* --- Document Cards (Espace Adherent Dashboard) --- */
.doc-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.doc-card {
    background: var(--fond-blanc);
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: var(--texte);
}

.doc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: var(--texte);
}

.doc-card-icon {
    width: 70px;
    height: 70px;
    background: rgba(56, 142, 183, 0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: var(--bleu);
}

.doc-card-icon svg { width: 32px; height: 32px; }

.doc-card-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
}

.doc-card-count {
    font-size: 0.8rem;
    color: var(--texte-muted);
    margin-top: 5px;
}

/* --- Document List --- */
.doc-list-header {
    background: var(--bleu-fonce);
    color: #fff;
    padding: 25px 30px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.doc-list-header h2 { color: #fff; font-size: 1.3rem; }

.doc-list-header .doc-count {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 3px;
}

.doc-list-toolbar {
    background: var(--fond-blanc);
    padding: 15px 30px;
    display: flex;
    gap: 15px;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
}

.doc-search {
    flex: 1;
    max-width: 300px;
    position: relative;
}

.doc-search input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.doc-search svg {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--texte-muted);
}

.doc-list {
    background: var(--fond-blanc);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 30px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}

.doc-item:hover { background: var(--fond-creme); }
.doc-item:last-child { border-bottom: none; }

.doc-item-icon { color: var(--bleu); flex-shrink: 0; }
.doc-item-icon svg { width: 24px; height: 24px; }

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

.doc-item-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: var(--bleu);
}

.doc-item-meta {
    font-size: 0.8rem;
    color: var(--texte-muted);
    margin-top: 2px;
}

.doc-item-download {
    flex-shrink: 0;
    color: var(--bleu);
    padding: 8px;
    border-radius: var(--radius);
    transition: background var(--transition);
}

.doc-item-download:hover { background: rgba(56, 142, 183, 0.1); }

/* ============================================================
   ADMIN
   ============================================================ */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--bleu-fonce);
    color: #fff;
    padding: 20px 0;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.admin-sidebar .sidebar-brand {
    padding: 10px 20px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.admin-sidebar .sidebar-brand img { height: 40px; filter: brightness(0) invert(1); }
.admin-sidebar .sidebar-brand small { display: block; font-size: 0.7rem; opacity: 0.5; margin-top: 5px; }

.admin-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    background: var(--fond-gris);
    min-height: 100vh;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-topbar h1 { font-size: 1.5rem; }

/* --- Tables (Admin) --- */
.table-container {
    background: var(--fond-blanc);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

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

.table th {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--texte-light);
    padding: 15px 20px;
    text-align: left;
    border-bottom: 2px solid var(--border-light);
    white-space: nowrap;
}

.table td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    vertical-align: middle;
}

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

.table tr:hover td { background: rgba(56, 142, 183, 0.03); }

.table-actions {
    display: flex;
    gap: 8px;
}

.table-actions a,
.table-actions button {
    padding: 6px 10px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: background var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.table-actions .btn-edit { background: rgba(56, 142, 183, 0.1); color: var(--bleu); }
.table-actions .btn-edit:hover { background: rgba(56, 142, 183, 0.2); }
.table-actions .btn-delete { background: rgba(231, 76, 60, 0.1); color: var(--danger); }
.table-actions .btn-delete:hover { background: rgba(231, 76, 60, 0.2); }

/* --- Admin Dashboard Stats --- */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: var(--fond-blanc);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-stat-icon svg { width: 24px; height: 24px; }
.admin-stat-icon.blue { background: rgba(56, 142, 183, 0.1); color: var(--bleu); }
.admin-stat-icon.green { background: rgba(39, 174, 96, 0.1); color: var(--success); }
.admin-stat-icon.orange { background: rgba(243, 156, 18, 0.1); color: var(--warning); }
.admin-stat-icon.red { background: rgba(231, 76, 60, 0.1); color: var(--danger); }

.admin-stat-value {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--bleu-fonce);
    line-height: 1;
}

.admin-stat-label {
    font-size: 0.8rem;
    color: var(--texte-muted);
    margin-top: 2px;
}

/* --- Editor --- */
.editor-container {
    background: var(--fond-blanc);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 30px;
}

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

@media (max-width: 768px) {
    :root { --header-height: 65px; }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }

    .mobile-menu-btn { display: block; }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: var(--fond-blanc);
        flex-direction: column;
        align-items: flex-start;
        padding: 70px 30px 30px;
        box-shadow: var(--shadow-lg);
        transition: right var(--transition);
        z-index: 1001;
    }

    .main-nav.open { right: 0; }

    .mobile-close-btn {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .nav-link { width: 100%; padding: 12px 0; }
    .nav-btn { width: 100%; text-align: center; margin-top: 10px; }

    /* Overlay */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
    }

    .nav-overlay.show { display: block; }

    .hero { padding: 60px 0 50px; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1.05rem; }

    .section { padding: 50px 0; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .stat-card { padding: 20px 10px; }
    .stat-number { font-size: 1.8rem; }

    .cards-grid { grid-template-columns: 1fr; }

    .form-inline { grid-template-columns: 1fr; }
    .contact-form-container { padding: 25px; }

    .footer-container { grid-template-columns: 1fr; gap: 25px; }

    /* Espace adherent */
    .espace-layout { flex-direction: column; }
    .espace-sidebar {
        width: 100%;
        position: relative;
        top: auto;
        height: auto;
        padding: 15px 0;
    }
    .espace-content { padding: 20px 15px; }
    .doc-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .doc-card { padding: 20px 15px; }

    /* Admin */
    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }
    .admin-content { margin-left: 0; padding: 20px 15px; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .doc-cards-grid { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; align-items: center; }
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.hidden { display: none; }
