/* === Hero === */
.hero { padding: 10rem 0 6rem; position: relative; overflow: hidden; background: linear-gradient(160deg, var(--cream) 0%, var(--cream-dark) 50%, var(--cap-red-light) 100%); }
.hero::before { content: ''; position: absolute; top: -200px; right: -200px; width: 600px; height: 600px; background: radial-gradient(circle, rgba(196,59,46,0.08) 0%, transparent 70%); border-radius: 50%; }
.hero__inner { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; position: relative; z-index: 1; }
.hero__badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 1rem; background: var(--white); border-radius: 100px; font-size: 0.8rem; font-weight: 600; color: var(--jura-blue); box-shadow: var(--shadow-sm); margin-bottom: 1.5rem; border: 1px solid var(--jura-blue-light); animation: fadeSlideDown 0.6s ease both; }
.hero__badge-dot { width: 6px; height: 6px; background: var(--cap-red); border-radius: 50%; animation: pulse 2s infinite; }
.hero__title { font-family: var(--font-display); font-size: 3.75rem; line-height: 1.1; margin-bottom: 1.5rem; animation: fadeSlideUp 0.7s ease 0.1s both; }
.hero__title em { color: var(--cap-red); font-style: italic; }
.hero__subtitle { font-size: 1.15rem; color: var(--ink-light); max-width: 480px; margin-bottom: 2.5rem; line-height: 1.7; animation: fadeSlideUp 0.7s ease 0.2s both; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; animation: fadeSlideUp 0.7s ease 0.3s both; }
.hero__stats { display: flex; gap: 2.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(0,0,0,0.08); animation: fadeSlideUp 0.7s ease 0.4s both; }
.hero__stat-number { font-family: var(--font-display); font-size: 2.25rem; color: var(--cap-red); }
.hero__stat-label { font-size: 0.8rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.25rem; }
.hero__visual { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); overflow: hidden; aspect-ratio: 4/3; animation: scaleIn 0.8s ease 0.3s both; }
.hero__map { width: 100%; height: 100%; }
@media (max-width: 900px) { .hero { padding: 6rem 0 3rem; } .hero__inner { grid-template-columns: 1fr; gap: 2rem; } .hero__title { font-size: 2.5rem; } .hero__visual { max-height: 300px; } .hero__stats { gap: 1.5rem; } .hero__stat-number { font-size: 1.75rem; } }
@media (max-width: 640px) { .hero__title { font-size: 2rem; } .hero__subtitle { font-size: 1rem; } .hero__stats { flex-wrap: wrap; gap: 1rem; } }

/* === Members directory === */
.members__layout { display: grid; grid-template-columns: 380px 1fr; gap: 1.5rem; height: 600px; }
.members__sidebar { display: flex; flex-direction: column; overflow: hidden; background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.members__search { padding: 1rem; border-bottom: 1px solid rgba(0,0,0,0.06); }
.members__search-input { width: 100%; padding: 0.7rem 1rem 0.7rem 2.5rem; border: 1.5px solid rgba(0,0,0,0.1); border-radius: var(--radius-sm); font-size: 0.9rem; font-family: var(--font-body); background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239E9E9E' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") 0.75rem center no-repeat; transition: var(--transition); }
.members__search-input:focus { outline: none; border-color: var(--cap-red); background-color: var(--white); }
.members__filters { padding: 0.75rem 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; border-bottom: 1px solid rgba(0,0,0,0.06); }
.members__list { flex: 1; overflow-y: auto; padding: 0.5rem; }
.members__list::-webkit-scrollbar { width: 4px; }
.members__list::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }
.member-card { display: flex; gap: 0.75rem; padding: 0.85rem; border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); border: 1px solid transparent; }
.member-card:hover { background: var(--cream); border-color: rgba(0,0,0,0.06); }
.member-card__avatar { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--cream-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; color: var(--cap-red); flex-shrink: 0; }
.member-card__name { font-weight: 600; font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-card__category { font-size: 0.75rem; color: var(--ink-muted); margin-top: 0.1rem; }
.members__map-wrap { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md); position: relative; }
.members__map { width: 100%; height: 100%; }
.members__count { position: absolute; bottom: 1rem; left: 1rem; z-index: 500; background: var(--white); padding: 0.5rem 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); font-size: 0.8rem; font-weight: 600; }
.members__count span { color: var(--cap-red); }
/* === Mobile members map — full-viewport "app" mode === */
/* Strategy: on mobile the members page becomes an app-like view that fills the
   viewport below the fixed nav. The map is the whole background, the list lives
   in a bottom sheet always anchored at the viewport bottom. No section header,
   no container padding — zero wasted space, no overflow. */
@media (max-width: 900px) {
  /* Kill all the layout chrome that eats vertical space on mobile */
  #page-membres .section {
    padding: 72px 0 0 !important;    /* Just clear the fixed 72px nav */
  }
  #page-membres .section > .container {
    padding: 0;
    max-width: none;
  }
  #page-membres .section__header { display: none; }
  /* Feedback disclaimer hidden on mobile — the "Signalez-le" link exists inside
     each member's modal, so users still have a reporting path. */
  #page-membres .section > .container > p:last-child { display: none; }

  /* Layout fills the viewport below the nav — no scroll, no overflow.
     100dvh accounts for iOS Safari's collapsing URL bar; vh is the fallback. */
  .members__layout {
    display: block;
    position: relative;
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    min-height: 480px;
    max-height: none;
    margin: 0;
    gap: 0;
    overflow: hidden;
  }
  .members__map-wrap {
    position: absolute;
    inset: 0;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    border-radius: 0;                /* Flush with viewport edges — feels native */
    box-shadow: none;
  }

  /* Floating count pill (top-right) — replaces the hidden section header info */
  .members__count {
    display: block;
    top: 12px;
    right: 12px;
    bottom: auto;
    left: auto;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 100px;
  }
  /* Legend overlay removed on mobile — colored pins tell the story */
  .members__legend { display: none !important; }

  /* === Bottom sheet === */
  .members__sidebar {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 600;
    /* Leave 60px at top so Leaflet zoom buttons + count pill stay reachable */
    max-height: calc(100% - 60px);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, .18);
    transition: height .28s cubic-bezier(.33, 1, .68, 1);
    will-change: height;
    /* Default state = mid */
    height: 48%;
  }
  /* Snap states (toggled by JS via [data-sheet-state]) */
  .members__sidebar[data-sheet-state="peek"] { height: 140px; }
  .members__sidebar[data-sheet-state="mid"]  { height: 48%; }
  .members__sidebar[data-sheet-state="full"] { height: calc(100% - 60px); }
  /* Suspend transition during drag for 1:1 touch feedback */
  .members__sidebar.is-dragging { transition: none; }

  /* Horizontal-scrolling filter row */
  .members__filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    padding: 0.55rem 1rem;
    border-bottom: none;
  }
  .members__filters::-webkit-scrollbar { display: none; }
  .members__filters .filter-chip {
    flex-shrink: 0;
    padding: 0.48rem 0.9rem;
    font-size: 0.82rem;
  }

  /* Compact search — no bottom border, tight padding */
  .members__search {
    padding: 0.55rem 1rem 0.4rem;
    border-bottom: none;
  }
  .members__search-input {
    padding: 0.6rem 1rem 0.6rem 2.4rem;
    font-size: 0.9rem;
  }

  /* Compact "Ouvert maintenant" row — no border, same horizontal alignment */
  .members__toggle-row {
    margin: 0 !important;
    padding: 0 1rem 0.5rem !important;
    border-top: none !important;
  }

  /* List scrolls internally, fills remaining sheet height */
  .members__list {
    flex: 1;
    max-height: none;
    padding: 0.25rem 0.5rem 1.25rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .member-card { padding: 0.85rem 0.75rem; }
}

/* Desktop: hide the mobile-only drag handle entirely */
.members__sidebar-handle { display: none; }

/* === Newsletter === */
.newsletter { background: var(--jura-blue); color: var(--white); padding: 4rem 0; position: relative; overflow: hidden; }
.newsletter::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.newsletter__inner { display: flex; align-items: center; justify-content: space-between; gap: 3rem; position: relative; z-index: 1; }
.newsletter__title { font-family: var(--font-display); font-size: 1.75rem; }
.newsletter__subtitle { opacity: 0.7; margin-top: 0.5rem; font-size: 0.95rem; }
.newsletter__form { display: flex; gap: 0.5rem; }
.newsletter__input { padding: 0.75rem 1.25rem; border: 2px solid rgba(255,255,255,0.2); border-radius: var(--radius-sm); background: rgba(255,255,255,0.1); color: var(--white); font-family: var(--font-body); font-size: 0.9rem; width: 300px; }
.newsletter__input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter__input:focus { outline: none; border-color: rgba(255,255,255,0.5); }
.newsletter__btn { padding: 0.75rem 1.5rem; background: var(--white); color: var(--jura-blue); border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem; }
@media (max-width: 768px) { .newsletter__inner { flex-direction: column; text-align: center; } .newsletter__form { flex-direction: column; width: 100%; } .newsletter__input { width: 100%; } }

/* === Footer === */
.footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 4rem 0 2rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer__brand { font-family: var(--font-display); font-size: 1.5rem; color: var(--white); margin-bottom: 1rem; }
.footer__brand-desc { font-size: 0.875rem; line-height: 1.7; max-width: 280px; }
.footer__title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--white); margin-bottom: 1rem; font-weight: 600; }
.footer__links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__link { font-size: 0.875rem; transition: var(--transition); }
.footer__link:hover { color: var(--white); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; }
@media (max-width: 768px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }

/* === Admin dashboard === */
.admin__top { background: var(--white); border-bottom: 1px solid rgba(0,0,0,0.08); padding: 1.25rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.admin__top-title { font-family: var(--font-display); font-size: 1.3rem; }
.admin__top-user { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; }
.admin__top-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--cap-red); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.75rem; }
.admin__layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 68px); }
.admin__sidebar { background: var(--white); border-right: 1px solid rgba(0,0,0,0.06); padding: 1.5rem 0; }
.admin__nav-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1.5rem; font-size: 0.875rem; color: var(--ink-light); transition: var(--transition); cursor: pointer; }
.admin__nav-item:hover { background: var(--cream); color: var(--ink); }
.admin__nav-item.active { background: var(--cap-red-light); color: var(--cap-red); border-right: 3px solid var(--cap-red); font-weight: 600; }
.admin__nav-section { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-muted); padding: 1.5rem 1.5rem 0.5rem; font-weight: 700; }
.admin__content { padding: 2rem; background: var(--cream-dark); }
.admin__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.admin__stat-card { background: var(--white); border-radius: var(--radius-md); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.admin__stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-muted); font-weight: 600; }
.admin__stat-value { font-family: var(--font-display); font-size: 2rem; color: var(--ink); margin-top: 0.25rem; }
.admin__stat-change { font-size: 0.75rem; margin-top: 0.25rem; }
.admin__stat-change--up { color: var(--green); }

/* Dashboard "à traiter" cards — clickable, badge-style number on the right */
.admin__action-card { background: var(--white); border-radius: var(--radius-md); padding: 1rem 1.25rem; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: .85rem; cursor: pointer; border: 1px solid transparent; transition: border-color .15s, transform .1s; text-align: left; }
.admin__action-card:hover { border-color: rgba(196,59,46,.25); transform: translateY(-1px); }
.admin__action-card[data-count="0"] { opacity: .55; }
.admin__action-card-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; background: rgba(196,59,46,.08); color: var(--cap-red); flex-shrink: 0; }
.admin__action-card-body { flex: 1; min-width: 0; }
.admin__action-card-label { font-size: .75rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.admin__action-card-sub { font-size: .72rem; color: var(--ink-muted); margin-top: .15rem; }
.admin__action-card-count { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--ink); margin-left: auto; }
.admin__action-card[data-count="0"] .admin__action-card-count { color: #9ca3af; }
.admin__action-card[data-pending="1"] .admin__action-card-count { color: var(--cap-red); }

@media (max-width: 1100px) {
  .admin__actions { grid-template-columns: 1fr 1fr !important; }
  .admin__dash-cols { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  .admin__actions { grid-template-columns: 1fr !important; }
}
.admin__table-wrap { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.admin__table-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.06); }
.admin__table-title { font-family: var(--font-display); font-size: 1.1rem; }
.admin__table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin__table th { text-align: left; padding: 0.75rem 1.5rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); font-weight: 600; border-bottom: 1px solid rgba(0,0,0,0.06); background: var(--cream); }
.admin__table td { padding: 0.85rem 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.04); vertical-align: middle; }
.admin__table tr:hover td { background: rgba(0,0,0,0.01); }
.admin__table-status { display: inline-flex; padding: 0.2rem 0.6rem; border-radius: 100px; font-size: 0.7rem; font-weight: 600; }
.admin__table-status--active { background: var(--green-light); color: var(--green); }
.admin__table-status--pending { background: var(--orange-light); color: var(--orange); }
.admin__table-actions { display: flex; gap: 0.5rem; }
.admin__table-btn { width: 32px; height: 32px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--ink-muted); transition: var(--transition); }
.admin__table-btn:hover { background: var(--cream); color: var(--ink); }
/* Tablet admin: sidebar becomes a horizontal scrollable tab bar instead of being
   hidden — otherwise admin users on mobile couldn't navigate between tabs. */
@media (max-width: 900px) {
  .admin__layout { grid-template-columns: 1fr; min-height: 0; }
  .admin__sidebar {
    border-right: none; border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 0.5rem 0.75rem;
    display: flex; gap: 0.4rem; overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; white-space: nowrap;
    position: sticky; top: 56px; z-index: 10;
  }
  .admin__sidebar::-webkit-scrollbar { height: 3px; }
  .admin__sidebar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }
  .admin__nav-section { display: none; } /* Section dividers don't fit in a horizontal strip */
  .admin__nav-item {
    padding: 0.5rem 0.85rem; border-radius: var(--radius-sm);
    font-size: 0.8rem; flex-shrink: 0; white-space: nowrap;
  }
  .admin__nav-item.active { background: var(--cap-red-light); color: var(--cap-red); border-right: none; }
  .admin__stats { grid-template-columns: 1fr 1fr; }
  .admin__top { padding: 0.85rem 1rem; gap: 0.5rem; flex-wrap: wrap; }
  .admin__top-title { font-size: 1.05rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin__top-user { font-size: 0.8rem; }
  .admin__top-user #adminDisplayName { display: none; } /* Keep just the avatar on narrow screens */
  .admin__content { padding: 1.25rem 1rem; }
  /* Admin tables: horizontal scroll so wide tables don't break the layout */
  .admin__table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin__table { min-width: 640px; }
  .admin__table th, .admin__table td { padding: 0.7rem 1rem; }
  /* Search + count row should stack on narrow screens */
  .admin__table-header { flex-wrap: wrap; gap: 0.5rem; padding: 0.85rem 1rem; }
  .admin__table-header .form-input { max-width: 100% !important; flex: 1 1 180px; }
}

/* === Voucher statistics tab ============================================== */
/* Spinner used by the loading placeholder. */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.vstats__kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.vstats__kpi {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--cap-red);
}
.vstats__kpi--issued      { border-left-color: var(--cap-red); }
.vstats__kpi--reimbursed  { border-left-color: #16a34a; }
.vstats__kpi--circulation { border-left-color: #2563eb; }
.vstats__kpi--pending     { border-left-color: #d97706; }
.vstats__kpi--neutral     { border-left-color: #94a3b8; }
.vstats__kpi-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); font-weight: 600; }
.vstats__kpi-value { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); margin-top: 0.25rem; line-height: 1.1; }
.vstats__kpi-sub   { font-size: 0.75rem; color: var(--ink-muted); margin-top: 0.4rem; }

.vstats__card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}
.vstats__card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap;
}
.vstats__card-head h3 { font-family: var(--font-display); font-size: 1.05rem; margin: 0; }
.vstats__sub { font-size: 0.78rem; color: var(--ink-muted); font-weight: 400; }
.vstats__legend { display: flex; gap: 1rem; font-size: 0.78rem; color: var(--ink-muted); flex-wrap: wrap; }
.vstats__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 0.35rem; vertical-align: middle; }

.vstats__chart-wrap { width: 100%; overflow-x: auto; }
.vstats__chart-wrap svg { display: block; max-width: 100%; height: auto; }

.vstats__two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .vstats__two-col { grid-template-columns: 1fr; gap: 0; }
}

/* Denomination & status compact rows. */
.vstats__row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  font-size: 0.85rem;
}
.vstats__row:last-child { border-bottom: none; }
.vstats__row-label { font-weight: 600; }
.vstats__row-bar {
  height: 8px; background: var(--cream); border-radius: 4px; overflow: hidden;
  position: relative;
}
.vstats__row-bar-fill { height: 100%; background: var(--cap-red); border-radius: 4px; }
.vstats__row-bar-fill--green { background: #16a34a; }
.vstats__row-bar-fill--orange { background: #d97706; }
.vstats__row-bar-fill--gray { background: #94a3b8; }
.vstats__row-bar-fill--blue { background: #2563eb; }
.vstats__row-value { font-variant-numeric: tabular-nums; color: var(--ink-muted); font-size: 0.8rem; }

/* === Voucher trace card =================================================== */
.vstats__trace-card { border-left: 3px solid var(--cap-red); }

/* Big colour-coded status badge for the trace result. */
.vtrace-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.85rem; border-radius: 999px;
  font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.vtrace-badge--reimbursed     { background: #dcfce7; color: #15803d; }
.vtrace-badge--circulation    { background: #fef3c7; color: #92400e; }
.vtrace-badge--unknown        { background: #fee2e2; color: #991b1b; }
.vtrace-badge--reimb-no-batch { background: #fde68a; color: #78350f; }

/* Timeline visualisation: two pills (sale / reimbursement) joined by a line. */
.vtrace-timeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
  margin-top: 1rem;
}
@media (max-width: 720px) {
  .vtrace-timeline { grid-template-columns: 1fr; gap: 0.75rem; }
  .vtrace-timeline__connector { display: none; }
}
.vtrace-step {
  background: #fafaf7;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  position: relative;
}
.vtrace-step--start { border-left: 3px solid var(--cap-red); }
.vtrace-step--end   { border-left: 3px solid #16a34a; }
.vtrace-step--end-pending { border-left: 3px solid #d97706; background: #fffbeb; }
.vtrace-step__head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-muted); font-weight: 700; margin-bottom: 0.5rem;
}
.vtrace-step__date {
  font-family: var(--font-display); font-size: 1.15rem; color: var(--ink);
  margin-bottom: 0.4rem;
}
.vtrace-step__line {
  font-size: 0.82rem; color: var(--ink); margin-top: 0.2rem;
  word-break: break-word;
}
.vtrace-step__line--muted { color: var(--ink-muted); font-size: 0.78rem; }

.vtrace-timeline__connector {
  display: flex; align-items: center; justify-content: center;
  padding: 0 0.5rem; min-width: 100px; position: relative;
}
.vtrace-timeline__connector::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%;
  height: 2px; background: linear-gradient(to right, var(--cap-red) 0%, #d97706 50%, #16a34a 100%);
}
.vtrace-timeline__days {
  position: relative; background: var(--white); padding: 0.25rem 0.65rem;
  border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; color: var(--ink); white-space: nowrap;
}

/* Batch detail grid — small chips, one per serial, colour-coded. */
.vbatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.vbatch-chip {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem; font-size: 0.78rem; font-family: var(--font-mono);
  text-align: center; cursor: pointer; background: var(--white);
  transition: var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
}
.vbatch-chip:hover { border-color: var(--cap-red); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.vbatch-chip--reimbursed { background: #dcfce7; border-color: #86efac; color: #15803d; }
.vbatch-chip--reimbursed:hover { border-color: #16a34a; }
.vbatch-chip--free       { background: var(--white); color: var(--ink); }
.vbatch-chip__status {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em;
  font-weight: 700; opacity: 0.7;
}

/* Make monthly chart bars feel clickable */
.vstats__chart-wrap svg rect { cursor: pointer; transition: opacity .15s; }
.vstats__chart-wrap svg rect:hover { opacity: 0.75; }
.vstats__chart-wrap svg .vbar-group { cursor: pointer; }
.vstats__chart-wrap svg .vbar-group:hover rect.vbar-bg { fill: rgba(0,0,0,0.04); }
.vstats__chart-wrap svg rect.vbar-bg { fill: transparent; pointer-events: all; }
.vstats__chart-wrap svg text.vbar-label { pointer-events: none; }

/* Drill-down modal helpers */
.vdrill__back {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.8rem; color: var(--ink-muted); cursor: pointer; background: none;
  border: none; padding: 0; margin-bottom: 0.75rem;
}
.vdrill__back:hover { color: var(--cap-red); }
.vdrill__totals {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem; margin-bottom: 1rem;
}
.vdrill__total-card {
  background: #fafaf7; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem; font-size: 0.85rem;
}
.vdrill__total-card strong { display: block; font-family: var(--font-display); font-size: 1.1rem; margin-top: 0.15rem; }
.vdrill__total-card-label { font-size: 0.7rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }

.vdrill__section-title {
  font-family: var(--font-display); font-size: 0.95rem; margin: 1rem 0 0.5rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.vdrill__section-title small { font-size: 0.75rem; color: var(--ink-muted); font-weight: 400; }

.vdrill-row { cursor: pointer; }
.vdrill-row:hover td { background: rgba(207,32,39,0.04); }

/* === Homepage bons section — photos beside text on desktop === */
/* Two-column grid on desktop (photos | text), stacked single-column on mobile.
   Items vertically centered so the fan and the heading line up nicely. */
.bons__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .bons__layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* === Bons d'achats page — wizard layout === */

/* Wizard container: 2-column grid on desktop (preview + stacked steps),
   single column on mobile with only the active step visible. */
.bons__wizard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  position: relative;
}

/* Preview column (desktop): sticky so it stays visible while scrolling the form */
.bons__preview-wrap {
  grid-column: 1;
  grid-row: 1 / span 3;
  position: sticky;
  top: 7rem;
  align-self: start;
}

/* Steps occupy the right column, stacked with spacing */
.bons__step { grid-column: 2; }
.bons__step + .bons__step { margin-top: 2.5rem; }

.bons__step-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 1.25rem;
}

/* --- Bon stack preview --- */
.bon-stack {
  position: relative;
  width: 100%;
  max-width: 420px;
  min-height: 300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 800px;
}
.bon-stack__empty { text-align: center; padding: 3rem 0; }
.bon-stack__item {
  position: absolute;
  width: 240px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center bottom;
}
.bon-stack__item.pop-in { animation: bonPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes bonPopIn {
  0% { opacity: 0; transform: scale(0.5) translateY(30px) rotate(0deg); }
  100% { opacity: 1; }
}
.bon-stack__badge {
  position: absolute;
  top: -8px; right: -8px;
  width: 28px; height: 28px;
  background: var(--cap-red);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(196,59,46,.4);
  z-index: 100;
}

/* --- Bon selector (step 1) --- */
.bon-selector { display: flex; flex-direction: column; gap: .5rem; }
.bon-selector__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.bon-selector__row:hover { border-color: var(--cap-red); }
.bon-selector__img { width: 56px; border-radius: 4px; flex-shrink: 0; }
.bon-selector__label { flex: 1; font-weight: 700; font-size: 1rem; }
.bon-selector__controls { display: flex; align-items: center; gap: .5rem; }
.bon-qty-btn {
  width: 40px; height: 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: var(--transition);
  user-select: none;
  -webkit-user-select: none;
}
.bon-qty-btn:hover { background: var(--cap-red); color: white; border-color: var(--cap-red); }
.bon-qty-btn:active { transform: scale(0.92); }
.bon-qty-value {
  width: 30px;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
/* Manual numeric input variant — same look as the static value but editable.
   Hides native spinners since +/- buttons are provided next to the input. */
.bon-qty-input {
  width: 56px;
  padding: .25rem .15rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  -moz-appearance: textfield;
  appearance: textfield;
  transition: var(--transition);
}
.bon-qty-input::-webkit-outer-spin-button,
.bon-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.bon-qty-input:focus {
  outline: none;
  border-color: var(--cap-red);
  box-shadow: 0 0 0 3px rgba(196, 59, 46, 0.15);
}

/* --- Delivery cards (step 2) --- */
.bons__delivery-options { display: flex; flex-direction: column; gap: .75rem; }
.bons__delivery-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: border-color .18s, background .18s;
  font-family: inherit;
  color: inherit;
  width: 100%;
}
.bons__delivery-card:hover { border-color: var(--cap-red); }
.bons__delivery-card.is-active { border-color: var(--cap-red); background: #fef4f3; }
.bons__delivery-card-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(196, 59, 46, 0.1);
  color: var(--cap-red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bons__delivery-card-text { min-width: 0; }
.bons__delivery-card-title { font-weight: 700; font-size: 1rem; color: var(--ink); }
.bons__delivery-card-sub { font-size: .82rem; color: var(--ink-muted); margin-top: .15rem; line-height: 1.4; }
.bons__delivery-card-check {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  background: var(--white);
  transition: all .18s;
}
.bons__delivery-card.is-active .bons__delivery-card-check {
  background: var(--cap-red);
  border-color: var(--cap-red);
  color: #fff;
}

/* --- Info panel (step 2) --- */
.bons__info-panel {
  margin-top: 1rem;
  background: var(--cream);
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: .9rem;
  line-height: 1.6;
}
.bons__info-panel-title {
  font-weight: 700;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.bons__info-hours { color: var(--ink-light); font-size: .88rem; }

/* --- Postal fields --- */
.bons__postal-fields { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.bons__postal-row { display: grid; grid-template-columns: 110px 1fr; gap: .5rem; }

/* --- Recap card (step 3) --- */
.bons__recap-card {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  margin-bottom: 1.25rem;
}
.bons__recap-title {
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 700;
  margin-bottom: .6rem;
}
.bons__recap-lines { font-size: .9rem; }

/* --- Contact fields + desktop submit --- */
.bons__contact-fields { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.bons__desktop-submit { width: 100%; justify-content: center; padding: .85rem 1.25rem; font-size: 1rem; }
.bons__msg {
  text-align: center;
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  margin-top: .75rem;
}
.bons__paiement-note { font-size: .75rem; color: var(--ink-muted); text-align: center; margin-top: .75rem; }

/* --- Back button (mobile only, hidden by default) --- */
.bons__back-btn {
  display: none;
  align-items: center;
  gap: .25rem;
  background: transparent;
  border: none;
  color: var(--cap-red);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  padding: .25rem .5rem;
  margin: 0 0 .75rem -.5rem;
}

/* --- Step indicator + sticky bar (mobile only, hidden by default) --- */
.bons__steps-indicator { display: none; }
.bons__sticky-bar { display: none; }

/* --- Confirmation screen --- */
.bons__confirmation {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  max-width: 520px;
  margin: 0 auto;
}
.bons__confirmation-icon {
  width: 72px; height: 72px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bons__confirmation h2 { font-family: var(--font-display); font-size: 1.8rem; margin: 0 0 .75rem; color: var(--ink); }
.bons__confirmation-msg { font-size: 1rem; color: var(--ink-muted); margin-bottom: 1.5rem; line-height: 1.6; }
.bons__confirmation-pickup {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: left;
  margin: 0 auto 1.5rem;
  font-size: .92rem;
  line-height: 1.7;
}
.bons__confirmation-pickup-title {
  font-weight: 700;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--cap-red);
  font-size: .95rem;
}
.bons__confirmation-pickup-hours { color: var(--ink-light); font-size: .88rem; margin-top: .5rem; }

/* Total bump animation (kept for #bonTotal visual feedback) */
@keyframes totalBump {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.bump { animation: totalBump 0.3s ease; }

/* ======================================================
   MOBILE WIZARD (≤900px): single column, one step at a time,
   sticky bottom action bar, step indicator on top.
   ====================================================== */
@media (max-width: 900px) {
  /* Collapse the 2-column grid */
  .bons__wizard { display: block; gap: 0; }

  /* Preview: static, above step 1 only; hidden on steps 2 & 3 */
  .bons__preview-wrap {
    position: static;
    grid-column: unset;
    grid-row: unset;
    margin-bottom: 1.25rem;
  }
  .bons__wizard[data-current-step="2"] .bons__preview-wrap,
  .bons__wizard[data-current-step="3"] .bons__preview-wrap { display: none; }

  /* Mini bon stack: compact preview, not hero */
  .bons__preview-wrap .bon-stack { min-height: 130px; max-width: 240px; }
  .bons__preview-wrap .bon-stack__item { width: 120px; }
  .bons__preview-wrap .bon-stack__empty { padding: 1rem 0; }
  .bons__preview-wrap .bon-stack__empty i { width: 32px !important; height: 32px !important; }
  .bons__preview-wrap .bon-stack__empty p { font-size: .8rem !important; margin-top: .5rem !important; }

  /* Only the active step is rendered */
  .bons__step { display: none; }
  .bons__step + .bons__step { margin-top: 0; }
  .bons__wizard[data-current-step="1"] .bons__step--1,
  .bons__wizard[data-current-step="2"] .bons__step--2,
  .bons__wizard[data-current-step="3"] .bons__step--3 { display: block; }

  /* Step indicator: 3 dots connected by lines */
  .bons__steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin: 0 auto 1.5rem;
    max-width: 280px;
  }
  .bons__step-dot {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
    transition: all .2s;
  }
  .bons__step-dot.is-active { background: var(--cap-red); color: #fff; transform: scale(1.08); }
  .bons__step-dot.is-done { background: #15803d; color: #fff; }
  .bons__step-line { flex: 1; height: 2px; max-width: 60px; background: #e5e7eb; transition: background .2s; }
  .bons__step-line.is-done { background: #15803d; }

  /* Show back button + hide desktop submit (sticky bar handles it) */
  .bons__back-btn { display: inline-flex; }
  .bons__desktop-submit { display: none; }

  /* Sticky action bar — fixed to bottom of viewport */
  .bons__sticky-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    padding: .8rem 1rem;
    padding-bottom: calc(.8rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
    border-top: 1px solid var(--border);
    z-index: 1000;
  }
  .bons__sticky-bar-label {
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-muted);
    font-weight: 700;
  }
  .bons__sticky-bar-value {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--cap-red);
    font-weight: 700;
    line-height: 1.1;
  }
  .bons__sticky-bar-action {
    flex: 1;
    max-width: 220px;
    justify-content: center;
    padding: .8rem 1rem;
    font-size: .95rem;
    min-height: 48px;
  }
  /* Disabled state: when no bons chosen or step invalid */
  .bons__sticky-bar-action:disabled {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
  }

  /* Extra bottom padding so content doesn't hide under sticky bar */
  #page-bons .section {
    padding-bottom: 6rem !important;
    padding-top: 5rem;
  }

  /* Hide sticky bar when wizard is in confirmation mode */
  .bons__wizard[data-current-step="done"] ~ .bons__sticky-bar { display: none; }

  /* Tighter step titles */
  .bons__step-title { font-size: 1.2rem; margin-bottom: 1rem; }

  /* Selector: bigger tap targets on touch */
  .bon-qty-btn { width: 44px; height: 44px; font-size: 1.3rem; }
  .bon-qty-value { min-width: 34px; font-size: 1.1rem; }
  .bon-qty-input { width: 64px; font-size: 1.1rem; padding: .35rem .25rem; }

  /* Delivery cards: slightly tighter */
  .bons__delivery-card { padding: .95rem 1rem; }
  .bons__delivery-card-title { font-size: .95rem; }
  .bons__delivery-card-sub { font-size: .8rem; }

  /* Merchants CTA: more breathing room before footer */
  .bons__merchants-cta { margin-top: 2rem; }

  /* Confirmation: tighter horizontal padding */
  .bons__confirmation { padding: 2rem 0.25rem 1rem; }
  .bons__confirmation h2 { font-size: 1.5rem; }
}

/* Very narrow phones: stack NPA / city vertically */
@media (max-width: 380px) {
  .bons__postal-row { grid-template-columns: 1fr !important; }
}

/* === Downloads page === */
.dl-card { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); transition: var(--transition); }
.dl-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.dl-card__icon { width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--cap-red-light); color: var(--cap-red); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dl-card__info { flex: 1; min-width: 0; }
.dl-card__title { font-weight: 600; font-size: 1rem; }
.dl-card__meta { font-size: .8rem; color: var(--ink-muted); margin-top: .2rem; }
.dl-card__action { width: 36px; height: 36px; border-radius: 50%; background: var(--cream); color: var(--ink-muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: var(--transition); }
.dl-card:hover .dl-card__action { background: var(--cap-red); color: white; }

/* === Global mobile overrides === */
@media (max-width: 640px) {
  .container { padding: 0 1rem; }
  .section { padding: 3rem 0; }
  .section__title { font-size: 1.75rem; }

  /* Hero padding consistent with container on mobile */
  .hero__inner { padding: 0 1rem; }

  /* Committee grid: 4 → 2 columns */
  .comite-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem !important; }

  /* Association page: values grid (4 cols) and benefits grid (2 cols) collapse
     to 2 cols on tablet, then 1 col on phones. The 2-col benefits grid uses
     a stricter breakpoint since the rows are taller. */
  .assoc-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Bons fan on homepage: stack smaller */
  .bons-fan { height: 220px !important; max-width: 280px !important; }
  .bons-fan img { width: 180px !important; }
  .bons-fan img:nth-child(1) { top: 30px !important; left: 0 !important; }
  .bons-fan img:nth-child(2) { top: 15px !important; left: 40px !important; }
  .bons-fan img:nth-child(3) { top: 0 !important; left: 80px !important; }

  /* Bons page bon-stack sizing is owned by the wizard-scoped rules
     (.bons__preview-wrap .bon-stack) — no global override needed here. */

  /* Footer: single column */
  .footer__grid { grid-template-columns: 1fr !important; gap: 1.5rem; }
  .footer__bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .footer__bottom > div { flex-wrap: wrap; justify-content: center; gap: 1rem !important; }

  /* Admin stats */
  .admin__stats { grid-template-columns: 1fr !important; }

  /* Admin modals: tighter padding on narrow screens */
  .admin-modal { padding: 0.5rem; }
  .admin-modal__header { padding: 1.25rem 1.25rem 0; }
  .admin-modal__body { padding: 1rem 1.25rem; }
  .admin-modal__footer { padding: 1rem 1.25rem 1.25rem; flex-wrap: wrap; }
  .admin-modal__footer .btn { flex: 1 1 auto; justify-content: center; }

  /* Atelier modal narrower padding */
  .atelier-modal__header { padding: 1.25rem 1.25rem 0; }
  .atelier-modal__body { padding: 1rem 1.25rem 1.25rem; }

  /* Member modal: reduce padding on mobile */
  .member-modal { padding: 0.75rem; }
  .member-modal__content { padding: 1.5rem; }

  /* Downloads */
  .dl-card { padding: 1rem; }
  .dl-card__title { font-size: .9rem; }

  /* Empty state mobile */
  .promo-suggest-form__row { flex-direction: column; }

  /* Adhesion advantages: keep 2 cols, but allow 1 col on very narrow later */
  /* Contact / forms: prevent textarea overflow */
  textarea.form-input { max-width: 100%; }

  /* Reimbursement: stack denom controls on very narrow */
  .reimb__denom-head { flex-wrap: wrap; gap: 0.5rem; }
  .reimb__denom-img { width: 44px; }
  .reimb__fieldset { padding: 1rem 1rem 1.25rem; }

  /* Members: bottom sheet owns its own height now (see main mobile block above) */
  /* Member modal becomes a bottom sheet on phones (see components.css) */
}

/* === Extra-narrow phones (iPhone SE, ~360px) === */
@media (max-width: 380px) {
  .section__title { font-size: 1.5rem; }
  .hero__title { font-size: 1.75rem; }
  .hero__stats { gap: 0.75rem; }
  .hero__stat-number { font-size: 1.4rem; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }

  /* Adhesion 2x2 grid becomes a single column on very narrow devices */
  #page-adhesion .section > .container > div > div[style*="grid-template-columns:1fr 1fr"],
  #page-adhesion .section > .container > div > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Association: collapse all assoc grids to a single column on narrow phones */
  .assoc-grid { grid-template-columns: 1fr !important; }

  /* Regles-bons page: fees comparison + reimbursement channels stack on phones */
  .regles-fees,
  .regles-channels { grid-template-columns: 1fr !important; }

  /* Bons page: NPA / city stacking is handled by the .bons__postal-row rule
     in the main bons block. Bon-stack sizing is also owned there. */
  .bon-selector__img { width: 36px; }

  /* Tighter container padding */
  .container { padding: 0 0.75rem; }
  .hero__inner { padding: 0 0.75rem; }
}

/* =============================================
   Statuts page — legal-document styling
   Each main section is a white card; each article is a thin-bordered
   block with a small red label so the document reads like a printed
   statute book without overwhelming the reader.
   ============================================= */
.statuts-block {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-sm);
}
.statuts-block__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--cap-red);
  color: var(--ink);
}
.statuts-subblock__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 1.5rem 0 1rem;
  color: var(--cap-red);
  letter-spacing: .02em;
}
.statuts-article {
  padding: 1.1rem 1.25rem;
  border-left: 3px solid rgba(196, 59, 46, .25);
  background: rgba(0, 0, 0, .015);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1rem;
}
.statuts-article:last-child { margin-bottom: 0; }
.statuts-article__num {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--cap-red);
  margin-bottom: .6rem;
  padding: .2rem .6rem;
  background: rgba(196, 59, 46, .08);
  border-radius: 999px;
}
.statuts-article p {
  color: var(--ink-light);
  line-height: 1.7;
  margin: 0 0 .75rem;
  font-size: .95rem;
}
.statuts-article p:last-child { margin-bottom: 0; }
.statuts-list {
  margin: .5rem 0 .75rem 1.25rem;
  padding-left: .75rem;
  color: var(--ink-light);
  line-height: 1.7;
  font-size: .95rem;
}
.statuts-list li { margin-bottom: .35rem; }
.statuts-list li:last-child { margin-bottom: 0; }

/* Signatures block — three-column row that collapses to one on phones */
.statuts-block--signatures {
  background: linear-gradient(180deg, var(--white) 0%, rgba(196, 59, 46, .03) 100%);
}
.statuts-signatures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.statuts-signature {
  text-align: center;
  padding: 1.25rem 1rem;
  border-top: 1px solid var(--border-light, #eee);
}
.statuts-signature__role {
  font-size: .8rem;
  color: var(--ink-muted);
  margin-bottom: .75rem;
  line-height: 1.4;
  min-height: 2.6em;
}
.statuts-signature__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 600;
}

/* Mobile: collapse signatures to a single column, tighten padding */
@media (max-width: 700px) {
  .statuts-block { padding: 1.5rem 1.25rem; }
  .statuts-block__title { font-size: 1.25rem; }
  .statuts-article { padding: 1rem; }
  .statuts-signatures { grid-template-columns: 1fr; gap: .5rem; }
  .statuts-signature__role { min-height: 0; }
}

/* =============================================
   Empty states (no promos / no events)
   ============================================= */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 2px dashed rgba(0,0,0,0.08);
}
.empty-state--wide { max-width: 560px; margin: 0 auto; padding: 2.5rem 2rem; }
.empty-state__icon { width: 48px; height: 48px; color: var(--cap-red); opacity: .5; margin-bottom: 1rem; }
.empty-state__title { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: .5rem; color: var(--ink); }
.empty-state__text { color: var(--ink-light); font-size: .95rem; line-height: 1.6; }

/* Promo suggestion form inside empty state */
.promo-suggest-form { margin-top: 1.5rem; text-align: left; }
.promo-suggest-form .form-input {
  width: 100%; padding: .75rem 1rem; border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-sm); font-size: .9rem; font-family: var(--font-body);
  transition: border-color .2s;
  margin-bottom: .75rem; box-sizing: border-box;
}
.promo-suggest-form .form-input:focus { border-color: var(--cap-red); outline: none; }
.promo-suggest-form textarea.form-input { resize: vertical; min-height: 80px; }
.promo-suggest-form__row { display: flex; gap: .75rem; }
.promo-suggest-form__field { flex: 1; }
.promo-suggest-form__field label { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-light); margin-bottom: .3rem; }
.promo-suggest-form .btn { width: 100%; justify-content: center; margin-top: .25rem; }

/* =============================================
   Organigramme (association page) — fully responsive
   Desktop (>1100px): full tree, 7 cards in a row
   Tablet  (<=1100px): wrap to 2 rows (4 + 3), connectors hidden
   Mobile  (<=720px):  2 cards per row, compact
   Narrow  (<=420px):  1 card per row
   ============================================= */
.org-chart { padding: 1.5rem 0; }

/* Root level: president centered */
.org-level--root { display: flex; justify-content: center; padding-bottom: .5rem; }

/* Vertical connector from president to horizontal bar */
.org-connector {
  width: 2px; height: 40px;
  background: var(--ink-muted);
  margin: 0 auto;
}

/* Horizontal connector bar spanning member columns */
.org-connector-h {
  height: 2px;
  background: var(--ink-muted);
  margin: 0 3%;
}

/* Members row */
.org-level--members {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  padding: 0 .5rem;
  flex-wrap: nowrap;
}

/* Each branch: column with vertical line + card + optional sub-tasks */
.org-branch {
  display: flex; flex-direction: column; align-items: center;
  flex: 1 1 0; min-width: 0;
  max-width: 170px;
  gap: 0;
}

/* Vertical connector from horizontal bar to card */
.org-connector-v {
  width: 2px; height: 28px;
  background: var(--ink-muted);
  flex-shrink: 0;
}
.org-connector-v--sub {
  height: 16px;
}

/* Card styles: flex column so name/role/company line up across cards */
.org-card {
  text-align: center;
  padding: 1.4rem 1rem 1.1rem;
  background: var(--cream);
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(0,0,0,.06);
  width: 100%;
  box-sizing: border-box;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 230px;
}
.org-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.org-card--president {
  background: var(--cap-red);
  color: var(--white);
  padding: 1.5rem 2rem 1.25rem;
  max-width: 220px;
  min-height: 0;
  border: none;
  box-shadow: 0 4px 16px rgba(196,59,46,.25);
}
.org-card--president .org-card__role { color: rgba(255,255,255,.85); }
.org-card--president .org-card__company { color: rgba(255,255,255,.7); }
.org-card--president .org-card__photo { border-color: rgba(255,255,255,.4); width: 76px; height: 76px; }
.org-card--president .org-card__interim { color: rgba(255,255,255,.7); }
.org-card--president .org-card__name { font-size: 1rem; min-height: 0; }
.org-card--president .org-card__role { font-size: .8rem; min-height: 0; }

.org-card__photo {
  width: 68px; height: 68px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto .6rem;
  display: block;
  border: 2.5px solid var(--white);
  box-shadow: var(--shadow-sm);
}

.org-card__initials {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--cream-dark);
  margin: 0 auto .6rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.05rem; color: var(--cap-red);
  border: 2.5px solid var(--white);
  box-shadow: var(--shadow-sm);
}

/* Reserve space for up to 2 lines on name + role so rows align across cards */
.org-card__name {
  font-weight: 600; font-size: .88rem; line-height: 1.3;
  min-height: calc(.88rem * 1.3 * 2);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.org-card__role {
  font-size: .75rem; color: var(--cap-red); font-weight: 600;
  margin: .3rem 0; line-height: 1.3;
  min-height: calc(.75rem * 1.3 * 2);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.org-card__interim { font-weight: 400; font-size: .68rem; }
/* Company sits at the bottom so every card has a matching baseline */
.org-card__company {
  font-size: .75rem; color: var(--ink-muted); margin-top: auto;
  padding-top: .15rem; line-height: 1.35;
}

/* Sub-task boxes under member cards */
.org-task {
  text-align: center;
  padding: .5rem .6rem;
  background: var(--white);
  border: 1.5px solid rgba(0,0,0,.08);
  border-radius: var(--radius-sm);
  font-size: .73rem;
  font-weight: 600;
  color: var(--ink-light);
  width: 92%;
  box-sizing: border-box;
}

/* ---------- Tablet: wrap to multiple rows ---------- */
@media (max-width: 1100px) {
  .org-level--members {
    flex-wrap: wrap;
    gap: 1.25rem .75rem;
  }
  .org-branch {
    flex: 0 0 calc(25% - .75rem);
    max-width: none;
  }
  /* Tree connectors no longer make sense when cards wrap */
  .org-connector-h { display: none; }
  .org-connector { height: 24px; }
  .org-connector-v { display: none; }
}

/* ---------- Mobile: 2 per row ---------- */
@media (max-width: 720px) {
  .org-chart { padding: 1rem 0; }
  .org-level--members { gap: .75rem; }
  .org-branch { flex: 0 0 calc(50% - .5rem); }
  .org-card {
    padding: 1rem .5rem .85rem;
    min-height: 210px;
  }
  .org-card__photo, .org-card__initials { width: 56px; height: 56px; }
  .org-card__name { font-size: .82rem; min-height: calc(.82rem * 1.3 * 2); }
  .org-card__role { font-size: .72rem; min-height: calc(.72rem * 1.3 * 2); }
  .org-card__company { font-size: .72rem; }
  .org-card--president { padding: 1.25rem 1.25rem 1rem; max-width: 260px; }

  /* Secretary sits directly under the president on mobile:
     order:-1 pulls it before the other branches, and full-width
     forces it onto its own centered row. */
  .org-branch--secretary {
    order: -1;
    flex: 0 0 100%;
    max-width: 280px;
    margin: 0 auto;
  }
}

/* ---------- Narrow phones: 1 per row ---------- */
@media (max-width: 420px) {
  .org-branch { flex: 0 0 100%; max-width: 280px; }
  .org-card { min-height: 0; }
  .org-card__name,
  .org-card__role { min-height: 0 !important; }
  /* Secretary still appears first (order:-1 inherited from 720px rule) */
}

/* =============================================
   Merchants CTA block on the /bons page (links to /remboursement)
   ============================================= */
.bons__merchants-cta {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--cream);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,.06);
}
.bons__merchants-cta-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--cap-red);
}
.bons__merchants-cta-text { flex: 1; display: flex; flex-direction: column; gap: .15rem; }
.bons__merchants-cta-text strong { font-size: 1rem; }
.bons__merchants-cta-text span { font-size: .88rem; color: var(--ink-light); line-height: 1.4; }
@media (max-width: 640px) {
  .bons__merchants-cta { flex-direction: column; align-items: stretch; text-align: center; }
  .bons__merchants-cta-icon { margin: 0 auto; }
}

/* =============================================
   Reimbursement page (/remboursement)
   ============================================= */
.reimb__layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) {
  .reimb__layout { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* Two-options chooser layout (paper / digital) — used by the new flow */
.reimb__choice-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) {
  .reimb__choice-layout { grid-template-columns: 1fr; gap: 1.5rem; }
}
.reimb__choices { display: flex; flex-direction: column; gap: 1.25rem; }
.reimb__choices-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0;
  color: var(--ink);
}
.reimb__choices-intro {
  margin: 0;
  color: var(--ink-light);
  font-size: .95rem;
  line-height: 1.6;
}
.reimb__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: .5rem;
}
@media (max-width: 720px) {
  .reimb__options { grid-template-columns: 1fr; }
}

/* Single option card — shared base for active and disabled states */
.reimb__option {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 2px solid rgba(0,0,0,.08);
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  position: relative;
}
.reimb__option--active {
  cursor: pointer;
  border-color: var(--cap-red-light);
}
.reimb__option--active:hover {
  border-color: var(--cap-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.reimb__option--disabled {
  opacity: .55;
  cursor: not-allowed;
  background: repeating-linear-gradient(45deg, var(--cream), var(--cream) 10px, #f3ede4 10px, #f3ede4 20px);
  border-color: rgba(0,0,0,.08);
  filter: grayscale(.6);
}
.reimb__option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  background: var(--cap-red-light);
  color: var(--cap-red);
  flex-shrink: 0;
}
.reimb__option--disabled .reimb__option-icon {
  background: rgba(0,0,0,.06);
  color: var(--ink-muted);
}
.reimb__option-body { display: flex; flex-direction: column; gap: .5rem; }
.reimb__option-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .25rem .5rem;
  border-radius: 999px;
}
.reimb__option-badge--ok {
  background: var(--green-light);
  color: var(--green);
}
.reimb__option-badge--soon {
  background: rgba(0,0,0,.08);
  color: var(--ink-light);
}
.reimb__option-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0;
  color: var(--ink);
}
.reimb__option-desc {
  margin: 0;
  font-size: .9rem;
  color: var(--ink-light);
  line-height: 1.55;
}
.reimb__option-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: .25rem;
  padding: .65rem .9rem;
  background: var(--cap-red);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  align-self: flex-start;
  transition: var(--transition);
}
.reimb__option--active:hover .reimb__option-cta { background: var(--cap-red-dark); }
.reimb__option-cta--muted {
  background: rgba(0,0,0,.1);
  color: var(--ink-light);
  cursor: not-allowed;
}

/* Mailing address reminder block */
.reimb__address {
  margin-top: .5rem;
  padding: 1rem 1.25rem;
  background: var(--cream);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--cap-red);
}
.reimb__address-title {
  display: flex; align-items: center; gap: .4rem;
  font-weight: 700; font-size: .85rem;
  color: var(--cap-red);
  margin-bottom: .4rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.reimb__address-body {
  font-style: normal;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--ink);
}

.reimb__sidebar { display: flex; flex-direction: column; gap: 1rem; }
.reimb__info-box {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  font-size: .92rem;
  line-height: 1.55;
  border: 1px solid rgba(0,0,0,.05);
}
.reimb__info-box--warn {
  background: #fef6e7;
  border-color: #f6d58e;
  color: #5a3d0a;
}
.reimb__info-title {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 700; margin-bottom: .5rem;
}
.reimb__info-list { margin: 0; padding-left: 1.25rem; }
.reimb__info-list li { margin-bottom: .35rem; }

.reimb__form { display: flex; flex-direction: column; gap: 1.5rem; }
.reimb__fieldset {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem 1.5rem;
  margin: 0;
}
.reimb__legend {
  padding: 0 .5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--cap-red);
  font-weight: 700;
}
.reimb__field { display: flex; flex-direction: column; margin-bottom: .75rem; }
.reimb__field .form-label,
.reimb__field > label.form-label { margin-bottom: .35rem; font-weight: 600; font-size: .85rem; }
.reimb__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 540px) {
  .reimb__row { grid-template-columns: 1fr; }
}
.reimb__hint { font-size: .75rem; color: var(--ink-muted); margin: .25rem 0 0; }
.reimb__or {
  text-align: center;
  font-size: .85rem;
  color: var(--ink-muted);
  margin: .5rem 0;
  font-style: italic;
}

/* QR-IBAN upload zone */
.reimb__upload {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.reimb__upload-preview {
  width: 140px; height: 140px;
  background: var(--cream-dark, #f0ede6);
  border: 1px dashed rgba(0,0,0,.2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: .78rem;
}
.reimb__upload-preview img { width: 100%; height: 100%; object-fit: contain; }
.reimb__upload-actions { display: flex; flex-direction: column; gap: .5rem; }

/* Denomination rows + per-bon serial inputs */
.reimb__denom {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--radius-sm);
  margin-bottom: .75rem;
  overflow: hidden;
}
.reimb__denom-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1rem;
  background: var(--white);
}
.reimb__denom-img { width: 56px; border-radius: 4px; flex-shrink: 0; }
.reimb__denom-label { flex: 1; font-weight: 600; }
.reimb__denom-controls { display: flex; align-items: center; gap: .5rem; }
.reimb__serials {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 0 1rem;
}
.reimb__serials:not(:empty) { padding: .5rem 1rem .75rem; background: var(--cream); }
.reimb__serial-row {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.reimb__serial-index {
  font-size: .78rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  min-width: 28px;
}
.reimb__serial-input {
  flex: 1;
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: .85rem;
}

.reimb__total-box {
  margin-top: .5rem;
  padding: .75rem 1rem;
  background: var(--cap-red-light, #fdecea);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
}
.reimb__total-box strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--cap-red);
}

.reimb__consent {
  padding: .85rem 1rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,.06);
}
