/**
 * Outil - Simulateur Batterie VAE — v1.0.1
 * Styles scopés sous .vac-av — aucun impact sur le thème.
 * Accessibilité : jamais de vert #99FF00 en texte sur fond clair
 * (réservé aux fonds sombres) ; tailles de texte généreuses (0.875rem minimum).
 */

.vac-av {
  font-family: 'Inter', -apple-system, sans-serif;
  color: #0a0a0a;
  max-width: 72rem;
  margin: 0 auto;
}
.vac-av *, .vac-av *::before, .vac-av *::after { box-sizing: border-box; }
.vac-av button { font-family: inherit; }

/* ── Présets rapides ────────────────────────────────── */
.vac-av-presets-wrap { margin-bottom: 2rem; }
.vac-av-presets-hint {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.vac-av-presets-hint p {
  font-size: 0.875rem;
  color: #6b7280;
  white-space: nowrap;
  margin: 0;
}
.vac-av-presets-line { flex: 1; height: 1px; background: #f3f4f6; }
.vac-av-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .vac-av-presets { grid-template-columns: repeat(4, 1fr); }
}
.vac-av-preset {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 1rem 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 1rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.vac-av-preset:hover { border-color: rgba(153, 255, 0, 0.4); background: #f9fafb; }
.vac-av-preset.is-active { border-color: #99FF00; background: rgba(153, 255, 0, 0.1); }
.vac-av-preset-emoji { font-size: 1.5rem; line-height: 1; }
.vac-av-preset-label { font-size: 0.9375rem; font-weight: 500; color: #374151; }
.vac-av-preset.is-active .vac-av-preset-label { color: #0a0a0a; font-weight: 600; }

/* ── Grille ─────────────────────────────────────────── */
.vac-av-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .vac-av-grid { grid-template-columns: 1fr 1fr; }
  .vac-av-results-col { position: sticky; top: 1.5rem; }
}

/* ── Cartes d'inputs (fond clair) ───────────────────── */
.vac-av-card {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 1.5rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
/* Sélecteur renforcé + !important : les thèmes / Elementor ciblent les h2
   avec des règles très spécifiques (.entry-content h2, .elementor-kit h2…) */
.vac-av h2.vac-av-card-title {
  font-family: 'Inter', -apple-system, sans-serif !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: #0a0a0a !important;
  margin: 0 0 0.875rem !important;
  padding: 0 !important;
}
.vac-av-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.875rem;
}
.vac-av .vac-av-card-head h2.vac-av-card-title { margin: 0 !important; }

/* ── Icône batterie ─────────────────────────────────── */
.vac-av-batticon { display: flex; align-items: center; gap: 0.5rem; }
.vac-av-batticon svg { width: 2.5rem; height: 1.25rem; flex-shrink: 0; }
.vac-av-batticon-fill { transition: width 0.5s ease; }
.vac-av-batticon-wh {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0a0a0a; /* noir sur fond clair */
  white-space: nowrap;
}
.vac-av-batticon-wh--dark { color: #fff; }

/* ── Présets batterie ───────────────────────────────── */
.vac-av-batt-presets {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.375rem;
  margin-bottom: 0.875rem;
}
@media (max-width: 480px) {
  .vac-av-batt-presets { grid-template-columns: repeat(3, 1fr); }
}
.vac-av-batt-preset {
  padding: 0.5rem 0.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  transition: border-color 0.15s;
}
.vac-av-batt-preset:hover { border-color: #d1d5db; }
.vac-av-batt-preset.is-active { border-color: #99FF00; background: rgba(153, 255, 0, 0.1); color: #0a0a0a; font-weight: 600; }

/* ── Boutons de mode ────────────────────────────────── */
.vac-av-modes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
@media (max-width: 480px) {
  .vac-av-modes { grid-template-columns: repeat(2, 1fr); }
}
.vac-av-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 0.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.vac-av-mode:hover { border-color: rgba(153, 255, 0, 0.4); background: #f9fafb; }
.vac-av-mode.is-active { border-color: #99FF00; background: rgba(153, 255, 0, 0.1); }
.vac-av-btn-emoji { font-size: 1.25rem; line-height: 1; }
.vac-av-btn-title { font-size: 1rem; font-weight: 700; color: #374151; }
.vac-av-mode.is-active .vac-av-btn-title { color: #0a0a0a; }
.vac-av-btn-desc { font-size: 0.875rem; color: #6b7280; }

/* ── Champs / sliders ───────────────────────────────── */
.vac-av-field { margin-bottom: 1.25rem; }
.vac-av-field:last-of-type { margin-bottom: 0; }
.vac-av-field--sep { border-top: 1px solid #f9fafb; padding-top: 1.25rem; }
.vac-av-label {
  font-size: 1rem;
  font-weight: 500;
  color: #4b5563;
}
.vac-av-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.vac-av-hint { font-size: 0.875rem; color: #6b7280; }
.vac-av-hint-i { font-size: 0.875rem; color: #6b7280; font-style: italic; }
.vac-av-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0a0a0a; /* noir sur fond clair, jamais de vert */
  white-space: nowrap;
}
.vac-av-bounds {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.vac-av input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: #e5e7eb;
  outline: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
  border: none;
}
.vac-av input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #99FF00;
  border: 3px solid #0a0a0a;
  cursor: pointer;
}
.vac-av input[type='range']::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #99FF00;
  border: 3px solid #0a0a0a;
  cursor: pointer;
}
.vac-av input[type='range']:focus-visible { outline: 2px solid #0a0a0a; outline-offset: 2px; }

/* ── Poids total ────────────────────────────────────── */
.vac-av-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: #f9fafb;
  border-radius: 0.75rem;
  padding: 0.625rem 1rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: #6b7280;
}
.vac-av-total-val {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #0a0a0a;
}

/* ── Conditions (terrain / vent / température) ──────── */
.vac-av-cond { margin-bottom: 1rem; }
.vac-av-cond:last-child { margin-bottom: 0; }
.vac-av-cond--sep { border-top: 1px solid #f9fafb; padding-top: 1rem; }
.vac-av-cond-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.625rem;
}
.vac-av-triple {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.vac-av-cond-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 0.5rem;
  border: 2px solid #f3f4f6;
  border-radius: 0.75rem;
  background: #f9fafb;
  cursor: pointer;
  transition: border-color 0.15s;
}
.vac-av-cond-btn:hover { border-color: rgba(153, 255, 0, 0.4); }
.vac-av-cond-btn.is-active { border-color: #99FF00; background: rgba(153, 255, 0, 0.1); }
.vac-av-cond-title { font-size: 0.875rem; font-weight: 700; color: #374151; text-align: center; line-height: 1.2; }
.vac-av-cond-btn.is-active .vac-av-cond-title { color: #0a0a0a; }
.vac-av-cond-desc { font-size: 0.875rem; color: #6b7280; text-align: center; line-height: 1.2; }
.vac-av-terrain svg { width: 2.25rem; height: 1rem; color: #9ca3af; }
.vac-av-terrain.is-active svg { color: #99FF00; }

/* ── Panneau résultats (fond sombre) ────────────────── */
.vac-av-results {
  background: #0a0a0a;
  border: 1px solid #1f2937;
  border-radius: 1.5rem;
  padding: 1.5rem;
  color: #fff;
}
@media (min-width: 768px) {
  .vac-av-results { padding: 2rem; }
}

/* Tabs */
.vac-av-tabs {
  display: flex;
  gap: 0.25rem;
  background: #111827;
  border-radius: 0.75rem;
  padding: 0.25rem;
  margin-bottom: 1.25rem;
}
.vac-av-tab {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.vac-av-tab:hover { color: #fff; }
.vac-av-tab.is-active { background: #fff; color: #0a0a0a; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }

/* Badge de niveau */
.vac-av-badge-wrap { display: flex; justify-content: center; margin-bottom: 1rem; }
.vac-av-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(153, 255, 0, 0.1);
  border: 1px solid rgba(153, 255, 0, 0.2);
  color: #99FF00;
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}
.vac-av-badge.is-pop { animation: vac-av-pop 0.3s ease; }
@keyframes vac-av-pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Jauge + odomètre */
.vac-av-gauge-wrap { position: relative; width: 100%; }
.vac-av-gauge {
  display: block;
  width: 100%;
  max-width: 230px;
  margin: 0 auto;
  overflow: visible;
  font-family: 'Inter', sans-serif;
}
#vac-av-gauge-fill { transition: stroke-dashoffset 0.7s ease, stroke 0.3s ease; }
.vac-av-gauge-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 8px;
  pointer-events: none;
}
.vac-av-km {
  font-family: 'Rajdhani', sans-serif;
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 1;
  color: #99FF00;
  font-variant-numeric: tabular-nums;
}
.vac-av-km-unit {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.25rem;
  color: #fff;
  margin-left: 0.25rem;
}
.vac-av-km-sub { font-size: 0.875rem; color: #9ca3af; margin-top: 0.25rem; }

/* Conso + fourchette */
.vac-av-conso {
  text-align: center;
  font-size: 0.875rem;
  color: #9ca3af;
  margin: 0.25rem 0 0.5rem;
}
.vac-av-conso strong { color: #fff; }
.vac-av-conso-sep { color: #6b7280; margin: 0 0.5rem; }

/* Équivalences qui tournent */
.vac-av-eq {
  text-align: center;
  font-size: 0.875rem;
  color: #9ca3af;
  margin: 0 0 1.25rem;
  min-height: 1.6em;
  transition: opacity 0.3s, transform 0.3s;
}
.vac-av-eq strong { color: #fff; }
.vac-av-eq.is-out { opacity: 0; transform: translateY(-8px); }

/* Curseur style de conduite */
.vac-av-bias {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
}
.vac-av-bias-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #d1d5db;
  margin-bottom: 0.25rem;
}
.vac-av-bias-value-wrap { text-align: center; margin-bottom: 0.5rem; }
.vac-av-bias-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #99FF00; /* vert en texte : OK, fond sombre */
}
.vac-av-bias input[type='range'] { background: #374151; }
.vac-av-bias input[type='range']::-webkit-slider-thumb { border-color: #fff; }
.vac-av-bias input[type='range']::-moz-range-thumb { border-color: #fff; }
.vac-av-bias input[type='range']:focus-visible { outline-color: #fff; }
.vac-av-bias-info {
  font-size: 0.875rem;
  color: #9ca3af;
  font-style: italic;
  text-align: center;
  margin: 0.625rem 0 0;
}

/* Verdict à sensation */
.vac-av-verdict {
  background: #111827;
  border: 1px solid rgba(153, 255, 0, 0.15);
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #e5e7eb;
  text-align: center;
  margin-bottom: 1rem;
}

/* Stats « Ce que ça change pour vous » */
.vac-av-stats {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
}
.vac-av-stats-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}
.vac-av-stat {
  font-size: 1rem;
  color: #d1d5db;
  line-height: 1.5;
  margin-bottom: 0.625rem;
}
.vac-av-stat:last-child { margin-bottom: 0; }
.vac-av-stat strong { color: #fff; }

/* Panneau batterie requise */
.vac-av-target-title {
  text-align: center;
  font-size: 0.875rem;
  color: #9ca3af;
  margin: 0 0 0.75rem;
}
.vac-av-target-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}
.vac-av-target-val {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #99FF00; /* fond sombre */
}
.vac-av-batt-result {
  background: #111827;
  border-radius: 1rem;
  padding: 1rem;
  margin-top: 1rem;
}
.vac-av-batt-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.875rem;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}
.vac-av-batt-min, .vac-av-batt-reco {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
}
.vac-av-batt-min { color: #fff; }
.vac-av-batt-reco { color: #99FF00; }
.vac-av-batticon--panel { margin-top: 0.25rem; }
.vac-av-batt-warn {
  font-size: 0.875rem;
  color: #fbbf24;
  margin: 0.75rem 0 0;
}

/* Récap */
.vac-av-recap {
  background: #111827;
  border-radius: 1rem;
  padding: 1rem;
  margin: 1rem 0;
}
.vac-av-recap-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.vac-av-recap-row:last-child { margin-bottom: 0; }
.vac-av-recap-row span:first-child { color: #9ca3af; }
.vac-av-recap-row span:last-child { color: #fff; font-weight: 500; }

/* Conseils dynamiques */
.vac-av-tips { margin-bottom: 1.25rem; }
.vac-av-tip {
  background: rgba(153, 255, 0, 0.05);
  border: 1px solid rgba(153, 255, 0, 0.15);
  border-radius: 0.75rem;
  padding: 0.75rem;
  font-size: 1rem;
  color: #d1d5db;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}
.vac-av-tip:last-child { margin-bottom: 0; }

/* ── CTA ────────────────────────────────────────────── */
.vac-av-cta {
  display: block;
  width: 100%;
  padding: 0.875rem 1rem;
  background: #99FF00;
  color: #0a0a0a !important;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none !important;
  transition: filter 0.15s;
}
.vac-av-cta:hover { filter: brightness(0.95); }
.vac-av-cta span { font-weight: 700; }

.vac-av-disclaimer {
  font-size: 0.875rem;
  color: #9ca3af;
  text-align: center;
  line-height: 1.5;
  margin: 1rem 0 0;
}
