/* ============================================================
   VétéransQC — main.css  (thème sombre, bleu/blanc Québec)
   ============================================================ */

/* --- Variables --- */
:root {
  --bg-primary:    #0a1628;
  --bg-secondary:  #0f1f3d;
  --bg-card:       #132040;
  --bg-card-hover: #1a2d55;
  --bg-input:      #0d1830;

  --accent:        #1565c0;
  --accent-light:  #1976d2;
  --accent-bright: #42a5f5;
  --accent-glow:   rgba(21,101,192,0.25);

  --gold:          #c8a84b;
  --gold-light:    #e8c96a;

  --text-primary:  #e8edf5;
  --text-secondary:#9ab0c8;
  --text-muted:    #5c7a99;

  --border:        rgba(100,149,200,0.15);
  --border-hover:  rgba(100,149,200,0.3);

  --success:       #2e7d32;
  --success-light: #4caf50;
  --danger:        #b71c1c;
  --danger-light:  #ef5350;
  --warning:       #e65100;
  --warning-light: #ff9800;
  --info:          #01579b;
  --info-light:    #29b6f6;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);

  --transition: 0.2s ease;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent-bright); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

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

/* --- Layout --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 780px; }
.main-content { flex: 1; }

/* --- Navbar --- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,22,40,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .75rem 0;
}
.nav-inner { display: flex; align-items: center; gap: 1rem; }
.nav-logo {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1.25rem; font-weight: 700; color: var(--text-primary);
  text-decoration: none; white-space: nowrap;
}
.logo-icon { color: var(--gold); font-size: 1.4rem; }
.logo-accent { color: var(--accent-bright); }
.nav-menu {
  display: flex; align-items: center; gap: .25rem;
  list-style: none; margin-left: auto; flex-wrap: wrap;
}
.nav-link {
  padding: .5rem .85rem; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: .95rem;
  transition: all var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.btn-nav-primary {
  background: var(--accent); color: #fff !important;
  border-radius: var(--radius-sm); padding: .45rem 1rem;
}
.btn-nav-primary:hover { background: var(--accent-light); }
.btn-nav-outline {
  border: 1px solid var(--border-hover); color: var(--text-secondary) !important;
  border-radius: var(--radius-sm);
}
.btn-nav-outline:hover { border-color: var(--accent-bright); color: var(--accent-bright) !important; }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + .5rem); right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); list-style: none;
  min-width: 200px; box-shadow: var(--shadow-md); z-index: 200;
  overflow: hidden;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu li a {
  display: block; padding: .6rem 1.1rem; color: var(--text-secondary);
  font-size: .9rem; transition: all var(--transition);
}
.dropdown-menu li a:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.dropdown-divider { border-top: 1px solid var(--border); margin: .3rem 0; }
.admin-link { color: var(--gold) !important; }
.logout-link { color: var(--danger-light) !important; }
.user-dot { width: 8px; height: 8px; background: var(--success-light); border-radius: 50%; display: inline-block; }
.badge-notif {
  background: var(--danger-light); color: #fff;
  border-radius: 10px; padding: 0 .4rem; font-size: .7rem; font-weight: 700;
  margin-left: .3rem; vertical-align: middle;
}
.badge-sm { background: var(--accent-bright); color: #fff; border-radius: 9px; padding: 0 .35rem; font-size:.7rem; font-weight:700; }

/* Mobile nav */
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: .4rem; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all .3s; }

/* --- Flash messages --- */
.flash {
  position: relative; padding: .85rem 3rem .85rem 1.25rem;
  border-left: 4px solid; font-size: .9rem;
}
.flash p { margin: 0; }
.flash-success { background: rgba(46,125,50,.15); border-color: var(--success-light); color: #a5d6a7; }
.flash-error   { background: rgba(183,28,28,.15); border-color: var(--danger-light);  color: #ef9a9a; }
.flash-warning { background: rgba(230,81,0,.15);  border-color: var(--warning-light); color: #ffcc80; }
.flash-info    { background: rgba(1,87,155,.15);  border-color: var(--info-light);    color: #81d4fa; }
.flash-close { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: inherit; cursor: pointer; font-size: 1.2rem; }

/* --- Boutons --- */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.2rem; border-radius: var(--radius-md);
  font-size: .9rem; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary  { background: var(--accent);   color: #fff; border-color: var(--accent); }
.btn-primary:hover  { background: var(--accent-light); color: #fff; }
.btn-outline  { background: transparent; color: var(--accent-bright); border-color: var(--accent-bright); }
.btn-outline:hover  { background: var(--accent-glow); color: var(--text-primary); }
.btn-ghost    { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn-ghost:hover    { background: rgba(255,255,255,.05); color: var(--text-primary); }
.btn-danger   { background: var(--danger);   color: #fff; }
.btn-danger:hover   { background: var(--danger-light); }
.btn-success  { background: var(--success);  color: #fff; }
.btn-success:hover  { background: var(--success-light); }
.btn-accent   { background: var(--gold);     color: var(--bg-primary); }
.btn-accent:hover   { background: var(--gold-light); }
.btn-full  { width: 100%; justify-content: center; }
.btn-lg    { padding: .75rem 1.75rem; font-size: 1rem; }
.btn-sm    { padding: .35rem .85rem; font-size: .82rem; }
.btn-xs    { padding: .2rem .55rem; font-size: .75rem; }
.btn-icon  { background: none; border: none; cursor: pointer; color: var(--text-secondary); font-size: 1rem; padding: .3rem; transition: color var(--transition); }
.btn-icon:hover { color: var(--danger-light); }
.btn-danger-icon { color: var(--danger-light); }

/* --- Forms --- */
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: .4rem; font-size: .9rem; color: var(--text-secondary); font-weight: 500; }
.form-group input, .form-group textarea, .form-group select,
.form-input, .form-select {
  width: 100%; padding: .65rem .9rem;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-size: .95rem; font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus,
.form-input:focus, .form-select:focus {
  outline: none; border-color: var(--accent-bright); box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group-lg { grid-column: span 2; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; display: block; }
.form-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.form-notice { background: rgba(21,101,192,.12); border: 1px solid var(--border); border-radius: var(--radius-md); padding: .85rem 1rem; font-size: .85rem; color: var(--text-secondary); margin-bottom: 1rem; }
.form-check label { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .9rem; }
.input-password { position: relative; }
.input-password input { padding-right: 2.5rem; }
.toggle-pwd { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 1rem; }
.search-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; }

/* --- Alerts --- */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius-md); border: 1px solid; margin-bottom: 1.25rem; }
.alert-error   { background: rgba(183,28,28,.12); border-color: var(--danger-light); color: #ef9a9a; }
.alert-success { background: rgba(46,125,50,.12);  border-color: var(--success-light); color: #a5d6a7; }
.alert-info    { background: rgba(1,87,155,.12);   border-color: var(--info-light); color: #81d4fa; }
.alert p { margin: .2rem 0; font-size: .9rem; }

/* --- Hero --- */
.hero { position: relative; min-height: 90vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0a1628 0%, #0d2144 50%, #071020 100%);
}
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 40%, rgba(21,101,192,.2) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 70%, rgba(200,168,75,.08) 0%, transparent 60%);
}
.hero-content { position: relative; z-index: 1; max-width: 700px; padding: 4rem 0; }
.hero-badge {
  display: inline-block; background: rgba(21,101,192,.2); border: 1px solid rgba(21,101,192,.4);
  color: var(--accent-bright); padding: .35rem .9rem; border-radius: 20px; font-size: .85rem; margin-bottom: 1.5rem;
}
.hero-title { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; line-height: 1.15; margin-bottom: 1.25rem; }
.text-accent { color: var(--accent-bright); }
.hero-subtitle { font-size: 1.15rem; color: var(--text-secondary); max-width: 560px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-scroll-hint { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); color: var(--text-muted); font-size: 1.5rem; animation: bounce .8s ease-in-out infinite alternate; }
@keyframes bounce { to { transform: translateX(-50%) translateY(8px); } }

/* Stats bar */
.stats-bar { background: var(--bg-secondary); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 1.5rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.stat-item { display: flex; align-items: center; gap: .75rem; }
.stat-icon { font-size: 1.5rem; }
.stat-svg { color: var(--accent-bright); flex-shrink: 0; }
.stat-item strong { display: block; font-size: 1.2rem; color: var(--accent-bright); }
.stat-item span { font-size: .8rem; color: var(--text-muted); }

/* --- Sections --- */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-secondary); }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.section-title { font-size: 1.6rem; font-weight: 700; }
.section-link { color: var(--accent-bright); font-size: .9rem; }
.section-cta { text-align: center; background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%); }
.section-cta h2 { font-size: 1.8rem; margin-bottom: .75rem; }
.section-cta p { color: var(--text-secondary); max-width: 600px; margin: 0 auto 2rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Cards */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all var(--transition); }
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-img-wrap { height: 180px; overflow: hidden; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.25rem; }
.card-title { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; line-height: 1.4; }
.card-title a { color: var(--text-primary); }
.card-title a:hover { color: var(--accent-bright); }
.card-meta { font-size: .8rem; color: var(--text-muted); }

/* Events */
.events-list { display: flex; flex-direction: column; gap: .75rem; }
.event-item { display: flex; align-items: center; gap: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem 1.25rem; transition: all var(--transition); }
.event-item:hover { border-color: var(--border-hover); }
.event-national { border-color: rgba(200,168,75,.3); background: rgba(200,168,75,.05); }
.event-date { text-align: center; min-width: 48px; }
.event-day { display: block; font-size: 1.5rem; font-weight: 800; color: var(--accent-bright); line-height: 1; }
.event-month { display: block; font-size: .7rem; color: var(--text-muted); text-transform: uppercase; }
.event-info h4 { font-size: .95rem; margin-bottom: .15rem; }
.event-info p { font-size: .8rem; color: var(--text-muted); }
.badge-national { background: rgba(200,168,75,.15); color: var(--gold); border: 1px solid rgba(200,168,75,.3); padding: .2rem .6rem; border-radius: 12px; font-size: .75rem; margin-left: auto; }

/* --- Auth --- */
.auth-section { min-height: calc(100vh - 120px); display: flex; align-items: center; padding: 3rem 0; }
.auth-card { max-width: 460px; margin: 0 auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2.5rem; }
.auth-card-lg { max-width: 600px; }
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-icon { font-size: 2.5rem; display: block; color: var(--gold); margin-bottom: .75rem; }
.auth-header h1 { font-size: 1.7rem; margin-bottom: .3rem; }
.auth-header p { color: var(--text-muted); font-size: .9rem; }
.auth-form { display: flex; flex-direction: column; gap: .1rem; }
.auth-switch { text-align: center; margin-top: 1rem; font-size: .9rem; color: var(--text-muted); }

/* --- Profile --- */
.profile-layout { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; align-items: start; }
.profile-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.profile-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.profile-card h3 { font-size: 1rem; margin-bottom: .85rem; color: var(--text-secondary); }
.profile-avatar-wrap { display: flex; justify-content: center; margin-bottom: 1rem; }
.profile-avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); }
.profile-username { text-align: center; font-size: 1.25rem; margin-bottom: .4rem; }
.profile-regiment, .profile-city { text-align: center; color: var(--text-muted); font-size: .85rem; margin-bottom: .3rem; }
.profile-bio { font-size: .9rem; color: var(--text-secondary); text-align: center; margin: .75rem 0; }
.profile-meta { text-align: center; font-size: .75rem; color: var(--text-muted); margin-top: .5rem; }
.profile-actions { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.profile-content { display: flex; flex-direction: column; gap: 1.5rem; }
.profile-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.info-list { display: grid; gap: .4rem; }
.info-list dt { font-size: .8rem; color: var(--text-muted); }
.info-list dd { font-size: .9rem; color: var(--text-primary); margin-bottom: .3rem; }

/* --- Gallery mini --- */
.gallery-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: .5rem; }
.gallery-mini-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; transition: opacity var(--transition); }
.gallery-mini-img:hover { opacity: .8; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
.gallery-item { position: relative; }
.gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-md); cursor: pointer; }
.gallery-caption { font-size: .75rem; color: var(--text-muted); padding: .25rem 0; }
.gallery-delete-btn { position: absolute; top: .35rem; right: .35rem; width: 24px; height: 24px; background: rgba(183,28,28,.85); color: #fff; border: none; border-radius: 50%; cursor: pointer; font-size: .9rem; line-height: 1; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--transition); }
.gallery-item:hover .gallery-delete-btn { opacity: 1; }
.gallery-upload-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 2rem; }
.gallery-upload-zone { border: 2px dashed var(--border-hover); border-radius: var(--radius-md); padding: 2rem; text-align: center; cursor: pointer; transition: border-color var(--transition); }
.gallery-upload-zone:hover { border-color: var(--accent-bright); }
.gallery-upload-zone input[type="file"] { display: none; }
.gallery-upload-zone label { cursor: pointer; display: flex; flex-direction: column; gap: .35rem; align-items: center; color: var(--text-muted); }
.upload-icon { font-size: 2rem; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 9999; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: var(--radius-md); }

/* --- Messaging --- */
.messaging-layout { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; align-items: start; }
.msg-sidebar { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.msg-tab { display: flex; align-items: center; gap: .5rem; padding: .85rem 1.1rem; color: var(--text-secondary); font-size: .9rem; border-bottom: 1px solid var(--border); transition: all var(--transition); }
.msg-tab:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.msg-tab.active { background: var(--accent-glow); color: var(--accent-bright); border-right: 3px solid var(--accent-bright); }
.msg-list { list-style: none; }
.msg-item { display: flex; align-items: stretch; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.msg-item:hover { background: var(--bg-card-hover); }
.msg-unread { background: rgba(21,101,192,.07); }
.msg-link { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; flex: 1; color: inherit; text-decoration: none; }
.msg-avatar img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg-info { flex: 1; min-width: 0; }
.msg-from { font-size: .9rem; font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.msg-new-dot { width: 8px; height: 8px; background: var(--accent-bright); border-radius: 50%; flex-shrink: 0; }
.msg-subject { font-size: .85rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-time { font-size: .75rem; color: var(--text-muted); }
.msg-delete-form { display: flex; align-items: center; padding-right: .5rem; }
.msg-view-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.msg-view-header { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; background: var(--bg-secondary); flex-wrap: wrap; }
.msg-view-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.msg-view-time { display: block; font-size: .8rem; color: var(--text-muted); }
.msg-view-arrow { color: var(--text-muted); }
.msg-view-body { padding: 1.5rem; min-height: 200px; color: var(--text-secondary); line-height: 1.8; font-size: .95rem; }
.msg-view-actions { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; background: var(--bg-secondary); }
.msg-list-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

/* Autocomplete */
.autocomplete-wrap { position: relative; }
.autocomplete-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-card); border: 1px solid var(--border-hover); border-radius: var(--radius-md); list-style: none; z-index: 50; max-height: 220px; overflow-y: auto; box-shadow: var(--shadow-md); display: none; }
.autocomplete-dropdown li { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; cursor: pointer; font-size: .9rem; color: var(--text-secondary); transition: background var(--transition); }
.autocomplete-dropdown li:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.autocomplete-dropdown li img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

/* --- Entraide --- */
.entraide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.entraide-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; position: relative; transition: all var(--transition); }
.entraide-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-sm); }
.status-resolved { opacity: .7; }
.entraide-type-badge { display: inline-block; background: rgba(21,101,192,.18); color: var(--accent-bright); border: 1px solid rgba(21,101,192,.3); padding: .2rem .7rem; border-radius: 12px; font-size: .75rem; margin-bottom: .75rem; }
.entraide-type-badge.lg { font-size: .85rem; padding: .3rem 1rem; }
.entraide-title { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; line-height: 1.4; }
.entraide-title a { color: var(--text-primary); }
.entraide-title a:hover { color: var(--accent-bright); }
.entraide-excerpt { font-size: .85rem; color: var(--text-muted); margin-bottom: .85rem; }
.entraide-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .8rem; }
.entraide-author { display: flex; align-items: center; gap: .4rem; color: var(--text-secondary); }
.entraide-author img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.entraide-meta { display: flex; gap: .6rem; color: var(--text-muted); }
.entraide-time { font-size: .75rem; color: var(--text-muted); margin-top: .6rem; }
.entraide-detail-layout { display: grid; grid-template-columns: 1fr 280px; gap: 2rem; align-items: start; }
.entraide-detail-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; }
.entraide-detail-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.entraide-detail-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 1.25rem; line-height: 1.3; }
.entraide-detail-meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; font-size: .9rem; }
.meta-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.entraide-detail-content { color: var(--text-secondary); line-height: 1.9; font-size: .95rem; }
.entraide-detail-actions { display: flex; gap: .75rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.replies-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-top: 1.25rem; }
.replies-section h2 { font-size: 1.1rem; margin-bottom: 1.25rem; }
.replies-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.reply-item { display: flex; gap: .85rem; }
.reply-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.reply-body { flex: 1; background: var(--bg-secondary); border-radius: var(--radius-md); padding: .85rem 1rem; }
.reply-header { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; font-size: .85rem; }
.reply-time { color: var(--text-muted); font-size: .75rem; margin-left: auto; }
.reply-body p { font-size: .9rem; color: var(--text-secondary); }
.reply-form textarea { width: 100%; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-primary); border-radius: var(--radius-md); padding: .75rem; font-family: var(--font); font-size: .9rem; resize: vertical; margin-bottom: .75rem; }
.reply-form textarea:focus { outline: none; border-color: var(--accent-bright); }
.entraide-detail-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.sidebar-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.sidebar-card h3 { font-size: .95rem; margin-bottom: 1rem; color: var(--text-secondary); }
.sidebar-card dl { display: grid; gap: .3rem; }
.sidebar-card dt { font-size: .75rem; color: var(--text-muted); }
.sidebar-card dd { font-size: .9rem; margin-bottom: .4rem; }

/* --- Map --- */
.map-section { display: flex; flex-direction: column; }
.map-toolbar { background: var(--bg-secondary); border-bottom: 1px solid var(--border); padding: .75rem 0; }
.map-toolbar-inner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.map-title { font-size: 1.2rem; font-weight: 700; white-space: nowrap; }
.map-filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.map-filter-btn { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted); padding: .35rem .85rem; border-radius: 20px; font-size: .8rem; cursor: pointer; transition: all var(--transition); }
.map-filter-btn.active { background: var(--accent-glow); border-color: var(--accent-bright); color: var(--accent-bright); }
.map-legend { display: flex; gap: 1.5rem; padding: .75rem 1.5rem; background: var(--bg-secondary); border-top: 1px solid var(--border); flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--text-muted); }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-events    { background: #1565c0; }
.dot-resources { background: #1b5e20; }
.dot-entraide  { background: #b71c1c; }
.dot-members   { background: #4a148c; }
.map-popup { font-size: 13px; line-height: 1.5; }
.map-popup strong { display: block; margin-bottom: .2rem; }
.map-popup a { color: #1976d2; }
.leaflet-container { background: #0a1628; }

/* --- Events calendar --- */
.events-layout { display: grid; grid-template-columns: 1fr 280px; gap: 2rem; align-items: start; }
.calendar-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.calendar-nav h2 { font-size: 1.1rem; text-transform: capitalize; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-header { background: var(--bg-secondary); padding: .4rem; text-align: center; font-size: .75rem; color: var(--text-muted); border-radius: 4px; }
.cal-day { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .35rem .4rem; min-height: 64px; font-size: .8rem; transition: background var(--transition); }
.cal-empty { background: transparent; border-color: transparent; }
.cal-today { border-color: var(--accent-bright) !important; background: var(--accent-glow); }
.cal-has-event { background: rgba(21,101,192,.1); border-color: rgba(21,101,192,.3); }
.cal-num { display: block; font-weight: 600; margin-bottom: .2rem; color: var(--text-muted); }
.cal-event-dot { font-size: .68rem; background: var(--accent); color: #fff; border-radius: 3px; padding: .1rem .25rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event-dot.nat { background: var(--gold); color: var(--bg-primary); }
.cal-event-dot a { color: inherit; font-size: .68rem; }
.events-upcoming { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.events-upcoming h3 { margin-bottom: 1rem; font-size: 1rem; }
.upcoming-list { list-style: none; display: flex; flex-direction: column; gap: .75rem; }
.upcoming-item { display: flex; gap: .85rem; align-items: flex-start; font-size: .85rem; }
.upcoming-national { border-left: 3px solid var(--gold); padding-left: .75rem; }
.upcoming-date { text-align: center; background: var(--accent); color: #fff; padding: .3rem .5rem; border-radius: var(--radius-sm); min-width: 42px; line-height: 1.2; }
.upcoming-date span { display: block; }
.upcoming-date span:first-child { font-size: 1.1rem; font-weight: 800; }
.upcoming-date span:last-child  { font-size: .65rem; text-transform: uppercase; }
.upcoming-item a { color: var(--text-primary); font-size: .85rem; }
.upcoming-item small { display: block; color: var(--text-muted); font-size: .75rem; }
.remembrance-note { margin-top: 1.25rem; padding: .75rem; background: rgba(200,168,75,.08); border: 1px solid rgba(200,168,75,.2); border-radius: var(--radius-md); font-size: .8rem; color: var(--gold); text-align: center; }
.event-detail-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.event-national-banner { background: rgba(200,168,75,.15); color: var(--gold); padding: .5rem 1.5rem; font-size: .85rem; text-align: center; border-bottom: 1px solid rgba(200,168,75,.25); }
.event-detail-card h1 { font-size: 1.8rem; padding: 1.5rem 1.5rem .5rem; }
.event-detail-meta { display: flex; flex-wrap: wrap; gap: 1rem; padding: 0 1.5rem 1.25rem; color: var(--text-muted); font-size: .9rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; }
.event-detail-content { padding: 0 1.5rem 1.5rem; color: var(--text-secondary); line-height: 1.8; }

/* --- Resources --- */
.resources-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.resource-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; transition: all var(--transition); }
.resource-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-sm); }
.resource-category { font-size: .75rem; color: var(--accent-bright); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }
.resource-title { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; }
.resource-desc { font-size: .85rem; color: var(--text-muted); margin-bottom: .75rem; }
.resource-city { font-size: .8rem; color: var(--text-muted); margin-bottom: .75rem; }
.filters-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2rem; align-items: center; }

/* --- Badges --- */
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .55rem; border-radius: 12px; font-size: .72rem; font-weight: 600; }
.badge-verified { background: rgba(46,125,50,.2); color: #66bb6a; border: 1px solid rgba(76,175,80,.3); }
.badge-pending  { background: rgba(230,81,0,.15); color: #ffa726; border: 1px solid rgba(255,152,0,.3); }
.badge-info     { background: rgba(1,87,155,.2); color: var(--info-light); border: 1px solid rgba(1,87,155,.3); }
.badge-draft     { background: rgba(92,122,153,.15); color: var(--text-muted); }
.badge-published { background: rgba(46,125,50,.15); color: var(--success-light); }
.badge-member    { background: rgba(21,101,192,.15); color: var(--accent-bright); }
.badge-admin     { background: rgba(200,168,75,.15); color: var(--gold); }
.badge-open      { background: rgba(21,101,192,.15); color: var(--accent-bright); }
.badge-progress  { background: rgba(230,81,0,.15); color: var(--warning-light); }
.badge-resolved  { background: rgba(46,125,50,.15); color: var(--success-light); }
.badge-approved  { background: rgba(46,125,50,.2); color: var(--success-light); }
.badge-rejected  { background: rgba(183,28,28,.2); color: var(--danger-light); }
.badge-pending   { background: rgba(230,81,0,.15); color: var(--warning-light); }

/* Verify cards */
.verify-success-card { text-align: center; background: rgba(46,125,50,.1); border: 1px solid rgba(76,175,80,.3); border-radius: var(--radius-lg); padding: 3rem; }
.verify-badge { font-size: 3rem; display: block; color: var(--success-light); margin-bottom: .75rem; }
.verify-info-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1.5rem; }
.verify-info-card h3 { margin-bottom: .75rem; font-size: 1rem; }
.verify-info-card ul { list-style: disc; padding-left: 1.5rem; color: var(--text-secondary); font-size: .9rem; display: flex; flex-direction: column; gap: .3rem; }
.verify-admin-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1rem; }
.verify-admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: .5rem; }
.verify-notes { background: var(--bg-secondary); border-radius: var(--radius-md); padding: .85rem; margin-bottom: 1rem; font-size: .9rem; }
.verify-doc-preview { margin-bottom: 1rem; }
.verify-admin-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* --- Members grid --- */
.members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.member-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; text-align: center; transition: all var(--transition); color: var(--text-primary); }
.member-card:hover { border-color: var(--accent-bright); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.member-avatar { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; margin: 0 auto .75rem; border: 2px solid var(--border); }
.member-info { display: flex; flex-direction: column; gap: .2rem; }
.member-info strong { font-size: .95rem; }
.member-info span { font-size: .75rem; display: block; }

/* Article full */
.article-full { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.article-full-title { font-size: 2rem; padding: 2rem 2rem 1rem; line-height: 1.3; }
.article-full-meta { display: flex; align-items: center; gap: .75rem; padding: 0 2rem 1.25rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; font-size: .9rem; }
.article-full-img { max-height: 400px; overflow: hidden; }
.article-full-img img { width: 100%; max-height: 400px; object-fit: cover; }
.article-full-content { padding: 2rem; color: var(--text-secondary); line-height: 1.9; font-size: 1rem; }
.article-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.article-list-item { display: flex; align-items: center; justify-content: space-between; padding: .6rem .75rem; background: var(--bg-secondary); border-radius: var(--radius-md); font-size: .9rem; }
.article-list-actions { display: flex; gap: .4rem; }
.entraide-mini-list { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.entraide-mini-list li { display: flex; align-items: center; justify-content: space-between; font-size: .85rem; padding: .4rem 0; border-bottom: 1px solid var(--border); }

/* --- Pagination --- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }

/* --- Breadcrumb --- */
.breadcrumb { display: inline-flex; align-items: center; gap: .4rem; color: var(--text-muted); font-size: .85rem; margin-bottom: 1.5rem; }
.breadcrumb:hover { color: var(--accent-bright); }

/* --- Page header --- */
.page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.page-header h1, .page-title { font-size: 1.8rem; font-weight: 700; }

/* --- Empty state --- */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.empty-state p { font-size: 1rem; margin-bottom: 1rem; }

/* --- Text helpers --- */
.text-muted    { color: var(--text-muted); }
.text-center   { text-align: center; }
.text-sm       { font-size: .85rem; }
.text-accent   { color: var(--accent-bright); }

/* --- Modal --- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 999; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2rem; max-width: 600px; width: 100%; max-height: 80vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }

/* --- Footer --- */
.footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 3.5rem 0 0; margin-top: auto; }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; padding-bottom: 2.5rem; }
.footer-logo { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); margin-bottom: .75rem; }
.footer-col h4 { font-size: .9rem; color: var(--text-secondary); margin-bottom: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-col p { font-size: .85rem; color: var(--text-muted); line-height: 1.7; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.footer-col ul li a { font-size: .85rem; color: var(--text-muted); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--accent-bright); }
.footer-remembrance { margin-top: .75rem; font-size: .8rem; color: var(--gold); }
.footer-bottom { border-top: 1px solid var(--border); padding: 1rem 0; text-align: center; font-size: .8rem; color: var(--text-muted); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .profile-layout, .entraide-detail-layout, .events-layout, .messaging-layout { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; margin-left: auto; }
  .nav-menu { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-secondary); border-bottom: 1px solid var(--border); padding: 1rem; z-index: 100; gap: .25rem; }
  .nav-menu.open { display: flex; }
  .navbar { position: relative; }
  .form-row { grid-template-columns: 1fr; }
  .form-group-lg { grid-column: span 1; }
}
@media (max-width: 600px) {
  .hero-title { font-size: 2rem; }
  .hero-actions { flex-direction: column; }
  .cards-grid, .resources-grid, .entraide-grid { grid-template-columns: 1fr; }
  .members-grid { grid-template-columns: repeat(2, 1fr); }
}
