/* ═══════════════════════════════════════════
   RÉSURGENCE — ESPACE ADHÉRENT DESIGN SYSTEM
   ═══════════════════════════════════════════ */
:root { --navy: #1E3A61; --navy-deep: #10203A; --brick: #C77F3B; --brick-light: #D89A5C; --cream: #F2F4F7; --cream-dark: #DFE3E8; --white: #FFFFFF; --text-primary: #1E3A61; --text-secondary: #565E68; --text-inverse: #F2F4F7; --border: #DFE3E8; --success: #2D7A4F; --warning: #C77F3B; --error: #C77F3B; --radius: 2px; --font-display: 'Cormorant Garamond', Georgia, serif; --font-body: 'Outfit', -apple-system, sans-serif; --transition: cubic-bezier(0.16, 1, 0.3, 1); }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-body); font-weight: 400; color: var(--text-primary); background: var(--cream); -webkit-font-smoothing: antialiased; min-height: 100vh; }

/* CORRECTIF TAILLE DES ICÔNES DANS LES BOUTONS ET TABLEAUX */
.btn svg, .sidebar-link svg, .stat-card svg, .annuaire-card svg { width: 1.1rem !important; height: 1.1rem !important; flex-shrink: 0; }
.success-icon svg { width: 32px !important; height: 32px !important; }

.auth-container { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .auth-container { grid-template-columns: 1fr; } .auth-brand { display: none; } }
.auth-brand { background: var(--navy-deep); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 4rem; position: relative; overflow: hidden; }
.auth-brand::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 20%, rgba(199,127,59,0.15) 0%, transparent 50%), radial-gradient(ellipse at 70% 80%, rgba(30,58,97,0.3) 0%, transparent 50%); }
.auth-brand-content { position: relative; z-index: 1; text-align: center; }
.auth-brand-content img { display: block; margin: 0 auto 1.5rem; }
.auth-brand p { font-family: var(--font-body); font-size: 1rem; font-weight: 300; color: rgba(244,241,236,0.6); letter-spacing: 0.2em; text-transform: uppercase; }
.auth-form-side { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 3rem 2rem; background: var(--cream); }
.auth-form-wrapper { width: 100%; max-width: 420px; }
.auth-form-header { margin-bottom: 2.5rem; }
.auth-form-header h2 { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--navy); margin-bottom: 0.5rem; }
.auth-form-header p { font-size: 0.9rem; color: var(--text-secondary); font-weight: 300; line-height:1.5; }
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 0.5rem; }
.form-input, .form-textarea { width: 100%; padding: 0.875rem 1rem; font-family: var(--font-body); font-size: 0.95rem; font-weight: 400; color: var(--text-primary); background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); outline: none; transition: border-color 0.3s var(--transition), box-shadow 0.3s var(--transition); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-input:focus, .form-textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30,58,97,0.08); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-select { width: 100%; padding: 0.875rem 1rem; font-family: var(--font-body); font-size: 0.95rem; font-weight: 400; color: var(--text-primary); background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); outline: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235A6A7A' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; cursor: pointer; transition: border-color 0.3s var(--transition); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 2rem; font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; border: none; border-radius: var(--radius); cursor: pointer; transition: all 0.4s var(--transition); text-decoration: none; }
.btn--primary { background: var(--brick); color: var(--white); width: 100%; }
.btn--primary:hover { background: var(--brick-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(199,127,59,0.25); }
.btn--outline { background: transparent; color: var(--navy); border: 1px solid var(--border); }
.btn--outline:hover { border-color: var(--navy); background: rgba(30,58,97,0.03); }
.btn--danger { background: transparent; color: var(--error); border: 1px solid var(--error); }
.btn--small { padding: 0.6rem 1.25rem; font-size: 0.75rem; }
.btn--ghost { background: none; border: none; color: var(--brick); font-size: 0.85rem; font-weight: 500; padding: 0.5rem 0; letter-spacing: 0.05em; text-transform: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.auth-switch { text-align: center; margin-top: 2rem; font-size: 0.875rem; color: var(--text-secondary); }
.auth-switch button { background: none; border: none; color: var(--brick); font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.form-footer { display: flex; justify-content: flex-end; margin-bottom: 1.5rem; }
.app { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; grid-template-rows: auto 1fr; }

/* ═══════════════════════════════════════════
   BURGER MENU ET NAVIGATION MOBILE
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
    .app { grid-template-columns: 1fr; }
    .sidebar {
        display: none !important;
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        height: calc(100vh - 64px);
        z-index: 1000;
        background: var(--white);
        flex-direction: column;
        animation: slideIn 0.3s var(--transition);
        overflow-y: auto;
        padding-bottom: 3rem;
    }
    .sidebar.open { display: flex !important; }
    .mobile-menu-close {
        display: block !important;
        background: none;
        border: none;
        padding: 1.5rem;
        text-align: right;
        color: var(--navy);
        cursor: pointer;
        width: 100%;
    }
    .mobile-menu-close svg { width: 24px !important; height: 24px !important; }
    .mobile-menu-btn { color: var(--cream) !important; opacity: 1 !important; display: block !important; background: none; border: none; cursor: pointer; padding: 0.5rem; }
    .mobile-menu-btn svg { width: 24px !important; height: 24px !important; stroke: var(--cream); }
}
@keyframes slideIn { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.mobile-menu-close { display: none; }
.mobile-menu-btn { display: none; }

.topbar { grid-column: 1 / -1; background: var(--navy-deep); padding: 0 2rem; height: 64px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 101; }
.topbar-brand { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--cream); letter-spacing: 0.02em; }
.topbar-right { display: flex; align-items: center; gap: 1.5rem; }
.topbar-user { display: flex; align-items: center; gap: 0.75rem; color: var(--cream); }
@media (max-width: 600px) { .topbar-name { display: none; } }
.topbar-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brick); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 600; color: var(--white); }
.topbar-logout { background: none; border: 1px solid rgba(244,241,236,0.2); color: rgba(244,241,236,0.7); font-family: var(--font-body); font-size: 0.75rem; padding: 0.4rem 1rem; border-radius: var(--radius); cursor: pointer; transition: all 0.3s; }
.topbar-logout:hover { border-color: rgba(244,241,236,0.5); color: var(--cream); }
.sidebar { background: var(--white); border-right: 1px solid var(--border); padding: 2rem 0; display: flex; flex-direction: column; }
.sidebar-section { margin-bottom: 2rem; }
.sidebar-title { font-size: 0.65rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-secondary); padding: 0 1.5rem; margin-bottom: 0.75rem; }
.sidebar-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1.5rem; font-size: 0.9rem; font-weight: 400; color: var(--text-secondary); text-decoration: none; cursor: pointer; transition: all 0.2s var(--transition); border: none; background: none; width: 100%; text-align: left; font-family: var(--font-body); }
.sidebar-link:hover { background: var(--cream); color: var(--text-primary); }
.sidebar-link.active { background: var(--cream); color: var(--navy); font-weight: 500; border-right: 2px solid var(--brick); }
.sidebar-spacer { flex: 1; }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); }
.main { padding: 2.5rem; overflow-y: auto; background: var(--cream); }
@media (max-width: 900px) { .main { padding: 1.5rem; } }
.page-header { margin-bottom: 2.5rem; }
.page-surtitle { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brick); margin-bottom: 0.5rem; }
.page-title { font-family: var(--font-display); font-size: 2.25rem; font-weight: 600; color: var(--navy); line-height: 1.2; }
.page-subtitle { font-size: 0.95rem; font-weight: 300; color: var(--text-secondary); margin-top: 0.5rem; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; transition: box-shadow 0.3s var(--transition); }
.card:hover { box-shadow: 0 2px 12px rgba(16,32,58,0.06); }
.card-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--navy); margin-bottom: 1.25rem; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.stat-label { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 0.5rem; }
.stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--navy); }
.member-card-container { perspective: 1000px; max-width: 500px; }
.member-card { width: 100%; aspect-ratio: 85.6 / 54; background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 60%, #3A5A8C 100%); border-radius: 8px; padding: 1.75rem; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 8px 32px rgba(16,32,58,0.3); transition: transform 0.6s var(--transition); }
.member-card:hover { transform: rotateY(-3deg) rotateX(2deg); }
.member-card::before { content: ''; position: absolute; top: -50%; right: -30%; width: 80%; height: 200%; background: radial-gradient(ellipse, rgba(199,127,59,0.12) 0%, transparent 60%); pointer-events: none; }
.member-card-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.member-card-brand { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--cream); letter-spacing: 0.03em; }
.member-card-type { font-size: 0.6rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brick-light); }
.member-card-bottom { position: relative; z-index: 1; }
.member-card-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--cream); margin-bottom: 0.25rem; }
.member-card-id { font-family: var(--font-body); font-size: 0.7rem; font-weight: 400; letter-spacing: 0.15em; color: rgba(244,241,236,0.5); }
.member-card-meta { display: flex; gap: 2rem; margin-top: 0.75rem; }
.member-card-meta-item { display: flex; flex-direction: column; }
.member-card-meta-label { font-size: 0.55rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(244,241,236,0.4); }
.member-card-meta-value { font-size: 0.8rem; font-weight: 400; color: var(--cream); margin-top: 0.15rem; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.profile-field { display: flex; flex-direction: column; }
.profile-field-label { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 0.35rem; }
.profile-field-value { font-size: 0.95rem; font-weight: 400; color: var(--text-primary); }
.badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.75rem; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; border-radius: var(--radius); }
.badge--success { background: rgba(45,122,79,0.1); color: var(--success); }
.badge--warning { background: rgba(196,133,63,0.1); color: var(--warning); }
.badge--error { background: rgba(199,127,59,0.1); color: var(--error); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-secondary); text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
tbody td { font-size: 0.9rem; padding: 1rem; border-bottom: 1px solid rgba(212,207,199,0.5); color: var(--text-primary); }
tbody tr:hover { background: var(--cream); }
.alert { padding: 1rem 1.25rem; border-radius: var(--radius); font-size: 0.875rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem; }
.alert--info { background: rgba(30,58,97,0.06); color: var(--navy); border: 1px solid rgba(30,58,97,0.12); }
.alert--success { background: rgba(45,122,79,0.06); color: var(--success); border: 1px solid rgba(45,122,79,0.12); }
.alert--warning { background: rgba(196,133,63,0.06); color: var(--warning); border: 1px solid rgba(196,133,63,0.12); }
.cotisation-status { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem; background: var(--cream); border-radius: var(--radius); margin-bottom: 1.5rem; }
.cotisation-info h4 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--navy); margin-bottom: 0.25rem; }
.cotisation-info p { font-size: 0.85rem; color: var(--text-secondary); font-weight: 300; }
.news-item { padding: 1.5rem 0; border-bottom: 1px solid rgba(212,207,199,0.5); }
.news-item:last-child { border-bottom: none; }
.news-date { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--brick); margin-bottom: 0.35rem; }
.news-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--navy); margin-bottom: 0.5rem; }
.news-excerpt { font-size: 0.9rem; font-weight: 300; color: var(--text-secondary); line-height: 1.6; }
.admin-toolbar { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; align-items: center; }
.search-input { flex: 1; min-width: 240px; padding: 0.7rem 1rem; font-family: var(--font-body); font-size: 0.9rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); outline: none; }
.filter-select { padding: 0.7rem 2rem 0.7rem 1rem; font-family: var(--font-body); font-size: 0.85rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235A6A7A' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; cursor: pointer; outline: none; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeInUp 0.5s var(--transition) forwards; opacity: 0; }
.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.2s; }
.spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-top-color: var(--white); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 1000; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { padding: 1rem 1.5rem; background: var(--navy-deep); color: var(--cream); border-radius: var(--radius); font-size: 0.875rem; box-shadow: 0 4px 20px rgba(16,32,58,0.25); animation: slideInRight 0.4s var(--transition); }
@keyframes slideInRight { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }
.annuaire-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.annuaire-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; display: flex; align-items: center; gap: 1rem; transition: box-shadow 0.3s var(--transition), transform 0.2s; cursor: pointer; }
.annuaire-card:hover { box-shadow: 0 4px 16px rgba(16,32,58,0.08); transform: translateY(-2px); }
.annuaire-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 600; color: var(--cream); flex-shrink: 0; }
.circo-chip { padding: 0.4rem 1rem; font-size: 0.8rem; font-family: var(--font-body); border: 1px solid var(--border); border-radius: 20px; background: var(--white); cursor: pointer; transition: all 0.2s var(--transition); color: var(--text-secondary); }
.circo-chip:hover, .circo-chip.active { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.engagement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.engagement-option { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; cursor: pointer; transition: all 0.3s var(--transition); text-align: center; }
.engagement-option.selected { border-color: var(--brick); background: rgba(199,127,59,0.04); }
.engagement-option.selected .engagement-icon { color: var(--brick); }
.engagement-icon { font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--text-secondary); transition: color 0.3s; }
.engagement-option-label { font-size: 0.85rem; font-weight: 500; color: var(--text-primary); }
.engagement-option-desc { font-size: 0.75rem; color: var(--text-secondary); font-weight: 300; margin-top: 0.25rem; }
.disponibilite-row { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid rgba(212,207,199,0.3); }
.disponibilite-label { min-width: 120px; font-size: 0.85rem; font-weight: 400; }
.toggle-btn { padding: 0.35rem 0.75rem; font-size: 0.75rem; font-family: var(--font-body); border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); cursor: pointer; transition: all 0.2s; color: var(--text-secondary); }
.toggle-btn.active { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.notif-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; font-size: 0.65rem; font-weight: 600; color: var(--white); background: var(--brick); border-radius: 9px; margin-left: 0.5rem; }
.rgpd-section { padding: 1.5rem 0; border-bottom: 1px solid rgba(212,207,199,0.5); }
.rgpd-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--navy); margin-bottom: 0.5rem; }
.rgpd-desc { font-size: 0.875rem; color: var(--text-secondary); font-weight: 300; line-height: 1.6; margin-bottom: 0.75rem; }
.confirm-overlay { position: fixed; inset: 0; background: rgba(16,32,58,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; animation: fadeIn 0.2s ease; overflow-y: auto; padding: 2rem 0; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.confirm-modal { background: var(--white); border-radius: var(--radius); padding: 2rem; max-width: 440px; width: 90%; box-shadow: 0 16px 48px rgba(16,32,58,0.2); position: relative; margin: auto; }
#btn-close-member-modal svg, #btn-close-member-modal * { pointer-events: none; }
.badge-fonction { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.7rem; font-size: 0.65rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; border-radius: var(--radius); background: var(--navy); color: var(--cream); }
.member-card-fonction { font-size: 0.65rem; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brick-light); margin-top: 0.2rem; }
