* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Corps de la page */
body {
  font-family: 'Arial', sans-serif;
  background-color: #fff; /* fond principal blanc */
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  line-height: 1.6;
  background-size: 4px 4px; /* grains plus nombreux */
}

/* En-tête */
header {
  background-color: #282828;
  width: 100%;
  padding: 20px 0;
  text-align: center;
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.05);
}

.logo {
  width: 200px;
  height: auto;
}

/* Conteneur principal de suivi */
.tracking-container {
  margin-top: 20px;
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tracking-container h1 {
  text-align: center;
  width: 100%;
  margin-bottom: 20px;
  color: black;
}

/* Formulaire de suivi */
.tracking-form {
  background-color: #282828;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
  width: 100%;
  max-width: 600px;
  margin-top: 20px;
  border: 1px solid #333;
}

.tracking-form h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 24px;
  color: #ffffff;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #ccc;
}

input[type="text"],
select {
  width: 100%;
  padding: 10px;
  border: 1px solid #555;
  border-radius: 4px;
  font-size: 14px;
  background-color: #fff;
  color: #fff;
}

button {
  width: 100%;
  padding: 12px;
  background-color: #c40505;
  color: #fff;
  border: none;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s;
  font-weight: bold;
}

button:hover {
  background-color: #990303;
}

footer {
  color: #585858;
  text-align: center;
  padding: 15px 0;
  font-size: 14px;
  margin-top: 40px;
  margin-bottom: 20px;
  border-top: 1px solid #333;
}

/* Résultat du suivi */
#tracking-result {
  width: 100%;
  margin-top: 30px;
  padding: 20px;
  background-color: #282828;
  border: 1px solid #333;
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.05);
}

.loading {
  color: #c40505;
  font-weight: bold;
  font-size: 18px;
  text-align: center;
}

.error {
  color: #ff4d4d;
  font-weight: bold;
  text-align: center;
  font-size: 16px;
}

.no-history {
  color: #aaa;
  font-style: italic;
  text-align: center;
  margin-top: 15px;
}

/* === BARRE DE PROGRESSION DYNAMIQUE === */
.progress-bar-container {
  margin-bottom: 25px;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background-color: #333;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  margin-bottom: 15px;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: #12660b;
  width: 0; /* start at 0 for animation */
  transition: width 0.8s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 600px;
  padding: 0 10px;
  font-size: 12px;
  color: #bbb;
  position: relative;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
  width: 25%;
  min-width: 60px;
}

.progress-step .step-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  margin-bottom: 4px;
  background-color: #333;
  border: 1px solid #555;
  color: #777;
}

.progress-step.completed .step-icon,
.progress-step.active .step-icon {
  background-color: #12660b;
  color: white;
  border-color: #12660b;
}

.progress-step.pending .step-icon {
  background-color: #333;
  color: #777;
  border-color: #555;
}

.progress-step.completed .step-label,
.progress-step.active .step-label {
  color: #12660b;
  font-weight: bold;
}

.progress-step.pending .step-label {
  color: #fff;
}

/* Informations de livraison */
.delivery-info {
  margin-bottom: 25px;
  padding: 15px;
  background-color: #1a1a1a; /* sombre */
  border: 1px solid #333;
  width: 100%;
}

.delivery-info h2 {
  font-size: 19px;
  margin-bottom: 8px;
  color: #fff; /* texte lisible */
  border-bottom: 1px solid #333;
  padding-bottom: 8px;
}

.delivery-info p {
  margin: 8px 0;
  color: #ccc;
}

.info-note {
  font-size: 13px;
  color: #aaa;
  margin-top: 10px;
  font-style: italic;
}

/* Chronologie des événements */
.timeline {
  margin-bottom: 25px;
  width: 100%;
}

.timeline-item {
  display: flex;
  margin-bottom: 18px;
  padding-left: 20px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: #333;
  z-index: 0;
}

.timeline-item:first-child::before {
  display: none;
}

.time {
  width: 100px;
  font-size: 14px;
  color: #ccc;
  font-weight: bold;
  flex-shrink: 0;
}

.details {
  flex: 1;
  margin-left: 15px;
}

.action {
  font-size: 15px;
  color: #fff;
  margin-bottom: 4px;
  font-weight: 500;
}

.location {
  font-size: 13px;
  color: #aaa;
  font-style: normal;
  margin-top: 2px;
}

.timezone-note {
  font-size: 13px;
  color: #777;
  text-align: center;
  margin-top: 15px;
  font-style: italic;
}
