/* ═══════════════════════════════════════════════
   ElBeauty 77 — Espace Client CSS
   Mobile-first, autonome (sans import styles.css)
   ═══════════════════════════════════════════════ */

/* ── Variables couleurs ── */
:root {
  --vert:            #3A5230;
  --vert-light:      #7A9A72;
  --vert-pale:       #EBF2E8;
  --vert-dark:       #2A3D22;
  --creme:           #F8F2E6;
  --beige:           #EDE0C8;
  --text-dark:       #1E2A1A;
  --text-mid:        #4A5A3A;
  --text-light:      #7A8A6A;
  --white:           #FFFFFF;
  --orange:          #D97706;
  --orange-light:    #FEF3C7;
  --red:             #B91C1C;
  --red-light:       #FEE2E2;
  --radius:          12px;
  --shadow:          0 4px 24px rgba(0,0,0,0.07);
}

/* ── Reset minimal ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; } /* verrouille le scroll horizontal sur mobile */

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--creme);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ══════════════════════════════════
   NAVBAR
   ══════════════════════════════════ */
.ec-navbar {
  background: var(--white);
  border-bottom: 1px solid var(--beige);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.ec-navbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ec-navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--vert-dark);
  font-weight: 700;
}

.ec-navbar__links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ec-navbar__link {
  font-size: 0.875rem;
  color: var(--text-mid);
  transition: color 0.2s;
}
.ec-navbar__link:hover { color: var(--vert); }

.ec-navbar__logout {
  font-size: 0.875rem;
  background: none;
  border: 1px solid var(--beige);
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  color: var(--text-mid);
  transition: all 0.2s;
}
.ec-navbar__logout:hover {
  background: var(--red-light);
  border-color: var(--red);
  color: var(--red);
}

/* ══════════════════════════════════
   AUTH SCREEN
   ══════════════════════════════════ */
.ec-auth-bg {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(145deg, var(--creme) 0%, var(--beige) 100%);
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 420px;
}

.auth-card__brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-card__brand h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--vert-dark);
  margin-top: 0.5rem;
}

.auth-card__brand p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* Onglets */
.auth-tabs {
  display: flex;
  border-radius: 8px;
  background: var(--vert-pale);
  padding: 3px;
  margin-bottom: 1.75rem;
  gap: 3px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-mid);
  transition: all 0.2s;
}

.auth-tab.active {
  background: var(--vert);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(58,82,48,0.25);
}

/* Formulaires */
.auth-form { display: flex; flex-direction: column; gap: 1rem; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-mid);
  letter-spacing: 0.02em;
}

.form-group input {
  border: 1.5px solid var(--beige);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus {
  border-color: var(--vert-light);
  box-shadow: 0 0 0 3px rgba(122,154,114,0.15);
}
.form-group input::placeholder { color: var(--text-light); }

/* Bouton principal */
.btn-primary-ec {
  background: var(--vert);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
  transition: background 0.2s, transform 0.1s;
  margin-top: 0.25rem;
}
.btn-primary-ec:hover  { background: var(--vert-dark); }
.btn-primary-ec:active { transform: scale(0.98); }
.btn-primary-ec:disabled { opacity: 0.6; cursor: not-allowed; }

/* Lien switch */
.auth-switch {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
}
.auth-switch button {
  background: none;
  border: none;
  color: var(--vert);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: underline;
  padding: 0;
}

/* Messages */
.auth-error {
  background: var(--red-light);
  color: var(--red);
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  display: none;
}

.auth-success {
  background: var(--vert-pale);
  color: var(--vert-dark);
  border: 1px solid #A7D9A0;
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.9rem;
  text-align: center;
  display: none;
}
.auth-success .success-icon { font-size: 2rem; margin-bottom: 0.5rem; }

/* ══════════════════════════════════
   DASHBOARD
   ══════════════════════════════════ */
.ec-dashboard {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--vert-dark);
  line-height: 1.2;
}

.dashboard-header p {
  color: var(--text-light);
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

.dashboard-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--beige);
}

/* Bouton CTA réservation */
.btn-cta-rdv {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--vert);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
  margin-bottom: 1.5rem;
}
.btn-cta-rdv:hover { background: var(--vert-dark); }

/* ── Cartes RDV ── */
.rdv-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rdv-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  border-left: 4px solid var(--beige);
  transition: transform 0.15s;
}
.rdv-card:hover { transform: translateY(-1px); }

.rdv-card--pending   { border-left-color: var(--orange); }
.rdv-card--confirmed { border-left-color: var(--vert-light); }
.rdv-card--paid      { border-left-color: var(--vert-dark); }
.rdv-card--cancelled { border-left-color: var(--red); }

.rdv-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.rdv-card__date {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.rdv-card__time {
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-top: 0.1rem;
}

/* Badges statut */
.badge-pending, .badge-confirmed, .badge-confirmed-paid, .badge-cancelled {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-pending {
  background: var(--orange-light);
  color: var(--orange);
}

.badge-confirmed {
  background: var(--vert-pale);
  color: var(--vert);
}

.badge-confirmed-paid {
  background: #D1FAE5;
  color: var(--vert-dark);
}

.badge-cancelled {
  background: var(--red-light);
  color: var(--red);
}

.rdv-card__service {
  font-size: 0.95rem;
  color: var(--text-mid);
  margin-bottom: 0.4rem;
}

.rdv-card__price {
  font-size: 0.875rem;
  color: var(--text-light);
}

.rdv-card__status-msg {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  font-style: italic;
}

.rdv-card__acompte-notice {
  margin-top: 0.75rem;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: 7px;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  color: #92400E;
}

/* ── Carte fidélité ── */
.loyalty-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--vert-light);
}

.loyalty-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.loyalty-card__count {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
}

.loyalty-card__stamps {
  font-size: 1.3rem;
  letter-spacing: 0.18em;
  color: var(--vert);
  line-height: 1;
}
.loyalty-card__stamps .stamp-empty { color: var(--beige); }

.loyalty-card__bar {
  width: 100%;
  height: 10px;
  background: var(--vert-pale);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.loyalty-card__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--vert-light), var(--vert));
  border-radius: 20px;
  transition: width 0.4s ease;
}

.loyalty-card__discount {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--vert-pale);
  color: var(--vert-dark);
  border: 1px solid #A7D9A0;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.loyalty-card__hint {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

.loyalty-card--soon {
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  border-left-color: var(--beige);
}

.loyalty-card--soon .loyalty-card__icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.empty-state h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.empty-state a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--vert);
  color: var(--white);
  border-radius: 8px;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
}
.empty-state a:hover { background: var(--vert-dark); }

/* ── Loading skeleton ── */
.rdv-loading {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.skeleton {
  background: linear-gradient(90deg, var(--beige) 25%, var(--creme) 50%, var(--beige) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: var(--radius);
  height: 110px;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ══════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════ */
@media (max-width: 480px) {
  .auth-card { padding: 1.5rem 1rem; }
  .ec-navbar__links { gap: 0.5rem; }
  .ec-navbar__link { font-size: 0.8rem; }
  .dashboard-header h1 { font-size: 1.4rem; }
  .rdv-card__header { flex-direction: column; }
}
