/* extras.css — styles des plans d'entretien, du scan OCR et du sélecteur de langue. */

.plans-modal {
  width: min(620px, 94vw);
}

.plans-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.plans-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
}

.plans-row input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
}

.plans-row__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.plans-row__text small {
  font-size: 0.8rem;
}

.plans-row__exists {
  color: var(--color-warning, #b45309);
}

.scan-box {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-start;
}

.scan-box__status {
  margin: 0;
  font-size: 0.85rem;
}

/* ---- Compte & synchronisation ---- */
.app-header__actions { display: flex; align-items: center; gap: 10px; }
.sync-chip { position: relative; display: inline-flex; width: 36px; height: 36px; border-radius: 50%; text-decoration: none; }
.sync-chip[hidden], .sync-card [hidden] { display: none !important; }
.sync-avatar { width: 48px; height: 48px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--color-primary, #2563eb); color: #fff; font-weight: 600; font-size: 1.1rem; overflow: hidden; }
.sync-chip .sync-avatar { width: 36px; height: 36px; font-size: .95rem; }
.sync-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sync-chip .sync-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border: 2px solid var(--color-surface, #fff); }
.sync-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #9ca3af; flex: none; }
.sync-dot--ok { background: var(--color-success, #16a34a); }
.sync-dot--syncing { background: #2563eb; animation: sync-pulse 1.1s ease-in-out infinite; }
.sync-dot--offline { background: #9ca3af; }
.sync-dot--error { background: var(--color-danger, #dc2626); }
@keyframes sync-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(1.3); } }
.sync-card { background: var(--color-surface, #fff); border: 1px solid var(--color-border, #e5e7eb); border-radius: var(--radius-md, 12px); padding: 16px; }
.sync-account { display: flex; align-items: center; gap: 14px; }
.sync-account > div { min-width: 0; }
.sync-account strong { display: block; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-account span#sync-email { display: block; font-size: .85rem; opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-status { display: flex; align-items: center; gap: 8px; margin: 14px 0; font-size: .9rem; }
.sync-google { display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 16px; border-radius: 10px; border: 1px solid #dadce0; background: #fff; color: #3c4043; font-weight: 500; font-size: 1rem; cursor: pointer; }
.sync-google:disabled { opacity: .6; }
.sync-hint { font-size: .85rem; opacity: .7; margin: 10px 0 0; }
.sync-link { background: none; border: 0; padding: 6px 0; color: var(--color-primary, #2563eb); font: inherit; font-size: .9rem; cursor: pointer; }
[data-theme="dark"] .sync-google { background: #2b2d31; color: #e8eaed; border-color: #444; }
[data-theme="dark"] .sync-chip .sync-dot { border-color: var(--color-surface, #1c1c1e); }
.sync-chip .sync-avatar { background: #3b82f6; color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
.sync-account__name { margin: 0; font-weight: 600; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-account__email { margin: 2px 0 0; font-size: .85rem; opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-status { margin: 14px 0 6px; }
#sync-panel { margin-bottom: 16px; }

/* ---- Écran d'accueil ---- */
.welcome { position: fixed; inset: 0; z-index: 1000; background: var(--color-bg, #f3f4f6); display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.welcome[hidden] { display: none !important; }
.welcome__inner { width: 100%; max-width: 380px; text-align: center; }
.welcome__logo { border-radius: 20px; box-shadow: 0 6px 20px rgba(18,53,107,.25); }
.welcome__title { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 2.2rem; margin: 18px 0 6px; }
.welcome__tag { margin: 0 0 22px; opacity: .75; }
.welcome__list { list-style: none; padding: 0; margin: 0 0 28px; text-align: left; display: grid; gap: 10px; }
.welcome__list li { padding-left: 28px; position: relative; font-size: .95rem; }
.welcome__list li::before { content: '✓'; position: absolute; left: 4px; color: var(--color-success, #16a34a); font-weight: 700; }
.welcome__skip { display: block; margin: 16px auto 4px; font-size: .95rem; }
body.welcome-open { overflow: hidden; }

/* ---- Énergie (pleins et recharges) et santé batterie ---- */
.cat-badge--carburant { background-color: var(--color-warning-bg); color: var(--color-warning); border-color: transparent; }

.field--checkbox {
  flex-direction: row !important;
  align-items: center;
  gap: var(--space-2, 8px);
}
.field--checkbox input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
}
.field--checkbox .field__label { margin: 0; font-weight: 400; }

.battery-summary {
  display: flex;
  align-items: baseline;
  gap: var(--space-3, 12px);
  margin-bottom: var(--space-3, 12px);
}
.battery-summary__value {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-success);
}
.battery-summary .muted { margin: 0; }

.battery-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
}
.battery-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
  flex-wrap: wrap;
}
.battery-list__track {
  flex: 0 0 90px;
  height: 8px;
  border-radius: 4px;
  background: var(--color-border, #e1e4e8);
  overflow: hidden;
}
.battery-list__fill {
  height: 100%;
  border-radius: 4px;
  background: var(--color-success, #1f9d55);
}
.battery-list__text { flex: 1 1 auto; font-size: 0.9rem; }
.battery-list__actions { display: inline-flex; gap: var(--space-2, 8px); }

/* ---- Coût de possession par mois ---- */
.ownership-total {
  margin: 0 0 var(--space-2, 8px);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
}
.ownership-toggle { margin: var(--space-2, 8px) 0; }

/* ---- Deux-roues : équipement et conseils motards ---- */
.gear-list {
  list-style: none;
  margin: 0 0 var(--space-3, 12px);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
}

.gear-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3, 12px);
  padding: var(--space-3, 12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
}

.gear-item__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.gear-item__text small {
  font-size: 0.8rem;
}

.gear-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 8px);
  align-items: center;
}

.gear-form__name {
  flex: 1 1 180px;
}

.gear-form__date {
  flex: 0 1 160px;
}

.tips-card .tips-group {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  padding: var(--space-3, 12px);
  margin-bottom: var(--space-2, 8px);
}

.tips-group__title {
  cursor: pointer;
  font-weight: 600;
}

.tips-group__list {
  margin: var(--space-2, 8px) 0 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tips-card__disclaimer {
  margin: var(--space-2, 8px) 0 0;
  font-size: 0.85rem;
}




/* ---------------------------------------------------------------------------
   Navigation mobile : bouton « Plus » (Statistiques / Paramètres)
   Mobile : 5 rubriques + Plus. Desktop (>= 720px) : les 7 liens restent visibles.
   --------------------------------------------------------------------------- */

.nav-link--more {
  display: none;
}

.nav-link--plus {
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.nav-more-sheet {
  position: fixed;
  right: var(--space-2, 8px);
  bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: var(--space-1, 4px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(11, 38, 80, 0.18);
}

.nav-more-sheet[hidden] {
  display: none;
}

.nav-more-sheet .nav-link {
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: var(--space-3, 10px);
  min-height: 0;
  padding: var(--space-3, 10px) var(--space-4, 14px);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

.nav-more-sheet .nav-link--active {
  color: var(--color-primary);
}

[data-theme="dark"] .nav-more-sheet .nav-link--active {
  color: var(--color-accent);
}

@media (min-width: 720px) {
  .nav-link--more {
    display: flex;
  }
  .nav-link--plus,
  .nav-more-sheet {
    display: none;
  }
}


/* Partage : les lignes membre laissent le bouton passer dessous plutôt que
   couper l'adresse email (identité à lire en entier, sans orphelin). */
#share-panel .sync-account {
  flex-wrap: wrap;
}
#share-panel .sync-account .sync-account__text {
  flex: 1 1 100%;
}
/* ---------------------------------------------------------------------------
   Design C « Accent pro » — choisi par Thibaut (WhatsApp 24/10/2026 09h28)
   Couleurs existantes uniquement, aucune structure modifiée.
   --------------------------------------------------------------------------- */
.page-title {
  position: relative;
  padding-left: 14px;
}
.page-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 3px;
  background: var(--color-accent);
}
.stat-card__value {
  color: var(--color-primary);
}
.stat-card--danger .stat-card__value {
  color: var(--color-danger);
}
.section-title {
  color: var(--color-primary);
}
.button--primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 140%);
}
.stat-card,
.vehicle-card {
  border-top: 3px solid rgba(47, 125, 255, 0.35);
}
[data-theme="dark"] .stat-card__value {
  color: var(--color-accent);
}
[data-theme="dark"] .stat-card--danger .stat-card__value {
  color: var(--color-danger);
}
[data-theme="dark"] .section-title {
  color: var(--color-accent);
}
[data-theme="dark"] .stat-card,
[data-theme="dark"] .vehicle-card {
  border-top-color: rgba(110, 163, 255, 0.35);
}

/* ── Dossier premium : promo fiche, modales achat/attestation (version d'essai).
   Traitement calqué sur la maquette validée le 24/10 18h11 (File maquette) ── */
.report-promo { padding: 12px 16px 14px; border-top: 1px solid #e2e8f0; display: grid; gap: 6px; }
.report-promo__title { font-weight: 600; font-size: 0.95em; color: #12356b; margin: 0; }
.report-promo__text { font-size: 0.85em; color: #556; line-height: 1.45; margin: 0; }
.report-promo__price { font-size: 0.9em; color: #445; margin: 0; }
.report-promo__price strong { color: #12356b; font-size: 1.15em; }
.report-promo__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Modales achat / attestation : cartes blanches, titre serif, espacements maquette */
.achat-modal .modal__body { scroll-padding-bottom: 20px; }
.achat-modal .modal__body { display: grid; gap: 12px; text-align: left; }
.achat-modal h2 { font-family: var(--font-accent, "Playfair Display", Georgia, serif); font-weight: 700; font-size: 1.35em; color: #12356b; margin: 0; }
.achat-veh { font-weight: 600; color: #4a5a74; font-size: 0.9em; margin: 0; }
/* Variables de thème (clair ET sombre) au lieu de couleurs fixes — audit U1/U02. */
.achat-card { background: var(--color-surface, #fff); color: var(--color-text, #2e3238); border: 1px solid var(--color-border, #e2e8f2); border-radius: 14px; padding: 13px 15px; margin: 0; }
.achat-card__title { margin: 0 0 8px; font-size: 0.75em; text-transform: uppercase; letter-spacing: 0.6px; color: var(--color-primary, #12356b); font-weight: 700; }
.achat-inclus { margin: 0; }
.achat-inclus ul { list-style: none; padding: 0; margin: 0; }
.achat-inclus li { font-size: 0.88em; color: #24344e; padding: 4px 0 4px 22px; position: relative; }
.achat-inclus li::before { content: '\2713'; position: absolute; left: 2px; color: #2f7dff; font-weight: 700; }
.achat-prix__ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.achat-prix__ligne strong { font-family: var(--font-accent, "Playfair Display", Georgia, serif); font-size: 1.5em; font-weight: 700; color: #12356b; }
.achat-prix__taxe { margin: 4px 0 0; font-size: 0.78em; color: var(--color-text-muted, #5f6b7d); }
.achat-paiement { font-size: 0.88em; color: #24344e; }
.achat-paiement strong { color: #12356b; }
.achat-check { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1.5px solid #2f7dff; border-radius: 14px; padding: 12px 13px; font-size: 0.82em; line-height: 1.4; color: #24344e; margin: 2px 0; cursor: pointer; }
.achat-check input { margin-top: 2px; flex: none; }
.achat-check { scroll-margin: 12px; }
/* CTA d'achat doré : design B validé par l'utilisateur le 24/10 (« B », 12:42). */
.achat-cta { display: block; width: 100%; box-sizing: border-box; background: #f5b70a; color: #12356b; border: none; border-radius: 14px; padding: 13px 14px; font-size: 0.95em; font-weight: 700; text-align: center; cursor: pointer; }
.achat-cta:hover:not([disabled]) { background: #e0a800; }
.achat-cta small { display: block; font-weight: 400; font-size: 0.8em; opacity: 0.8; margin-top: 2px; }
.achat-cta[disabled] { opacity: 0.5; cursor: not-allowed; }
.achat-badge { display: inline-block; background: #e7f0ff; color: #12356b; font-size: 0.72em; font-weight: 700; border-radius: 999px; padding: 4px 10px; }
.achat-badge--ok { background: #e7f0ff; color: #12356b; }
.achat-badge--attente { background: #fff8e1; color: #7a5b00; }
.achat-badge--erreur { background: #ffebee; color: #b71c1c; }
.achat-ok { background: #e9f7ef; border: 1px solid #bfe5cd; border-radius: 14px; padding: 12px 14px; font-size: 0.82em; color: #1d5c38; margin: 0; }
.achat-facts { display: grid; }
.achat-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #eef2f8; font-size: 0.88em; color: #24344e; }
.achat-facts > div:last-child { border-bottom: 0; }
.achat-facts > div span:first-child { color: #6a7a94; }
.achat-facts > div span:last-child { text-align: right; }
.achat-note { font-size: 0.8em; color: var(--color-text-muted, #5f6b7d); line-height: 1.4; margin: 0; }
.achat-note--centre { text-align: center; }
.achat-footer { display: grid; gap: 8px; }
.achat-footer .button { width: 100%; }
.premium-toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #12356b; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 0.9em; z-index: 9999; box-shadow: 0 4px 12px rgba(0,0,0,0.25); max-width: 90vw; text-align: center; }

#attestation-overlay { position: fixed; inset: 0; background: #fff; z-index: 9998; overflow: auto; padding: 24px; display: none; }
body.attestation-open #attestation-overlay { display: block; }
.attestation-sheet { max-width: 720px; margin: 0 auto; font-size: 0.92em; line-height: 1.5; color: #222; }
.attestation-sheet h1 { font-family: var(--font-accent, "Playfair Display", Georgia, serif); font-size: 1.3em; margin: 0 0 12px; color: #12356b; }
.attestation-sheet p { margin: 8px 0; }
.attestation-sheet ul { margin: 4px 0 4px 18px; padding: 0; }
.attestation-sheet .small { font-size: 0.8em; color: #556; }
@media print {
  body.attestation-open .app-shell,
  body.attestation-open .report-modal,
  body.attestation-open .premium-toast { display: none !important; }
}

/* Bandeau de l'aperçu réduit dans le dossier (audit P1). */
.rp-apercu h1 { color: #12356b; }
.rp-apercu { padding: 24px; }

/* Thème sombre de l'écran d'achat : variantes explicites (audit U1/U02). */
[data-theme="dark"] .achat-modal h2 { color: #9dc0ff; }
[data-theme="dark"] .achat-check { background: var(--color-surface); border-color: #2f7dff; color: var(--color-text); }
[data-theme="dark"] .achat-badge { background: #22385f; color: #cfe0ff; }
[data-theme="dark"] .achat-badge--ok { background: #22385f; color: #cfe0ff; }
[data-theme="dark"] .achat-badge--attente { background: #4a3c08; color: #ffe9a8; }
[data-theme="dark"] .achat-badge--erreur { background: #5a1f22; color: #ffc4c8; }
[data-theme="dark"] .achat-card__title { color: #9dc0ff; }
[data-theme="dark"] .achat-inclus li { color: var(--color-text); }
[data-theme="dark"] .achat-inclus li::before { color: #8ab4ff; }
[data-theme="dark"] .achat-prix__ligne strong { color: #ffe9a8; }
[data-theme="dark"] .achat-paiement { color: var(--color-text); }
[data-theme="dark"] .achat-paiement strong { color: #cfe0ff; }
[data-theme="dark"] .achat-facts > div { color: var(--color-text); border-bottom-color: rgba(255, 255, 255, 0.14); }
[data-theme="dark"] .achat-facts > div span:first-child { color: var(--color-text-muted); }

/* Icônes SVG (point 39) : un seul traitement, taille par contexte */
.ck-icon { display: inline-block; vertical-align: middle; }
.nav-link__icon .ck-icon { width: 20px; height: 20px; }
.app-header__logo .ck-icon { width: 22px; height: 22px; }
.empty-state__icon .ck-icon { width: 44px; height: 44px; color: var(--color-accent); }
.vehicle-card__photo--placeholder .ck-icon { width: 36px; height: 36px; }
.cat-badge .ck-icon, button .ck-icon { width: 15px; height: 15px; margin-right: 4px; }
.icon-button .ck-icon { width: 18px; height: 18px; }
