/* =============================================
   ITWIN TECHNOLOGIES – style.css
   Feuille de style principale partagée par toutes les pages
   ============================================= */

/* =============================================
   VARIABLES CSS GLOBALES
   Centralisées ici pour faciliter la maintenance
   ============================================= */
:root {
  --red:        #ec1f27;      /* Rouge principal (boutons, accents) */
  --red-dark:   #a93226;      /* Rouge foncé (état hover) */
  --green:      #0d9f49;      /* Vert principal */
  --green-light:#0d9f49;      /* Alias vert (conservé pour compatibilité) */
  --dark:       #1a1a1a;      /* Texte sombre */
  --dark2:      #222;         /* Variante sombre (fonds, séparateurs) */
  --gray:       #f5f5f5;      /* Fond gris clair */
  --text:       #000000;         /* Couleur de texte standard */
  --white:      #ffffff;
  --font:       'Montserrat', sans-serif;   /* Police de titres */
  --body-font:  'Open Sans', sans-serif;    /* Police de corps */

  /* Variables utilitaires supplémentaires */
  --radius:     8px;
  --shadow:     0 2px 16px rgba(0,0,0,.08);
  --shadow-hover: 0 8px 32px rgba(0,0,0,.14);
  --border:     #e8e8e8;
  --transition: .25s ease;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--body-font);
  color: var(--text);
  overflow-x: hidden;
}

/* Suppression des soulignements par défaut sur les liens */
a { text-decoration: none; color: inherit; }

/* Application de la police de titres sur tous les éléments de heading */
h1, h2, h3, h4, h5, h6 { font-family: var(--font); }

/* =============================================
   CLASSES UTILITAIRES
   ============================================= */
.text-green { color: var(--green-light); }
.text-red   { color: var(--red); }

/* Titre de section avec ligne décorative rouge en bas */
.section-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--green);
  text-transform: uppercase;
  position: relative;
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 40px; height: 2px;
  background: var(--red);
}

/* Barre rouge décorative (utilisée sous certains titres) */
.red-bar {
  width: 40px; height: 3px;
  background: var(--red);
  margin-top: 12px;
}

/* =============================================
   BARRE SUPÉRIEURE (TOPBAR)
   Contacts et réseaux sociaux en haut de page
   ============================================= */
.topbar {
  background-color: var(--green);
  color: #ccc;
  font-size: 0.78rem;
  padding: 7px 0;
  /* overflow caché → animation de masquage par JS (max-height) */
  overflow: hidden;
}

/* Infos de contact côté gauche */
.topbar-left span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
}
.topbar-left i { color: #fff; }

/* Texte "Suivez-nous" */
.suivez { color: #fff; font-size: 0.78rem; }

/* Icônes réseaux sociaux (topbar) */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid #fff;
  color: #fff;
  font-size: 0.7rem;
  transition: all var(--transition);
}
.social-icon:hover {
  background: var(--red);
  border-color: var(--red);
}

/* =============================================
   BARRE DE NAVIGATION PRINCIPALE
   Sticky en haut, fond blanc avec ombre légère
   ============================================= */
.main-navbar {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  padding: 10px 0;
  z-index: 1050;
  transition: box-shadow .3s, background .3s;
}

/* Effet ajouté par JS au scroll */
.main-navbar.scrolled {
  background: rgba(255,255,255,0.97) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,.12);
}

/* Logo image */
.navbar-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}

/* Conteneur logo texte (fallback si pas d'image) */
.logo-wrap { cursor: pointer; }
.logo-icon {
  background: var(--red);
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font);
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1;
}
.logo-it  { color: #fff; font-style: italic; }
.logo-win { color: var(--white); }
.logo-tech {
  font-family: var(--font);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--dark);
  text-transform: uppercase;
}

/* Liens de navigation */
.nav-link {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dark) !important;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 8px 12px !important;
  position: relative;
  transition: color .2s;
}

/* Soulignement animé au hover et lien actif */
.nav-link::after {
  content: '';
  position: absolute;
  left: 12px; bottom: 4px;
  width: 0; height: 2px;
  background: var(--green);
  transition: width .25s;
}
.nav-link:hover::after,
.nav-link.active::after { width: calc(100% - 24px); }
.nav-link:hover,
.nav-link.active { color: var(--green) !important; }

/* Menu déroulant */
.dropdown-menu {
  border: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  border-radius: 0;
  border-top: 3px solid var(--red);
  min-width: 220px;
}
.dropdown-item {
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 10px 18px;
  color: var(--dark);
  transition: all .2s;
}
.dropdown-item:hover {
  background: var(--red);
  color: #fff;
  padding-left: 24px; /* Légère indentation pour l'effet de profondeur */
}

/* Bouton "Demander un devis" */
.btn-devis {
  background: var(--red);
  color: #fff !important;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 2px;
  transition: background var(--transition);
}
.btn-devis:hover { background: var(--red-dark); }

/* =============================================
   SECTION HERO (CARROUSEL)
   Diaporama plein écran en haut de la page d'accueil
   ============================================= */
.hero-section { position: relative; }

.hero-slide {
  min-height: 520px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Dégradé radial d'ambiance sur chaque slide */
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(26,107,60,.25) 0%, transparent 65%);
  pointer-events: none; /* Ne pas bloquer les clics */
}

/* Classe utilitaire hauteur minimale */
.min-vh-70 { min-height: 70vh; }

/* Contenu textuel du slide (z-index pour passer au-dessus du ::before) */
.hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 0;
  will-change: opacity, transform; /* Optimisation GPU pour les animations */
}

/* Sous-titre de marque */
.hero-brand {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--dark);
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Titre principal du héros – taille fluide via clamp() */
.hero-title {
  font-family: var(--font);
  font-size: clamp(1.8rem, 3.5vw, 2.9rem);
  font-weight: 900;
  color: var(--dark);
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* Description / accroche du héros */
.hero-desc {
  color: var(--dark);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 480px;
}

/* Bouton CTA principal (fond vert) */
.btn-dark-outline {
  background: var(--green);
  border: 2px solid var(--green);
  color: #fff !important;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 30px;
  transition: all var(--transition);
}
.btn-dark-outline:hover {
  background: var(--red);
  border-color: var(--red);
}

/* Bouton CTA secondaire (contour vert) */
.btn-light-outline {
  background: transparent;
  border: 2px solid var(--green);
  color: var(--green) !important;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 30px;
  transition: all var(--transition);
}
.btn-light-outline:hover {
  background: var(--green);
  color: #fff !important;
}

/* Animation flottante (image héros) */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-18px); }
}

/* Flèches de navigation du carrousel */
.carousel-ctrl-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: rgba(0,0,0,.1);
  border-radius: 50%;
  color: var(--dark);
  font-size: 0.9rem;
  transition: background .2s;
}
.carousel-control-prev:hover .carousel-ctrl-icon,
.carousel-control-next:hover .carousel-ctrl-icon {
  background: var(--red);
  color: #fff;
}
.carousel-control-prev,
.carousel-control-next { width: 56px; }

/* Points indicateurs du carrousel */
.hero-dots { bottom: 20px; }
.hero-dots button {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(24,24,24,.4);
  border: none;
  transition: background .2s;
}
.hero-dots button.active { background: var(--red); }

/* =============================================
   BARRE DE SERVICES ICONIQUES
   4 blocs colorés sous le héros
   ============================================= */
.services-bar { background: #fff; }

.service-bar-item {
  color: #fff;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  border-right: 1px solid rgba(255,255,255,.15);
  /* Forme en parallélogramme via clip-path */
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
}
.service-bar-item:last-child { border-right: none; }

/* Alternance rouge / vert */
.service-bar-item:not(.dark) { background: var(--red); }
.service-bar-item.dark       { background: var(--green); }

/* Couleurs inversées au survol */
.service-bar-item:not(.dark):hover { background: #cdf7df; color: var(--dark); }
.service-bar-item.dark:hover       { background: #f5969a; color: var(--dark); }

.service-bar-item i {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 10px;
}
.service-bar-item p {
  font-family: var(--font);
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.4;
}

/* =============================================
   SECTION NOS VALEURS
   Icônes + Mission/Vision (page d'accueil)
   ============================================= */
.valeurs-section { background: #fff; }

/* Carte d'une valeur */
.valeur-item { padding: 10px; }
.valeur-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--green-light);
  font-size: 1.2rem;
  transition: all var(--transition);
}
.valeur-item:hover .valeur-icon {
  background: var(--green-light);
  color: #fff;
}
.valeur-item h6 {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}
.valeur-item p { font-size: 0.8rem; color: var(--dark); line-height: 1.5; }

/* Bloc Mission / Vision (colonne droite) */
.mission-vision { padding-left: 20px; }
.mv-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.mv-icon.red   { background: var(--red); color: #fff; }
.mv-icon.green { background: transparent; border: 2px solid var(--green); color: var(--green); }

/* Bloc Mission (bordure gauche rouge) */
.mission-block,
.vision-block {
  padding: 16px;
  border-left: 3px solid #eee;
}
.mission-block { border-left-color: var(--red); }
.vision-block  { border-left-color: var(--green); }
.mission-block p,
.vision-block p { font-size: 0.85rem; color: var(--dark); line-height: 1.6; }

/* =============================================
   BARRE DE STATISTIQUES
   Fond vert avec compteurs animés
   ============================================= */
.stats-section { background: var(--green); }
.stats-bar { padding: 30px 0; }

.stat-item {
  padding: 20px 16px;
  color: #fff;
  border-right: 1px solid rgba(255,255,255,.2);
}
.stat-item:last-child { border-right: none; }
.stat-item i {
  font-size: 1.4rem;
  opacity: .7;
  display: block;
  margin-bottom: 8px;
}
.stat-item h3 {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.stat-item p {
  font-size: 0.875rem; /* 14px → converti en rem */
  opacity: .8;
  letter-spacing: .5px;
  margin: 0;
}

/* =============================================
   SECTION NOS SERVICES
   Grille de cartes de services
   ============================================= */
.nos-services-section { background: #f9f9f9; }

.services-subtitle {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--dark);
  margin-bottom: 14px;
}

/* Description introductive dans la colonne gauche */
.nos-services-section > .container-fluid > .row > .col-lg-3 > p {
  font-size: 0.85rem;
  color: var(--dark);
  line-height: 1.7;
}

/* Carte de service individuelle */
.service-card {
  background: #fff;
  border: 1px solid #eee;
  padding: 24px 18px;
  border-radius: 2px;
  height: 100%;
  transition: all .3s;
  position: relative;
  overflow: hidden;
}

/* Ligne colorée animée sur le bord gauche au hover */
.service-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 0;
  background: var(--red);
  transition: height .3s;
}
.service-card:hover::before { height: 100%; }
.service-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
  transform: translateY(-3px);
}

/* Icône de la carte (variante rouge par défaut, verte optionnelle) */
.service-card-icon {
  width: 48px; height: 48px;
  border-radius: 4px;
  background: rgba(192,57,43,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  font-size: 1.2rem;
  margin-bottom: 14px;
}
.service-card-icon.green {
  background: rgba(39,174,96,.1);
  color: var(--green-light);
}
.service-card h6 {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 10px;
}
.service-card p { font-size: 0.82rem; color: var(--dark); line-height: 1.6; }

/* Lien "En savoir plus" avec icône décalée au hover */
.en-savoir {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 10px;
  transition: gap .2s;
}
.en-savoir:hover { gap: 10px; }

/* =============================================
   SECTION POURQUOI NOUS CHOISIR
   ============================================= */
.why-section { background: #fff; }

.why-title {
  font-size: 0.8rem;
  letter-spacing: 2px;
}

/* Item "Pourquoi" avec icône ronde */
.why-item { padding: 10px 4px; }
.why-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--green);
  font-size: 1.2rem;
  transition: all var(--transition);
}
.why-item:hover .why-icon {
  background: var(--green);
  color: #fff;
}
.why-item h6 {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 6px;
}
.why-item p { font-size: 0.78rem; color: var(--dark); line-height: 1.5; }

/* =============================================
   SECTION CLIENTS (LOGOS)
   ============================================= */
.clients-section { background: #f9f9f9; }

/* Titre centré avec lignes décoratives */
.clients-title {
  font-size: 0.8rem;
  letter-spacing: 3px;
  color: var(--dark) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
/* Suppression du pseudo-élément générique sur ce titre */
.clients-title::after,
.clients-title::before { display: none; }

/* Ligne décorative autour du titre clients */
.title-line {
  display: inline-block;
  width: 60px; height: 1px;
  background: #ccc;
}

/* Carte logo client */
.client-logo {
  padding: 14px 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all var(--transition);
}
.client-logo:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

/* Texte logo stylisé (utilisé en remplacement des images) */
.logo-text {
  font-family: var(--font);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 1px;
}
/* Couleurs spécifiques à chaque marque client */
.carrefour { color: #004f9f; }
.kutea     { color: #555; }
.mg        { color: var(--red); }
.afriquia  { color: #e07b00; }
.logistix  { color: #0057a8; }
.addoha    { color: #2e8b57; }
.ocp       { color: var(--dark); }

/* =============================================
   BANDE CTA (APPEL À L'ACTION)
   Fond vert avec contacts et lien devis
   ============================================= */
.cta-band { background: var(--green); color: #fff; }

/* Icône rocket */
.rocket-icon {
  font-size: 2.2rem;
  color: rgba(255,255,255,.9);
  flex-shrink: 0;
}
.cta-band h5 {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.cta-band p,
.cta-band small {
  font-size: 0.83rem;
  opacity: .85;
}

/* Blocs de contact séparés par une ligne verticale */
.cta-block {
  border-left: 1px solid rgba(255,255,255,.15);
  padding-left: 24px;
}
.cta-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.green-icon { background: rgba(255,255,255,.15); }
.red-icon   { background: var(--red); }
.cta-band .cta-block p { font-weight: 600; }

/* =============================================
   PIED DE PAGE (FOOTER)
   Fond sombre avec 4 colonnes d'info
   ============================================= */
.main-footer { background: #3d3f3e; color: #aaa; }

/* Logo dans le footer (variantes texte) */
.footer-logo .logo-it  { color: #fff; font-style: italic; font-size: 1.4rem; font-weight: 900; font-family: var(--font); }
.footer-logo .logo-win { color: var(--red); font-size: 1.4rem; font-weight: 900; font-family: var(--font); }
.footer-logo .logo-tech { font-family: var(--font); font-size: 0.55rem; font-weight: 800; letter-spacing: 3px; color: #666; text-transform: uppercase; }

.footer-desc { font-size: 0.82rem; line-height: 1.7; color: #fff; }

/* Titres des colonnes du footer */
.footer-heading {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--dark2);
}

/* Listes de liens dans le footer */
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li {
  font-size: 0.82rem;
  color: #fff;
  margin-bottom: 8px;
  transition: color .2s;
}
.footer-links li a {
  color: #fff;
  transition: color .2s, padding-left .2s;
  display: inline-block;
}
.footer-links li a:hover,
.footer-links li:hover { color: var(--red); padding-left: 4px; }

/* Liste d'infos de contact (avec icônes) */
.contact-info li { display: flex; align-items: flex-start; gap: 8px; }
.contact-info li i { color: var(--red); margin-top: 2px; flex-shrink: 0; }
.contact-info li a { color: #fff; }

/* Icônes réseaux sociaux du footer */
.footer-social {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  transition: all var(--transition);
}
.footer-social:hover {
  background: var(--red);
  border-color: var(--red);
}

/* Séparateur horizontal du footer */
.footer-hr { border-color: var(--dark2); margin: 24px 0 16px; }

/* Mentions légales (bas de footer) */
.footer-copy        { font-size: 0.78rem; color: #fff; }
.footer-bottom-link { font-size: 0.78rem; color: #fff; transition: color .2s; }
.footer-bottom-link:hover { color: var(--red); }

/* =============================================
   BOUTON RETOUR EN HAUT
   Apparaît après 300px de scroll (via JS)
   ============================================= */
.back-to-top {
  position: fixed;
  bottom: 68px; right: 28px;
  width: 40px; height: 40px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  display: none; /* Caché par défaut, affiché via .show */
  align-items: center;
  justify-content: center;
  z-index: 9999;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  transition: background .2s, transform .2s;
  cursor: pointer;
}
.back-to-top:hover { background: var(--red-dark); transform: translateY(-3px); }
.back-to-top.show  { display: flex; } /* Ajouté par JS au scroll */

/* =============================================
   ANIMATIONS D'ENTRÉE AU SCROLL
   Classe de base + classe .visible ajoutée par IntersectionObserver
   ============================================= */
.fade-in-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in-up.visible {
  opacity: 1;
  transform: none;
}

/* =============================================
   RESPONSIVE – Tablette (< 992px)
   ============================================= */
@media (max-width: 991px) {
  .hero-title    { font-size: 1.8rem; }
  .hero-content  { padding: 40px 0; }
  .hero-image-wrap { display: none; } /* Masquer l'image hero sur tablette */
  .mission-vision  { padding-left: 0; margin-top: 20px; }
  /* Séparateurs CTA en horizontal au lieu de vertical */
  .cta-block {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(255,255,255,.15);
    padding-top: 16px;
  }
  .hero-slide { min-height: 420px; }
}

/* =============================================
   RESPONSIVE – Mobile (< 768px)
   ============================================= */
@media (max-width: 767px) {
  .topbar-right { display: none !important; } /* Masquer les réseaux sociaux en topbar */
  .services-bar .service-bar-item { border-bottom: 1px solid rgba(255,255,255,.15); }
  /* Stats en grille 2 colonnes */
  .stats-bar .row { flex-wrap: wrap; }
  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .clients-logos { gap: 12px !important; }
}