/* ==========================================================================
   TRAKO - STYLES GLOBAUX & VARIABLES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;700;800&family=DM+Sans:wght@400;500&display=swap');

:root {
  /* Couleurs de marque principales */
  --green: #27500A;
  --green-light: #EAF3DE;
  --green-mid: #639922;
  --orange: #854F0B;
  --orange-light: #FAEEDA;
  --orange-mid: #EF9F27;
  --yellow: #FAC775;
  --blue: #0C447C;
  --blue-light: #E6F1FB;
  --red: #791F1F;
  --red-light: #FCEBEB;
  
  /* Couleurs de fond et texte */
  --bg-primary: #ffffff;
  --bg-secondary: #FAFAF8;
  --text-primary: #1a1a1a;
  --text-secondary: #5F5E5A;
  --text-tertiary: #888888;
  --border-color: #e0e0e0;
  --radius: 14px;

  /* Variables manquantes — utilisées dans .lang-btn et ailleurs */
  --primary: #3B6D11;
  --primary-rgb: 59, 109, 17;
  --border: #e0e0e0;
  --dark: #1a1a1a;
}

/* ==========================================================================
   SPLASH SCREEN — Logo au chargement de la page d'accueil
   ========================================================================== */
#trako-splash {
  position: fixed;
  inset: 0;
  background: #27500A;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
  animation: splashFadeOut 0.5s ease 1.9s forwards;
}

.splash-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  animation: splashLogoIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.splash-logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 3.5rem;
  color: #ffffff;
  letter-spacing: -2px;
  line-height: 1;
}

.splash-logo-text span {
  color: #EF9F27;
}

.splash-tagline {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: splashTaglineIn 0.6s ease 0.7s both;
}

.splash-bar-wrap {
  margin-top: 2.5rem;
  width: 120px;
  height: 2px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
  animation: splashTaglineIn 0.5s ease 0.8s both;
}

.splash-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #EF9F27, #FAC775);
  border-radius: 2px;
  animation: splashBarFill 1.1s cubic-bezier(0.4, 0, 0.2, 1) 0.7s forwards;
}

@keyframes splashLogoIn {
  from { opacity: 0; transform: translateY(24px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes splashTaglineIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes splashBarFill {
  from { width: 0%; }
  to   { width: 100%; }
}
@keyframes splashFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; pointer-events: none; visibility: hidden; }
}

/* Corps de la page bloqué pendant le splash */
body.splash-active {
  overflow: hidden;
}

/* ==========================================================================
   ANIMATIONS GLOBALES & UTILITAIRES
   ========================================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.4); }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

/* Classe utilitaire d'apparition au scroll / chargement */
.anim-fadeup {
  opacity: 0;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.45s; }
.anim-delay-5 { animation-delay: 0.6s; }

/* ==========================================================================
   INTERSECTION OBSERVER — classes ajoutées par JS
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-primary);
  overflow-x: hidden;
  /* Ajout pour le footer en bas de page */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Gestion des fonds d'écran selon la page (à ajouter sur la balise <body>) --- */
body.landing-page { background: var(--bg-secondary); }
body.auth-page { background: #f5f5f5; display: flex; justify-content: center; align-items: center; min-height: 100vh; flex-direction: column; }
body.dashboard-page { background: var(--bg-secondary); padding: 2rem; display: flex; flex-direction: column; align-items: center; min-height: 100vh; }
body.admin-page { background: var(--bg-secondary); padding: 2rem; display: flex; flex-direction: column; align-items: center; min-height: 100vh; }

/* ==========================================================================
   COMPOSANTS COMMUNS (Badges, Alertes, Formulaires)
   ========================================================================== */
.alert { padding: 0.8rem; border-radius: 8px; font-size: 0.85rem; margin-bottom: 1rem; }
.alert-success { background: var(--green-light); color: var(--green); border: 1px solid #97C459; }
.alert-error { background: var(--red-light); color: var(--red); border: 1px solid #F09595; }

.badge { display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 0.7rem; font-weight: 500; }
.badge-green { background: var(--green-light); color: var(--green); }
.badge-amber { background: var(--orange-light); color: var(--orange); }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-gray, .badge-done, .b-res { background: #F1EFE8; color: var(--text-secondary); }
.badge-new, .b-ok { background: var(--green-light); color: var(--green); }
.badge-sent, .b-pend { background: var(--orange-light); color: var(--orange); }
.badge-urgent, .badge-esc, .b-rej { background: var(--red-light); color: var(--red); }
.badge-transit, .b-open { background: var(--blue-light); color: var(--blue); }

.f-label, .flbl { font-size: 0.75rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 4px; }
.f-input, .f-select, .finput, .fselect { width: 100%; padding: 0.55rem 0.8rem; border: 0.5px solid var(--border-color); border-radius: 8px; font-size: 1rem; /* ≥16px évite le zoom iOS */ font-family: 'DM Sans', sans-serif; background: var(--bg-primary); color: var(--text-primary); outline: none; }
.f-input:focus, .f-select:focus, .finput:focus, .fselect:focus { border-color: var(--green); }
.ftextarea { resize: vertical; min-height: 60px; }

.btn-submit { padding: 0.6rem 1.4rem; border-radius: 8px; border: none; background: var(--green); color: #fff; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: 0.15s; }
.btn-submit:hover { background: var(--green-mid); }
.btn-cancel { padding: 0.6rem 1.2rem; border-radius: 8px; border: 0.5px solid var(--border-color); background: none; color: var(--text-secondary); font-size: 0.85rem; cursor: pointer; }

/* ==========================================================================
   LANDING PAGE SPECIFICS
   ========================================================================== */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2.5rem;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(232,232,228,0.7);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}
nav.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  color: #3B6D11;
  letter-spacing: -1px;
  text-decoration: none;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.logo:hover { opacity: 0.8; }
.logo span { color: var(--orange-mid); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { font-size: 0.9rem; color: var(--text-secondary); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: #3B6D11; }

/* ── Menu hamburger mobile ── */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
  z-index: 200;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer mobile */
.nav-mobile-drawer {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 5rem 2rem 2rem;
  z-index: 150;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
.nav-mobile-drawer.open {
  transform: translateY(0);
}
.nav-mobile-drawer a {
  display: block;
  padding: 1rem 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  transition: color 0.2s;
}
.nav-mobile-drawer a:hover { color: #3B6D11; }
.nav-mobile-drawer .drawer-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 1.5rem;
}
.nav-mobile-drawer .drawer-cta button {
  width: 100%;
  padding: 0.85rem;
  font-size: 0.95rem;
}
.btn-outline { padding: 0.55rem 1.2rem; border: 1.5px solid #3B6D11; border-radius: 8px; color: #3B6D11; font-size: 0.88rem; font-weight: 500; cursor: pointer; background: transparent; transition: all 0.22s; }
.btn-outline:hover { background: var(--green-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59,109,17,0.15); }
.btn-primary { padding: 0.55rem 1.2rem; border: none; border-radius: 8px; background: #3B6D11; color: white; font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: all 0.22s; }
.btn-primary:hover { background: var(--green-mid); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(59,109,17,0.25); }

.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; padding: 5rem 2.5rem 4rem; max-width: 1100px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--orange-light); color: var(--orange); border-radius: 20px; padding: 0.35rem 1rem; font-size: 0.8rem; font-weight: 500; margin-bottom: 1.2rem; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange-mid); animation: pulse-dot 2s ease-in-out infinite; }
.hero h1 { font-family: 'Syne', sans-serif; font-size: 3.2rem; font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 1.2rem; }
.hero h1 em { font-style: normal; color: #3B6D11; }
.hero p { font-size: 1.05rem; line-height: 1.7; margin-bottom: 2rem; max-width: 440px; color: var(--text-secondary); }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-hero { padding: 0.85rem 1.8rem; border-radius: 10px; font-size: 0.95rem; font-weight: 500; cursor: pointer; border: none; transition: all 0.22s cubic-bezier(0.22,1,0.36,1); }
.btn-hero-primary { background: #3B6D11; color: white; box-shadow: 0 4px 16px rgba(59,109,17,0.2); }
.btn-hero-primary:hover { background: var(--green-mid); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,109,17,0.3); }
.btn-hero-secondary { background: var(--orange-light); color: var(--orange); border: 1.5px solid var(--yellow); }
.btn-hero-secondary:hover { background: var(--yellow); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(239,159,39,0.2); }

.hero-visual { position: relative; }
.route-card { background: var(--bg-primary); border: 1px solid #e4e4e0; border-radius: var(--radius); padding: 1.2rem 1.5rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 1rem; animation: slideIn 0.5s ease forwards; opacity: 0; transition: transform 0.2s, box-shadow 0.2s; }
.route-card:hover { transform: translateX(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.route-card:nth-child(1) { animation-delay: 0.2s; } .route-card:nth-child(2) { animation-delay: 0.4s; } .route-card:nth-child(3) { animation-delay: 0.6s; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.route-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.route-icon.green { background: var(--green-light); } .route-icon.orange { background: var(--orange-light); } .route-icon.yellow { background: #FFF9E6; }
.route-info { flex: 1; }
.route-info .route-name { font-weight: 500; font-size: 0.9rem; margin-bottom: 2px; }
.route-info .route-sub { font-size: 0.78rem; color: var(--text-secondary); }
.route-price { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem; color: #3B6D11; }
.stars { color: var(--orange-mid); font-size: 0.75rem; }

.stats-bar { background: var(--text-primary); padding: 2rem 2.5rem; }
.stats-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; }
.stat-number { font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800; color: var(--yellow); }
.stat-label { font-size: 0.82rem; color: #888; margin-top: 4px; }

.section { padding: 5rem 2.5rem; max-width: 1100px; margin: 0 auto; }
.section-tag { display: inline-block; background: var(--green-light); color: #3B6D11; border-radius: 20px; padding: 0.3rem 0.9rem; font-size: 0.78rem; font-weight: 500; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.5px; }
.section-tag.orange { background: var(--orange-light); color: var(--orange); }
.section h2 { font-family: 'Syne', sans-serif; font-size: 2.2rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 1rem; }
.section-sub { color: var(--text-secondary); font-size: 1rem; line-height: 1.7; max-width: 500px; margin-bottom: 3rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.step-card { background: var(--bg-primary); border: 1px solid #e8e8e4; border-radius: var(--radius); padding: 1.8rem; position: relative; overflow: hidden; transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), box-shadow 0.25s; }
.step-card:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(0,0,0,0.08); }
.step-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: #3B6D11; }
.step-card.orange::before { background: var(--orange-mid); } .step-card.yellow::before { background: var(--yellow); }
.step-num { font-family: 'Syne', sans-serif; font-size: 2.5rem; font-weight: 800; color: var(--green-light); line-height: 1; margin-bottom: 1rem; }
.step-card.orange .step-num { color: var(--orange-light); } .step-card.yellow .step-num { color: #FFF9E6; }
.step-card h3 { font-family: 'Syne', sans-serif; font-size: 1.05rem; font-weight: 700; margin-bottom: 0.6rem; }
.step-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

.who-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1rem; }
.who-card { border-radius: var(--radius); padding: 2rem; position: relative; overflow: hidden; transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), box-shadow 0.25s; }
.who-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.1); }
.who-card.buyer { background: var(--green-light); } .who-card.freight { background: var(--orange-light); }
.who-card h3 { font-family: 'Syne', sans-serif; font-size: 1.3rem; font-weight: 800; margin-bottom: 0.5rem; }
.who-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.2rem; }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.feature-list li { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.check { width: 18px; height: 18px; border-radius: 50%; background: #3B6D11; color: white; display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0; }
.who-card.freight .check { background: var(--orange); }
.who-card-btn { margin-top: 1.5rem; padding: 0.7rem 1.4rem; border-radius: 8px; border: none; cursor: pointer; font-size: 0.88rem; font-weight: 500; transition: all 0.22s; }
.who-card.buyer .who-card-btn { background: #3B6D11; color: white; }
.who-card.buyer .who-card-btn:hover { background: var(--green-mid); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(59,109,17,0.25); }
.who-card.freight .who-card-btn { background: var(--orange); color: white; }
.who-card.freight .who-card-btn:hover { background: var(--orange-mid); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(133,79,11,0.25); }

.routes-bg { background: #F5F5F0; padding: 5rem 2.5rem; }
.routes-inner { max-width: 1100px; margin: 0 auto; }
.routes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.route-badge { background: var(--bg-primary); border: 1px solid #e4e4e0; border-radius: 12px; padding: 1.2rem 1.4rem; display: flex; align-items: center; gap: 12px; }
.flag { font-size: 1.5rem; }
.route-badge-info .from { font-size: 0.78rem; color: var(--text-secondary); }
.route-badge-info .to { font-size: 0.9rem; font-weight: 500; }
.arrow-right { margin-left: auto; color: var(--text-secondary); font-size: 0.9rem; }

.cta-section { background: #3B6D11; padding: 5rem 2.5rem; text-align: center; }
.cta-section h2 { font-family: 'Syne', sans-serif; font-size: 2.5rem; font-weight: 800; color: white; letter-spacing: -1px; margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,0.75); font-size: 1rem; margin-bottom: 2rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-white { padding: 0.85rem 2rem; border-radius: 10px; border: none; background: white; color: #3B6D11; font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.btn-white:hover { background: var(--green-light); }
.btn-ghost { padding: 0.85rem 2rem; border-radius: 10px; border: 1.5px solid rgba(255,255,255,0.5); background: transparent; color: white; font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

/* ==========================================================================
   AUTH PAGE SPECIFICS
   ========================================================================== */
.auth-wrap { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  width: 100%; 
  max-width: 900px; 
  margin: 0 1rem; 
  min-height: 620px; 
  border: 0.5px solid var(--border-color); 
  border-radius: 16px; 
  overflow: hidden; 
  background: var(--bg-primary); 
  box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
}
.auth-left { background: var(--green); padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-logo { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.8rem; color: #ffffff; letter-spacing: -1px; }
.auth-logo span { color: var(--yellow); }
.auth-left-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; }
.auth-left h2 { font-family: 'Syne', sans-serif; font-size: 1.7rem; font-weight: 800; color: #ffffff; line-height: 1.2; letter-spacing: -0.5px; }
.auth-left h2 span { color: var(--yellow); }
.auth-left p { font-size: 0.88rem; color: rgba(255,255,255,0.65); line-height: 1.6; }
.trust-items { display: flex; flex-direction: column; gap: 0.75rem; }
.trust-item { display: flex; align-items: center; gap: 10px; }
.trust-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); flex-shrink: 0; }
.trust-item span { font-size: 0.83rem; color: rgba(255,255,255,0.8); }
.auth-left-foot { font-size: 0.75rem; color: rgba(255,255,255,0.35); }

.auth-right { padding: 2.5rem; display: flex; flex-direction: column; gap: 1.5rem; overflow-y: auto; }
.tab-switcher { display: flex; background: var(--bg-secondary); border-radius: 10px; padding: 4px; gap: 4px; }
.tab-btn { flex: 1; padding: 0.55rem; border: none; border-radius: 7px; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: all 0.2s; background: transparent; color: var(--text-secondary); }
.tab-btn.active { background: var(--bg-primary); color: var(--green); border: 0.5px solid var(--border-color); box-shadow: 0 2px 5px rgba(0,0,0,0.02); }

.form-title { font-family: 'Syne', sans-serif; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.5px; }
.form-sub { font-size: 0.83rem; color: var(--text-secondary); margin-top: 3px; }

.role-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role-card { border: 1.5px solid var(--border-color); border-radius: 10px; padding: 0.9rem; cursor: pointer; transition: all 0.2s; background: var(--bg-primary); text-align: left; }
.role-card:hover { border-color: var(--green-mid); background: var(--green-light); }
.role-card.selected { border-color: var(--green); background: var(--green-light); }
.role-card.selected.freight { border-color: var(--orange); background: var(--orange-light); }
.role-icon { font-size: 16px; margin-bottom: 5px; }
.role-name { font-size: 0.85rem; font-weight: 500; }
.role-desc { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }

.name-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kyc-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 0.82rem; font-weight: 500; color: var(--text-secondary); }
.fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.auth-submit { width: 100%; padding: 0.8rem; background: var(--green); color: white; border: none; border-radius: 10px; font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: background 0.2s; }
.auth-submit:hover { background: var(--green-mid); }
.auth-submit.orange { background: var(--orange); }
.auth-submit.orange:hover { background: var(--orange-hover); }

.divider { display: flex; align-items: center; gap: 10px; margin-top: 1rem; }
.divider-line { flex: 1; height: 0.5px; background: var(--border-color); }
.divider span { font-size: 0.78rem; color: var(--text-tertiary); }

.social-btn { width: 100%; padding: 0.7rem; border: 0.5px solid var(--border-color); border-radius: 10px; font-size: 0.88rem; font-weight: 500; cursor: pointer; background: var(--bg-primary); transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 1rem; }
.social-btn:hover { background: var(--bg-secondary); }
.footer-link { font-size: 0.8rem; color: var(--text-secondary); text-align: center; margin-top: 0.75rem; }
.footer-link a { color: var(--green); text-decoration: none; font-weight: 500; cursor: pointer; }
.forgot { font-size: 0.78rem; color: var(--green-mid); text-align: right; cursor: pointer; }

/* ==========================================================================
   DASHBOARDS COMMUNS (Acheteur, Transitaire, Admin)
   ========================================================================== */
.db, .adm, .tr { 
  font-family: 'DM Sans', sans-serif; 
  background: var(--bg-primary); 
  border: 0.5px solid var(--border-color); 
  border-radius: 16px; 
  overflow: hidden; 
  width: 100%; 
  max-width: 1200px; 
  margin: 0 auto; 
  box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
}
.db-top, .tr-top, .adm-top { padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.db-top { background: var(--green); }
.tr-top { background: #412402; }
.adm-top { background: #1a1a1a; }

.db-logo, .tr-logo, .adm-logo { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.3rem; color: #fff; letter-spacing: -0.5px; text-decoration: none; }
.db-logo span, .tr-logo span, .adm-logo span { color: var(--yellow); }
.adm-badge { background: var(--orange); color: var(--yellow); font-size: 0.68rem; font-weight: 500; padding: 2px 8px; border-radius: 4px; margin-left: 8px; vertical-align: middle; }

.db-nav, .tr-nav, .adm-nav { display: flex; gap: 4px; }
.db-nav-btn, .tr-nav-btn, .adm-btn { padding: 0.4rem 0.85rem; border-radius: 7px; border: none; font-family: 'DM Sans', sans-serif; font-size: 0.78rem; font-weight: 500; cursor: pointer; background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); transition: all 0.2s; }
.db-nav-btn.active, .tr-nav-btn.active, .adm-btn.active { background: rgba(255,255,255,0.22); color: #fff; }
.db-nav-btn:hover, .tr-nav-btn:hover, .adm-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }

.db-user, .tr-user, .adm-user { display: flex; align-items: center; gap: 8px; }
.db-avatar, .tr-avatar, .adm-av { width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; color: #412402; }
.adm-av { background: var(--green); color: var(--green-light); }
.db-username, .tr-uname, .adm-un { font-size: 0.82rem; color: rgba(255,255,255,0.85); display: flex; align-items: center; }
.verified-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #97C459; margin-left: 6px; }

.logout-btn { background: none; border: 1px solid rgba(255,255,255,0.3); color: white; padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; cursor: pointer; margin-left: 10px; }
.logout-btn:hover { background: rgba(255,255,255,0.1); }

.db-body, .tr-body, .adm-body { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }

.section-label, .sec-label, .slbl { font-size: 0.72rem; font-weight: 500; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 0.6rem; }

/* Metrics */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.metric, .met { background: var(--bg-primary); border: 0.5px solid var(--border-color); border-radius: 10px; padding: 0.9rem 1rem; transition: transform 0.2s, box-shadow 0.2s; }
.metric:hover, .met:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.metric-label, .met-lbl { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 4px; }
.metric-val, .met-val { font-family: 'Syne', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.metric-sub, .met-sub { font-size: 0.7rem; color: var(--text-tertiary); margin-top: 2px; }
.green, .g { color: var(--green); }
.amber, .a { color: var(--orange); }
.r { color: var(--red); }

/* Panels */
.panel { background: var(--bg-primary); border: 0.5px solid var(--border-color); border-radius: 12px; overflow: hidden; }
.panel-head, .ph { padding: 0.85rem 1.25rem; border-bottom: 0.5px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; }
.panel-title, .pt { font-size: 0.88rem; font-weight: 500; color: var(--text-primary); }
.panel-sub, .ps { font-size: 0.75rem; color: var(--text-secondary); margin-top: 1px; }

/* Buttons inside Panels */
.panel-action, .act-btn, .xbtn, .see-btn { font-size: 0.78rem; border: 0.5px solid var(--border-color); background: none; cursor: pointer; color: var(--text-secondary); font-family: 'DM Sans', sans-serif; font-weight: 500; padding: 0.35rem 0.8rem; border-radius: 6px; transition: all 0.15s; }
.panel-action:hover, .act-btn:hover, .xbtn:hover, .see-btn:hover { background: var(--bg-secondary); }
.panel-action.primary, .act-btn.green-btn, .xbtn.app { background: var(--green); color: #fff; border-color: var(--green); }
.act-btn.amber-btn, .btn-send { background: var(--orange); color: #fff; border-color: var(--orange); border-radius: 8px; padding: 0.55rem 1.3rem; }
.xbtn.rej { background: var(--red-light); color: var(--red); border-color: #F09595; }
.xbtn.warn { background: var(--orange-light); color: var(--orange); border-color: var(--yellow); }
.xbtn.dark { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

/* Table Rows */
.demand-row, .row, .devis-row, .exp-row, .dem-row, .offer-row { display: grid; align-items: center; padding: 0.8rem 1.25rem; border-bottom: 0.5px solid var(--border-color); gap: 8px; transition: background 0.15s, transform 0.15s; }
.demand-row:last-child, .row:last-child, .devis-row:last-child { border-bottom: none; }
.demand-row:hover:not(.header), .row:hover:not(.hdr), .devis-row:hover:not(.header) { background: var(--bg-secondary); }
.demand-row.header, .row.hdr { background: var(--bg-secondary); }
.demand-row.header span, .row.hdr span { font-size: 0.7rem; font-weight: 500; color: var(--text-tertiary); text-transform: uppercase; }
.devis-row.best { background: var(--green-light); }

/* Typo inside tables */
.demand-name, .item-name, .rn, .trans-name { font-size: 0.85rem; font-weight: 500; color: var(--text-primary); }
.demand-route, .item-sub, .rs, .trans-loc { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }
.demand-cell, .cell, .rc, .delay-val { font-size: 0.82rem; color: var(--text-secondary); }
.price-val, .price-bold, .pv { font-family: 'Syne', sans-serif; font-size: 0.95rem; font-weight: 700; color: var(--green); }
.stars-row, .stars { color: var(--orange-hover); font-size: 11px; }

/* Specific Column Templates */
.demand-row { grid-template-columns: 2fr 1.2fr 1fr 1fr 90px; }
.devis-row { grid-template-columns: 2fr 1fr 1fr 1fr 100px; }
.exp-row { grid-template-columns: 2fr 1.2fr 1fr 1fr 100px; }
.dem-row { grid-template-columns: 2fr 1fr 1fr 0.8fr 100px; }
.offer-row { grid-template-columns: 2fr 1fr 1fr 1fr 100px; }
.kyc-row { grid-template-columns: 2fr 1.2fr 0.9fr 0.8fr 130px; }
.lit-row { grid-template-columns: 2fr 1.2fr 0.9fr 0.8fr 120px; }
.com-row { grid-template-columns: 2fr 1fr 1fr 1fr 80px; }
.usr-row { grid-template-columns: 2fr 1fr 0.8fr 0.8fr 100px; }

.choose-btn { padding: 0.4rem 0.85rem; border-radius: 7px; border: none; font-size: 0.78rem; font-weight: 500; cursor: pointer; background: var(--green); color: #fff; }
.best-badge { font-size: 0.68rem; background: var(--green); color: #fff; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }

/* Forms inside Dashboards */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 1.25rem; }
.form-grid .full, .f-full { grid-column: 1 / -1; }
.devis-form { padding: 1.25rem; display: flex; flex-direction: column; gap: 10px; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.submit-row, .form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* Tracking Acheteur */
.tracking-card { padding: 1.25rem; border-bottom: 0.5px solid var(--border-color); }
.track-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.2rem; }
.track-ref { font-size: 0.78rem; color: var(--text-secondary); }
.track-title { font-size: 0.95rem; font-weight: 500; margin-top: 2px; }
.track-eta { text-align: right; }
.track-eta-label { font-size: 0.72rem; color: var(--text-tertiary); }
.track-eta-val { font-size: 0.9rem; font-weight: 500; color: var(--green); margin-top: 2px; }
.track-steps { display: flex; align-items: flex-start; gap: 0; margin-bottom: 1.2rem; }
.track-step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.track-step-line { position: absolute; top: 11px; left: 50%; right: -50%; height: 2px; background: var(--border-color); z-index: 0; }
.track-step-line.done { background: var(--green); }
.track-step:last-child .track-step-line { display: none; }
.track-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-color); background: #fff; z-index: 1; display: flex; align-items: center; justify-content: center; font-size: 9px; color: var(--text-tertiary); }
.track-dot.done { background: var(--green); border-color: var(--green); color: #fff; }
.track-dot.active { background: var(--green-light); border-color: var(--green); color: var(--green); }
.track-step-label { font-size: 0.7rem; color: var(--text-secondary); margin-top: 6px; text-align: center; }
.track-step-label.done { color: var(--green); font-weight: 500; }

/* Transitaire Specifique */
.route-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 1rem 1.25rem; }
.route-tag { padding: 5px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 500; background: var(--orange-light); color: var(--orange); border: 0.5px solid var(--orange-mid); }
.route-tag.add { background: none; border: 0.5px dashed var(--border-color); color: var(--text-tertiary); cursor: pointer; }
.demand-detail { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.detail-item { background: var(--bg-secondary); border-radius: 8px; padding: 0.7rem 0.9rem; }
.detail-lbl { font-size: 0.7rem; color: var(--text-tertiary); }
.detail-val { font-size: 0.85rem; font-weight: 500; margin-top: 2px; }

/* Admin Specifique */
.doc-preview { display: flex; gap: 6px; flex-wrap: wrap; padding: 1rem 1.25rem; border-bottom: 0.5px solid var(--border-color); }
.doc-card { background: var(--bg-secondary); border: 0.5px solid var(--border-color); border-radius: 8px; padding: 0.6rem 0.9rem; font-size: 0.75rem; color: var(--text-secondary); display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.doc-card:hover { background: var(--bg-primary); }
.doc-name { font-weight: 500; color: var(--text-primary); font-size: 0.78rem; }
.doc-ok { color: var(--green); font-size: 0.7rem; }
.doc-miss { color: var(--red); font-size: 0.7rem; }
.kyc-actions { display: flex; gap: 6px; padding: 0.9rem 1.25rem; align-items: center; justify-content: flex-end; border-top: 0.5px solid var(--border-color); }
.bar-chart { padding: 1rem 1.25rem; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-lbl { font-size: 0.75rem; color: var(--text-secondary); width: 120px; flex-shrink: 0; }
.bar-track { flex: 1; background: var(--bg-secondary); border-radius: 4px; height: 10px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; }
.bar-val { font-size: 0.75rem; font-weight: 500; color: var(--text-primary); width: 45px; text-align: right; }
.lit-detail { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.lit-card { background: var(--bg-secondary); border-radius: 8px; padding: 0.8rem 1rem; }
.lit-title { font-size: 0.82rem; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.lit-body { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }
.lit-foot { display: flex; gap: 6px; margin-top: 8px; }


/* ==========================================================================
   RESPONSIVE COMPLET — voir le bloc dédié plus bas (≥ ligne 853)
   ========================================================================== */

/* ==========================================================================
   FOOTER STYLE QUISHIBA (Dark & Minimalist)
   ========================================================================== */
.trako-footer {
    background: #1a1a1a;
    color: #ffffff;
    padding: 80px 0 40px 0;
    margin-top: auto; /* Pousse le footer tout en bas si la page est courte */
    font-family: 'DM Sans', sans-serif;
    border-top: 1px solid #2a2a2a;
    width: 100%;
}

.trako-footer .f-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Alignement Logo + Social en ligne */
.trako-footer .f-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 60px;
    border-bottom: 1px solid #2a2a2a;
}

.trako-footer .f-brand {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trako-footer .f-logo {
    font-family: 'Syne', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
}

.trako-footer .f-logo span { color: #639922; }

.trako-footer .f-social {
    display: flex;
    gap: 12px;
}

.trako-footer .f-social a {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    border: 1px solid #333;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    transition: 0.3s;
}

.trako-footer .f-social a:hover {
    background: #639922;
    border-color: #639922;
}

/* Groupes de liens alignés à droite */
.trako-footer .f-nav-groups {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

.trako-footer .f-nav-col h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    color: #666;
}

.trako-footer ul.f-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.trako-footer .f-list li {
    margin-bottom: 12px;
    list-style: none !important;
}

.trako-footer .f-list li a {
    color: #bbb;
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.3s;
}

.trako-footer .f-list li a:hover { color: #fff; }

.trako-footer .f-apps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trako-footer .app-btn {
    background: #000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.8rem;
    border: 1px solid #333;
    cursor: pointer;
    text-align: center;
    min-width: 140px;
}

/* Partie Basse : Légal horizontal */
.trako-footer .f-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.trako-footer .f-legal {
    display: flex;
    gap: 25px;
}

.trako-footer .f-legal a {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
}

.trako-footer .f-legal a:hover { color: #bbb; }

.trako-footer .f-copy {
    color: #444;
    font-size: 0.85rem;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .trako-footer .f-top { flex-direction: column; align-items: center; text-align: center; }
    .trako-footer .f-nav-groups { justify-content: center; gap: 30px; }
    .trako-footer .f-bottom { flex-direction: column; text-align: center; }
    .trako-footer .f-legal { flex-direction: column; gap: 10px; }
}







/* --- ANIMATION GLOBALE D'APPARITION --- */
@keyframes fadeUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Appliquer l'animation aux blocs principaux */
.auth-wrap, 
.db-body, 
.tr-body, 
.adm-content, 
.hero-about,
.content-section {
    animation: fadeUp 0.6s ease-out forwards;
}

/* ==========================================================================
   RESPONSIVE COMPLET — TRAKO v2
   Breakpoints: 480px (mobile S), 768px (mobile L), 992px (tablette), 1200px (desktop)
   ========================================================================== */

/* ---------- BASE : viewport meta (doit être dans chaque <head>) ---------- */
/* Rappel : <meta name="viewport" content="width=device-width, initial-scale=1"> */

/* ---------- DASHBOARD & ADMIN : plein écran sur tous supports ----------- */
body.dashboard-page,
body.admin-page {
  padding: 1rem;
  align-items: flex-start;
  justify-content: stretch;
}

/* Le conteneur principal prend toute la largeur disponible */
.db, .adm, .tr {
  max-width: 100%;
  border-radius: 12px;
}

/* ---------- TABLETTE (≤ 1024px) ---------------------------------------- */
@media (max-width: 1024px) {

  /* Navbar dashboard : logo + nav + user sur 2 lignes */
  .db-top, .tr-top, .adm-top {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
  }
  .db-nav, .tr-nav, .adm-nav {
    flex-wrap: wrap;
    gap: 4px;
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }
  .db-nav-btn, .tr-nav-btn, .adm-btn {
    font-size: 0.73rem;
    padding: 0.35rem 0.7rem;
  }

  /* Métriques 2 colonnes */
  .metrics { grid-template-columns: repeat(2, 1fr); }

  /* Tableaux : réduire les colonnes fixes */
  .demand-row { grid-template-columns: 2fr 1fr 1fr 80px; }
  .demand-row > *:nth-child(3) { display: none; } /* masquer colonne médiane */
  .devis-row  { grid-template-columns: 2fr 1fr 1fr 90px; }
  .exp-row    { grid-template-columns: 2fr 1fr 1fr 90px; }
  .dem-row    { grid-template-columns: 2fr 1fr 1fr 90px; }
  .kyc-row    { grid-template-columns: 2fr 1fr 1fr 110px; }
  .lit-row    { grid-template-columns: 2fr 1fr 1fr 100px; }
  .com-row    { grid-template-columns: 2fr 1fr 1fr 70px; }
  .usr-row    { grid-template-columns: 2fr 1fr 1fr 90px; }

  /* Formulaires 1 colonne */
  .form-grid  { grid-template-columns: 1fr; }
  .f-row      { grid-template-columns: 1fr; }

  /* Landing */
  .hero { grid-template-columns: 1fr; padding: 3rem 1.5rem; text-align: center; }
  .hero-buttons { justify-content: center; }
  .hero-visual { display: none; } /* masqué uniquement sur tablette portrait — visible sur desktop */
  .steps  { grid-template-columns: 1fr 1fr; }
  .who-grid { grid-template-columns: 1fr; }
  .routes-grid { grid-template-columns: 1fr 1fr; }
  .stats-inner { grid-template-columns: 1fr 1fr; }

  /* Auth */
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-left { display: none; }
}

/* ---------- MOBILE (≤ 768px) ------------------------------------------- */
@media (max-width: 768px) {

  /* Corps de page */
  body.dashboard-page,
  body.admin-page,
  body.auth-page { padding: 0.5rem; }

  /* Conteneur dashboard bord à bord */
  .db, .adm, .tr {
    border-radius: 8px;
    border-left: none;
    border-right: none;
  }

  /* Header dashboard empilé */
  .db-top, .tr-top, .adm-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
  }
  .db-user, .tr-user, .adm-user { width: 100%; justify-content: flex-end; }
  .db-nav, .tr-nav, .adm-nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .db-nav::-webkit-scrollbar,
  .tr-nav::-webkit-scrollbar,
  .adm-nav::-webkit-scrollbar { display: none; }
  .db-nav-btn, .tr-nav-btn, .adm-btn { white-space: nowrap; flex-shrink: 0; }

  /* Corps dashboard */
  .db-body, .tr-body, .adm-body { padding: 0.9rem; gap: 1rem; }

  /* Métriques 1 colonne */
  .metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric, .met { padding: 0.7rem 0.85rem; }
  .metric-val, .met-val { font-size: 1.2rem; }

  /* Panneaux */
  .panel-head, .ph { padding: 0.75rem 1rem; }
  .panel-title, .pt { font-size: 0.82rem; }

  /* Tableaux → liste verticale */
  .demand-row,
  .row,
  .devis-row,
  .exp-row,
  .dem-row,
  .offer-row,
  .kyc-row,
  .lit-row,
  .com-row,
  .usr-row {
    grid-template-columns: 1fr !important;
    gap: 6px;
    padding: 0.9rem 1rem;
  }
  /* Masquer les lignes d'en-tête de tableau sur mobile */
  .demand-row.header,
  .row.hdr,
  .exp-row.header,
  .dem-row.header,
  .offer-row.header,
  .kyc-row.header,
  .lit-row.header,
  .com-row.header,
  .usr-row.header { display: none; }

  /* Boutons dans les panneaux */
  .panel-action, .act-btn, .xbtn, .see-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
  }

  /* Formulaires */
  .form-grid  { grid-template-columns: 1fr; padding: 1rem; }
  .f-row      { grid-template-columns: 1fr; }
  .fields-row { grid-template-columns: 1fr; }
  .role-selector { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr 1fr; }

  /* Tracking steps horizontal → vertical */
  .track-steps { flex-direction: column; gap: 0.75rem; }
  .track-step  { flex-direction: row; gap: 10px; width: 100%; align-items: flex-start; }
  .track-step-line {
    width: 2px; height: calc(100% + 12px);
    left: 10px; top: 22px;
    right: auto; bottom: auto;
  }

  /* Landing */
  nav { padding: 1rem; }
  .nav-links { display: none; } /* remplacé par le drawer mobile */
  .nav-burger { display: flex; }
  .nav-mobile-drawer { display: flex; }
  .hero { padding: 2rem 1rem; }
  .hero h1 { font-size: 2.2rem; }
  .steps { grid-template-columns: 1fr; }
  .routes-grid { grid-template-columns: 1fr; }
  .section { padding: 3rem 1rem; }
  .routes-bg { padding: 3rem 1rem; }
  .cta-section { padding: 3rem 1rem; }
  .cta-section h2 { font-size: 1.8rem; }

  /* Auth */
  .auth-wrap { margin: 0; border-radius: 0; border: none; min-height: 100vh; overflow: visible; }
  .auth-right { padding: 1.5rem 1rem; overflow-y: auto; max-height: none; }
  /* Empêcher le formulaire signup (long) de déborder sur iOS */
  body.auth-page { align-items: flex-start; overflow-y: auto; }
  /* Inputs et selects pleine largeur */
  .f-input, .f-select, .finput, .fselect { font-size: 1rem; }
  /* Grille prénom/nom en 1 colonne sur < 480px */
  .auth-right .f-input[name="first_name"],
  .auth-right .f-input[name="last_name"] { width: 100%; }
  /* KYC grid en 1 colonne */
  #freight-fields > div[style*="grid-template-columns: 1fr 1fr"] { display: flex; flex-direction: column; }

  /* Footer */
  .trako-footer { padding: 40px 0 24px; }
  .trako-footer .f-container { padding: 0 1rem; }
  .trako-footer .f-nav-groups { gap: 20px; }
}

/* ---------- PETIT MOBILE (≤ 480px) ------------------------------------- */
@media (max-width: 480px) {

  .metrics { grid-template-columns: 1fr; }
  .name-grid, .kyc-grid { grid-template-columns: 1fr; }

  .db-logo, .tr-logo, .adm-logo { font-size: 1.1rem; }
  .adm-badge { font-size: 0.6rem; }

  .db-nav-btn, .tr-nav-btn, .adm-btn { font-size: 0.7rem; padding: 0.3rem 0.55rem; }

  .hero h1 { font-size: 1.8rem; letter-spacing: -0.5px; }
  .section h2 { font-size: 1.6rem; }

  .form-grid  { padding: 0.75rem; }
  .devis-form { padding: 0.75rem; }
  .demand-detail { padding: 0.75rem; }

  .role-selector { grid-template-columns: 1fr; }
  .detail-grid   { grid-template-columns: 1fr; }

  .btn-hero { padding: 0.7rem 1.2rem; font-size: 0.88rem; }

  /* Masquer le nom d'utilisateur sur très petit écran */
  .db-username, .tr-uname, .adm-un { display: none; }

  /* Panneaux: actions en bas */
  .panel-head, .ph { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---------- TOUCH : zones de tap plus grandes --------------------------- */
@media (hover: none) and (pointer: coarse) {
  .db-nav-btn, .tr-nav-btn, .adm-btn,
  .panel-action, .act-btn, .xbtn, .see-btn,
  .btn-submit, .btn-cancel, .choose-btn {
    min-height: 40px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  .f-input, .f-select, .finput, .fselect {
    min-height: 42px;
    font-size: 1rem; /* évite le zoom iOS sur focus */
  }
}

/* ── Bouton sélecteur de langue ─────────────────────────────────────────── */
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.lang-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb, 27,99,100), 0.06);
}

/* ==========================================================================
   LOADING STATE — Squelette shimmer pour les panneaux en chargement
   ========================================================================== */
.skeleton {
  background: linear-gradient(90deg, #f0f0ec 25%, #e8e8e4 50%, #f0f0ec 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}

/* ==========================================================================
   ACCESSIBILITÉ — Désactive les animations pour les utilisateurs sensibles
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #trako-splash { animation: none; opacity: 0; visibility: hidden; }
  #trako-preloader { display: none; }
  .anim-fadeup { opacity: 1; animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}