:root {
  --navy: #071831;
  --navy-soft: #10294f;
  --gold: #d89d27;
  --gold-light: #f4c969;
  --white: #ffffff;
  --light: #f4f6f9;
  --text: #1f2937;
  --muted: #64748b;
  --border: #e5e7eb;
  --success: #15803d;
  --danger: #b91c1c;
  --gray: #cbd5e1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text);
  background: var(--light);
}

a {
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: var(--navy);
  color: var(--white);
}

.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--navy);
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  color: var(--gold);
  font-size: 20px;
}

.brand span {
  font-size: 12px;
  letter-spacing: 0.08em;
}

.home-link {
  text-decoration: none;
  font-weight: 700;
  padding: 10px 15px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px;
}

.hero {
  background:
    linear-gradient(rgba(7, 24, 49, 0.92), rgba(7, 24, 49, 0.92)),
    radial-gradient(circle at top right, var(--navy-soft), var(--navy));
  color: var(--white);
  padding: 72px 0 88px;
}

.hero-content {
  max-width: 850px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold-light);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 13px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
}

.hero-text {
  margin: 0 0 30px;
  max-width: 700px;
  color: #dbe4f0;
  font-size: 18px;
  line-height: 1.65;
}

.tracking-form {
  background: var(--white);
  color: var(--text);
  padding: 22px;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.2);
}

.tracking-form label {
  display: block;
  margin-bottom: 9px;
  color: var(--navy);
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-row input {
  min-height: 52px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 0 15px;
  font-size: 16px;
}

.search-row input:focus {
  outline: 2px solid rgba(216,157,39,.25);
  border-color: var(--gold);
}

.search-row button {
  min-height: 52px;
  border: 0;
  border-radius: 11px;
  padding: 0 24px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}

.search-row button:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.form-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.results-section {
  padding: 44px 0 70px;
}

.message,
.loading-box {
  border-radius: 12px;
  padding: 15px 17px;
  margin-bottom: 18px;
  font-weight: 700;
}

.message {
  display: none;
}

.message.error {
  display: block;
  background: #fee2e2;
  color: var(--danger);
}

.message.success {
  display: block;
  background: #dcfce7;
  color: var(--success);
}

.loading-box {
  background: var(--white);
  color: var(--muted);
  box-shadow: 0 10px 30px rgba(7,24,49,.07);
}

.result-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(7,24,49,.1);
}

.result-header {
  padding: 24px 26px;
  background: var(--navy);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.result-label {
  display: block;
  margin-bottom: 7px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
}

.result-header h2 {
  margin: 0;
  color: var(--gold);
  word-break: break-word;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 900;
  text-align: center;
}

.route-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 26px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfcfe;
}

.route-item span,
.detail-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.route-item strong {
  color: var(--navy);
  font-size: 20px;
}

.route-arrow {
  color: var(--gold);
  font-size: 30px;
  font-weight: 900;
}

.details-grid {
  padding: 0 26px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.detail-item {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.detail-item strong {
  word-break: break-word;
}

.timeline-section {
  padding: 28px 26px 32px;
}

.timeline-section h3 {
  margin: 0 0 20px;
  color: var(--navy);
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 13px;
  min-height: 68px;
}

.timeline-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 31px;
  width: 2px;
  height: calc(100% - 5px);
  background: var(--gray);
}

.timeline-step.complete:not(:last-child)::after {
  background: var(--success);
}

.timeline-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e2e8f0;
  color: var(--muted);
  font-weight: 900;
  z-index: 1;
}

.timeline-step.complete .timeline-icon {
  background: var(--success);
  color: var(--white);
}

.timeline-step.current .timeline-icon {
  background: var(--gold);
  color: var(--navy);
}

.timeline-step strong {
  display: block;
  padding-top: 5px;
  color: var(--navy);
}

.timeline-step p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  background: var(--navy);
  color: var(--white);
  padding: 34px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: #cbd5e1;
}

.footer-contact {
  display: grid;
  gap: 8px;
  text-align: right;
}

.footer-contact a {
  text-decoration: none;
}

@media (max-width: 850px) {
  .details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-contact {
    text-align: left;
  }
}

@media (max-width: 650px) {
  .header-inner,
  .result-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .route-grid {
    grid-template-columns: 1fr;
  }

  .route-arrow {
    transform: rotate(90deg);
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .brand span {
    font-size: 10px;
  }
}


/* Détails complémentaires de l'expédition */
.shipment-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.detail-card {
  padding: 18px;
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: 14px;
  box-shadow: 0 5px 16px rgba(11, 29, 58, 0.06);
}

.detail-card span {
  display: block;
  margin-bottom: 8px;
  color: #6b7280;
  font-size: 0.86rem;
}

.detail-card strong {
  color: #0b1d3a;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .shipment-details { grid-template-columns: 1fr; }
}
