@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ================================================================
   Astero Intranet — Design System
   ================================================================ */
:root {
  --navy:        #16163f;
  --navy-light:  #1e1e52;
  --navy-dark:   #0e0e2a;
  --gold:        #d3b574;
  --gold-light:  #e8d09b;
  --gold-pale:   #faf5e9;
  --white:       #ffffff;
  --bg:          #f4f5f8;
  --bg-card:     #ffffff;
  --border:      #e8eaef;
  --text:        #1a1a2e;
  --text-muted:  #6b7280;
  --text-light:  #9ca3af;
  --success:     #0a7a45;
  --success-bg:  #e8f8f0;
  --error:       #c0392b;
  --error-bg:    #fdf0ef;
  --info:        #1e4fa8;
  --info-bg:     #eef3ff;

  --sidebar-w:   260px;
  --topbar-h:    64px;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:   0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:   0 12px 40px rgba(22,22,63,.14);
  --transition:  .18s ease;
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ---- Layout ------------------------------------------------------- */
.ast-body { display: flex; min-height: 100vh; }

.ast-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ast-content {
  flex: 1;
  padding: 32px;
  margin-top: var(--topbar-h);
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.ast-sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}

/* Logo */
.ast-sidebar-logo {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}

.ast-sidebar-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.3px;
}

.ast-sidebar-logo img {
  height: 32px;
  width: auto;
  filter: brightness(10);
  object-fit: contain;
}

.ast-sidebar-logo-name { line-height: 1.1; }
.ast-sidebar-logo-sub  { font-size: 10px; font-weight: 400; opacity: .5; letter-spacing: .5px; text-transform: uppercase; }

/* Nav section label */
.ast-sidebar-label {
  padding: 16px 20px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.3);
}

/* Nav link */
.ast-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,.6);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 2px solid transparent;
}

.ast-nav-link:hover { background: rgba(255,255,255,.05); color: var(--white); }
.ast-nav-link.active { background: rgba(211,181,116,.12); color: var(--gold); border-left-color: var(--gold); }
.ast-nav-icon { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }

/* ---- Sidebar catégories accordéon -------------------------------- */
.ast-sidebar-cats { flex: 1; }
.ast-sidebar-cat { border-bottom: 1px solid rgba(255,255,255,.05); }

.ast-cat-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  background: none;
  border: none;
  color: rgba(255,255,255,.55);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: all var(--transition);
}

.ast-cat-toggle:hover { background: rgba(255,255,255,.04); color: rgba(255,255,255,.85); }
.ast-cat-toggle[aria-expanded="true"] { background: rgba(211,181,116,.08); color: var(--gold); }

.ast-cat-icon { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; }
.ast-cat-label { flex: 1; }

.ast-cat-chevron {
  font-size: 16px;
  opacity: .4;
  transition: transform var(--transition), opacity var(--transition);
  font-style: normal;
}

.ast-cat-toggle[aria-expanded="true"] .ast-cat-chevron {
  transform: rotate(90deg);
  opacity: 1;
}

.ast-token-pill {
  background: var(--gold);
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}

.ast-cat-items {
  background: rgba(0,0,0,.18);
  padding: 3px 0;
}

.ast-cat-items[hidden] { display: none; }

.ast-cat-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 20px 8px 30px;
  color: rgba(255,255,255,.45);
  font-size: 13px;
  font-weight: 400;
  transition: all var(--transition);
  border-left: 2px solid transparent;
}

.ast-cat-item:hover { background: rgba(255,255,255,.04); color: rgba(255,255,255,.8); border-left-color: rgba(211,181,116,.4); }

.ast-cat-item img {
  height: 14px;
  width: auto;
  object-fit: contain;
  filter: brightness(10);
  opacity: .6;
  transition: opacity var(--transition);
}

.ast-cat-item:hover img { opacity: .9; }
.ast-cat-item-icon { font-size: 14px; }

.ast-tokens-mini {
  padding: 10px 20px 10px 30px;
  font-size: 12px;
  color: rgba(255,255,255,.35);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,.05);
  margin-top: 3px;
}

.ast-tokens-mini strong { color: var(--gold); }

/* Sidebar user card */
.ast-sidebar-user {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ast-sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(211,181,116,.2);
  border: 1.5px solid rgba(211,181,116,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.ast-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.ast-avatar-initials { font-size: 12px; font-weight: 700; color: var(--gold); }

.ast-sidebar-user-info { flex: 1; min-width: 0; }
.ast-sidebar-user-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ast-sidebar-user-role { font-size: 11px; color: rgba(255,255,255,.35); }

.ast-sidebar-logout { color: rgba(255,255,255,.3); font-size: 16px; flex-shrink: 0; transition: color var(--transition); padding: 4px; }
.ast-sidebar-logout:hover { color: var(--gold); }

/* ================================================================
   TOPBAR
   ================================================================ */
.ast-topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: rgba(244,245,248,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  z-index: 100;
  gap: 16px;
}

.ast-topbar-title { font-size: 17px; font-weight: 700; color: var(--navy); flex: 1; }
.ast-topbar-date  { font-size: 13px; color: var(--text-muted); }

.ast-menu-toggle { display: none; background: none; border: none; font-size: 22px; color: var(--navy); }

/* ================================================================
   BUTTONS
   ================================================================ */
.ast-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.ast-btn-primary { background: var(--navy); color: var(--white); }
.ast-btn-primary:hover { background: var(--navy-light); }

.ast-btn-gold { background: var(--gold); color: var(--navy); }
.ast-btn-gold:hover { background: var(--gold-light); }

.ast-btn-ghost { background: transparent; border-color: var(--border); color: var(--text-muted); }
.ast-btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

.ast-btn-danger { background: var(--error-bg); color: var(--error); border-color: rgba(192,57,43,.2); }
.ast-btn-danger:hover { background: var(--error); color: var(--white); }

.ast-btn-sm { padding: 6px 12px; font-size: 12px; }
.ast-btn-lg { padding: 13px 28px; font-size: 15px; }

/* ================================================================
   CARDS
   ================================================================ */
.ast-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.ast-card-header {
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ast-card-title { font-size: 15px; font-weight: 700; color: var(--navy); }
.ast-card-body  { padding: 20px 24px; }

/* ================================================================
   PAGE HEADER
   ================================================================ */
.ast-page-header { margin-bottom: 28px; }
.ast-page-title  { font-size: 26px; font-weight: 700; color: var(--navy); letter-spacing: -.5px; }
.ast-page-sub    { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* ================================================================
   LOGIN PAGE
   ================================================================ */
.ast-login-body { background: var(--navy); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }

.ast-login-box {
  background: var(--white);
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 32px 80px rgba(0,0,0,.3);
}

.ast-login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.ast-login-logo img { height: 40px; width: auto; object-fit: contain; }

.ast-login-logo-text { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -.5px; }
.ast-login-logo-text span { color: var(--gold); }

.ast-login-title { font-size: 22px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.ast-login-sub   { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }

.ast-field { margin-bottom: 16px; }
.ast-field label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }

.ast-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.ast-input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(22,22,63,.08); }
.ast-input::placeholder { color: var(--text-light); }

.ast-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }

textarea.ast-input { resize: vertical; min-height: 90px; }

.ast-alert {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 16px;
}

.ast-alert-error   { background: var(--error-bg);   color: var(--error);   }
.ast-alert-success { background: var(--success-bg); color: var(--success); }
.ast-alert-info    { background: var(--info-bg);    color: var(--info);    }

.ast-login-divider { text-align: center; font-size: 12px; color: var(--text-light); margin: 18px 0; position: relative; }
.ast-login-divider::before, .ast-login-divider::after { content:''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border); }
.ast-login-divider::before { left: 0; }
.ast-login-divider::after  { right: 0; }

/* ================================================================
   DASHBOARD — HOME
   ================================================================ */
.ast-home-welcome {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.ast-home-welcome::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(211,181,116,.15) 0%, transparent 70%);
  border-radius: 50%;
}

.ast-home-welcome::after {
  content: '';
  position: absolute;
  bottom: -60px; left: 60px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(211,181,116,.08) 0%, transparent 70%);
  border-radius: 50%;
}

.ast-welcome-greeting { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.5); margin-bottom: 4px; }
.ast-welcome-name     { font-size: 26px; font-weight: 800; color: var(--white); letter-spacing: -.5px; }
.ast-welcome-tagline  { font-size: 14px; color: rgba(255,255,255,.5); margin-top: 4px; }

.ast-welcome-date-block { text-align: right; flex-shrink: 0; }
.ast-welcome-date       { font-size: 13px; color: rgba(255,255,255,.45); }
.ast-welcome-time       { font-size: 30px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.ast-welcome-day        { font-size: 13px; color: rgba(255,255,255,.55); margin-top: 2px; }

/* Stats row */
.ast-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }

.ast-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.ast-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.ast-stat-icon-navy { background: rgba(22,22,63,.08); }
.ast-stat-icon-gold { background: var(--gold-pale); }
.ast-stat-icon-blue { background: var(--info-bg); }

.ast-stat-value { font-size: 26px; font-weight: 800; color: var(--navy); letter-spacing: -.5px; }
.ast-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

/* Home grid */
.ast-home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Links rapides */
.ast-quick-links-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.ast-quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
  background: var(--bg-card);
}

.ast-quick-link:hover { border-color: var(--gold); background: var(--gold-pale); color: var(--navy); }
.ast-quick-link img { height: 18px; width: auto; object-fit: contain; flex-shrink: 0; }
.ast-quick-link-icon { font-size: 18px; }

/* News */
.ast-news-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

.ast-news-item:last-child { border-bottom: none; padding-bottom: 0; }

.ast-news-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  margin-top: 6px;
}

.ast-news-title   { font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 3px; }
.ast-news-excerpt { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.ast-news-date    { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* Events mini */
.ast-event-mini {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.ast-event-mini:last-child { border-bottom: none; }

.ast-event-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gold-pale);
  border: 1px solid rgba(211,181,116,.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  line-height: 1.2;
}

.ast-event-badge.today { background: var(--navy); color: var(--gold); }
.ast-event-day  { font-size: 14px; font-weight: 800; }

.ast-event-mini-info { flex: 1; min-width: 0; }
.ast-event-mini-title { font-size: 13.5px; font-weight: 600; color: var(--navy); }
.ast-event-mini-time  { font-size: 12px; color: var(--text-muted); }

/* ================================================================
   ANNUAIRE
   ================================================================ */
.ast-annuaire-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ast-search-wrap { position: relative; flex: 1; min-width: 220px; }
.ast-search-wrap input { padding-left: 38px; }
.ast-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 16px; }

.ast-annuaire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.ast-collab-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.ast-collab-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.ast-collab-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(22,22,63,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--border);
}

.ast-collab-photo img { width: 100%; height: 100%; object-fit: cover; }
.ast-collab-initials { font-size: 22px; font-weight: 700; color: var(--navy); }

.ast-collab-name { font-size: 15px; font-weight: 700; color: var(--navy); }
.ast-statut-badge { background: var(--navy); color: var(--gold); font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.ast-collab-info { font-size: 12.5px; color: var(--text-muted); display: flex; flex-direction: column; gap: 2px; }
.ast-collab-info a { color: var(--navy); }
.ast-collab-info a:hover { text-decoration: underline; }

/* ================================================================
   ÉVÉNEMENTS
   ================================================================ */
.ast-events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

.ast-event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.ast-event-card:hover { box-shadow: var(--shadow-md); }
.ast-event-card.today { border-left-color: var(--navy); }

.ast-event-card-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }

.ast-event-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.ast-event-card.today .ast-event-icon-wrap { background: rgba(22,22,63,.08); }

.ast-event-card-title { font-size: 17px; font-weight: 700; color: var(--navy); }
.ast-event-card-day   { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.ast-event-today-tag  { display: inline-block; background: var(--navy); color: var(--gold); font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-top: 4px; }

.ast-event-card-time {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ast-event-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ================================================================
   GUIDES
   ================================================================ */
.ast-guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

.ast-guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.ast-guide-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.ast-guide-thumb {
  height: 150px;
  background: linear-gradient(135deg, var(--gold-pale), #f0ede6);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ast-guide-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ast-guide-thumb-icon { font-size: 50px; opacity: .35; }

.ast-guide-body { padding: 18px; }
.ast-guide-title { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.ast-guide-desc  { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.ast-guide-actions { display: flex; gap: 8px; }
.ast-guide-actions .ast-btn { flex: 1; justify-content: center; font-size: 12.5px; padding: 8px 10px; }

/* Modal */
.ast-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.ast-modal-overlay.open { opacity: 1; pointer-events: all; }

.ast-modal {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 500px;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(.97);
  transition: transform .22s ease;
}

.ast-modal-overlay.open .ast-modal { transform: none; }

.ast-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg);
  border: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 16px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.ast-modal-close:hover { background: var(--border); color: var(--navy); }

.ast-modal-header { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.ast-modal-header-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--gold-pale); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.ast-modal-title { font-size: 18px; font-weight: 700; color: var(--navy); }
.ast-modal-guide-name { font-size: 13px; color: var(--gold); font-weight: 600; margin-top: 2px; }

.ast-modal-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 16px 0;
}

.ast-modal-preview strong { color: var(--navy); }
.ast-modal-preview-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; color: var(--text-light); margin-bottom: 8px; }

.ast-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.ast-feedback {
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 500;
  margin-top: 14px;
  display: none;
}

.ast-feedback.success { background: var(--success-bg); color: var(--success); display: block; }
.ast-feedback.error   { background: var(--error-bg);   color: var(--error);   display: block; }

/* ================================================================
   RESSOURCES & PRINT
   ================================================================ */
.ast-ressources-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.ast-ressources-empty-icon { font-size: 52px; margin-bottom: 16px; opacity: .4; }
.ast-ressources-empty-title { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }

.ast-token-balance {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.ast-token-balance-icon { font-size: 32px; }
.ast-token-balance-value { font-size: 36px; font-weight: 800; color: var(--gold); }
.ast-token-balance-label { font-size: 13px; color: rgba(255,255,255,.55); margin-top: 2px; }

/* ================================================================
   ADMIN
   ================================================================ */
.ast-admin-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
}

.ast-admin-nav a {
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}

.ast-admin-nav a:hover { background: var(--bg); color: var(--navy); }
.ast-admin-nav a.active { background: var(--navy); color: var(--white); }

.ast-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ast-table th { padding: 11px 14px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); border-bottom: 2px solid var(--border); }
.ast-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.ast-table tr:last-child td { border-bottom: none; }
.ast-table tr:hover td { background: var(--bg); }

.ast-badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.ast-badge-manager { background: rgba(22,22,63,.1); color: var(--navy); }
.ast-badge-collab  { background: rgba(211,181,116,.2); color: #7a6020; }

.ast-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ast-form-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.ast-form-section-title { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

/* ================================================================
   UTILITIES & MISC
   ================================================================ */
.ast-empty { color: var(--text-muted); font-style: italic; font-size: 14px; padding: 20px; text-align: center; }
.ast-divider { height: 1px; background: var(--border); margin: 20px 0; }
.text-muted { color: var(--text-muted); }
.text-gold   { color: var(--gold); }
.text-navy   { color: var(--navy); }
.font-bold   { font-weight: 700; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
  .ast-home-grid   { grid-template-columns: 1fr; }
  .ast-stats-row   { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .ast-sidebar {
    transform: translateX(-260px);
    width: 260px;
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    z-index: 300;
  }

  .ast-sidebar.open { transform: none; }

  .ast-main { margin-left: 0; }

  .ast-topbar {
    left: 0;
    padding: 0 16px;
  }

  .ast-menu-toggle { display: flex; }
  .ast-content { padding: 20px 16px; }
  .ast-stats-row { grid-template-columns: 1fr; }
  .ast-annuaire-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  .ast-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 299;
    display: none;
  }

  .ast-overlay.open { display: block; }
}

/* ================================================================
   RESPONSIVE — renforcements mobile
   ================================================================ */

/* Topbar mobile : menu toggle visible, date masquée */
@media (max-width: 768px) {
  .ast-topbar-date { display: none; }

  /* Home welcome : empilé verticalement */
  .ast-home-welcome {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 22px 20px;
  }
  .ast-welcome-date-block { text-align: left; }
  .ast-welcome-time { font-size: 24px; }
  .ast-welcome-name { font-size: 22px; }

  /* Liens rapides : 1 colonne sur très petit */
  .ast-quick-links-grid { grid-template-columns: 1fr; }

  /* Guides : 1 colonne */
  .ast-guides-grid { grid-template-columns: 1fr; }

  /* Events : 1 colonne */
  .ast-events-grid { grid-template-columns: 1fr; }

  /* Annuaire : 2 colonnes sur mobile */
  .ast-annuaire-grid { grid-template-columns: repeat(2, 1fr); }

  /* Admin form row : 1 colonne */
  .ast-form-row { grid-template-columns: 1fr; }

  /* Admin stats row : 2 colonnes */
  .ast-stats-row { grid-template-columns: repeat(2, 1fr) !important; }

  /* Modal : plein écran bas sur mobile */
  .ast-modal-overlay { align-items: flex-end; padding: 0; }
  .ast-modal {
    border-radius: 20px 20px 0 0;
    max-width: 100%;
    padding: 28px 20px 32px;
  }

  /* Tables admin : scroll horizontal */
  .ast-card { overflow-x: auto; }

  /* Admin nav : scroll horizontal */
  .ast-admin-nav { overflow-x: auto; flex-wrap: nowrap; }
  .ast-admin-nav a { white-space: nowrap; }

  /* Page header */
  .ast-page-header { flex-direction: column !important; align-items: flex-start !important; }
  .ast-page-title { font-size: 22px; }
}

@media (max-width: 420px) {
  .ast-annuaire-grid { grid-template-columns: 1fr; }
  .ast-stats-row { grid-template-columns: 1fr !important; }
  .ast-content { padding: 16px 12px; }
}

/* Catégories sidebar en mode lien-page (Formation, Formulaires) */
a.ast-cat-toggle {
  display: flex;
  align-items: center;
}

a.ast-cat-page-active {
  background: rgba(211,181,116,.12) !important;
  color: var(--gold) !important;
  border-left: 2px solid var(--gold);
}
