/* ===========================================================
   ETHASTOP — Dashboard layout (inspiré DKcal, palette rosée)
   =========================================================== */

/* ============== TOP NAVBAR ============== */
.navbar {
  display: flex;
  align-items: center;
  height: var(--navbar-height);
  padding: 0 var(--sp-lg);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: var(--sp-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar-left, .navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-shrink: 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-shrink: 0;
}
.navbar-brand img { width: 28px; height: 28px; }
.navbar-brand h1 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
}

/* Date-nav centrée par rapport au viewport, pas au flexbox */
.navbar-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  pointer-events: none; /* laisse passer le clic en dehors des enfants… */
}
.navbar-center > * { pointer-events: auto; } /* …mais garde-les actifs sur les enfants */
/* La navbar grow naturellement les left/right autour */
.navbar { position: relative; justify-content: space-between; }
.navbar > .navbar-actions { margin-left: auto; }

/* === Date nav (intégrée à la navbar) === */
.date-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
}
.date-nav button.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 1rem;
  background: transparent;
}
.date-nav button.nav:hover { color: var(--accent); background: var(--accent-bg); }

.date-nav .date-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 180px;
  text-align: center;
  cursor: pointer;
  padding: 0 var(--sp-sm);
}
.date-nav .date-label:hover { color: var(--accent); }
.date-nav .date-label.today { color: var(--accent-bright); }

/* === Boutons navbar === */
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.nav-btn:hover {
  color: var(--text-primary);
  border-color: var(--glass-border-hover);
  background: var(--bg-elevated);
}
.nav-btn svg { width: 15px; height: 15px; opacity: 0.75; }

.nav-btn-primary {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}
.nav-btn .plus {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 0.8;
  margin-right: -2px;
  position: relative;
  top: 1px;
}
.nav-btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
  color: #fff;
}

.nav-btn-round {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}
.nav-btn-round:hover { border-color: var(--accent); color: var(--accent); }
.nav-btn-round.danger:hover { border-color: var(--danger); color: var(--danger); }

/* L'ampoule du bouton aide reste jaune en permanence pour attirer l'œil,
   même quand le bouton autour est dans son état neutre. */
#help-btn svg {
  color: #fbbf24;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.45));
}
#help-btn:hover { border-color: #fbbf24; }
#help-btn:hover svg {
  color: #fcd34d;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.7));
}

/* Indicateur "nouveauté non vue" sur le bouton changelog */
.rainbow-blink {
  animation: rainbow-glow 2.4s ease-in-out infinite;
}
@keyframes rainbow-glow {
  0%   { border-color: #ff6b6b; color: #ff6b6b; box-shadow: 0 0 12px rgba(255, 107, 107, 0.4); }
  25%  { border-color: #ffd93d; color: #ffd93d; box-shadow: 0 0 12px rgba(255, 217, 61, 0.4); }
  50%  { border-color: #6bcb77; color: #6bcb77; box-shadow: 0 0 12px rgba(107, 203, 119, 0.4); }
  75%  { border-color: #4d96ff; color: #4d96ff; box-shadow: 0 0 12px rgba(77, 150, 255, 0.4); }
  100% { border-color: #ff6b6b; color: #ff6b6b; box-shadow: 0 0 12px rgba(255, 107, 107, 0.4); }
}

.username-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0 4px;
}

.impersonating-badge {
  font-size: 0.7rem;
  padding: 4px 10px;
  background: rgba(255, 192, 72, 0.15);
  color: var(--warning);
  border: 1px solid rgba(255, 192, 72, 0.3);
  border-radius: var(--radius-md);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.impersonating-badge button {
  color: var(--warning);
  font-size: 0.95rem;
  line-height: 1;
}

/* ============== MAIN ============== */
.main-content {
  padding: var(--sp-lg) var(--sp-xl) var(--sp-2xl);
}

/* ============== SUMMARY CARDS (totaux du jour) ============== */
.summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
}
.summary-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}
.summary-card:hover { border-color: var(--glass-border-hover); }
.summary-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.card-units::before  { background: linear-gradient(90deg, var(--units-color), #fda4af); }
.card-pure::before   { background: linear-gradient(90deg, var(--warning), #fde68a); }
.card-volume::before { background: linear-gradient(90deg, var(--volume-color), #67e8f9); }

.summary-card .card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-md);
}
.summary-card .card-icon svg { width: 20px; height: 20px; }
.card-units .card-icon  { background: rgba(251, 113, 133, 0.12); color: var(--units-color); }
.card-pure .card-icon   { background: rgba(251, 191, 36, 0.12); color: var(--warning); }
.card-volume .card-icon { background: rgba(34, 211, 238, 0.12); color: var(--volume-color); }

.summary-card .card-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 4px;
}
.summary-card .card-unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 4px;
}
.summary-card .card-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 4px;
}

.card-units  .card-value { color: var(--units-color); }
.card-pure   .card-value { color: var(--warning); }
.card-volume .card-value { color: var(--volume-color); }

/* État "jour sans alcool" : la première card prend toute la largeur, contenu centré horizontalement */
.summary-row.dry { grid-template-columns: 1fr; }
.summary-row.dry .card-pure,
.summary-row.dry .card-volume { display: none; }
.summary-row.dry .card-units {
  text-align: center;
  padding: var(--sp-xl) var(--sp-lg);
}
.summary-row.dry .card-units::before { background: linear-gradient(90deg, var(--dry-color), #38f9d7); }
.summary-row.dry .card-units .card-icon {
  background: rgba(67, 233, 123, 0.18);
  color: var(--dry-color);
  width: 56px; height: 56px;
  margin: 0 auto var(--sp-md);
}
.summary-row.dry .card-units .card-icon svg { width: 28px; height: 28px; }
.summary-row.dry .card-units .card-value {
  color: var(--dry-color);
  font-size: 2rem;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-block;
  margin-bottom: 4px;
}
.summary-row.dry .card-units .card-label {
  color: var(--dry-color);
  opacity: 0.85;
}

/* ============== CONSUMPTION PANEL ============== */
.consumption-panel {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: var(--sp-lg);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md) var(--sp-lg);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.15);
}
.panel-header h2 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}
.panel-header h2 .count {
  background: var(--accent-bg);
  color: var(--accent-bright);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.panel-actions { display: flex; gap: 6px; }

/* Liste des consommations */
.consumption-list {
  display: flex;
  flex-direction: column;
}
.consumption-item {
  display: grid;
  grid-template-columns: 70px minmax(180px, 1.5fr) 1fr 1fr 1fr 36px;
  align-items: center;
  column-gap: var(--sp-lg);
  padding: 14px var(--sp-lg);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}
.consumption-item:last-child { border-bottom: none; }
.consumption-item:hover { background: var(--bg-hover); }

.consumption-item .time {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.consumption-item .name {
  font-weight: 500;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  min-width: 0;
}
.consumption-item .name .label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.consumption-item .count-badge {
  background: var(--accent-bg);
  color: var(--accent-bright);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  flex-shrink: 0;
}

/* Trois colonnes alignées : volume / alcool pur / unités. Format verbeux. */
.consumption-item .col-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.88rem;
}
.consumption-item .col-stat .v {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}
.consumption-item .col-stat .l {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.consumption-item .col-volume .v  { color: var(--volume-color); }
.consumption-item .col-alcohol .v { color: var(--warning); }
.consumption-item .col-units .v   { color: var(--accent-bright); }

.consumption-item .delete {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 1.1rem;
  background: transparent;
}
.consumption-item .delete:hover { color: var(--danger); background: rgba(255, 71, 87, 0.08); }

/* Type indicator (barre verticale colorée à gauche) */
.consumption-item .type-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-muted);
}
.consumption-item[data-type="wine"] .type-dot     { background: #c9243f; }
.consumption-item[data-type="beer"] .type-dot     { background: #f0b042; }
.consumption-item[data-type="spirit"] .type-dot   { background: #b08a4a; }
.consumption-item[data-type="cocktail"] .type-dot { background: #d65aa8; }

.empty-state {
  padding: var(--sp-2xl);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.empty-state.dry {
  color: var(--dry-color);
}
.empty-state .hint {
  display: block;
  margin-top: var(--sp-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============== TENDANCE (stats inline en grand) ============== */
.trend-panel {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-lg);
}
.trend-panel .panel-header {
  background: transparent;
  padding: 0 0 var(--sp-md);
  border-bottom: 0;
}

.range-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
}
.range-tabs button {
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.range-tabs button:hover { color: var(--text-primary); }
.range-tabs button.active {
  background: var(--accent-bg);
  color: var(--accent-bright);
  font-weight: 600;
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid var(--border-subtle);
}
.stats-summary .stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stats-summary .stat .value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
}
.stats-summary .stat .value.dry { color: var(--dry-color); }
.stats-summary .stat .value.units { color: var(--units-color); }
.stats-summary .stat .value.alcohol { color: var(--warning); }
.stats-summary .stat .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}

.chart-wrap {
  position: relative;
  height: 320px;
  width: 100%;
}

/* ============== Notes (compact, intégré) ============== */
.notes-row {
  margin-bottom: var(--sp-lg);
}
.notes-row textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-md) var(--sp-lg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  resize: vertical;
  min-height: 60px;
  transition: border-color var(--transition-fast);
}
.notes-row textarea::placeholder { color: var(--text-muted); }
.notes-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* ============== DRINK MODAL : liste fluide à la DKcal ============== */
.drink-modal-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.drink-search-wrap { position: relative; }
.drink-search-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
}
.drink-search-input::placeholder { color: var(--text-muted); }
.drink-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.drink-new-btn {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
}

.drink-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 55vh;
  overflow-y: auto;
  padding: 2px;
}

.drink-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: var(--sp-md);
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
}
.drink-row:hover {
  background: var(--bg-card-solid);
  border-color: var(--accent);
  transform: translateX(2px);
}

.drink-row-name {
  font-weight: 500;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drink-row-meta {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-bright);
  background: var(--accent-bg);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 500;
}
.drink-row-edit {
  width: 24px;
  text-align: center;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity var(--transition-fast);
  font-size: 0.85rem;
}
.drink-row:hover .drink-row-edit {
  opacity: 0.7;
}

/* État vide */
.drink-empty {
  text-align: center;
  padding: var(--sp-2xl) var(--sp-lg);
}
.drink-empty-icon {
  font-size: 3rem;
  margin-bottom: var(--sp-md);
  opacity: 0.6;
}
.drink-empty-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--sp-sm);
  color: var(--text-primary);
}
.drink-empty-hint {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.6;
}
.drink-empty-hint strong { color: var(--accent-bright); font-weight: 600; }

/* ============== STATS MODAL ============== */
.stats-modal-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}
.stats-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
}
.stats-modal-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stats-modal-subtitle .period-label::before {
  content: '⌖ ';
  opacity: 0.6;
}

/* Stats en grille de cards distinctes (relief, accent stripe) */
.stats-modal-body .stats-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-sm);
  padding: 0;
  margin: 0;
  border-bottom: none;
}
.stats-modal-body .stats-summary .stat {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px 12px;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}
.stats-modal-body .stats-summary .stat:hover { border-color: var(--glass-border-hover); }
.stats-modal-body .stats-summary .stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  opacity: 0.85;
}
.stats-modal-body .stats-summary .stat:nth-child(1)::before { background: linear-gradient(90deg, var(--units-color), #fda4af); }
.stats-modal-body .stats-summary .stat:nth-child(2)::before { background: linear-gradient(90deg, var(--dry-color), #86efac); }
.stats-modal-body .stats-summary .stat:nth-child(3)::before { background: linear-gradient(90deg, var(--warning), #fde68a); }
.stats-modal-body .stats-summary .stat:nth-child(4)::before { background: linear-gradient(90deg, var(--volume-color), #67e8f9); }

.stats-modal-body .stats-summary .stat .value {
  font-size: 1.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 6px;
}
.stats-modal-body .stats-summary .stat .label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* Section "Tendance" : container avec header + chart */
.trend-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-md) var(--sp-md) var(--sp-sm);
  position: relative;
  overflow: hidden;
}
.trend-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0.8;
}
.trend-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-sm);
  padding-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--border-subtle);
}
.trend-section-header h3 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.trend-section-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.stats-modal-body .chart-wrap {
  height: 300px;
}

/* Tendance dans le summary stats */
.stats-summary .stat .value.trend-up { color: #f87171; }
.stats-summary .stat .value.trend-down { color: var(--dry-color); }
.stats-summary .stat .value.trend-flat { color: var(--text-secondary); }

/* Légende du chart */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 6px 0 var(--sp-md);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--sp-sm);
}
.chart-legend .lg-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chart-legend .lg-swatch {
  display: inline-block;
  flex-shrink: 0;
}
.chart-legend .lg-line {
  width: 18px;
  height: 2px;
  border-radius: 1px;
}
.chart-legend .lg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.chart-legend .lg-dash {
  width: 18px;
  height: 2px;
  /* La couleur vient du background inline ; le mask donne l'effet pointillé */
  -webkit-mask-image: linear-gradient(to right, black 50%, transparent 50%);
          mask-image: linear-gradient(to right, black 50%, transparent 50%);
  -webkit-mask-size: 6px 2px;
          mask-size: 6px 2px;
  -webkit-mask-repeat: repeat-x;
          mask-repeat: repeat-x;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 900px) {
  .summary-row { grid-template-columns: repeat(3, 1fr); gap: var(--sp-sm); }
  .summary-card { padding: var(--sp-md); }
  .summary-card .card-value { font-size: 1.5rem; }
  .stats-summary { grid-template-columns: repeat(2, 1fr); }
  .navbar-center { display: none; } /* la date passe ailleurs en mobile */
}

@media (max-width: 600px) {
  .navbar { padding: 0 var(--sp-md); gap: var(--sp-sm); }
  .navbar-brand h1 { display: none; }
  .nav-btn span.lbl { display: none; } /* boutons icon-only sur mobile */
  .main-content { padding: var(--sp-md) var(--sp-md) var(--sp-2xl); }
  .summary-row { grid-template-columns: 1fr 1fr; }
  .summary-row .card-volume { grid-column: 1 / -1; }
  .consumption-item {
    grid-template-columns: 56px 1fr auto 28px;
    column-gap: var(--sp-sm);
  }
  .consumption-item .meta,
  .consumption-item .alcohol { display: none; }
}

/* ============== MODAL EXPORT ============== */
.export-body { display: flex; flex-direction: column; gap: var(--sp-md); }
.export-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.export-range-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
}
.export-range-tabs .range-tab {
  flex: 1 1 auto;
  min-width: 70px;
  padding: 7px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: transparent;
  border: none;
  font-weight: 500;
  transition: all var(--transition-fast);
}
.export-range-tabs .range-tab:hover { color: var(--text-primary); }
.export-range-tabs .range-tab.active {
  background: var(--accent-bg);
  color: var(--accent-bright);
  font-weight: 600;
}

/* ============== DATE-PICKER CUSTOM ============== */
.datepicker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: transparent;
}
.datepicker-popup {
  position: fixed;
  width: 280px;
  background: var(--bg-card-solid);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(34, 197, 94, 0.12);
  font-family: var(--font-sans);
  animation: dp-pop 0.15s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes dp-pop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.dp-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.dp-month {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-transform: capitalize;
}
.dp-nav {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.1rem;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.dp-nav:hover { background: var(--bg-hover); color: var(--accent-bright); }

.dp-today {
  width: 100%;
  padding: 6px 0;
  margin-bottom: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.dp-today:hover {
  color: var(--accent-bright);
  border-color: var(--accent);
}

.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.dp-wd {
  text-align: center;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 0 6px;
}
.dp-day {
  position: relative;
  aspect-ratio: 1;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.dp-day:hover { background: var(--bg-hover); }
.dp-day-other {
  color: var(--text-muted);
  opacity: 0.4;
}
.dp-day-today {
  font-weight: 700;
  color: var(--accent-bright);
}
.dp-day-today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-bright);
}
.dp-day-selected {
  background: var(--accent-gradient);
  color: #ffffff;
  font-weight: 700;
}
.dp-day-selected::after { display: none; }
.dp-day-selected:hover {
  background: var(--accent-gradient);
  filter: brightness(1.08);
}

/* Mobile date row (sous la navbar quand la date sort de la navbar) */
.mobile-date-row {
  display: none;
  justify-content: center;
  padding: var(--sp-md) var(--sp-md) 0;
}
@media (max-width: 900px) {
  .mobile-date-row { display: flex; }
}
