:root {
  --color-bg: #ffffff;
  --color-primary: #186d8d;
  --color-secondary: #fedb33;
  --color-dark: #091c25;
  --color-border: #e2e8f0;
  --color-muted: #64748b;

  --radius-lg: 16px;
  --radius-pill: 999px;
}

/* Reset léger */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Urbanist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--color-bg); /* fond blanc */
  color: var(--color-dark);
}

/* Page générale */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--color-bg);
}

/* Carte centrale */
.auth-card {
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.12);
  padding: 24px 22px 26px;
  border: 1px solid rgba(9, 28, 37, 0.06);
}

/* Header */
.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-title-block {
  display: flex;
  flex-direction: column;
}

.auth-title-block small {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}

.auth-title-block span {
  font-size: 17px;
  font-weight: 800;
}

/* Switch login/register */
.auth-switch {
  font-size: 12px;
  color: var(--color-muted);
}

.auth-switch a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Titre principal de la carte */
.auth-main-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 18px;
}

/* Formulaire */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-dark);
}

.auth-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(24, 109, 141, 0.35);
}

.auth-input::placeholder {
  color: #a0aec0;
}

/* Message d'erreur / succès */
.auth-message {
  margin-top: 6px;
  font-size: 13px;
  min-height: 18px;
}

.auth-message.error {
  color: #e11d48;
}

.auth-message.success {
  color: #15803d;
}

/* Bouton principal */
.auth-submit {
  margin-top: 6px;
  width: 100%;
  border-radius: var(--radius-pill);
  border: none;
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #186d8d, #0c4356);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  box-shadow: 0 14px 36px rgba(9, 28, 37, 0.35);
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 44px rgba(9, 28, 37, 0.4);
}

.auth-submit:active {
  transform: translateY(0);
  box-shadow: 0 10px 26px rgba(9, 28, 37, 0.3);
}

.auth-submit[disabled] {
  opacity: 0.6;
  cursor: wait;
}

/* Petit texte sous le bouton */
.auth-footer-text {
  margin-top: 14px;
  font-size: 11px;
  color: var(--color-muted);
  line-height: 1.5;
}

/* Responsif */
@media (max-width: 520px) {
  .auth-card {
    padding: 20px 18px 22px;
    border-radius: 18px;
  }
  .auth-title-block span {
    font-size: 16px;
  }
  .auth-main-title {
    font-size: 18px;
  }
}

/* ============================
   Layout compte / Dashboard
   ============================ */

.account-layout {
  display: flex;
  min-height: 100vh;
  background: #f8fafc;
  color: var(--color-dark);
  font-family: "Urbanist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* Sidebar */
.account-sidebar {
  width: 260px;
  background: #091c25;
  color: #f9fafb;
  padding: 20px 18px 24px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  transition: transform 0.2s ease-out;
}

.account-sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-sidebar-title small {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
}

.account-sidebar-title span {
  font-size: 17px;
  font-weight: 800;
}

.account-sidebar-user {
  font-size: 13px;
  color: #e5e7eb;
  line-height: 1.4;
}

/* Navigation */
.account-nav {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: #e5e7eb;
  text-decoration: none;
  opacity: 0.9;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
}

.account-nav a span.bullet {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fedb33;
}

.account-nav a .sidebar-notification-dot {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-radius: 999px;
  background: #fedb33;
  box-shadow: 0 0 0 3px rgba(254, 219, 51, 0.16);
}

.account-nav a:hover {
  background: rgba(148, 163, 184, 0.16);
  opacity: 1;
  transform: translateY(-0.5px);
}

.account-nav a.active {
  background: #ffffff;
  color: #091c25;
  font-weight: 700;
}

/* Main content */
.account-main {
  flex: 1;
  margin-left: 260px;
  padding: 24px 20px 32px;
}

.account-main-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.account-main-header h1 {
  font-size: 22px;
  font-weight: 800;
}

.account-main-header p {
  font-size: 13px;
  color: var(--color-muted);
}

/* Cartes Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.dashboard-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.dashboard-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.dashboard-card-value {
  font-size: 24px;
  font-weight: 800;
}

.dashboard-card-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-muted);
}

/* Liste des rendez-vous en attente (placeholder) */
.pending-list {
  margin-top: 18px;
  background: #ffffff;
  border-radius: 18px;
  padding: 14px 16px 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.pending-list-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.pending-list-empty {
  font-size: 13px;
  color: var(--color-muted);
}

/* Bouton burger (mobile) */
.account-burger {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 50;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: #091c25;
  color: #f9fafb;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.45);
}

.account-burger-lines {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.account-burger-lines span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #f9fafb;
}

/* Overlay mobile (optionnel si tu veux plus tard) */
/* .account-overlay { ... } */

/* Responsive */
@media (max-width: 768px) {
  .account-sidebar {
    transform: translateX(-100%);
  }
  .account-sidebar.open {
    transform: translateX(0);
  }
  .account-main {
    margin-left: 0;
    padding-top: 72px;
  }
  .account-burger {
    display: inline-flex;
  }
}

/* ============================================
   Bouton secondaire : Créer un compte
   ============================================ */
.auth-create-btn {
  margin-top: 10px;
  width: 100%;
  border-radius: var(--radius-pill);
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  display: inline-block;
  text-decoration: none;
  color: var(--color-primary);
  background: #ffffff;
  border: 2px solid var(--color-primary);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.auth-create-btn:hover {
  background: #f0f8fb;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(24, 109, 141, 0.25);
}

/* ============================================
   Case à cocher conditions / mentions légales
   ============================================ */

.auth-legal {
  margin-top: 6px;
}

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: var(--color-muted);
  line-height: 1.4;
}

.auth-checkbox input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.auth-checkbox span a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-checkbox span a:hover {
  text-decoration: underline;
}

/* ============================================
   Switch type de compte
   ============================================ */
.account-type-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 100%;
  padding: 4px;
  border-radius: 16px;
  background: #f1f5f9;
  border: 1px solid #dbe4ee;
  overflow: hidden;
  min-height: 54px;
}

.account-type-switch input[type="radio"] {
  display: none;
}

.account-type-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 12px;
  background: linear-gradient(135deg, #186d8d, #0c4356);
  box-shadow: 0 10px 24px rgba(24, 109, 141, 0.22);
  transition: transform 0.28s ease;
  z-index: 1;
}

#accountTypeCompany:checked ~ .account-type-slider {
  transform: translateX(100%);
}

.account-type-option {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 800;
  color: #091c25;
  cursor: pointer;
  user-select: none;
  transition: color 0.22s ease, transform 0.18s ease;
  text-align: center;
}

#accountTypeIndividual:checked ~ label[for="accountTypeIndividual"],
#accountTypeCompany:checked ~ label[for="accountTypeCompany"] {
  color: #ffffff;
}

#accountTypeIndividual:checked ~ label[for="accountTypeCompany"],
#accountTypeCompany:checked ~ label[for="accountTypeIndividual"] {
  color: #64748b;
}

.account-type-option:hover {
  transform: translateY(-1px);
}

@media (max-width: 520px) {
  .account-type-switch {
    min-height: 50px;
    border-radius: 14px;
  }

  .account-type-slider {
    border-radius: 10px;
  }

  .account-type-option {
    min-height: 42px;
    font-size: 13px;
    padding: 0 10px;
  }
}

/* ============================================
   Autocomplete adresse (register)
   ============================================ */

.autocomplete-wrap {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;

  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;

  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);

  max-height: 220px;
  overflow-y: auto;

  padding: 4px 0;
}

/* Chaque ligne */
.autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

/* Hover */
.autocomplete-item:hover {
  background: #f1f5f9;
}

/* Ligne principale (adresse) */
.autocomplete-main {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

/* Ligne secondaire (ville/pays) */
.autocomplete-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.autocomplete-list::-webkit-scrollbar {
  width: 6px;
}

.autocomplete-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}
