/* ADIS-HAÏTI — Espace Membre (dashboard/). Palette dédiée, identique à la carte "Paiement
   Membership" de adhesion.html et aux documents générés (badge/attestation) : marine #0D1B2A,
   or #C9A84C, bordeaux #7B1F2E, Cormorant Garamond (titres) + Raleway (texte) — volontairement
   distincte de la palette générale du site (--navy/--gold de style.css), déjà le cas pour la
   carte Membership. */

:root {
  --dnavy: #0D1B2A;
  --dnavy-deep: #08121C;
  --dgold: #C9A84C;
  --dbordeaux: #7B1F2E;
  --dbg: #F4F1EA;
  --dink: #1F2A37;
  --dbody: #4A5568;
  --dborder: #E4DFD3;
  --dserif: 'Cormorant Garamond', serif;
  --dsans: 'Raleway', sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--dsans); color: var(--dink); background: var(--dbg); -webkit-font-smoothing: antialiased; }
a { color: var(--dgold); }
[hidden] { display: none !important; }

/* -------------------- SHELL -------------------- */
.dash-shell { display: flex; min-height: 100vh; }

.dash-sidebar {
  width: 264px; flex-shrink: 0; background: var(--dnavy); color: #fff;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.dash-brand { display: flex; align-items: center; gap: 10px; padding: 22px 22px 18px; border-bottom: 1px solid rgba(201,168,76,0.2); }
.dash-brand img { width: 34px; height: 34px; border-radius: 50%; background: #fff; }
.dash-brand span { font-family: var(--dserif); font-weight: 700; font-size: 17px; color: var(--dgold); }

.dash-nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.dash-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px;
  color: #C9D4E0; text-decoration: none; font-size: 14px; font-weight: 500;
}
.dash-nav a .dash-nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.dash-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.dash-nav a.is-active { background: var(--dgold); color: var(--dnavy); font-weight: 700; }

.dash-sidebar-footer { padding: 16px 22px 22px; border-top: 1px solid rgba(201,168,76,0.2); }
.dash-user { font-size: 13px; color: #C9D4E0; margin-bottom: 10px; line-height: 1.5; }
.dash-user strong { color: #fff; display: block; font-size: 14px; }
.dash-logout { background: none; border: 1px solid rgba(255,255,255,0.3); color: #fff; padding: 8px 14px; border-radius: 6px; font-size: 12.5px; cursor: pointer; width: 100%; font-family: inherit; }
.dash-logout:hover { border-color: var(--dgold); color: var(--dgold); }

.dash-mobile-bar { display: none; }

.dash-main { flex: 1; min-width: 0; padding: 36px 40px 60px; max-width: 1100px; }

.dash-page-title { font-family: var(--dserif); font-size: 30px; color: var(--dnavy); margin: 0 0 6px; }
.dash-page-sub { color: var(--dbody); font-size: 14.5px; margin: 0 0 32px; }

/* -------------------- CARDS / WIDGETS -------------------- */
.dash-card { background: #fff; border: 1px solid var(--dborder); border-radius: 12px; padding: 26px; margin-bottom: 22px; }
.dash-card-title { font-family: var(--dserif); font-size: 19px; color: var(--dnavy); margin: 0 0 4px; }
.dash-card-sub { color: var(--dbody); font-size: 13.5px; margin: 0 0 18px; }

.dash-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 28px; }
.dash-widget { background: #fff; border: 1px solid var(--dborder); border-radius: 12px; padding: 20px 22px; }
.dash-widget-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dbody); margin-bottom: 8px; }
.dash-widget-value { font-family: var(--dserif); font-size: 26px; color: var(--dnavy); font-weight: 700; }
.dash-widget-detail { font-size: 13px; color: var(--dbody); margin-top: 4px; }
.dash-widget-cta { display: inline-block; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--dgold); text-decoration: none; }

.dash-welcome { background: linear-gradient(135deg, var(--dnavy), var(--dnavy-deep)); color: #fff; border-radius: 14px; padding: 32px 34px; margin-bottom: 28px; }
.dash-welcome h1 { font-family: var(--dserif); font-size: 26px; margin: 0 0 6px; }
.dash-welcome p { color: #C9D4E0; font-size: 14px; margin: 0; }

/* -------------------- FORMS / BUTTONS (réutilisés sur toutes les pages) -------------------- */
.dash-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.dash-field label { font-size: 13px; font-weight: 600; color: var(--dnavy); }
.dash-input, .dash-select, textarea.dash-input {
  width: 100%; box-sizing: border-box; padding: 11px 14px; border: 1px solid var(--dborder);
  border-radius: 8px; font-size: 14px; color: var(--dink); font-family: inherit;
}
.dash-btn { background: var(--dgold); color: var(--dnavy); border: none; padding: 12px 22px; border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; }
.dash-btn:hover { background: #b8933f; }
.dash-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.dash-btn-outline { background: none; color: var(--dnavy); border: 1.5px solid var(--dnavy); padding: 10px 20px; border-radius: 8px; font-weight: 700; font-size: 13.5px; cursor: pointer; font-family: inherit; }
.dash-btn-sm { padding: 7px 14px; font-size: 12.5px; border-radius: 6px; }

.dash-error { background: #FDECEC; color: #8A1F1F; border: 1px solid #F3B4B4; padding: 12px 16px; border-radius: 8px; font-size: 13.5px; margin: 0 0 16px; }
.dash-success { background: #EAF3E4; color: #2F6B2F; border: 1px solid #BFE0AE; padding: 12px 16px; border-radius: 8px; font-size: 13.5px; margin: 0 0 16px; }
.dash-empty { color: var(--dbody); font-size: 14px; padding: 30px 0; text-align: center; }
.dash-loading { color: var(--dbody); font-size: 14px; padding: 20px 0; }

/* -------------------- LISTES / TABLEAUX -------------------- */
.dash-list-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--dborder); flex-wrap: wrap; }
.dash-list-item:last-child { border-bottom: none; }
.dash-list-title { font-weight: 700; color: var(--dnavy); font-size: 14.5px; }
.dash-list-meta { font-size: 12.5px; color: var(--dbody); margin-top: 3px; }
.dash-pill { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 4px 10px; border-radius: 20px; }
.dash-pill-gold { background: #F1E9D2; color: #8A6D1F; }
.dash-pill-green { background: #EAF3E4; color: #2F6B2F; }
.dash-pill-gray { background: #EEF1F4; color: #5A6472; }
.dash-pill-red { background: #FBEAEA; color: var(--dbordeaux); }

/* -------------------- GALERIE D'IMAGES (formations/événements/documents/actualités/bénévolat) -------------------- */
.dash-gallery { display: flex; gap: 8px; overflow-x: auto; margin: 12px 0; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.dash-gallery img { width: 150px; height: 104px; object-fit: cover; border-radius: 8px; flex-shrink: 0; cursor: pointer; border: 1px solid var(--dborder); }
.dash-item-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; font-size: 12.5px; color: var(--dbody); }
.dash-item-facts strong { color: var(--dnavy); font-weight: 600; }
.dash-item-link { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--dgold); text-decoration: none; }

/* -------------------- ONGLETS / ACCORDÉONS (L'Écosystème ADIS-HAÏTI) -------------------- */
.dash-tabs { display: flex; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; border-bottom: 1px solid var(--dborder); padding-bottom: 14px; }
.dash-subtab { background: none; border: 1px solid var(--dborder); color: var(--dnavy); padding: 10px 20px; border-radius: 24px; font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.dash-subtab.is-active { background: var(--dnavy); color: var(--dgold); border-color: var(--dnavy); }
.dash-subtab:hover:not(.is-active) { border-color: var(--dgold); }

.dash-section-intro { color: var(--dbody); font-size: 14.5px; line-height: 1.6; margin: 0 0 22px; }

.dash-accordion-item { background: #fff; border: 1px solid var(--dborder); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.dash-accordion-header { display: flex; align-items: center; gap: 16px; padding: 18px 22px; cursor: pointer; background: none; border: none; width: 100%; text-align: left; font-family: inherit; }
.dash-accordion-icon { font-size: 24px; flex-shrink: 0; width: 32px; text-align: center; }
.dash-accordion-title-wrap { flex: 1; }
.dash-accordion-title { font-family: var(--dserif); font-size: 17px; color: var(--dnavy); font-weight: 700; }
.dash-accordion-subtitle { font-size: 12.5px; color: var(--dbody); margin-top: 2px; }
.dash-accordion-chevron { color: var(--dgold); font-size: 13px; flex-shrink: 0; transition: transform 0.2s ease; }
.dash-accordion-item.is-open .dash-accordion-chevron { transform: rotate(180deg); }
.dash-accordion-body { padding: 0 22px 20px 68px; display: none; }
.dash-accordion-item.is-open .dash-accordion-body { display: block; }
.dash-accordion-body ul { margin: 0; padding-left: 18px; }
.dash-accordion-body li { margin-bottom: 8px; line-height: 1.5; font-size: 14px; color: var(--dink); }
.dash-accordion-body p { margin: 0; line-height: 1.6; font-size: 14px; color: var(--dink); }

/* -------------------- PAGES PUBLIQUES (login / activation / reset) -------------------- */
.dash-auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--dnavy); padding: 24px; }
.dash-auth-card { background: #fff; border-radius: 14px; padding: 40px 36px; max-width: 420px; width: 100%; }
.dash-auth-card h1 { font-family: var(--dserif); font-size: 24px; color: var(--dnavy); margin: 0 0 6px; }
.dash-auth-card p.sub { color: var(--dbody); font-size: 13.5px; margin: 0 0 24px; }
.dash-auth-brand { text-align: center; margin-bottom: 22px; }
.dash-auth-brand img { width: 48px; height: 48px; border-radius: 50%; }
.dash-auth-link { text-align: center; margin-top: 16px; font-size: 13px; color: var(--dbody); }

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 900px) {
  .dash-shell { flex-direction: column; }
  .dash-sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: 4px 0 24px rgba(0,0,0,0.25); }
  .dash-sidebar.is-open { transform: translateX(0); }
  .dash-mobile-bar {
    display: flex; align-items: center; justify-content: space-between; background: var(--dnavy);
    color: #fff; padding: 14px 18px; position: sticky; top: 0; z-index: 50; width: 100%;
  }
  .dash-mobile-bar span { font-family: var(--dserif); color: var(--dgold); font-weight: 700; font-size: 16px; }
  .dash-mobile-toggle { background: none; border: 1px solid rgba(255,255,255,0.4); color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 16px; cursor: pointer; }
  .dash-main { padding: 24px 18px 48px; max-width: 100%; }
  .dash-widgets { grid-template-columns: 1fr; }
  .dash-list-item { flex-direction: column; align-items: flex-start; }
}
