/* ============================================================
   HEADER MOBILE CUSTOM (Logo agrandi et harmonisé)
   ============================================================ */

.header-mobile-custom {
  display: flex;
  align-items: center; 
  width: 100%;
  padding: 18px 0; /* Légèrement augmenté pour accompagner la taille du logo */
  box-sizing: border-box;
  
}

/* --- ZONE LOGO (Ajustée à ~30%) --- */
.zone-logo-mob {
  flex: 0 0 30%; /* Fixe la zone à 30% pour donner plus de place au logo */
  padding-left: 15px;  /* Réduit pour gagner de l'espace image */
  padding-right: 15px; /* Espace équilibré avant la ligne */
  display: flex;
  justify-content: center; 
  align-items: center;
}

.img-logo-mob {
  width: 100%;      /* Utilise toute la place disponible dans les 30% */
  max-width: 90px;  /* Limite de sécurité pour ne pas devenir géant sur tablette */
  height: auto;
  display: block;
}

/* --- ZONE TEXTE (Ajustée à ~70%) --- */
.zone-texte-mob {
  flex: 0 0 70%; 
  padding-left: 20px; /* Ajusté pour une harmonie visuelle avec la ligne */
  position: relative; 
  display: flex;
  align-items: center;
}

/* Ligne verticale de séparation */
.zone-texte-mob::before {
  content: "";
  position: absolute;
  left: 0; 
  top: 5%;    /* Ligne un peu plus longue (90% de hauteur) */
  bottom: 5%; 
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 1) 12%,
    rgba(255, 255, 255, 1) 88%,
    transparent 100%
  );
}

/* Style du texte H1 */
.titre-h1-mobil {
  font-family: 'arial', sans-serif;
  font-size: 14px !important;
  color: #ffffff !important;
  text-align: left;
  line-height: 1.5; 
  margin: 0 !important;
  font-weight: normal;
  letter-spacing: 0.3px; /* Légère aération pour le standing */
}

/* --- ADAPTATION ÉCRANS TRÈS PETITS (iPhone SE, etc.) --- */
@media (max-width: 380px) {
  .zone-logo-mob { flex: 0 0 32%; padding-left: 10px; padding-right: 10px; }
  .zone-texte-mob { flex: 0 0 68%; padding-left: 15px; }
  .titre-h1-mobil { font-size: 12px !important; line-height: 1.4; }
}

/* ============================================================
   ANTI-FLASH COULEUR HEADER MOBILE (UNIQUEMENT ACCUEIL) - Garde couleur #016576
   ============================================================ */

@media (max-width: 768px) {
  /* 1. Applique le calque de couleur UNIQUEMENT si le body a la classe .home */
  body.home::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px; /* Hauteur de votre header mobile */
    background-color: #016576 !important;
    z-index: 1; /* Sous le logo mais au-dessus du blanc du site */
  }

  /* 2. Force la couleur sur le wrapper et les éléments du widget TCK sur l'accueil */
  body.home #wrapper3, 
  body.home div[id*="wrapper3-sticky-wrapper"], 
  body.home .tck-fixed-placeholder {
    background-color: #016576 !important;
    position: relative;
    z-index: 2;
  }

  /* 3. Force la couleur du contenu interne sur l'accueil */
  body.home .header-mobile-custom {
    background-color: #016576 !important;
    z-index: 10;
  }
}



/* ============================================================
   1. STRUCTURE ET GRILLE (LAYOUT)
   ============================================================ */

#block-top-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;              /* Espacement horizontal et vertical */
  justify-content: center; /* Modules centrés horizontalement */
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Base commune à tous les modules */
.module-item {
  width: 373px;
  height: 470px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-sizing: border-box;
}

/* ============================================================
   2. MODULES AVEC FOND (1, 3, 5, 7 - Image ou Vidéo)
   ============================================================ */

.module-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Positionnement des textes sur les fonds */
.module-bg .text-top {
  position: absolute;
  top: 100px;
  left: 120px;
  right: 10px;
  font-size: 38px;
  line-height: 42px;
  color: #fff;
}

.module-bg .text-bottom {
  position: absolute;
  bottom: 40px;
  left: 80px;
  right: 10px;
  font-size: 22px;
  line-height: 26px;
  color: #fff;
}

/* Spécificités pour les vidéos de fond */
.video-bg {
  position: relative;
  overflow: hidden;
}

.video-bg .bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.video-bg .text-top,
.video-bg .text-bottom {
  z-index: 2; /* S'assure que le texte est au-dessus de la vidéo */
}

/* ============================================================
   3. MODULES BLANCS (2, 4, 6, 8 - Zone de texte + Bouton)
   ============================================================ */

/* Zone blanche supérieure */
.module-white .white-content {
  background: #fff;
  width: 100%;
  height: 330px;
  padding: 25px;
  box-sizing: border-box;
  border-radius: 8px;
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  line-height: 20px;
  color: #333;
}

/* Zone basse pour le bouton */
.module-white .white-footer {
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px; /* Espace sous la zone blanche */
}

/* ============================================================
   4. TITRES GÉNÉRAUX
   ============================================================ */

.titre-module {
  font-family: "Times New Roman", Times, serif;
  font-size: 26px;
  line-height: 28px;
  color: #fff;
  text-align: center;
  padding: 15px 25px;
  margin: 0;
  font-weight: normal;
  position: absolute;
  z-index: 2;
}

.titre-h1 {
  font-family: "Times New Roman", Times, serif;
  font-size: 22px;
  line-height: 24px;
  color: #fff;
  text-align: center;
  padding: 5px 25px 40px 25px;
  margin: 0;
  font-weight: normal;
  box-sizing: border-box;
}

/* ============================================================
   5. LE BOUTON SPECIAL (btn-wtr) - EFFET BULLES & REMPLISSAGE
   ============================================================ */

.btn-wtr {
  /* Variables de couleurs */
  --btn-bg-initial: #016576;    
  --btn-text-initial: #ffffff;  
  --btn-bg-hover: #CAF6F4;      
  --btn-text-hover: #000000;   
  --bubble-outline-color: #ffffff; 
  
  /* Structure et Centrage (Force le centrage parfait) */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative;
  width: 200px;
  height: 40px;
  padding: 0 !important;   /* Crucial pour le centrage horizontal */
  text-indent: 0 !important;
  text-decoration: none !important;
  
  /* Style visuel */
  background-color: var(--btn-bg-initial) !important;
  border: 1px solid #000000 !important;
  border-radius: 4px;
  cursor: pointer;
  z-index: 0;
  overflow: hidden;
  
  /* Typographie */
  font-family: 'arial', sans-serif;
  font-weight: normal;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--btn-text-initial) !important;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

/* État Hover global */
.btn-wtr:hover {
  background-color: var(--btn-bg-hover) !important;
  color: var(--btn-text-hover) !important;
}

/* Texte principal (Couche supérieure) */
.btn-text {
  position: relative;
  z-index: 5; 
  transition: color 0.4s ease;
  margin: 0 !important;
}

/* Effet de remplissage Liquide (Couche intermédiaire) */
.btn-wtr .right {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 3;
  pointer-events: none;
}

.btn-wtr .right::after {
  content: attr(data-text);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: var(--btn-bg-hover) !important; 
  color: var(--btn-text-hover) !important;
  transition: transform .5s cubic-bezier(0.19, 1, 0.22, 1);
  transform: translate(0, 100%); 
}

.btn-wtr:hover .right::after {
  transform: translate(0, 0);
}

/* Animation des Bulles blanches (Couche de fond) */
.btn-wtr::before {
  content: '';
  pointer-events: none;
  opacity: .8;
  background:
    radial-gradient(circle at 20% 35%, transparent 0, transparent 2px, var(--bubble-outline-color) 2.5px, var(--bubble-outline-color) 3.5px, transparent 4px),
    radial-gradient(circle at 75% 44%, transparent 0, transparent 2px, var(--bubble-outline-color) 2.5px, var(--bubble-outline-color) 3.5px, transparent 4px),
    radial-gradient(circle at 46% 52%, transparent 0, transparent 4px, var(--bubble-outline-color) 4.5px, var(--bubble-outline-color) 5.5px, transparent 6px);

  width: 100%;
  height: 300%;
  top: 0;
  left: 0;
  position: absolute;
  z-index: 2;
  animation: bubbles-wtr 4s linear infinite both;
}

@keyframes bubbles-wtr {
  from { transform: translate(0, 0); }
  to { transform: translate(0, -66.66%); }
}

.btn-wtr:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(202, 246, 244, 0.5);
}

/* ============================================================
   6. RESPONSIVE (MOBILE)
   ============================================================ */

@media (max-width: 768px) {
  #block-top-modules {
    flex-direction: column;
    gap: 20px;
    align-items: center;
    width: 100%;
    padding: 0;
  }

  /* Force la largeur de TOUS les modules à 100% - 16px */
  .module-item {
    width: calc(100% - 16px) !important; 
    max-width: 373px; 
    height: 470px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Ajustement des textes sur mobile */
  .module-bg .text-top,
  .titre-module {
    top: 60px;
    left: 20px;
    right: 20px;
    font-size: 28px;
    line-height: 32px;
  }

  .module-bg .text-bottom {
    bottom: 30px;
    left: 20px;
    right: 20px;
    font-size: 18px;
  }

  .module-white .white-content {
    height: 330px;
    padding: 20px;
  }

  /* Force le centrage du bouton sur mobile */
  .module-white .white-footer {
    width: 100%;
    justify-content: center;
  }

  .btn-wtr {
    width: 200px !important; /* Maintient la largeur fixe demandée */
    max-width: 80%;
  }
}


