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

/* GLOBAL */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #020817;
  color: #e5e7eb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  
  
  
  padding-top: var(--header-h);      /* ← décale tout le contenu sous le header */
}

/* HEADER */
header{
	
  height: var(--header-h);        /* utile même si contenu flex */
  min-height: var(--header-h);
  
  
  
  
  display:flex;
  align-items:center;
	
	
	
	
	
  position: fixed;
  left: 0;
  width: 100%;
  padding: 14px 32px;
  justify-content: space-between;
  gap: 24px;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.12), transparent);
  backdrop-filter: blur(6px);
  
  
  
  
  top: 0;
  left: 0;
  right: 0;
  
  
  
  
 /* ---- NAV: ne colle plus, donc plus d'overlap avec le contenu ---- */
  position: static !important;   /* enlève le "fixed" partout */
  inset: auto !important;
  z-index: auto !important;
}
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid #1d4ed8;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020817;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #facc15;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
}

.menu{
  /* supprime les marges internes trop grandes si besoin */
  margin: 24px auto;
  padding: 0;

  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr)); /* ← 2 colonnes */
  gap: 16px 28px;                                     /* espace lignes/colonnes */
  justify-content: center;                            /* centre la grille */
  align-content: center;                              /* centre verticalement si hauteur disponible */
  max-width: 720px;                                   /* évite la dilatation pleine largeur */
}

/* les <li> ne forcent plus de largeur : retire l’ancienne règle flex */
.menu li{ list-style: none; }           /* supprime ‘flex: 1 1 10%’ */

/* Nav droite */
.nav-right {
  display: grid;
   grid-template-columns: repeat(2, minmax(0, 1fr));
   gap: 10px 12px;            /* row-gap / column-gap */
   width: 100%;
   max-width: 520px;          /* pour éviter de trop s’étirer */
   justify-items: center;     /* centre chaque cell */
}

.nav-link {
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 253, 0.18);
  color: #e5e7eb;
  transition: all 0.22s ease;
  
  
  
  display: inline-flex;                 /* centrage */
  align-items: center;                  /* vertical */
  justify-content: center;              /* horizontal */
  text-align: center;
  min-height: 44px;                     /* zone cliquable confortable */
  padding: 12px 24px;
}
.nav-link:hover {
  background: linear-gradient(90deg, #1d4ed8, #facc15);
  color: #020817;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.7);
  transform: translateY(-1px);
}
.nav-link.active {
  border-color: #facc15;
  color: #facc15;
}

/* Bouton Admin */
.btn-admin {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid rgba(148, 163, 253, 0.45);
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s ease;
  
    display: flex;
    align-items: center;
    justify-content: center;   /* centre le texte dans le bouton */
    text-align: center;
    width: 100%;               /* occupe toute la cellule */
    min-height: 44px;          /* cible tactile confortable */
    padding: 10px 14px;
    border-radius: 999px;
	grid-column: 1 / -1;
}
.btn-admin:hover {
  color: #facc15;
  border-color: #facc15;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.32);
}

/* PAGE WRAPPER */
.page {
  flex: 1;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 110px 24px 40px;
  padding-top: calc(var(--header-h) + 12px);   /* remplace l’ancien 110px */
}

/* Admin banner */
.admin-banner {
  padding: 8px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.4);
  color: #4ade80;
  display: flex;
  align-items: center;
  gap: 8px;
  
  
  top: calc(var(--header-h) + 8px);
  z-index: 10;                                  /* sous le header (z-index:20) */
  
  
  
  position: relative;
  margin-top: 16px;              /* petit espace sous le header */
}
.admin-banner::before {
  content: "✔";
  font-size: 0.8rem;
}
.hidden {
  display: none !important;
}

/* HEADER CATALOGUE */
.catalog-header {
  text-align: left;
  margin-bottom: 18px;
}
.catalog-header h1 {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #facc15;
  text-shadow: 0 0 14px rgba(250, 204, 21, 0.35);
}
.catalog-header p {
  margin-top: 6px;
  font-size: 0.9rem;
  color: #9ca3af;
}

/* FORMULAIRE (ADMIN) */
.add-vehicle {
  display: none;
  margin-bottom: 22px;
  padding: 16px 18px 14px;
  border-radius: 18px;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), #020817);
  border: 1px solid rgba(148, 163, 253, 0.25);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.8);
}
.add-vehicle h2 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #facc15;
}
#addVehicleForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
}
.field input,
.field select {
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid rgba(156, 163, 175, 0.5);
  background: #020817;
  color: #e5e7eb;
  font-size: 0.8rem;
  outline: none;
  transition: all 0.18s ease;
}
.field input:focus,
.field select:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.6);
}
.btn-add {
  align-self: flex-start;
  margin-top: 4px;
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  cursor: pointer;
  background: linear-gradient(90deg, #1d4ed8, #2563eb);
  color: #e5e7eb;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.7);
  transition: all 0.22s ease;
}
.btn-add:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.95);
}
.hint {
  margin-top: 4px;
  font-size: 0.7rem;
  color: #6b7280;
}

/* FILTRES */
.filters {
  margin: 12px 0 18px;
  padding: 10px 12px;
  border-radius: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.92), #020817);
  border: 1px solid rgba(75, 85, 99, 0.9);
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 140px;
}
.filter-group label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
}
.filter-group select,
.filter-group input {
  padding: 6px 9px;
  border-radius: 10px;
  border: 1px solid rgba(156, 163, 175, 0.5);
  background: #020817;
  color: #e5e7eb;
  font-size: 0.78rem;
  outline: none;
  transition: all 0.18s ease;
}
.filter-group select:focus,
.filter-group input:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}
.btn-reset {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 253, 0.4);
  background: transparent;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-reset:hover {
  color: #facc15;
  border-color: #facc15;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
}

/* GRILLE */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

/* Carte véhicule */
.car-card {
  position: relative;
  padding: 14px 12px 12px;
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.14), #020817);
  border: 1px solid rgba(75, 85, 99, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.22s ease;
}
.car-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.98);
  border-color: #1d4ed8;
}

/* Statut badge */
.car-status {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 9px;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.96);
  border: 1px solid;
}
.car-status.dispo {
  color: #22c55e;
  border-color: #22c55e;
}
.car-status.reserve {
  color: #facc15;
  border-color: #facc15;
}
.car-status.vendu {
  color: #f97316;
  border-color: #f97316;
}

/* Image véhicule */
.car-image {
  width: 100%;
  height: 150px;
  border-radius: 12px;
  margin-top: 18px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #020817;
}
.car-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}
.car-card:hover .car-image img {
  transform: scale(1.12);
}
.car-image.placeholder {
  border: 1px dashed rgba(148, 163, 253, 0.4);
  color: #6b7280;
  font-size: 0.7rem;
}

/* Texte */
.car-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e5e7eb;
}
.car-meta {
  font-size: 0.7rem;
  color: #9ca3af;
}
.car-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: #facc15;
}
.car-infos {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: #9ca3af;
}

/* Actions */
.card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.car-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: none;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  background: linear-gradient(90deg, #1d4ed8, #2563eb);
  color: #e5e7eb;
  box-shadow: 0 9px 20px rgba(37, 99, 235, 0.8);
  transition: all 0.2s ease;
}
.car-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 1);
}
.car-btn.disabled,
.car-btn:disabled {
  background: #111827;
  color: #6b7280;
  box-shadow: none;
  cursor: not-allowed;
}

/* Modifier */
.btn-edit {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.85);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #38bdf8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}
.btn-edit::before {
  content: "✎";
  font-size: 0.7rem;
}
.btn-edit:hover {
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.16), rgba(15, 23, 42, 1));
  color: #e5e7eb;
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.55);
  transform: translateY(-1px);
}

/* Supprimer */
.btn-delete {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.7);
  background: transparent;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #f87171;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-delete:hover {
  background: rgba(239, 68, 68, 0.12);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

/* Bloc demandes de contact (admin) */
.contacts-admin {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 18px;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.96), #020817);
  border: 1px solid rgba(148, 163, 253, 0.3);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.9);
}
.contacts-admin h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #facc15;
  margin-bottom: 6px;
}
.contacts-hint {
  font-size: 0.72rem;
  color: #9ca3af;
  margin-bottom: 8px;
}
#contacts-list {
  font-size: 0.72rem;
  color: #d1d5db;
}
.contacts-list-empty {
  color: #6b7280;
}
.contacts-table {
  width: 100%;
  border-collapse: collapse;
}
.contacts-table th,
.contacts-table td {
  padding: 6px 4px;
  border-bottom: 1px solid rgba(75, 85, 99, 0.6);
}
.contacts-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
  text-align: left;
}
.contacts-table td strong {
  color: #facc15;
}

/* Modale contact */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}
.modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 20px 18px 16px;
  border-radius: 18px;
  background: #020817;
  border: 1px solid rgba(148, 163, 253, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.95);
  color: #9ca3af;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.modal-close:hover {
  color: #facc15;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.4);
}
.modal h2 {
  font-size: 1.1rem;
  color: #facc15;
  margin-bottom: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.modal-subtitle {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-bottom: 10px;
}
.modal-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.modal-row .field {
  gap: 4px;
}
.modal-row .field.full {
  grid-column: 1 / -1;
}
.modal .field label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
}
.modal .field input {
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid rgba(156, 163, 175, 0.6);
  background: #020817;
  color: #e5e7eb;
  font-size: 0.8rem;
  outline: none;
  transition: all 0.18s ease;
}
.modal .field input:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 9px rgba(37, 99, 235, 0.7);
}
.btn-send {
  margin-top: 4px;
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  color: #e5e7eb;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.7);
  transition: all 0.22s ease;
}
.btn-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(22, 163, 74, 1);
}
.modal-success {
  margin-top: 8px;
  font-size: 0.75rem;
  color: #4ade80;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  font-size: 0.78rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(148, 163, 253, 0.3);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 50;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Si le texte vert est le toast (#toast) : on le place sous le header */
#toast{
  position: fixed;
  top: calc(var(--header-h) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;                     /* au-dessus du contenu, sous le header si besoin */
}

/* FOOTER */
footer {
  width: 100%;
  padding: 14px 24px 18px;
  font-size: 0.7rem;
  color: #4b5563;
  display: flex;
  justify-content: center;
  gap: 10px;
}
footer .highlight {
  color: #1d4ed8;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  header {
    padding: 10px 16px;
    gap: 12px;
  }
  .page {
    padding: 90px 16px 30px;
  }
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .brand-name {
    display: none;
  }
  .catalog-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  .form-row {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  .modal {
    margin: 0 16px;
  }
}

/* ====== MENU MOBILE : 2 colonnes centrées ====== */
@media (max-width: 520px) {
	:root{ --header-h: 100px; }                   /* adapte à ton header mobile */
  /* Le header passe en colonne pour laisser la place au menu */
  header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;                 /* espace entre logo et menu */
    padding: 12px 14px;
 }

@media (max-width: 600px){
  :root { --header-h: 64px; }
}

@media (min-width: 900px){
  .menu{
    grid-template-columns: repeat(2, minmax(200px, 1fr)); /* reste 2 colonnes */
    gap: 18px 32px;
    max-width: 860px;
	padding-top: 300px; /* ajuste selon la vraie hauteur du header */
  }
   .admin-banner{
    position: fixed;
    top: 90px;            /* exactement la même valeur que ton padding-top */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;        /* juste sous le header */
  }
}

/* ====== 2) Évite les collisions de bordures quand ça wrap ====== */
.menu .nav-link{ margin-top: 25px; }     /* pas de marge verticale sur le bouton */
.menu{ row-gap: 18px; }           /* espace vertical entre rangées = pas de “bords qui se touchent” */


/* ====== 3) Bandeau Admin visible sous l’en-tête ====== */
/* Donne une hauteur fixe au header et “pousse” le contenu */
:root{
  --header-h: 86px;               /* ajuste si besoin */
}