/* ==========================================================================
   1. VARIABLES & CONFIGURATION GLOBALE
   ========================================================================== */
:root {
  /* Palette Principale (Terracotta & Dark Slate) */
  --primary: #A34323;
  --primary-hover: #8B381C;
  --secondary: #111827;
  --accent: #059669;
  
  /* Arrière-plans & Surface */
  --background: #FCFCFC;
  --bg-light: #F8FAFC;
  --card-pro-bg: #FAFAFA;
  --client-active-bg: #F7EFEA;
  
  /* Bordures et Neutres */
  --border-color: #E2E8F0;
  --stone-200: #E5E7EB;
  --stone-400: #9CA3AF;
  --stone-500: #6B7280;
  
  /* Typographie & Couleurs de texte */
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --text-dark: #1E293B;
  --text-muted: #64748B;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--background);
  color: var(--secondary);
}

footer {
  position: relative;
  z-index: 2;
  clear: both;
}

.pro-shell > .row {
  align-items: stretch;
}

.hidden {
  display: none !important;
}

.reveal-on-scroll {
  opacity: 0;
  transition: opacity .65s ease var(--reveal-delay, 0ms), transform .65s cubic-bezier(.22, 1, .36, 1) var(--reveal-delay, 0ms);
}

.reveal-fade-in { transform: translateY(18px); }
.reveal-slide-left { transform: translateX(-42px); }
.reveal-slide-right { transform: translateX(42px); }

.reveal-on-scroll.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-on-scroll.reveal-slide-left.reveal-visible,
.reveal-on-scroll.reveal-slide-right.reveal-visible {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   6 BIS. ESPACES DE TRAVAIL
   ========================================================================== */
.workspace-page {
  min-height: calc(100vh - 76px);
  padding: clamp(1.5rem, 3vw, 3rem) 0;
  background: linear-gradient(145deg, #fbfaf8 0%, #f4f7f6 52%, #eef4f2 100%);
}

.workspace-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.workspace-kicker {
  margin-bottom: .45rem;
  color: var(--primary);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.workspace-title {
  margin: 0;
  color: var(--secondary);
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 800;
  letter-spacing: 0;
}

.workspace-subtitle {
  max-width: 44rem;
  margin: .5rem 0 0;
  color: var(--text-muted);
}

.metric-card,
.workspace-panel {
  /* height: 100%; */
  border: 1px solid rgba(226, 232, 240, .85);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 1.25rem;
}

.metric-card::after {
  position: absolute;
  right: -1.5rem;
  bottom: -2.25rem;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: rgba(163, 67, 35, .08);
  content: '';
}

.metric-card .metric-icon {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: .85rem;
  background: var(--client-active-bg);
  color: var(--primary);
  font-size: 1.15rem;
}

.metric-card .metric-label {
  margin-top: 1.2rem;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
}

.metric-card .metric-value {
  margin-top: .2rem;
  color: var(--secondary);
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
}

.workspace-panel {
  padding: clamp(1.15rem, 2vw, 1.75rem);
}

.workspace-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.workspace-panel-title {
  margin: 0;
  color: var(--secondary);
  font-size: 1.05rem;
  font-weight: 800;
}

.workspace-table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(247, 239, 234, .55);
  margin-bottom: 0;
}

.workspace-table thead th {
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.workspace-table tbody td {
  border-color: rgba(226, 232, 240, .65);
  color: var(--text-dark);
  vertical-align: middle;
}

.workspace-table tbody tr:last-child td { border-bottom: 0; }

.workspace-status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .38rem .65rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: .73rem;
  font-weight: 700;
}

.workspace-status::before {
  width: .4rem;
  height: .4rem;
  border-radius: 50%;
  background: currentColor;
  content: '';
}

.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background: #f4f6f8;
}

.dashboard-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  width: 256px;
  height: 100vh;
  flex: 0 0 256px;
  flex-direction: column;
  padding: 1.35rem 1rem;
  background: linear-gradient(180deg, #1d2a35 0%, #111a22 100%);
  color: #fff;
}

.dashboard-sidebar::before {
  position: absolute;
  inset: 0 0 auto;
  height: 9rem;
  background: linear-gradient(135deg, rgba(163, 67, 35, .22), transparent 72%);
  content: '';
  pointer-events: none;
}

.dashboard-sidebar > * { position: relative; z-index: 1; }

.dashboard-brand { display: flex; align-items: center; gap: .75rem; padding: .35rem .5rem 1.75rem; }
.dashboard-brand-mark { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border-radius: .7rem; background: var(--primary); color: #fff; font-weight: 800; text-decoration: none; }
.dashboard-brand strong, .dashboard-brand span { display: block; }
.dashboard-brand strong { font-size: .95rem; }
.dashboard-brand span { margin-top: .15rem; color: #aebbc5; font-size: .72rem; }
.dashboard-nav { display: grid; gap: .25rem; }
.dashboard-nav a { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: .65rem; color: #b9c5ce; font-size: .88rem; text-decoration: none; transition: background .18s ease, color .18s ease; }
.dashboard-nav a:hover, .dashboard-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.dashboard-nav a.active { box-shadow: inset 3px 0 var(--primary); }
.dashboard-nav i { width: 1.1rem; color: #91a4b2; text-align: center; }
.dashboard-nav a.active i { color: #f2a27e; }
.dashboard-sidebar-foot { margin-top: auto; padding: 1rem .5rem .25rem; border-top: 1px solid rgba(255,255,255,.1); }
.dashboard-sidebar-foot a { color: #b9c5ce; font-size: .82rem; text-decoration: none; }
.dashboard-main { display: flex; min-width: 0; min-height: 100vh; flex: 1; flex-direction: column; }
.dashboard-header { display: flex; min-height: 68px; align-items: center; padding: .75rem clamp(1rem, 3vw, 2.5rem); border-bottom: 1px solid #e3e8ec; background: rgba(255,255,255,.88); }
.dashboard-header-spacer { flex: 1; }
.dashboard-menu-toggle { display: none; border: 0; background: transparent; color: var(--secondary); font-size: 1.45rem; }
.dashboard-user { display: flex; align-items: center; gap: .55rem; color: var(--secondary); font-size: .85rem; font-weight: 600; text-decoration: none; }
.dashboard-user > i { color: #83909a; font-size: .7rem; }
.dashboard-avatar { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; background: var(--client-active-bg); color: var(--primary); font-size: .8rem; font-weight: 800; }
.dashboard-content { width: 100%; max-width: 1480px; flex: 1; margin: 0 auto; padding: clamp(1.25rem, 3vw, 2.75rem); }
.dashboard-footer { padding: 1rem clamp(1.25rem, 3vw, 2.75rem); border-top: 1px solid #e3e8ec; color: #89949e; font-size: .75rem; text-align: center; }
.dashboard-footer a { color: inherit; text-decoration: none; }
.dashboard-footer a:hover { color: var(--primary); }
.profile-detail { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid #e7ecef; color: var(--text-muted); font-size: .85rem; }
.profile-detail:last-child { border-bottom: 0; }
.profile-detail strong { color: var(--secondary); font-weight: 700; text-align: right; }

@media (max-width: 991.98px) {
  .dashboard-sidebar { position: fixed; z-index: 1045; left: -270px; transition: left .2s ease; }
  .dashboard-sidebar.show { left: 0; }
  .dashboard-menu-toggle { display: block; }
}

@media (max-width: 767.98px) {
  .workspace-header { align-items: flex-start; flex-direction: column; }
  .workspace-header .btn { width: 100%; }
  .workspace-panel-header { align-items: flex-start; flex-direction: column; }
}

/* ==========================================================================
   2. CLASSES UTILITAIRES & COULEURS
   ========================================================================== */
.bg-primary { background-color: var(--primary) !important; border-radius: 0.6rem; }
.bg-secondary { background-color: var(--secondary) !important; color: #ffffff; }

.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-stone-300 { color: #d1d5db !important; }
.text-stone-400 { color: var(--stone-400) !important; }
.text-stone-500 { color: var(--stone-500) !important; }

.text-stone-600 {
  color: var(--stone-500) !important;
  transition: color 0.15s ease;
}
.text-stone-600:hover {
  color: var(--primary) !important;
}

/* ==========================================================================
   3. COMPOSANTS BOUTONS
   ========================================================================== */
.btn-primary,
button[type="submit"]:not(.bg-transparent),
.btn-primary-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* width: 100%;
  height: 3rem; */
  padding: 8px 32px !important;
  background-color: var(--primary);
  color: #ffffff !important;
  font-weight: 600;
  border-radius: 9999px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-primary:hover,
button[type="submit"]:not(.bg-transparent):hover,
.btn-primary-custom:hover,
.btn-primary-custom:focus {
  background-color: var(--primary-hover) !important;
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  background-color: transparent !important;
  color: var(--secondary) !important;
  font-weight: 500;
  border: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-ghost-custom:hover,
.btn-ghost-custom:focus {
  background-color: rgba(0, 0, 0, 0.05) !important;
  color: var(--secondary) !important;
}

/* Liens textuels */
a.text-primary {
  text-decoration: none;
  font-weight: 600;
}
a.text-primary:hover {
  text-decoration: underline;
}

/* ==========================================================================
   4. FORMULAIRES & INPUTS
   ========================================================================== */
label {
  display: block;
  color: var(--secondary);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"] {
  width: 100%;
  height: 2.75rem;
  padding: 0.5rem 0.85rem;
  background-color: var(--card-pro-bg);
  border: 1px solid var(--stone-200);
  border-radius: 0.6rem;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(163, 67, 35, 0.12);
}

/* ==========================================================================
   5. CARTES DE SÉLECTION DE COMPTE
   ========================================================================== */
#btn-type-client,
#btn-type-pro,
.type-card {
  width: 100%;
  padding: 1rem 0.75rem;
  background-color: #ffffff;
  border: 2px solid var(--stone-200);
  border-radius: 0.75rem;
  color: var(--stone-500);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

#btn-type-client:hover,
#btn-type-pro:hover,
.type-card:hover {
  border-color: var(--primary);
  background-color: rgba(163, 67, 35, 0.02);
}

/* État actif */
.border-primary,
#btn-type-client[class*="border-primary"],
#btn-type-pro[class*="border-primary"],
.type-card.active {
  border-color: var(--primary) !important;
  background-color: var(--client-active-bg) !important;
  color: var(--primary) !important;
  box-shadow: 0 0 0 1px var(--primary);
}

.type-card.active svg { stroke: var(--primary) !important; }
.type-card.active .fw-semibold { color: var(--primary) !important; }

/* ==========================================================================
   6. LAYOUT & AUTHENTIFICATION
   ========================================================================== */
[data-controller="auth"] {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  background-color: var(--background);
}

.bg-white-70 { background-color: rgba(255, 255, 255, 0.85); }
.backdrop-blur { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.max-w-7xl { max-width: 80rem; }

/* Navbar Mobile (Menu Burger) */
@media (max-width: 767.98px) {
  .navbar-collapse {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1050;
    background-color: #ffffff;
    padding: 1.25rem;
    border: 1px solid var(--stone-200);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  }
  .navbar-collapse .nav-link { padding: 0.5rem 0; }
}

/* ==========================================================================
   7. PAGE D'ACCUEIL (HOME)
   ========================================================================== */
.home-container {
  color: var(--text-dark);
}

/* Hero Section */
.hero-section {
  position: relative;
  background-color: var(--secondary);
  color: white;
  padding: 100px 24px 140px 24px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

.hero-content {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 16px;
  border-radius: 9999px;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  margin: 24px 0 0 0;
  letter-spacing: -0.02em;
}

.hero-title .highlight { color: #60a5fa; }

.hero-desc {
  margin-top: 24px;
  font-size: 18px;
  color: #cbd5e1;
  max-width: 600px;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Routes Populaires */
.routes-section {
  max-width: 1200px;
  margin: -60px auto 80px auto;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

.routes-card {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  padding: 32px;
}

.routes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.routes-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.filter-btn {
  border: none;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: #f1f5f9;
  color: var(--text-muted);
  transition: background-color 0.2s, color 0.2s;
}

.filter-btn.active {
  background: var(--primary);
  color: white;
}

.routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.route-item {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: block;
  background: white;
}

.route-item:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.route-img {
  height: 120px;
  width: 100%;
  object-fit: cover;
}

.route-info { padding: 16px; }

.route-cities {
  font-weight: 700;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.route-details {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Comment ça marche */
.how-section {
  max-width: 1200px;
  margin: 0 auto 96px auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px auto;
}

.section-tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  font-weight: 700;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--secondary);
  margin-top: 8px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.how-box {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  background: white;
}

.how-box.dark {
  background: var(--secondary);
  color: white;
}

.how-box h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 24px 0;
}

.how-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.how-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step-num {
  background: var(--secondary);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.how-box.dark .step-num { background: var(--primary); }

/* Section Professionnel */
.pro-section {
  max-width: 1200px;
  margin: 0 auto 96px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  align-items: center;
}

.pro-img-wrapper {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.pro-img-wrapper img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.pro-check-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pro-check-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dark);
}

.check-icon {
  color: var(--accent);
  font-weight: bold;
}

/* Témoignages */
.testimonials-section {
  background-color: var(--secondary);
  color: white;
  padding: 80px 24px;
}

.testimonials-container {
  max-width: 1200px;
  margin: 0 auto;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
}