/* =============================================================
   EllaCar — account.css
   Espace client complet (dark theme)
   ============================================================= */

.ec-account { padding: 28px 0 60px; background: var(--ec-navy2); min-height: 80vh; }

/* =============================================================
   AUTH (connexion / inscription)
   ============================================================= */
.ec-account-auth {
  display: flex; align-items: center; justify-content: center;
  min-height: 70vh;
}
.ec-account-auth__card {
  width: 100%; max-width: 440px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 24px;
  background: rgba(255,255,255,.04);
  padding: 32px;
}
.ec-account-auth__logo { text-align: center; margin-bottom: 18px; }
.ec-account-auth__title { margin: 0 0 6px; font-size: 24px; font-weight: 950; color: #fff; text-align: center; }
.ec-account-auth__sub   { margin: 0 0 22px; font-size: 14px; color: rgba(255,255,255,.50); text-align: center; line-height: 1.5; }

/* Onglets auth */
.ec-auth-tabs {
  display: flex; gap: 4px;
  background: rgba(255,255,255,.06);
  border-radius: 12px; padding: 4px;
  margin-bottom: 22px;
}
.ec-auth-tab {
  flex: 1; padding: 9px 12px; border-radius: 9px;
  border: none; cursor: pointer;
  font-size: 14px; font-weight: 800;
  color: rgba(255,255,255,.50);
  background: transparent;
  transition: background .12s ease, color .12s ease;
}
.ec-auth-tab.active { background: rgba(255,255,255,.10); color: #fff; }

.ec-auth-panel { display: none; }
.ec-auth-panel.active { display: block; }

/* Champs */
.ec-account-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ec-account-field label {
  font-size: 12px; font-weight: 900;
  letter-spacing: .04em; text-transform: uppercase;
  color: rgba(255,255,255,.50);
}
.ec-account-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .ec-account-row2 { grid-template-columns: 1fr; } }

.ec-account-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(7,10,20,.55);
  color: #fff; font-size: 14px; outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.ec-account-input::placeholder { color: rgba(255,255,255,.28); }
.ec-account-input:focus {
  border-color: rgba(255,179,0,.50);
  box-shadow: 0 0 0 3px rgba(255,179,0,.12);
}
.ec-account-input:disabled { opacity: .45; cursor: not-allowed; }

.ec-account-pw-wrap { position: relative; }
.ec-account-pw-wrap .ec-account-input { padding-right: 44px; }
.ec-account-pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 16px; opacity: .5;
  transition: opacity .12s ease;
}
.ec-account-pw-toggle:hover { opacity: 1; }

.ec-account-submit {
  width: 100%; padding: 14px;
  border-radius: 14px; border: none;
  background: var(--ec-brand);
  color: #111827; font-weight: 950; font-size: 15px;
  cursor: pointer; margin-top: 4px;
  transition: filter .12s ease;
}
.ec-account-submit:hover { filter: brightness(.95); }

.ec-account-link { color: rgba(255,255,255,.45); font-size: 13px; text-decoration: none; }
.ec-account-link:hover { color: rgba(255,255,255,.80); }

/* =============================================================
   LAYOUT PRINCIPAL
   ============================================================= */
.ec-account-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) { .ec-account-layout { grid-template-columns: 1fr; } }

/* =============================================================
   SIDEBAR
   ============================================================= */
.ec-account-sidebar {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  background: rgba(255,255,255,.04);
  padding: 18px;
  position: sticky; top: 80px;
  display: flex; flex-direction: column; gap: 6px;
}
@media (max-width: 860px) {
  .ec-account-sidebar { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px; gap: 8px; }
}

/* User pill */
.ec-account-sidebar__user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 14px;
  background: rgba(255,255,255,.06);
  margin-bottom: 6px;
}
@media (max-width: 860px) { .ec-account-sidebar__user { flex: 1 1 100%; margin-bottom: 0; } }

.ec-account-avatar {
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--ec-brand);
  color: #111827;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 950;
  flex-shrink: 0;
}
.ec-account-sidebar__name  { font-size: 14px; font-weight: 950; color: #fff; line-height: 1.2; }
.ec-account-sidebar__email { font-size: 11px; color: rgba(255,255,255,.45); margin-top: 2px; }

/* Nav items */
.ec-account-nav { display: contents; }
.ec-account-nav__item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  color: rgba(255,255,255,.65);
  text-decoration: none; font-size: 14px; font-weight: 700;
  transition: background .12s ease, color .12s ease;
  position: relative;
}
.ec-account-nav__item:hover { background: rgba(255,255,255,.06); color: #fff; }
.ec-account-nav__item.active { background: rgba(255,179,0,.10); color: #ffda6a; }
.ec-account-nav__ic { font-size: 16px; }
.ec-account-nav__badge {
  margin-left: auto;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  background: var(--ec-brand);
  color: #111827;
  font-size: 11px; font-weight: 950;
  display: grid; place-items: center;
}
.ec-account-nav__item--danger { color: rgba(255,100,100,.65); margin-top: 4px; }
.ec-account-nav__item--danger:hover { color: #ffb3a7; background: rgba(255,42,0,.08); }

/* CTA sidebar */
.ec-account-sidebar__cta {
  display: block; text-align: center;
  padding: 11px 14px; border-radius: 12px;
  background: var(--ec-brand);
  color: #111827; text-decoration: none;
  font-weight: 950; font-size: 13px;
  margin-top: 8px;
  transition: filter .12s ease;
}
.ec-account-sidebar__cta:hover { filter: brightness(.95); }

/* =============================================================
   SECTIONS PRINCIPALES
   ============================================================= */
.ec-account-main {
  min-width: 0;
}
.ec-account-section {
  display: flex; flex-direction: column; gap: 20px;
}
.ec-account-section__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.ec-account-section-title { margin: 0; font-size: 20px; font-weight: 950; color: #fff; }
.ec-account-section-count { font-size: 13px; color: rgba(255,255,255,.40); font-weight: 700; }
.ec-account-back { color: rgba(255,255,255,.50); text-decoration: none; font-size: 13px; font-weight: 700; }
.ec-account-back:hover { color: #fff; }

/* Bienvenue */
.ec-account-welcome {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.ec-account-title { margin: 0 0 4px; font-size: 26px; font-weight: 950; color: #fff; }
.ec-account-sub   { margin: 0; font-size: 14px; color: rgba(255,255,255,.50); }

/* Stats */
.ec-account-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 700px) { .ec-account-stats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 400px) { .ec-account-stats { grid-template-columns: 1fr; } }

.ec-account-stat {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 16px; padding: 16px;
}
.ec-account-stat__val   { font-size: 28px; font-weight: 950; color: #fff; line-height: 1; margin-bottom: 4px; }
.ec-account-stat__label { font-size: 12px; color: rgba(255,255,255,.45); font-weight: 700; }

/* Prochaine réservation */
.ec-account-next {
  border: 1px solid rgba(255,179,0,.22);
  background: rgba(255,179,0,.06);
  border-radius: 18px; padding: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.ec-account-next__label   { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.45); margin-bottom: 4px; font-weight: 900; }
.ec-account-next__vehicle { font-size: 18px; font-weight: 950; color: #fff; margin-bottom: 4px; }
.ec-account-next__period  { font-size: 14px; color: rgba(255,255,255,.60); }
.ec-account-next__lieux   { font-size: 13px; color: rgba(255,255,255,.50); margin-top: 4px; }
.ec-account-next__countdown {
  text-align: center;
  background: var(--ec-brand);
  color: #111827;
  border-radius: 16px; padding: 14px 20px;
  flex-shrink: 0;
}
.ec-account-next__days       { font-size: 36px; font-weight: 950; line-height: 1; }
.ec-account-next__days-label { font-size: 12px; font-weight: 800; margin-top: 2px; }

/* Badges statut */
.ec-account-status {
  display: inline-flex; align-items: center;
  padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 800;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.75);
  white-space: nowrap;
}
.ec-account-status--processing, .ec-account-status--on-hold {
  border-color: rgba(255,179,0,.30); background: rgba(255,179,0,.10); color: #ffd56a;
}
.ec-account-status--completed {
  border-color: rgba(16,185,129,.30); background: rgba(16,185,129,.10); color: #6ee7b7;
}
.ec-account-status--cancelled,
.ec-account-status--failed,
.ec-account-status--refunded {
  border-color: rgba(255,42,0,.28); background: rgba(255,42,0,.08); color: #ffb3a7;
}

/* Empty state */
.ec-account-empty {
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 20px; padding: 40px 24px;
  text-align: center;
}
.ec-account-empty__icon { font-size: 40px; margin-bottom: 12px; }
.ec-account-empty strong { display: block; font-size: 16px; color: rgba(255,255,255,.70); margin-bottom: 6px; }
.ec-account-empty p { font-size: 14px; color: rgba(255,255,255,.40); margin: 0 0 18px; }

/* =============================================================
   BOOKING CARDS
   ============================================================= */
.ec-account-bookings { display: flex; flex-direction: column; gap: 12px; }

.ec-booking-card {
  display: flex; gap: 0;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  overflow: hidden;
  transition: border-color .14s ease, transform .14s ease;
}
.ec-booking-card:hover { border-color: rgba(255,179,0,.25); transform: translateY(-1px); }

/* Miniature */
.ec-booking-card__img {
  width: 110px; flex-shrink: 0;
  background: rgba(255,255,255,.06);
  overflow: hidden; text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  border-right: 1px solid rgba(255,255,255,.06);
}
.ec-booking-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ec-booking-card__img--ph { font-size: 36px; }
@media (max-width: 600px) { .ec-booking-card__img { width: 72px; font-size: 24px; } }

/* Corps */
.ec-booking-card__body { flex: 1; padding: 14px 16px; min-width: 0; }
.ec-booking-card__row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.ec-booking-card__title { margin: 0 0 4px; font-size: 15px; font-weight: 950; }
.ec-booking-card__title a { color: #fff; text-decoration: none; }
.ec-booking-card__title a:hover { color: var(--ec-brand); }
.ec-booking-card__period { font-size: 13px; color: rgba(255,255,255,.55); margin-bottom: 3px; }
.ec-booking-card__lieu   { font-size: 12px; color: rgba(255,255,255,.40); margin-bottom: 3px; }
.ec-booking-card__days   { font-size: 12px; color: rgba(255,255,255,.35); }

.ec-booking-card__right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ec-booking-card__countdown {
  text-align: center; padding: 6px 10px; border-radius: 10px;
  background: rgba(255,179,0,.10); border: 1px solid rgba(255,179,0,.20);
}
.ec-booking-card__countdown strong { display: block; font-size: 16px; font-weight: 950; color: var(--ec-brand); line-height: 1; }
.ec-booking-card__countdown span   { font-size: 10px; color: rgba(255,255,255,.50); font-weight: 700; text-transform: uppercase; }

.ec-booking-card__footer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-wrap: wrap;
}
.ec-booking-card__total { font-size: 16px; font-weight: 950; color: var(--ec-brand); }
.ec-booking-card__cta {
  font-size: 13px; color: rgba(255,255,255,.60);
  text-decoration: none; font-weight: 800;
  padding: 7px 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  transition: background .12s ease, color .12s ease;
}
.ec-booking-card__cta:hover { background: rgba(255,255,255,.08); color: #fff; }

/* =============================================================
   DÉTAIL RÉSERVATION
   ============================================================= */
.ec-account-detail-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.ec-account-detail-img {
  border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  height: clamp(180px, 20vw, 280px);
}
.ec-account-detail-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ec-account-detail-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (max-width: 580px) { .ec-account-detail-grid { grid-template-columns: 1fr; } }

.ec-account-detail-card {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 16px; padding: 14px;
}
.ec-account-detail-card__title { font-size: 12px; font-weight: 900; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.ec-account-detail-card__val   { font-size: 15px; font-weight: 950; color: #fff; }
.ec-account-detail-card__sub   { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 3px; }

.ec-account-detail-opts {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  border-radius: 16px; padding: 14px;
}
.ec-account-detail-opt {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 0; font-size: 14px; color: rgba(255,255,255,.70);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.ec-account-detail-opt:last-child { border-bottom: none; }
.ec-account-detail-opt__price { color: var(--ec-brand); font-weight: 700; }

/* =============================================================
   FACTURES
   ============================================================= */
.ec-account-invoices { display: flex; flex-direction: column; gap: 10px; }

.ec-account-invoice {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 16px; padding: 14px 18px;
  flex-wrap: wrap;
  transition: border-color .12s ease;
}
.ec-account-invoice:hover { border-color: rgba(255,179,0,.20); }

.ec-account-invoice__id   { font-size: 12px; color: rgba(255,255,255,.35); font-weight: 700; margin-bottom: 3px; }
.ec-account-invoice__name { font-size: 15px; font-weight: 950; color: #fff; margin-bottom: 3px; }
.ec-account-invoice__date { font-size: 13px; color: rgba(255,255,255,.45); }

.ec-account-invoice__right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ec-account-invoice__amount { font-size: 16px; font-weight: 950; color: #fff; }

/* =============================================================
   PROFIL
   ============================================================= */
.ec-account-form-block {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 18px; padding: 20px;
  margin-bottom: 16px;
}
.ec-account-form-title { margin: 0 0 18px; font-size: 16px; font-weight: 950; color: #fff; }
