/* ====== VARIABLES ====== */
:root {
  --bg: #f2f4f7;
  --bg-light: #ffffff;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0f9ed5;
  --accent-light: rgba(15, 158, 213, 0.08);
  --border: rgba(15, 23, 42, 0.08);
  --footer: #111;
  --radius: 14px;
  --shadow: 0 15px 45px rgba(15, 23, 42, 0.08);
  --font: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ====== RESET ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ====== LAYOUT ====== */
.container {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 20px;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ====== HEADER ====== */
.site-header {
  width: 100%;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15,23,42,0.04);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 999;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-text {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
}
.main-nav ul {
  display: flex;
  gap: 1.5rem;
}
.main-nav a {
  display: block;
  padding: 18px 0;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a.active {
  color: #0f172a;
  border-color: var(--accent);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: #0f172a;
  display: block;
}

/* ====== MAIN WRAPPER ====== */
.t3p-main {
  padding: 2.5rem 0 3rem;
}

/* ====== TITRES / TEXTES ====== */
.t3p-page-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.t3p-page-subtitle {
  color: var(--muted);
  margin-bottom: 1.6rem;
  font-size: 0.95rem;
}

/* ====== CARDS / PANELS ====== */
.t3p-panel,
.card {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,0.04);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.15rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.03);
}
.t3p-panel + .t3p-panel {
  margin-top: 1.8rem;
}

.t3p-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
}
.t3p-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.3rem;
}

/* Cartes stats type dashboard */
.t3p-stat-card {
  background: #ffffff;
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  border: 1px solid rgba(15,23,42,0.04);
  box-shadow: 0 10px 30px rgba(15,23,42,0.05);
}
.t3p-stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.t3p-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
}
.t3p-stat-extra {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ====== BOUTONS ====== */
.btn,
.t3p-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: 0.2s ease-out;
  font-size: 0.9rem;
  cursor: pointer;
  background: transparent;
}
.btn.primary,
.t3p-btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn.primary:hover,
.t3p-btn-primary:hover {
  background: #12ace7;
}
.btn.ghost,
.t3p-btn-ghost {
  border: 1px solid rgba(0,0,0,0.05);
  background: #fff;
  color: #0f172a;
}
.btn.ghost:hover,
.t3p-btn-ghost:hover {
  background: #eff1f3;
}
.btn.small,
.t3p-btn-sm {
  padding: 0.45rem 1.15rem;
  font-size: 0.78rem;
}

/* ====== TABLES ====== */
.t3p-table-wrapper {
  margin-top: 1rem;
  overflow-x: auto;
}
table.t3p-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.t3p-table thead {
  background: #f1f5f9;
}
.t3p-table th,
.t3p-table td {
  padding: 0.65rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  white-space: nowrap;
}
.t3p-table th {
  font-weight: 600;
  color: #0f172a;
}
.t3p-table tbody tr:hover {
  background: rgba(148, 163, 184, 0.05);
}

/* ====== DETAIL COURSE VIEW ====== */
.t3p-panel--detail {
  max-width: 900px;
  margin: 0 auto 1.5rem;
}

.t3p-detail-table {
  table-layout: fixed;
}

.t3p-detail-table th,
.t3p-detail-table td {
  white-space: normal;
  vertical-align: top;
}

.t3p-detail-table th {
  width: 30%;
}

.t3p-detail-table td {
  width: 70%;
}

/* ====== DETAIL COURSE LIST ====== */

.t3p-link {
    font-weight: 600;
    color: #0d6efd;       /* bleu admin discret */
    text-decoration: none;
}

.t3p-link:hover {
    text-decoration: underline;
    color: #0a58ca;       /* hover plus foncé */
}

.t3p-row-highlight {
    background: #DCF4D4; /* vert pastel très doux */
}

.t3p-row-highlight2 {
    background: #E9F4E6; /* vert pastel très doux */
}

.input-readonly {
    background: #f3f3f3 !important;
    color: #666 !important;
    cursor: not-allowed !important;
}

/* Table responsive fix */
.t3p-table-wrap {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 5px;
}

.t3p-table {
    min-width: 900px; /* empêche le tableau de se casser */
}

.t3p-form label {
    margin-top: 12px;
    margin-bottom: 4px;
    display: block;
    font-weight: 500;
}

.t3p-input {
    margin-bottom: 14px;  /* ← espace vertical entre chaque champ */
}

.t3p-form select,
.t3p-form input[type="text"],
.t3p-form input[type="email"],
.t3p-form input[type="password"],
.t3p-form input[type="number"] {
    margin-bottom: 14px; /* ← sécurité */
}

/* Amélioration espacement filtres page chauffeurs */
.t3p-form-row {
    gap: 22px !important;   /* augmente l'espace horizontal */
    margin-bottom: 18px !important; /* ajoute espace vertical */
}


/* ====== BADGES ====== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-pill {
  border-radius: 999px;
}
.badge-status-pending {
  background: rgba(234,179,8,0.08);
  color: #92400e;
}
.badge-status-assigned {
  background: rgba(59,130,246,0.08);
  color: #1d4ed8;
}
.badge-status-done {
  background: rgba(34,197,94,0.08);
  color: #166534;
}
.badge-vip {
  background: rgba(234,179,8,0.12);
  color: #92400e;
}

/* ====== FORMULAIRES ====== */
.t3p-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.t3p-form-group {
  margin-bottom: 1rem;
}
.t3p-form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}
.t3p-input,
.t3p-select,
.t3p-textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.t3p-input:focus,
.t3p-select:focus,
.t3p-textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 1px rgba(15,158,213,0.25);
}

/* ====== FOOTER ====== */
.site-footer {
  background: #111 !important;
  padding: 1.6rem 0;
  margin-top: 2rem;
  font-size: 0.8rem;
  color: #fff;
}
.footer-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-flex p {
  color: rgba(231, 237, 243, 0.5);
}
.footer-links {
  display: flex;
  gap: 1rem;
}
.footer-links a {
  color: rgba(231, 237, 243, 0.5);
}
.footer-links a:hover {
  color: #fff;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .t3p-grid-3,
  .t3p-grid-2 {
    grid-template-columns: 1fr;
  }
  .main-nav {
    position: absolute;
    top: 64px;
    right: 20px;
    background: #fff;
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 12px;
    padding: 0.5rem 1.2rem;
    display: none;
  }
  .main-nav.open {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
  }
  .nav-toggle {
    display: flex;
  }
  .footer-flex {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .t3p-form-row {
    grid-template-columns: 1fr;
  }
}

/* ===== FOOTER collé en bas ===== */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1; /* pousse le footer vers le bas */
}

/* Fix largeur max tableau chauffeurs */
.t3p-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
}

.t3p-panel {
    width: 100%;
}

@media (max-width: 768px) {
  .t3p-panel--detail {
    padding: 1rem;
  }

  .t3p-detail-table tr {
    display: block;
    margin-bottom: 0.75rem;
  }

  .t3p-detail-table th,
  .t3p-detail-table td {
    display: block;
    width: 100%;
  }

  .t3p-detail-table th {
    padding-bottom: 0.2rem;
    border-bottom: none;
  }

  .t3p-detail-table td {
    padding-top: 0;
  }
}
