* {
  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;

  /* Texture grains plus visibles */
  background-image:
    radial-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px);
  /* grains plus foncés */
  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;
}

/* NEW BEAUTIFUL TIMELINE STYLES */

/* Progress Container */
.progress-container {
  margin-bottom: 30px;
  background: #1a1a1a;
  padding: 20px;
  border-radius: 8px;
}

.progress-bar-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.progress-line {
  height: 4px;
  background-color: #333;
  border-radius: 2px;
  position: absolute;
  top: 28%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 1;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00b894, #00a085);
  transition: width 1s ease-in-out;
}

.progress-stages {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
  position: relative;
}

.stage-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 8px;
  border: 2px solid;
  background: white;
  position: relative;
  z-index: 3;
}

.stage.completed .stage-icon {
  background: #00b894;
  color: white;
  border-color: #00b894;
}

.stage.active .stage-icon {
  background: #00b894;
  color: white;
  border-color: #00b894;
}

.stage.pending .stage-icon {
  background: #333;
  color: #777;
  border-color: #555;
}

.stage-label {
  font-size: 12px;
  font-weight: 600;
}

.stage.completed .stage-label,
.stage.active .stage-label {
  color: #00b894;
}

.stage.pending .stage-label {
  color: #999;
}

/* Tracking Info Header */
.tracking-info {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.tracking-id {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.tracking-note {
  font-size: 14px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Timeline Container */
.timeline-container {
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.date-section {
  border-bottom: 1px solid #eee;
}

.date-section:last-child {
  border-bottom: none;
}

.date-header {
  background: #e0e0e0;
  padding: 12px 20px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.timeline-event {
  display: flex;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.timeline-event:last-child {
  border-bottom: none;
}

.event-time {
  width: 80px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  flex-shrink: 0;
}

.event-details {
  flex: 1;
  margin-left: 20px;
}

.event-status {
  font-size: 16px;
  color: #333;
  font-weight: bold;
  margin-bottom: 4px;
}

.event-location {
  font-size: 14px;
  color: #666;
}

.no-events {
  color: #aaa;
  font-style: italic;
  text-align: center;
  margin-top: 15px;
}

/* Logo container styles */
.logo-container {
  text-align: center;
  margin-bottom: 20px;
  padding: 20px 0;
}

.centered-logo {
  max-width: 200px;
  height: auto;
}