/* ========================================
   RESPONSIVE STYLES - IAG
   ======================================== */

/* ========================================
   FIX OVERFLOW HORIZONTAL - MOBILE
   ======================================== */

/* Empêcher le scroll horizontal sur mobile */
html {
  overflow-x: hidden;
  width: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Conteneurs principaux - éviter le débordement sur mobile */
@media (max-width: 767px) {
  .w-container,
  .w-layout-blockcontainer {
    max-width: 100% !important;
  }
  
  /* S'assurer que les sections ne débordent pas */
  section,
  main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Images et médias - éviter le débordement */
  img,
  video,
  iframe {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 479px) {
  /* Correction supplémentaire pour petits écrans */
  body {
    overflow-x: hidden;
  }
  
  .w-container {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* ========================================
   BLOG IMAGES - UNIFORM SIZE
   ======================================== */

.rt-blog-v1-item-image {
  height: 280px !important;
  min-height: 280px !important;
  max-height: 280px !important;
  overflow: hidden;
}

.rt-blog-v1-item-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* ========================================
   FOOTER GRID LAYOUT
   ======================================== */

/* Footer wrapper - Grid principal */
.rt-footer-one-wrapper {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 4rem;
  width: 100%;
}

/* Footer heading */
.rt-footer-one-heading {
  display: grid !important;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

/* Footer content wrap - Grid pour les colonnes */
.rt-footer-one-content-wrap {
  display: grid !important;
  grid-template-columns: 1fr 3fr;
  gap: 3rem;
  align-items: start;
}

/* Main content - Grid 3 colonnes, prend tout l'espace de la 2e colonne de la grille */
.rt-fotter-one-content-main {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  grid-column: 2 / 3;
  /* S'assure que ça occupe toute la largeur de sa colonne grid, sans sortir du conteneur parent */
}

/* Footer bottom */
.rt-footer-one-bottom {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

/* ========================================
   FOOTER ICONS & LOGOS HARMONIZATION
   ======================================== */

/* Logo IAG dans le footer - taille uniforme */
.rt-brand-footer {
  width: auto !important;
  height: 80px !important;
  object-fit: contain !important;
}

.rt-brand-footer-filiale {
}

.rt-brand-footer-filiale-link {
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.3s ease;
}

.rt-brand-footer-filiale-link:hover {
  opacity: 0.8;
}

/* Icônes réseaux sociaux - taille uniforme */
.rt-social-media-icon {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain !important;
}

/* Icône téléphone - taille harmonisée */
.rt-footer-call-icon {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain !important;
}

/* Filiales logos - Grid */
.filiales-logos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.5rem;
  align-items: center;
  justify-items: center;
  width: 100%;
}

/* ========================================
   SUBSIDIARIES LOGOS BASE STYLES
   ======================================== */

.subsidiaries-logos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.5rem;
  align-items: center;
  justify-items: center;
  width: 100%;
}

.subsidiary-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.subsidiary-logo-link:hover {
  transform: translateY(-4px);
  opacity: 0.85;
}

.subsidiaries-row {
  gap: 1.5rem;
  align-items: center;
}

.subsidiary-logo {
  height: 100px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
  display: block;
}

/* ========================================
   FOOTER MOBILE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 991px) {
  /* Blog images responsive */
  .rt-blog-v1-item-image {
    height: 250px !important;
    min-height: 250px !important;
    max-height: 250px !important;
  }

  /* ========================================
     FOOTER GRID - MOBILE/TABLET
     ======================================== */

  /* Footer wrapper - Grid 1 colonne */
  .rt-footer-one-wrapper {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* Footer heading - Grid 1 colonne centré */
  .rt-footer-one-heading {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
    justify-items: center;
  }

  .rt-footer-one-heading-text h2 {
    font-size: 1.75rem;
    line-height: 1.3;
  }

  /* Content wrap - Grid 1 colonne, logo en premier */
  .rt-footer-one-content-wrap {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 3rem;
    order: -1;
  }

  /* Logo IAG section - centré */
  .rt-footer-one-content.rt-change {
    align-items: center;
    text-align: center;
    justify-self: center;
  }

  /* Main content - Grid en lignes : pour le mobile chacun occupe une ligne */
  .rt-fotter-one-content-main {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
    grid-column: 1 / 2;
  }

  /* Footer bottom - Grid 1 colonne centré */
  .rt-footer-one-bottom {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
    justify-items: center;
  }

  /* Masquer les textes hover sur mobile */
  .rt-link-opacity {
    display: none !important;
  }

  /* Masquer le bouton cercle Contactez-nous sur mobile */
  [data-w-id='58304a70-bdea-f496-a0bf-d80a297ec138'] {
    display: none !important;
  }

  /* Subsidiaries logos - Grid 2 colonnes */
  .subsidiaries-logos-grid,
  .filiales-logos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 2rem;
  }

  /* Subsidiaries logos - taille mobile harmonisée */
  .subsidiary-logo {
    height: 75px !important;
  }

  .subsidiary-logo-link:hover {
    transform: translateY(-2px);
  }

  /* Logo IAG - taille mobile */
  .rt-brand-footer {
    height: 70px !important;
  }

  /* Icônes réseaux sociaux */
  .rt-social-media-icon {
    width: 20px !important;
    height: 20px !important;
  }

  /* Icône téléphone */
  .rt-footer-call-icon {
    width: 26px !important;
    height: 26px !important;
  }
}

@media (max-width: 767px) {
  .footer-description {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  /* Blog images responsive */
  .rt-blog-v1-item-image {
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
  }

  /* Footer wrapper - gap réduit */
  .rt-footer-one-wrapper {
    gap: 2.5rem;
  }

  /* Footer heading - texte plus petit */
  .rt-footer-one-heading-text h2 {
    font-size: 1.5rem;
  }

  /* Main content - chaque colonne sur une ligne (pile) */
  .rt-fotter-one-content-main {
    gap: 2rem;
    grid-template-columns: 1fr;
  }

  /* Logos filiales - taille tablette */
  .subsidiary-logo {
    height: 65px !important;
  }

  /* Logo IAG - taille tablette */
  .rt-brand-footer {
    height: 60px !important;
  }

  /* Grilles - gap réduit */
  .subsidiaries-logos-grid,
  .filiales-logos-grid {
    gap: 2rem 1.5rem;
  }
}

@media (max-width: 479px) {
  /* Footer section - padding réduit */
  .rt-footer-one {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Footer wrapper - gap très réduit */
  .rt-footer-one-wrapper {
    gap: 2rem;
  }

  /* Footer heading - texte très petit */
  .rt-footer-one-heading-text h2 {
    font-size: 1.25rem;
  }

  /* Content wrap - gap réduit */
  .rt-footer-one-content-wrap {
    gap: 2rem;
  }

  /* Main content - un élément par ligne sur mobile */
  .rt-fotter-one-content-main {
    gap: 1.75rem;
    width: 100%;
    max-width: 100%;
    grid-column: 1 / 2;
    grid-template-columns: 1fr;
  }

  /* Logos filiales - taille petits écrans */
  .subsidiary-logo {
    height: 55px !important;
  }

  /* Logo IAG - taille petits écrans */
  .rt-brand-footer {
    height: 50px !important;
  }

  /* Grilles - gap minimal */
  .subsidiaries-logos-grid,
  .filiales-logos-grid {
    gap: 1.75rem 1.25rem;
  }

  /* Icônes réseaux sociaux - plus petites */
  .rt-social-media-icon {
    width: 18px !important;
    height: 18px !important;
  }

  /* Icône téléphone - plus petite */
  .rt-footer-call-icon {
    width: 24px !important;
    height: 24px !important;
  }

  /* Footer bottom - texte plus petit */
  .rt-footer-one-bottom-text {
    font-size: 13px;
  }
}

.footer-description {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1rem;
  align-items: start;
  justify-items: start;
  width: 100%;
  padding-bottom: 1rem;
}

.our-filiales-item {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: center;
  justify-items: center;
  width: 100%;
}

/* Harmonisation de l'alignement des titres du footer */
.rt-footer-item-heading,
.rt-footer-one-heading-text h2 {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}

.footer-copyright {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-top: 1px solid #fff3;
}

@media (max-width: 768px) {
  .footer-copyright {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
  }

  .footer-description {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  .our-filiales-item {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    align-items: center;
    justify-items: center;
    width: 100%;
  }
}
