/* =========================================
   CARBURANTS — v1
   ========================================= */

/* ── Onglets de mode ── */
.cb-modes {
  background: #fff;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}
.cb-modes-inner {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
}
.cb-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;
}
.cb-mode-btn.is-active { background: #d91319; color: #fff; }
.cb-mode-btn:hover:not(.is-active) { color: #d91319; background: rgba(217,19,25,0.07); }

.cb-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 ── */
.cb-body {
  background: #f8fafc;
  padding: 28px 0 64px;
  min-height: 500px;
  font-family: var(--font);
}
.cb-layout {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

/* ═══════════════════════════════════════
   COLONNE GAUCHE
═══════════════════════════════════════ */
.cb-left-stack {
  position: sticky;
  top: 80px;
  align-self: start;
}
.cb-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);
}

/* ── Carburant selector ── */
#cbFuelList {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cb-fuel-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 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;
}
.cb-fuel-btn:hover:not(.is-active) { background: rgba(217,19,25,0.05); border-color: rgba(217,19,25,0.2); }
.cb-fuel-btn.is-active {
  background: #d91319 !important;
  border-color: #d91319 !important;
  color: #fff !important;
}
.cb-fuel-btn-icon {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 8px;
  background: rgba(217,19,25,0.1);
  color: #d91319;
  transition: background .13s, color .13s;
}
.cb-fuel-btn.is-active .cb-fuel-btn-icon {
  background: rgba(255,255,255,0.2) !important;
  color: #fff !important;
}
.cb-fuel-btn-icon svg { width: 15px; height: 15px; }
.cb-fuel-btn-name {
  flex: 1;
  font-size: 0.84rem; font-weight: 800;
  color: inherit;
}
.cb-fuel-btn-minprice {
  flex: 0 0 auto;
  font-size: 0.75rem; font-weight: 900;
  color: #16a34a;
  white-space: nowrap;
  transition: color .13s;
}
.cb-fuel-btn.is-active .cb-fuel-btn-minprice { color: rgba(255,255,255,0.9) !important; }
.cb-fuel-btn-noprice {
  flex: 0 0 auto;
  font-size: 0.65rem; font-weight: 600;
  color: #cbd5e1;
}

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

.cb-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;
}
.cb-ville-btn:hover:not(.is-active) { background: rgba(217,19,25,0.05); border-color: rgba(217,19,25,0.2); }
.cb-ville-btn.is-active {
  background: #d91319 !important;
  border-color: #d91319 !important;
  color: #fff !important;
}
.cb-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;
}
.cb-ville-btn.is-active .cb-ville-btn-icon {
  background: rgba(255,255,255,0.2) !important;
  color: #fff !important;
}
.cb-ville-btn-icon svg { width: 14px; height: 14px; }
.cb-ville-btn-name {
  flex: 1;
  font-size: 0.82rem; font-weight: 800;
  color: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cb-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;
}
.cb-ville-btn.is-active .cb-ville-btn-count {
  color: rgba(255,255,255,0.85) !important;
  background: rgba(255,255,255,0.2) !important;
}

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

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

/* ── Carte station (mode par carburant) ── */
.cb-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;
}
.cb-card:hover { box-shadow: 0 5px 18px rgba(15,23,42,0.09); border-color: rgba(217,19,25,0.15); }
.cb-card--cheapest { border-color: rgba(22,163,74,0.3); }

.cb-card-pump {
  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;
}
.cb-card--cheapest .cb-card-pump { background: rgba(22,163,74,0.1); color: #16a34a; }

.cb-card-body { min-width: 0; }
.cb-card-brand-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cb-card-brand {
  font-size: 0.88rem; font-weight: 900; color: #0f172a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 0; min-width: 0;
}
.cb-card-badge {
  flex: 0 0 auto;
  font-size: 0.62rem; font-weight: 700;
  border-radius: 5px; padding: 2px 7px; white-space: nowrap;
}
.cb-card-badge--cheap { color: #16a34a; background: rgba(22,163,74,0.1); }
.cb-card-adresse {
  display: block; font-size: 0.73rem; color: #64748b; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cb-card-ville {
  display: block; font-size: 0.68rem; color: #94a3b8; margin-top: 2px;
}

.cb-card-right {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
.cb-card-price {
  font-size: 1.15rem; font-weight: 900; color: #0f172a; white-space: nowrap; line-height: 1;
}
.cb-card--cheapest .cb-card-price { color: #16a34a; }
.cb-card-price-unit { font-size: 0.65rem; font-weight: 700; color: #94a3b8; margin-left: 1px; }
.cb-card-diff {
  font-size: 0.68rem; font-weight: 700; color: #94a3b8; white-space: nowrap;
}
.cb-card-maj {
  font-size: 0.6rem; font-weight: 600; color: #cbd5e1; white-space: nowrap;
}

/* ── Carte station complète (mode par ville) ── */
.cb-station-card {
  background: #fff;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(15,23,42,0.04);
  transition: box-shadow .15s;
}
.cb-station-card:hover { box-shadow: 0 5px 18px rgba(15,23,42,0.09); }
.cb-station-header { margin-bottom: 12px; }
.cb-station-brand { font-size: 0.9rem; font-weight: 900; color: #0f172a; display: block; }
.cb-station-adresse { font-size: 0.73rem; color: #64748b; display: block; margin-top: 2px; }

.cb-prices-grid {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.cb-price-chip {
  display: flex; flex-direction: column; align-items: center;
  padding: 7px 12px; background: #f8fafc;
  border: 1px solid rgba(15,23,42,0.07); border-radius: 10px; min-width: 68px;
}
.cb-price-chip--null { opacity: .35; }
.cb-price-chip-label {
  font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: #94a3b8; margin-bottom: 4px; white-space: nowrap;
}
.cb-price-chip-val {
  font-size: 0.92rem; font-weight: 900; color: #0f172a; white-space: nowrap;
}
.cb-price-chip--null .cb-price-chip-val { font-size: 0.75rem; color: #cbd5e1; }

/* ── Erreur / vide ── */
.cb-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);
}
.cb-panel-empty svg { color: #cbd5e1; }
.cb-panel-empty p { font-size: 0.85rem; font-weight: 700; color: #64748b; margin: 0; }
.cb-panel-empty--error p { color: #d91319; }

/* ═══════════════════════════════════════
   COULEURS PAR CARBURANT — palette contrastée
   SP95-E10 → vert médium     (#388e3c)
   Gazole   → or vif          (#c8880a)
   SP98     → vert très sombre(#0d3b0f)
   E85      → turquoise       (#00838f)
   SP95     → vert lime       (#7cb342)
═══════════════════════════════════════ */

/* — Boutons sélecteur — */
.cb-fuel-btn[data-fuel="e10"]    { --fc:#388e3c; --fc-a:rgba(56,142,60,.10);  --fc-h:rgba(56,142,60,.06);  --fc-b:rgba(56,142,60,.30);  }
.cb-fuel-btn[data-fuel="gazole"] { --fc:#c8880a; --fc-a:rgba(200,136,10,.11); --fc-h:rgba(200,136,10,.06); --fc-b:rgba(200,136,10,.30); }
.cb-fuel-btn[data-fuel="sp98"]   { --fc:#0d3b0f; --fc-a:rgba(13,59,15,.12);   --fc-h:rgba(13,59,15,.06);   --fc-b:rgba(13,59,15,.28);   }
.cb-fuel-btn[data-fuel="e85"]    { --fc:#00838f; --fc-a:rgba(0,131,143,.10);  --fc-h:rgba(0,131,143,.05);  --fc-b:rgba(0,131,143,.28);  }
.cb-fuel-btn[data-fuel="sp95"]   { --fc:#7cb342; --fc-a:rgba(124,179,66,.11); --fc-h:rgba(124,179,66,.06); --fc-b:rgba(124,179,66,.28); }

.cb-fuel-btn[data-fuel] .cb-fuel-btn-icon { background: var(--fc-a); color: var(--fc); }
.cb-fuel-btn[data-fuel]:hover:not(.is-active) { background: var(--fc-h); border-color: var(--fc-b); }
.cb-fuel-btn[data-fuel].is-active {
  background: var(--fc) !important;
  border-color: var(--fc) !important;
}
.cb-fuel-btn[data-fuel].is-active .cb-fuel-btn-icon {
  background: rgba(255,255,255,.18) !important;
  color: #fff !important;
}
.cb-fuel-btn[data-fuel].is-active .cb-fuel-btn-minprice { color: rgba(255,255,255,.92) !important; }
.cb-fuel-btn[data-fuel].is-active .cb-fuel-btn-noprice  { color: rgba(255,255,255,.55) !important; }

/* — Icône pompe sur les cards — */
.cb-card[data-fuel="e10"]    { --fc:#388e3c; --fc-a:rgba(56,142,60,.10);  }
.cb-card[data-fuel="gazole"] { --fc:#c8880a; --fc-a:rgba(200,136,10,.11); }
.cb-card[data-fuel="sp98"]   { --fc:#0d3b0f; --fc-a:rgba(13,59,15,.12);   }
.cb-card[data-fuel="e85"]    { --fc:#00838f; --fc-a:rgba(0,131,143,.10);  }
.cb-card[data-fuel="sp95"]   { --fc:#7cb342; --fc-a:rgba(124,179,66,.11); }

.cb-card[data-fuel] .cb-card-pump { background: var(--fc-a); color: var(--fc); }

/* Carte la moins chère : bordure + prix dans la couleur du carburant */
.cb-card--cheapest[data-fuel] { border-color: color-mix(in srgb, var(--fc) 40%, transparent); }
.cb-card--cheapest[data-fuel] .cb-card-pump { background: color-mix(in srgb, var(--fc) 15%, transparent); }
.cb-card--cheapest[data-fuel] .cb-card-price { color: var(--fc); }

/* — Chips par ville : label coloré par type — */
.cb-price-chip[data-fuel="e10"]    { --fc:#388e3c; }
.cb-price-chip[data-fuel="gazole"] { --fc:#c8880a; }
.cb-price-chip[data-fuel="sp98"]   { --fc:#0d3b0f; }
.cb-price-chip[data-fuel="e85"]    { --fc:#00838f; }
.cb-price-chip[data-fuel="sp95"]   { --fc:#7cb342; }
.cb-price-chip[data-fuel]:not(.cb-price-chip--null) .cb-price-chip-label { color: var(--fc); }
.cb-price-chip[data-fuel]:not(.cb-price-chip--null) { border-color: color-mix(in srgb, var(--fc) 25%, transparent); }

/* ── Wrapper colonne gauche + slogan ── */
.cb-left-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Bandeau slogan ── */
.cb-slogan-banner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 0;
  width: 100%;
  box-sizing: border-box;
  background: none;
  border: none;
  box-shadow: none;
  font-family: var(--font);
}
.cb-slogan-banner svg { flex: 0 0 13px; width: 13px; height: 13px; color: #3a9e6f; }
.cb-slogan-banner p { margin: 0; font-size: 0.7rem; font-weight: 500; color: #3a9e6f; white-space: nowrap; }
.cb-slogan-banner strong { font-weight: 800; color: #3a9e6f; }

/* ── Squelettes ── */
.cb-skel-list { display: flex; flex-direction: column; gap: 6px; }
.cb-skel-item {
  height: 52px; border-radius: 10px;
  background: linear-gradient(90deg,#f1f5f9 25%,#e8edf3 50%,#f1f5f9 75%);
  background-size: 200% 100%; animation: cb-skel 1.4s ease-in-out infinite;
}
.cb-skel-item:nth-child(even) { height: 52px; }
.cb-skel-cards { display: flex; flex-direction: column; gap: 8px; }
.cb-skel-card {
  height: 72px; border-radius: 16px;
  background: linear-gradient(90deg,#f1f5f9 25%,#e8edf3 50%,#f1f5f9 75%);
  background-size: 200% 100%; animation: cb-skel 1.4s ease-in-out infinite;
}
@keyframes cb-skel { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

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

/* ── Onglet Favoris dans la barre de modes ── */
.cb-mode-btn--favs {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cb-mode-btn--favs svg { opacity: .55; transition: opacity .15s; }
.cb-mode-btn--favs:hover svg,
.cb-mode-btn--favs.is-active svg { opacity: 1; }

/* ── Bouton cœur sur les cartes ── */
.cb-fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  width: 26px; height: 26px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  transition: color .15s, background .15s, transform .1s;
}
.cb-fav-btn:hover { color: #d91319; background: rgba(217,19,25,0.07); }
.cb-fav-btn.is-fav { color: #d91319; }
.cb-fav-btn:active { transform: scale(.85); }
.cb-fav-btn:disabled { opacity: .4; cursor: wait; }

/* ── En-tête de station avec cœur (mode ville & favoris) ── */
.cb-station-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.cb-station-header-top .cb-station-brand { flex: 1 1 0; min-width: 0; }

/* ── Panneau gauche en mode favoris ── */
.cb-favs-left-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  background: rgba(217,19,25,0.05);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
}
.cb-favs-left-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  text-align: center;
}
.cb-favs-login-link {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #d91319;
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 8px;
  background: rgba(217,19,25,0.07);
  transition: background .15s;
}
.cb-favs-login-link:hover { background: rgba(217,19,25,0.13); }

/* ── CTA Club (utilisateur non connecté) ── */
.cb-cta-club {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 52px 32px 44px;
  background: #fff;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 24px;
  box-shadow: 0 2px 12px rgba(15,23,42,0.05);
  max-width: 420px;
  margin: 0 auto;
  font-family: var(--font);
}
.cb-cta-club-heart {
  width: 68px; height: 68px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(217,19,25,0.09);
  border-radius: 50%;
  color: #d91319;
  flex: 0 0 68px;
}
.cb-cta-club-title {
  font-size: 1.18rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}
.cb-cta-club-desc {
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
  max-width: 310px;
}
.cb-cta-club-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 230px;
}
.cb-cta-btn {
  display: block;
  padding: 11px 20px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  letter-spacing: .02em;
  transition: opacity .15s, transform .12s;
}
.cb-cta-btn:hover { opacity: .88; transform: translateY(-1px); }
.cb-cta-btn--signup { background: #d91319; color: #fff; }
.cb-cta-btn--login  { background: rgba(217,19,25,0.09); color: #d91319; }

/* ── Empty state — hint ── */
.cb-panel-empty-hint {
  font-size: 0.73rem !important;
  font-weight: 600 !important;
  color: #cbd5e1 !important;
  margin: 0 !important;
}

/* ── Ligne ville + cœur (mode par ville) ── */
.cb-ville-row {
  display: flex;
  align-items: center;
  gap: 2px;
}
.cb-ville-row .cb-ville-btn { flex: 1 1 0; min-width: 0; }
.cb-ville-row .cb-fav-btn   { flex: 0 0 28px; }

/* ── Header panel avec marge top (2e section favoris) ── */
.cb-panel-header--mt { margin-top: 24px; }

/* ── Carte ville favorite ── */
.cb-favville-card {
  background: #fff;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(15,23,42,0.04);
}
.cb-favville-name { font-size: 0.96rem !important; font-weight: 900 !important; }
.cb-favville-stations {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.cb-favville-station {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,0.06);
}
.cb-favville-station--cheapest {
  background: rgba(22,163,74,0.05);
  border-color: rgba(22,163,74,0.2);
}
.cb-favville-station-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.cb-favville-station-top .cb-station-brand { flex: 1; font-size: 0.82rem; }
.cb-favville-station .cb-station-adresse { font-size: 0.7rem; margin-bottom: 7px; display: block; }
.cb-favville-station .cb-prices-grid { gap: 4px; }
.cb-favville-station .cb-price-chip { padding: 5px 8px; min-width: 58px; }

/* ── Liens inline dans l'état vide ── */
.cb-empty-tab-link {
  display: inline;
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
  color: #d91319;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cb-empty-tab-link:hover { opacity: .75; }

/* ── Responsive ── */
@media (max-width: 720px) {
  .cb-layout { grid-template-columns: 1fr; }
  .cb-left-stack { position: static; }
  .cb-updated { display: none; }
  .cb-cta-club { padding: 36px 20px 28px; }
}
@media (max-width: 420px) {
  .cb-card { grid-template-columns: 38px 1fr; gap: 10px; }
  .cb-card-pump { width: 38px; height: 38px; flex: 0 0 38px; }
  .cb-card-right { grid-column: 2; flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
}
