/* ============================================================
   BATLIFE - style.css
   ============================================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary:    #0f172a;
  --bg-card:       #1e293b;
  --bg-card-hover: #334155;
  --text-primary:  #f8fafc;
  --text-secondary:#94a3b8;
  --accent:        #0ea5e9;
  --success:       #22c55e;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --border:        #334155;
}

/* ============================================================
   BASE
   ============================================================ */
body {
  font-family: system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  padding-bottom: 95px;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

.hidden { display: none !important; }

/* ============================================================
   CARTES
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(14,165,233,0.08);
}

.tip-card {
  background: rgba(14,165,233,0.15);
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 14px;
  margin: 12px 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ============================================================
   ALERTES
   ============================================================ */
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin: 10px 0;
  font-size: 0.88rem;
  border-left: 4px solid transparent;
  line-height: 1.5;
}

.alert-info    { background: rgba(14,165,233,0.1);  color: #7dd3fc; border-left-color: var(--accent);  }
.alert-success { background: rgba(34,197,94,0.1);   color: #86efac; border-left-color: var(--success); }
.alert-warning { background: rgba(245,158,11,0.1);  color: #fde047; border-left-color: var(--warning); }
.alert-danger  { background: rgba(239,68,68,0.15);  color: #fca5a5; border-left-color: var(--danger);  }

/* ============================================================
   BADGE
   ============================================================ */
.badge {
  background: rgba(14,165,233,0.2);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

/* ============================================================
   TOAST
   ============================================================ */
#toast {
  display: none;
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: white;
  border: 1px solid var(--accent);
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: bold;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}

@keyframes fadeInOut {
  0%   { opacity: 0; transform: translateX(-50%) translateY(10px); }
  15%  { opacity: 1; transform: translateX(-50%) translateY(0);    }
  75%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.lang-switcher {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lang-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: bold;
  transition: all 0.2s ease;
}

.lang-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(14,165,233,0.1);
}
/* === Nouveau menu déroulant langue === */
.lang-select-wrapper {
  flex-shrink: 0;
  position: relative;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 30px 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.lang-select:hover,
.lang-select:focus {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(14,165,233,0.1);
}

.lang-select-wrapper::after {
  content: "▼";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  color: var(--accent);
  pointer-events: none;
}

.lang-select option {
  background: #1e293b;
  color: white;
  padding: 8px;
}

/* ============================================================
   BANNIÈRE NOTIFICATION
   ============================================================ */
.notif-banner {
  background: linear-gradient(90deg, #0284c7, #0ea5e9);
  color: white;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(14,165,233,0.3);
}

.notif-banner button {
  background: white;
  color: #0284c7;
  margin-top: 0;
  padding: 10px;
  font-size: 0.9rem;
}

/* ============================================================
   LISTES DE CONSEILS
   ============================================================ */
ul.tips-list {
  list-style: none;
  padding: 0;
}

ul.tips-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}

ul.tips-list li::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.1rem;
  top: -1px;
}

ul.tips-list.danger-list li::before {
  color: var(--danger);
}

/* ============================================================
   FORMULAIRES
   ============================================================ */
input, select {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #0b0f19;
  color: white;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.1);
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 12px;
  font-weight: 600;
}

.input-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
  min-height: 18px;
}

/* ============================================================
   BOUTONS
   ============================================================ */
button {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 10px;
}

button.primary   { background: var(--accent);              color: white; }
button.success   { background: var(--success);             color: white; }
button.secondary { background: var(--bg-card-hover);       color: white; }
button.danger-btn{ background: rgba(239,68,68,0.2);        color: var(--danger); }

button:active { opacity: 0.85; transform: scale(0.98); }

button.primary:hover   { background: #0284c7; box-shadow: 0 4px 15px rgba(14,165,233,0.3); }
button.success:hover   { background: #16a34a; box-shadow: 0 4px 15px rgba(34,197,94,0.3);  }
button.secondary:hover { background: #475569; }

/* ============================================================
   BOUTONS DE MODE
   ============================================================ */
.mode-group {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}

.mode-btn {
  flex: 1;
  padding: 12px;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  color: var(--text-secondary);
  border-radius: 10px;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
}

.mode-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(14,165,233,0.1);
  box-shadow: 0 2px 10px rgba(14,165,233,0.2);
}

/* ============================================================
   NAVIGATION BAS DE PAGE
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  display: flex;
  border-top: 1px solid var(--border);
  z-index: 999;
  backdrop-filter: blur(10px);
}

.tabBtn {
  flex: 1;
  background: none;
  color: #cbd5e1;                /* ⬅️ Couleur claire (meilleur contraste) */
  font-size: 0.7rem;             /* ⬅️ Légèrement plus grand pour lisibilité */
  padding: 10px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 4px;
  border: none;
  cursor: pointer;
  font-weight: 600;              /* ⬅️ Légèrement plus fin que bold */
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
}

.tabBtn:hover {
  background: rgba(255,255,255,0.08);
  color: #f1f5f9;                /* ⬅️ Encore plus clair au survol */
}

.tabBtn.active {
  color: #38bdf8;                /* ⬅️ Bleu lumineux (meilleur contraste que --accent) */
  background: rgba(14,165,233,0.18);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14,165,233,0.2);
  font-weight: 700;
}

.tabBtn.active::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 30%;
  right: 30%;
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 3px 3px;
  box-shadow: 0 0 8px var(--accent);
}

.tabBtn.active .tab-icon {
  transform: scale(1.15);
  transition: transform 0.3s ease;
}

.tab-icon { font-size: 1.2rem; }

/* ============================================================
   SOUS-ONGLETS
   ============================================================ */
.sub-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin-bottom: 14px;
  background: #0b0f19;
  padding: 4px;
  border-radius: 10px;
}

.sub-tabs-2 { grid-template-columns: repeat(2, 1fr); }
.sub-tabs-3 { grid-template-columns: repeat(3, 1fr); }

.sub-tab {
  padding: 8px 4px;
  font-size: 0.68rem;
  background: none;
  color: var(--text-secondary);
  margin: 0;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  white-space: nowrap;
  text-align: center;
  width: 100%;
  transition: all 0.2s ease;
}

.sub-tab.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px rgba(14,165,233,0.3);
}

.sub-content { display: none; }
.sub-content.active { display: block; }

/* ============================================================
   BARRE DE PROGRESSION
   ============================================================ */
.progress-container {
  width: 100%;
  height: 26px;
  background: #0b0f19;
  border-radius: 13px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  margin: 15px 0;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  transition: width 0.8s ease;
  position: relative;
  overflow: hidden;
}

/* Effet shimmer sur la barre de progression */
.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.2),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0%   { left: -100%; }
  100% { left: 100%;  }
}

.progress-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: bold;
  color: white;
}

/* ============================================================
   KPI
   ============================================================ */
.kpi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0;
}

.kpi3 { grid-template-columns: 1fr 1fr 1fr; }

.kpi-item {
  background: #0b0f19;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14,165,233,0.15);
}

.kpi-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--accent);
}

.kpi-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ============================================================
   MODALES
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-box h3 {
  margin-bottom: 12px;
  font-size: 1.1rem;
}

/* ============================================================
   TIMER
   ============================================================ */
.timer-display {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  font-family: monospace;
  text-align: center;
  background: #0b0f19;
  padding: 14px 24px;
  border-radius: 12px;
  border: 2px solid var(--border);
  letter-spacing: 2px;
}

/* ============================================================
   CARTES CONSEILS CLIQUABLES
   ============================================================ */
.advice-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  margin: 10px 0;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.advice-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(33,150,243,0.3);
}

.advice-title {
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
}

.advice-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 16px;
  transition: max-height 0.4s ease, padding 0.4s ease;
  color: #b0b0b0;
  line-height: 1.5;
  font-size: 0.9rem;
}

.advice-card.open .advice-content {
  max-height: 300px;
  padding: 0 16px 14px;
}

.advice-icon {
  font-size: 1.3em;
  opacity: 0.6;
  transition: transform 0.3s ease;
  font-weight: bold;
}

.advice-card.open .advice-icon {
  transform: rotate(45deg);
  color: #2196F3;
  opacity: 1;
}

/* ============================================================
   SPLASH SCREEN
   ============================================================ */
#splashScreen {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f1419 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-content {
  text-align: center;
  animation: splashAppear 1s ease-out;
}

.splash-icon {
  font-size: 100px;
  margin-bottom: 20px;
  display: inline-block;
  animation: splashPulse 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(14,165,233,0.6));
}

.splash-title {
  font-size: 3.5rem;
  font-weight: 200;
  letter-spacing: 8px;
  color: #ffffff;
  margin-bottom: 15px;
  background: linear-gradient(90deg, #ffffff 0%, #b0bec5 50%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: splashShine 3s linear infinite;
}

.splash-subtitle {
  font-size: 1rem;
  color: #b0bec5;
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 40px;
  min-height: 24px;
  animation: splashSubtitleFade 0.5s ease-in-out;
}

.splash-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.splash-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b0bec5;
  animation: splashDots 1.4s ease-in-out infinite;
}

.splash-dots span:nth-child(2) { animation-delay: 0.2s; }
.splash-dots span:nth-child(3) { animation-delay: 0.4s; }

.splash-version {
  position: absolute;
  bottom: 30px;
  left: 0; right: 0;
  text-align: center;
  color: #607d8b;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 1px;
  opacity: 0.7;
}

/* ============================================================
   ANIMATIONS SPLASH
   ============================================================ */
@keyframes splashAppear {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1);   }
}

@keyframes splashPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 30px rgba(14,165,233,0.6));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 50px rgba(14,165,233,0.9));
  }
}

@keyframes splashShine {
  to { background-position: 200% center; }
}

@keyframes splashDots {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40%           { opacity: 1;   transform: scale(1.2); }
}

@keyframes splashSubtitleFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ============================================================
   TEMPÉRATURE (nouveau)
   ============================================================ */
.temp-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: bold;
  margin: 8px 0;
}

.temp-cold   { background: rgba(14,165,233,0.15); color: #7dd3fc; border: 1px solid var(--accent); }
.temp-ok     { background: rgba(34,197,94,0.15);  color: #86efac; border: 1px solid var(--success); }
.temp-hot    { background: rgba(239,68,68,0.15);  color: #fca5a5; border: 1px solid var(--danger); }

/* ============================================================
   BADGES / GAMIFICATION (nouveau)
   ============================================================ */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0;
}

.badge-item {
  background: #0b0f19;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  transition: all 0.3s ease;
}

.badge-item.earned {
  border-color: var(--warning);
  background: rgba(245,158,11,0.1);
  box-shadow: 0 0 15px rgba(245,158,11,0.2);
}

.badge-item.locked {
  opacity: 0.4;
  filter: grayscale(1);
}

.badge-emoji { font-size: 2rem; display: block; margin-bottom: 6px; }
.badge-name  { font-size: 0.68rem; color: var(--text-secondary); font-weight: bold; }

/* ============================================================
   JOURNAL D'ENTRETIEN (nouveau)
   ============================================================ */
.maintenance-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  border-left: 4px solid var(--accent);
  transition: all 0.2s ease;
}

.maintenance-item:hover {
  border-left-color: var(--success);
  transform: translateX(2px);
}

.maintenance-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.maintenance-text {
  font-size: 0.88rem;
  color: var(--text-primary);
}

/* ============================================================
   MULTI-BATTERIE (nouveau)
   ============================================================ */
.battery-selector {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px 0;
  scrollbar-width: none;
  margin-bottom: 10px;
}

.battery-selector::-webkit-scrollbar { display: none; }

.battery-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.battery-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(14,165,233,0.1);
}

.battery-pill.add-btn {
  border-style: dashed;
  color: var(--success);
  border-color: var(--success);
}

/* ============================================================
   SCORE DE SANTÉ ANIMÉ (nouveau)
   ============================================================ */
.health-score-ring {
  width: 140px;
  height: 140px;
  margin: 0 auto 16px;
  position: relative;
}

.health-score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.health-score-ring .ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 10;
}

.health-score-ring .ring-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease, stroke 0.5s ease;
}

.health-score-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 900;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 360px) {
  .kpi3 { grid-template-columns: 1fr 1fr; }
  .badge-grid { grid-template-columns: repeat(2, 1fr); }
  .splash-title { font-size: 2.5rem; }
  .sub-tab { font-size: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
/* ============================================================
   CARTES ACCORDÉON ÉLÉGANTES - CONSEILS
   ============================================================ */

.tips-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.tip-card-accordion {
  background: linear-gradient(135deg, rgba(14,165,233,0.08), rgba(14,165,233,0.02));
  border: 1px solid rgba(14,165,233,0.25);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tip-card-accordion:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(14,165,233,0.15), rgba(14,165,233,0.05));
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(14,165,233,0.15);
}

.tip-card-accordion.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(14,165,233,0.18), rgba(14,165,233,0.06));
}

.tip-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  gap: 10px;
  user-select: none;
}

.tip-card-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.tip-card-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.tip-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.tip-card-arrow {
  font-size: 0.8rem;
  color: var(--accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.tip-card-accordion.active .tip-card-arrow {
  transform: rotate(180deg);
}

.tip-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.tip-card-accordion.active .tip-card-body {
  max-height: 400px;
  padding: 0 16px 16px 16px;
}

/* Variantes couleur selon catégorie */
.tip-card-accordion.warning {
  background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(245,158,11,0.02));
  border-color: rgba(245,158,11,0.25);
}
.tip-card-accordion.warning:hover,
.tip-card-accordion.warning.active {
  border-color: var(--warning);
  background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(245,158,11,0.06));
}
.tip-card-accordion.warning .tip-card-arrow {
  color: var(--warning);
}

.tip-card-accordion.danger {
  background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(239,68,68,0.02));
  border-color: rgba(239,68,68,0.25);
}
.tip-card-accordion.danger:hover,
.tip-card-accordion.danger.active {
  border-color: var(--danger);
  background: linear-gradient(135deg, rgba(239,68,68,0.18), rgba(239,68,68,0.06));
}
.tip-card-accordion.danger .tip-card-arrow {
  color: var(--danger);
}

/* Section titres */
.tips-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 20px 0 8px 0;
  padding-left: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tips-section-title.golden {
  color: var(--accent);
}
.tips-section-title.winter {
  color: var(--warning);
}
.tips-section-title.danger {
  color: var(--danger);
}

/* Disclaimer */
.batlife-disclaimer {
  margin-top: 24px;
  padding: 14px 16px;
  background: rgba(100,116,139,0.1);
  border-left: 3px solid var(--text-secondary);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}

/* ============================================================
   MENU DÉROULANT LANGUE
   ============================================================ */

.lang-select-wrapper {
  position: relative;
  display: inline-block;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(14,165,233,0.12);
  border: 1.5px solid rgba(14,165,233,0.3);
  color: var(--text-primary);
  padding: 6px 32px 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.lang-select:hover {
  background: rgba(14,165,233,0.2);
  border-color: var(--accent);
}

.lang-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.2);
}

.lang-select-wrapper::after {
  content: "▼";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  color: var(--accent);
  pointer-events: none;
}

.lang-select option {
  background: #1e293b;
  color: var(--text-primary);
  padding: 8px;
}
/* ============================================================
   ACCESSIBILITÉ - Texte caché visuellement mais lu par les
   lecteurs d'écran
   ============================================================ */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
/* ============================================ */
/* 🚀 BATLIFE - AMÉLIORATIONS UI v3 (FINAL)    */
/* Adapté EXACTEMENT à votre HTML               */
/* ============================================ */

/* ============================================ */
/* 1️⃣ TITRES H1 - Plus compacts                */
/* ============================================ */

.app-container h1 {
  font-size: 1.35rem !important;
  line-height: 1.25 !important;
  margin: 12px 0 14px !important;
  font-weight: 800 !important;
}

/* Titre de l'écran Accueil avec badge à droite */
#screenHome h1 {
  font-size: 1.25rem !important;
  gap: 10px;
}

/* ============================================ */
/* 2️⃣ SOUS-ONGLETS SCROLLABLES (Stats x5)     */
/* ============================================ */

/* Override du grid pour permettre le scroll horizontal */
.sub-tabs {
  display: flex !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  gap: 4px !important;
  /* Désactive le grid */
  grid-template-columns: none !important;
}

.sub-tabs::-webkit-scrollbar {
  display: none !important;
}

/* Onglets de taille naturelle */
.sub-tabs .sub-tab {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  padding: 9px 14px !important;
  font-size: 0.78rem !important;
  min-width: max-content !important;
  scroll-snap-align: start;
}

/* Pour les barres de 2 ou 3 onglets : on garde le grid (ça rentre) */
.sub-tabs-2,
.sub-tabs-3 {
  display: grid !important;
}
.sub-tabs-2 { grid-template-columns: repeat(2, 1fr) !important; }
.sub-tabs-3 { grid-template-columns: repeat(3, 1fr) !important; }

.sub-tabs-2 .sub-tab,
.sub-tabs-3 .sub-tab {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

/* ============================================ */
/* 3️⃣ HEADER : sélecteur langue compact        */
/* ============================================ */

.app-header {
  padding: 4px 0 !important;
}

.lang-select {
  font-size: 0.78rem !important;
  padding: 5px 28px 5px 10px !important;
}

/* ============================================ */
/* 4️⃣ INDICE SANTÉ - retire le doublon "100%" */
/* ============================================ */

/* Le grand chiffre vert sous le cercle */
#txtHealthScore {
  display: none !important;
}

/* ============================================ */
/* 5️⃣ ANIMATIONS BONUS                         */
/* ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeInUp 0.4s ease-out;
}

/* Cercle santé animé */
@keyframes drawCircle {
  from {
    stroke-dashoffset: 440;
  }
}

#healthRingContainer svg .ring-fill {
  animation: drawCircle 1.5s ease-out;
}

/* ============================================ */
/* 6️⃣ BOUTON LANGUE - icône globe optionnelle */
/* ============================================ */

/* Conteneur header plus aéré */
.app-header {
  gap: 12px;
}
/* Petite flèche animée pour indiquer le scroll */
#screenDashboard .sub-tabs {
  position: relative;
}

#screenDashboard .sub-tabs::after {
  content: '›';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: bold;
  pointer-events: none;
  animation: pulseArrow 1.5s ease-in-out infinite;
  z-index: 10;
}

@keyframes pulseArrow {
  0%, 100% { opacity: 0.4; transform: translateY(-50%) translateX(0); }
  50% { opacity: 1; transform: translateY(-50%) translateX(3px); }
}
/* ============================================ */
/* 🔧 FIX v4 - Coach + indicateur scroll       */
/* ============================================ */

/* 1️⃣ "Mon Coach BatLife" plus petit */
#smartCoachTitle {
  font-size: 1.1rem !important;
  line-height: 1.3 !important;
}

/* Tous les H2 dans les cartes */
.card h2 {
  font-size: 1.1rem !important;
  line-height: 1.3 !important;
}

/* 2️⃣ Onglets Stats - montrer qu'il faut scroller */
#screenDashboard .sub-tabs {
  position: relative !important;
  /* Affiche un aperçu du 2ème onglet */
  padding-right: 40px !important;
  /* Gradient à droite qui invite au scroll */
  background-image: linear-gradient(to right, #0b0f19 0%, #0b0f19 85%, rgba(11,15,25,0.3) 100%) !important;
}

/* Petite flèche clignotante "→" */
#screenDashboard .sub-tabs::after {
  content: '→';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: bold;
  pointer-events: none;
  animation: blinkArrow 1.5s ease-in-out infinite;
  z-index: 10;
  text-shadow: 0 0 8px var(--accent);
}

@keyframes blinkArrow {
  0%, 100% { 
    opacity: 0.4;
    transform: translateY(-50%) translateX(0);
  }
  50% { 
    opacity: 1;
    transform: translateY(-50%) translateX(4px);
  }
}

/* 3️⃣ Réduire les onglets pour voir 2-3 sur mobile */
#screenDashboard .sub-tabs .sub-tab {
  font-size: 0.72rem !important;
  padding: 8px 10px !important;
}
/* ============================================================
   POLISH V6 : FORCER LES TITRES SUR UNE SEULE LIGNE
   ============================================================ */

/* Titres principaux des écrans (Outils, Réglages, etc.) */
#screenTools h1, #screenSettings h1, #screenDashboard h1 {
  font-size: 1.5rem !important; /* Réduit un poil la taille si nécessaire */
  white-space: nowrap;          /* Interdit le passage à la ligne */
  overflow: hidden;
  text-overflow: ellipsis;      /* Ajoute "..." si vraiment ça dépasse */
}

/* Titres des sous-sections et des cartes (Journal d'entretien, etc.) */
.card h2, #screenTools h2, #screenSettings h3 {
  font-size: 1.05rem !important; /* Ajustement précis pour que ça passe sur une ligne */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ajustement pour les petits écrans de téléphones */
@media (max-width: 360px) {
  .card h2, #screenTools h2, #screenSettings h3 {
    font-size: 0.95rem !important;
  }
}
/* ============================================================
   POLISH V6 : FORCER TOUS LES TITRES SUR UNE SEULE LIGNE
   ============================================================ */

/* 1. Titres principaux de chaque écran (Outils, Réglages...) */
#screenTools h1, #screenSettings h1, #screenDashboard h1 {
  font-size: 1.4rem !important; /* Légère réduction pour la sécurité */
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* 2. Tous les titres H2 et H3 dans les cartes et sections (Gestion, Entretien...) */
.card h2, .card h3, #screenTools h2, #screenSettings h3, #screenSettings h2 {
  font-size: 0.98rem !important; /* Taille idéale pour que "Gestion de l'application" tienne */
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* 3. Sécurité pour les écrans de téléphones très étroits */
@media (max-width: 360px) {
  .card h2, .card h3, #screenTools h2, #screenSettings h3 {
    font-size: 0.90rem !important;
  }
}
/* ============================================================
   FORÇAGE ULTIME TOUS TITRES SUR UNE SEULE LIGNE (V6)
   ============================================================ */

/* 1. Titres principaux de chaque écran (Outils, Réglages...) */
#screenTools h1, #screenSettings h1, #screenDashboard h1 {
  font-size: 1.35rem !important; /* Légère réduction de sécurité */
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* 2. Réduction drastique de TOUS les titres internes pour forcer la ligne unique */
.card h2, .card h3, .settings-section h2, .settings-section h3, 
#screenTools h2, #screenSettings h2, #screenSettings h3, 
.tools-container h2, .maintenance-card h2 {
  font-size: 0.85rem !important;      /* Assez petit pour TOUT faire tenir en largeur */
  font-weight: bold !important;
  white-space: nowrap !important;     /* Interdiction formelle de créer une 2ème ligne */
  overflow: hidden !important;        /* Coupe tout ce qui dépasse */
  text-overflow: ellipsis !important; /* Sécurité : met "..." si le mot est trop long */
  display: block !important;          /* Force le comportement de bloc pour le nowrap */
}
/* ============================================================
   BANNIÈRES DE SECTION CONSEILS (harmonisées)
   ============================================================ */

.tips-section-banner {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  margin: 24px 0 12px 0;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  border-left: 4px solid;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.tips-section-banner .tips-section-text {
  flex: 1;
}

/* Variante GOLDEN : règles d'or */
.tips-section-banner.golden {
  color: #fbbf24;
  border-left-color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}

/* Variante WINTER : remisage hivernal */
.tips-section-banner.winter {
  color: #f59e0b;
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

/* Variante DANGER : erreurs destructrices */
.tips-section-banner.danger {
  color: #ef4444;
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

/* Supprimer l'ancien style buggé (optionnel mais conseillé) */
.tips-section-title {
  display: none !important;
}
/* ============================================ */
/* 🎯 FIN PACK v3                                */
/* ============================================ */
/* ============================================================
   HEADER ÉCRAN ACCUEIL - Titre + badge véhicule
   ============================================================ */

.home-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
}

.home-title {
  font-size: 1.4rem;
  margin: 0;
  line-height: 1.2;
}

.home-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
}