/* === 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); }
.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; }
}

/* === Bons d'achats page === */
.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-info-box {
  margin-top: 1.5rem;
  background: var(--cream);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: .9rem;
  line-height: 1.6;
}
.bon-info-box__title {
  font-weight: 700;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.bon-info-box__hours {
  margin-top: .5rem;
  color: var(--ink-light);
}

.bon-selector {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.bon-selector__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  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: 600;
  font-size: .95rem;
}
.bon-selector__controls {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.bon-qty-btn {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  font-size: 1.1rem;
  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: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.bon-total-box {
  background: var(--cream);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
}
.bon-total-box__summary {
  font-size: .85rem;
  color: var(--ink-light);
  margin-bottom: .5rem;
}
.bon-total-box__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bon-total-box__label {
  font-weight: 600;
}
.bon-total-box__amount {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--cap-red);
  transition: transform 0.3s ease;
}
.bon-total-box__amount.bump {
  animation: totalBump 0.3s ease;
}
@keyframes totalBump {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Mobile bons */
@media (max-width: 640px) {
  .bon-stack { min-height: 220px; }
  .bon-stack__item { width: 180px; }
  .bon-selector__img { width: 40px; }
  .bon-selector__row { padding: .6rem .75rem; gap: .75rem; }
}

/* === 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; }

  /* 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 order page: smaller stack + larger touch targets */
  .bon-stack { min-height: 200px !important; }
  .bon-stack__item { width: 160px !important; }
  .bon-qty-btn { width: 38px; height: 38px; font-size: 1.2rem; }

  /* 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;
  }

  /* Bons page: stack NPA / city */
  #page-bons div[style*="grid-template-columns:100px 1fr"],
  #page-bons div[style*="grid-template-columns: 100px 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Bon-stack even smaller */
  .bon-stack__item { width: 140px !important; }
  .bon-selector__img { width: 36px; }

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

/* =============================================
   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);
}
