/* =========================================
   DON DU SANG — v6
   ========================================= */

/* ── Onglets de mode ── */
.ds-modes {
  background: #fff;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}
.ds-modes-inner {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
}
.ds-mode-btn {
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #5e6b82;
  cursor: pointer;
  font-family: var(--font);
  transition: background .15s, color .15s;
}
.ds-mode-btn.is-active { background: #d91319; color: #fff; }
.ds-mode-btn:hover:not(.is-active) { color: #d91319; background: rgba(217,19,25,0.07); }

.ds-updated {
  margin-left: auto;
  font-size: 0.67rem;
  font-weight: 600;
  color: #94a3b8;
  font-family: var(--font);
  white-space: nowrap;
  padding-right: 4px;
}

/* ── Corps / layout ── */
.ds-body {
  background: #f8fafc;
  padding: 28px 0 64px;
  min-height: 500px;
  font-family: var(--font);
}
.ds-layout {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: start;
}

/* ═══════════════════════════════════════
   COLONNE GAUCHE
═══════════════════════════════════════ */
.ds-col-left {
  background: #fff;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 20px;
  padding: 20px 16px;
  box-shadow: 0 2px 12px rgba(15,23,42,0.05);
  position: sticky;
  top: 80px;
}

/* ── Calendrier ── */
.ds-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.ds-cal-nav-label {
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f172a;
  font-family: var(--font);
}
.ds-cal-nav-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(15,23,42,0.1);
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
  transition: background .14s, border-color .14s;
}
.ds-cal-nav-btn:hover:not(:disabled) { background: #f1f5f9; border-color: rgba(15,23,42,0.2); }
.ds-cal-nav-btn:disabled { color: #cbd5e1; cursor: not-allowed; }

.ds-cal {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  gap: 4px;
}
.ds-cal-wday {
  text-align: center;
  font-size: 0.6rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase;
  color: #94a3b8; padding-bottom: 8px; font-family: var(--font);
}
.ds-cal-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 9px;
  border: 1.5px solid transparent;
  background: #fff;
  cursor: default;
  transition: background .13s, border-color .13s, transform .12s;
  font-family: var(--font); padding: 0;
}
.ds-cal-empty { background: transparent; border: none; }
.ds-cal-cell.is-past { background: transparent; }
.ds-cal-cell.is-past .ds-cal-num { color: #e2e8f0; }
.ds-cal-cell.has-collecte { cursor: pointer; border-color: rgba(217,19,25,0.2); }
.ds-cal-cell.has-collecte:hover:not(:disabled):not(.is-active) {
  background: rgba(217,19,25,0.05); border-color: rgba(217,19,25,0.4); transform: translateY(-1px);
}
.ds-cal-cell.is-active {
  background: #d91319; border-color: #d91319;
  box-shadow: 0 3px 10px rgba(217,19,25,0.3); transform: translateY(-1px);
}
.ds-cal-cell.is-active .ds-cal-num       { color: #fff; font-weight: 900; }
.ds-cal-cell.is-active .ds-cal-drop-icon { color: rgba(255,255,255,0.7); }
.ds-cal-num {
  font-size: 0.78rem; font-weight: 600; color: #334155; line-height: 1;
}
.ds-cal-cell.has-collecte:not(.is-past) .ds-cal-num { font-weight: 900; color: #0f172a; }
.ds-cal-drop-icon { width: 8px; height: 8px; color: #d91319; display: block; }

/* ── Liste des villes (mode ville) ── */
#dsVilleList {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(217,19,25,0.25) transparent;
  padding-right: 2px;
}
#dsVilleList::-webkit-scrollbar { width: 4px; }
#dsVilleList::-webkit-scrollbar-track { background: transparent; }
#dsVilleList::-webkit-scrollbar-thumb { background: rgba(217,19,25,0.25); border-radius: 99px; }

.ds-ville-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  transition: background .13s, border-color .13s, color .13s;
}
.ds-ville-btn:hover:not(.is-active) { background: rgba(217,19,25,0.05); border-color: rgba(217,19,25,0.2); }
.ds-ville-btn.is-active {
  background: #d91319 !important;
  border-color: #d91319 !important;
  color: #fff !important;
}
.ds-ville-btn-icon {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex: 0 0 28px;
  border-radius: 7px;
  background: rgba(217,19,25,0.1);
  color: #d91319;
  transition: background .13s, color .13s;
}
.ds-ville-btn.is-active .ds-ville-btn-icon {
  background: rgba(255,255,255,0.2) !important;
  color: #fff !important;
}
.ds-ville-btn-icon svg { width: 14px; height: 14px; }
.ds-ville-btn-name {
  flex: 1;
  font-size: 0.82rem; font-weight: 800;
  color: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ds-ville-btn-count {
  flex: 0 0 auto;
  font-size: 0.68rem; font-weight: 700;
  color: #94a3b8;
  background: rgba(15,23,42,0.06);
  border-radius: 99px;
  padding: 2px 8px;
  min-width: 24px;
  text-align: center;
  transition: color .13s, background .13s;
}
.ds-ville-btn.is-active .ds-ville-btn-count {
  color: rgba(255,255,255,0.85) !important;
  background: rgba(255,255,255,0.2) !important;
}

/* ═══════════════════════════════════════
   COLONNE DROITE
═══════════════════════════════════════ */
.ds-col-right { min-width: 0; }

/* Invite */
.ds-panel-invite {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 48px 24px;
  background: #fff;
  border: 1.5px dashed rgba(217,19,25,0.2);
  border-radius: 20px;
  text-align: center; font-family: var(--font);
}
.ds-panel-invite svg { color: #d91319; opacity: .35; }
.ds-panel-invite p { font-size: 0.82rem; font-weight: 700; color: #94a3b8; margin: 0; line-height: 1.6; }

/* Panel vide / erreur */
.ds-panel-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 48px 24px;
  background: #fff; border: 1px solid rgba(15,23,42,0.07); border-radius: 20px;
  text-align: center; font-family: var(--font);
}
.ds-panel-empty svg { color: #cbd5e1; }
.ds-panel-empty p { font-size: 0.85rem; font-weight: 700; color: #64748b; margin: 0; line-height: 1.55; }
.ds-panel-empty span { font-size: 0.72rem; color: #94a3b8; }
.ds-panel-empty a { color: #d91319; font-weight: 700; text-decoration: none; font-size: 0.82rem; }
.ds-panel-empty--error p { color: #d91319; }

/* En-tête du panel */
.ds-panel-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.ds-panel-title {
  font-size: 0.7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; color: #94a3b8; white-space: nowrap;
}
.ds-panel-header::after { content:''; flex:1; height:1px; background:rgba(15,23,42,0.08); }

/* Groupes date (mode ville) */
.ds-date-group { margin-bottom: 24px; }
.ds-date-label { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ds-date-label-text {
  font-size: 0.68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .09em; color: #94a3b8; white-space: nowrap;
}
.ds-date-label::after { content:''; flex:1; height:1px; background:rgba(15,23,42,0.07); }

/* ── Carte collecte ── */
.ds-card {
  background: #fff;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  box-shadow: 0 2px 8px rgba(15,23,42,0.04);
  transition: box-shadow .15s, border-color .15s;
}
.ds-card:hover { box-shadow: 0 5px 18px rgba(15,23,42,0.09); border-color: rgba(217,19,25,0.15); }
.ds-card-drop {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 12px; background: rgba(217,19,25,0.08); color: #d91319;
}
.ds-card-body { min-width: 0; }
.ds-card-lieu-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ds-card-lieu { font-size: 0.88rem; font-weight: 900; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.ds-card-slots { flex: 0 0 auto; font-size: 0.64rem; font-weight: 700; color: #16a34a; background: rgba(22,163,74,0.1); border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
.ds-card-adresse { display: block; font-size: 0.73rem; color: #64748b; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-card-ville-line { display: block; font-size: 0.68rem; color: #94a3b8; margin-top: 2px; }
.ds-card-horaires { flex: 0 0 auto; display: flex; flex-direction: row; align-items: center; gap: 10px; }
.ds-card-time { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; font-weight: 800; color: #0f172a; white-space: nowrap; }
.ds-card-time svg { color: #d91319; flex-shrink: 0; }
.ds-card-book {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; background: #d91319; border-radius: 7px;
  font-size: 0.68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em;
  text-decoration: none; white-space: nowrap; transition: background .14s;
  color: #fff !important;
}
.ds-card-book:hover { background: #b81016; color: #fff !important; }

/* ── Bandeau EFS ── */
.ds-efs-banner {
  margin-top: 20px;
  background: rgba(217,19,25,0.05); border: 1px solid rgba(217,19,25,0.12); border-radius: 12px;
  padding: 14px 16px; display: flex; align-items: flex-start; gap: 10px;
}
.ds-efs-banner svg { color: #d91319; flex: 0 0 20px; margin-top: 1px; }
.ds-efs-banner-text { font-size: 0.75rem; color: #475569; line-height: 1.5; }
.ds-efs-banner-text strong { color: #0f172a; font-weight: 800; }
.ds-efs-banner-text a { color: #d91319; font-weight: 700; text-decoration: none; }
.ds-efs-banner-text a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   SQUELETTES
═══════════════════════════════════════ */
.ds-skel-cal-header {
  width: 140px; height: 16px; border-radius: 6px; margin: 0 auto 16px;
  background: linear-gradient(90deg,#f1f5f9 25%,#e8edf3 50%,#f1f5f9 75%);
  background-size: 200% 100%; animation: ds-skel 1.4s ease-in-out infinite;
}
.ds-skel-cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.ds-skel-cal-cell {
  aspect-ratio: 1; border-radius: 9px;
  background: linear-gradient(90deg,#f1f5f9 25%,#e8edf3 50%,#f1f5f9 75%);
  background-size: 200% 100%; animation: ds-skel 1.4s ease-in-out infinite;
}
.ds-skel-cal-cell:nth-child(3n+1) { background: #f8fafc; animation: none; }
@keyframes ds-skel { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 700px) {
  .ds-layout { grid-template-columns: 1fr; }
  .ds-col-left { position: static; }
  .ds-updated { display: none; }
}
@media (max-width: 400px) {
  .ds-card { grid-template-columns: 38px 1fr; gap: 10px; }
  .ds-card-drop { width: 38px; height: 38px; flex: 0 0 38px; }
  .ds-card-horaires { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
}

/* ══════════════════════════════════════
   FAVORIS
══════════════════════════════════════ */

/* Tab favoris */
.ds-mode-btn--favs { gap: 5px; display: inline-flex; align-items: center; }
.ds-mode-btn--favs svg { flex-shrink: 0; }
.ds-mode-btn--favs.is-active svg { fill: #fff; }
.ds-mode-btn--favs:not(.is-active) svg { fill: #d91319; }

/* Ligne ville + cœur */
.ds-ville-row { display: flex; align-items: center; gap: 2px; }
.ds-ville-row .ds-ville-btn { flex: 1 1 0; min-width: 0; }
.ds-ville-row .ds-fav-btn   { flex: 0 0 30px; }

/* Bouton cœur */
.ds-fav-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0;
  border: none; background: none; cursor: pointer;
  border-radius: 8px;
  color: #94a3b8;
  transition: color .15s, background .15s, transform .12s;
}
.ds-fav-btn:hover { color: #d91319; background: rgba(217,19,25,0.08); transform: scale(1.15); }
.ds-fav-btn.is-fav { color: #d91319; }
.ds-fav-btn:disabled { opacity: .5; cursor: default; }

/* Panneau gauche favoris */
.ds-favs-left-info {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(217,19,25,0.06); border: 1.5px solid rgba(217,19,25,0.15);
  font-size: 0.82rem; font-weight: 700; color: #0f172a; font-family: var(--font);
}
.ds-favs-left-cta {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px; font-size: 0.82rem; color: #64748b; font-family: var(--font);
}
.ds-favs-login-link {
  border: none; background: none; padding: 0;
  font-weight: 800; color: #d91319; cursor: pointer; font-family: var(--font);
  font-size: 0.82rem; text-decoration: underline;
}

/* Carte ville favorite */
.ds-favcity-card {
  background: #fff; border: 1px solid rgba(15,23,42,0.08);
  border-radius: 16px; padding: 16px 18px; margin-bottom: 12px;
}
.ds-favcity-header {
  display: flex; align-items: center; gap: 7px; margin-bottom: 12px;
}
.ds-favcity-header svg { flex-shrink: 0; }
.ds-favcity-name { font-size: 1rem; font-weight: 900; color: #0f172a; font-family: var(--font); flex: 1 1 0; min-width: 0; }
.ds-favcity-header .ds-fav-btn { margin-left: auto; }

.ds-favcity-date-group { margin-bottom: 10px; }
.ds-favcity-date-group:last-child { margin-bottom: 0; }
.ds-favcity-date-label {
  font-size: 0.75rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 5px; font-family: var(--font);
}
.ds-favcity-event {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 10px; border-radius: 8px; background: #f8fafc;
  margin-bottom: 3px; font-family: var(--font);
}
.ds-favcity-event-lieu { font-size: 0.83rem; font-weight: 600; color: #0f172a; }
.ds-favcity-event-time { font-size: 0.78rem; color: #64748b; white-space: nowrap; flex-shrink: 0; }
.ds-favcity-empty { font-size: 0.82rem; color: #94a3b8; padding: 4px 0; font-family: var(--font); }

/* Empty state hint */
.ds-panel-empty-hint { font-size: 0.82rem; color: #64748b; margin-top: 6px; font-family: var(--font); }
.ds-empty-tab-link {
  display: inline; border: none; background: none;
  font-weight: 800; color: #d91319; cursor: pointer; font-family: var(--font);
  font-size: inherit; text-decoration: underline; padding: 0;
}

/* CTA Club */
.ds-cta-club {
  background: #fff; border: 1px solid rgba(15,23,42,0.08);
  border-radius: 20px; padding: 32px 28px; text-align: center;
  max-width: 440px; margin: 0 auto;
}
.ds-cta-club-heart {
  width: 64px; height: 64px; border-radius: 18px;
  background: rgba(217,19,25,0.08); color: #d91319;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.ds-cta-club-title { font-size: 1.1rem; font-weight: 900; color: #0f172a; margin: 0 0 10px; font-family: var(--font); }
.ds-cta-club-desc  { font-size: 0.87rem; color: #64748b; line-height: 1.55; margin: 0 0 22px; font-family: var(--font); }
.ds-cta-club-btns  { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ds-cta-btn {
  display: inline-flex; align-items: center; padding: 10px 20px; border-radius: 99px;
  font-size: 0.85rem; font-weight: 800; font-family: var(--font); cursor: pointer;
  text-decoration: none; border: 2px solid transparent; transition: opacity .15s, transform .12s;
}
.ds-cta-btn:hover { opacity: .85; transform: translateY(-1px); }
.ds-cta-btn--signup { background: #d91319; color: #fff; }
.ds-cta-btn--login  { background: transparent; border-color: rgba(15,23,42,0.2); color: #0f172a; }
