/* ================================================
   DIAB TRANSIT — visual.css
   Système d'images uniforme & responsive
   Toutes les images ont des dimensions FIXES
   avec object-fit: cover (jamais de déformation)
   ================================================ */

/* ================================================
   1. HERO AVEC IMAGE DE FOND
   ================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 46, 80, 0.88) 0%,
    rgba(26, 46, 80, 0.65) 60%,
    rgba(26, 46, 80, 0.45) 100%
  );
}
/* Si l'image hero est absente → dégradé de secours */
.hero-bg:not(:has(.hero-img)) {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
}

/* ================================================
   2. SERVICE CARDS AVEC PHOTO
   ================================================ */
.services-grid-visual {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.svc-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.svc-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* Image uniformisée — toujours 16/9, jamais de déformation */
.svc-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-100);
  /* Fond de remplacement si image manquante */
  background-image: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
}
.svc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}
.svc-card:hover .svc-img {
  transform: scale(1.05);
}

/* Badge sur l'image */
.svc-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(26, 46, 80, 0.82);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}
.svc-card-badge--orange {
  background: var(--orange);
}

/* Corps de la card */
.svc-card-body {
  padding: 20px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.svc-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.svc-card-body p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 14px;
}
.svc-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--orange);
  font-family: var(--font-display);
  letter-spacing: 0.3px;
  transition: gap 0.2s;
}
.svc-card:hover .svc-link {
  text-decoration: underline;
}

/* Card featured — bordure orange */
.svc-card--featured {
  border: 2px solid var(--orange);
  position: relative;
}

/* Card CTA — fond navy, pas d'image */
.svc-card--cta {
  background: var(--navy);
  border: none;
  justify-content: center;
  min-height: 280px;
}
.svc-cta-content {
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.svc-cta-icon {
  font-size: 2.5rem;
}
.svc-card--cta h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
}
.svc-card--cta p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}
.btn-white-sm {
  display: inline-block;
  background: var(--orange);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  margin-top: 4px;
  transition: background 0.2s;
}
.svc-card--cta:hover .btn-white-sm {
  background: white;
  color: var(--navy);
}

/* Placeholder quand image manquante */
.svc-card-img.img-missing::after {
  content: '📷';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #1A2E50 0%, #2A4878 100%);
}

/* ================================================
   3. BANNIÈRE SPLIT (image gauche / texte droite)
   ================================================ */
.banner-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 560px;
}
.banner-split-img {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  min-height: 400px;
}
.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s ease;
}
.banner-split:hover .banner-img {
  transform: scale(1.03);
}
.banner-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(26,46,80,0.3), transparent);
}
.banner-img-caption {
  position: absolute;
  bottom: 24px;
  left: 24px;
}
.banner-img-caption span {
  background: var(--orange);
  color: white;
  padding: 8px 18px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
}
.banner-split-img.img-missing {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
}

.banner-split-content {
  background: var(--off-white);
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}
.banner-split-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  font-weight: 800;
  color: var(--navy);
  margin: 12px 0 16px;
  line-height: 1.2;
}
.banner-split-content > p {
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* ================================================
   4. BANNIÈRE PLEIN-LARGEUR
   ================================================ */
.banner-full {
  position: relative;
  height: 480px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
}
/* Fond background-image : jamais de coupure sur desktop */
.banner-full-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
}
.banner-full-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
  z-index: 0;
}
.banner-full-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    rgba(26,46,80,0.92) 0%,
    rgba(26,46,80,0.72) 55%,
    rgba(26,46,80,0.45) 100%
  );
}
.banner-full > .container {
  position: relative;
  z-index: 2;
}
.banner-full-content {
  max-width: 620px;
  color: white;
  padding: 60px 0;
}
.banner-full-content h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: white;
  margin: 12px 0 20px;
  line-height: 1.15;
}

/* Ligne villes avec drapeaux */
.banner-cities {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.banner-cities span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.9);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.banner-cities .sep-dot {
  color: var(--orange);
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 300;
}

/* Drapeaux <img> depuis flagcdn.com — dimensions fixes, jamais distordus */
.flag-icon {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}


/* ================================================
   5. ZONES CARDS AVEC PHOTO
   ================================================ */
.zones { background: var(--navy); padding: 88px 0; }
.zones-grid-visual {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.zone-card-visual {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: white;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}
.zone-card-visual:hover {
  background: rgba(232,134,58,0.15);
  border-color: var(--orange);
  transform: translateY(-4px);
}

/* Image zone — dimensions FIXES, uniformes */
.zone-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #243D68 0%, #1A2E50 100%);
}
.zone-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}
.zone-card-visual:hover .zone-img {
  transform: scale(1.06);
}
.zone-card-img.img-missing::after {
  content: '🌍';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

/* Drapeau en overlay */
.zone-flag-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
}
.zone-flag-overlay img {
  width: 40px;
  height: 27px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.zone-card-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.zone-card-info h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}
.zone-role {
  font-size: 0.75rem;
  color: var(--orange);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.zone-card-info ul {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  flex: 1;
}
.zone-card-info ul li {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.zone-card-info ul li::before {
  content: '· ';
  color: var(--orange);
}
.zone-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--orange);
  font-family: var(--font-display);
  letter-spacing: 0.3px;
  margin-top: auto;
}

/* ================================================
   6. ICÔNES MODES DE TRANSPORT
   ================================================ */
.banner-numbers {
  background: var(--white);
  padding: 48px 0;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.number-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 24px;
  border-right: 1px solid var(--gray-100);
}
.number-item:last-child { border-right: none; }
.number-icon {
  font-size: 2.4rem;
  margin-bottom: 10px;
}
.number-item strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  display: block;
  margin-bottom: 4px;
}
.number-item span {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* ================================================
   7. PROCESS — avec émoji icônes
   ================================================ */
.step-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.step-emoji {
  font-size: 2rem;
}

/* ================================================
   8. FAQ SIDEBAR IMAGE
   ================================================ */
.faq-sidebar-img {
  margin: 20px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  width: 100%;
}
.faq-sidebar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================================================
   9. RESPONSIVE — TABLETTE (max 1024px)
   ================================================ */
@media (max-width: 1024px) {
  .services-grid-visual {
    grid-template-columns: repeat(2, 1fr);
  }
  .zones-grid-visual {
    grid-template-columns: repeat(3, 1fr);
  }
  .numbers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .number-item:nth-child(2) { border-right: none; }
  .number-item:nth-child(3) { border-top: 1px solid var(--gray-100); }
  .number-item:nth-child(4) { border-top: 1px solid var(--gray-100); border-right: none; }
  .banner-split {
    grid-template-columns: 1fr 1fr;
  }
  .banner-split-content {
    padding: 48px 40px;
  }
}

/* ================================================
   10. RESPONSIVE — MOBILE (max 768px)
   ================================================ */
@media (max-width: 768px) {

  /* Services : 1 colonne */
  .services-grid-visual {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Bannière split : empilé */
  .banner-split {
    grid-template-columns: 1fr;
  }
  .banner-split-img {
    min-height: 260px;
    aspect-ratio: 16 / 9;
  }
  .banner-split-content {
    padding: 36px 24px;
  }

  /* Bannière pleine largeur */
  .banner-full {
    min-height: 320px;
  }
  .banner-full-content {
    padding: 40px 0;
  }
  .banner-full-content h2 {
    font-size: 1.8rem;
  }

  /* Zones : 2 colonnes sur mobile */
  .zones-grid-visual {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Modes de transport : 2×2 */
  .numbers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* FAQ sidebar image cachée sur mobile */
  .faq-sidebar-img {
    display: none;
  }

  /* Hero */
  .hero {
    min-height: 90vh;
  }
}

/* ================================================
   11. RESPONSIVE — PETIT MOBILE (max 480px)
   ================================================ */
@media (max-width: 480px) {

  /* Zones : 1 colonne */
  .zones-grid-visual {
    grid-template-columns: 1fr;
  }

  /* Transport icons : 2×2 */
  .numbers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .banner-full {
    min-height: 280px;
  }

  .banner-split-content h2 {
    font-size: 1.6rem;
  }
}

/* ================================================
   12. GUIDE VISUEL DES IMAGES
   (commentaires pour chaque image à uploader)

   FICHIER             DIMENSIONS    SECTION
   ─────────────────────────────────────────────
   hero-bg.jpg         1920×1080px   Fond du Hero (page accueil)
   svc-transport.jpg    600×340px    Card service Transport
   svc-import-export.jpg 600×340px   Card service Import-Export
   svc-dedouanement.jpg  600×340px   Card service Dédouanement
   svc-transit.jpg       600×340px   Card service Transit
   svc-groupage.jpg      600×340px   Card service Groupage
   banner-equipe.jpg    900×700px    Bannière "Pourquoi nous choisir"
   banner-port.jpg     1920×700px    Bannière plein-largeur port
   zone-ci.jpg          500×375px    Card Côte d'Ivoire
   zone-ng.jpg          500×375px    Card Nigeria
   zone-gh.jpg          500×375px    Card Ghana
   zone-tg.jpg          500×375px    Card Togo
   zone-bj.jpg          500×375px    Card Bénin
   faq-sidebar.jpg      480×270px    Sidebar FAQ

   → Toutes dans : public_html/diabtransit/assets/images/
   → Format recommandé : JPG (qualité 80%) ou WebP
   → Poids max conseillé : 300 Ko par image
   ================================================ */
