/* -------------------- */
/* style-infrastructure.css v4 */
/* Infrastructure dynamique et colorée (texte statique) */
/* -------------------- */

/* Import global */
@import url('style-global.css');

/* -------------------- */
/* Arrière-plan général  */
/* -------------------- */
body {
  background: linear-gradient(to bottom, #e0f7fa, #80deea);
  font-family: 'Poppins', sans-serif;
  color: #333;
  margin: 0;
  animation: bgGradientShift 20s ease-in-out infinite alternate;
  position: relative;
  overflow-x: hidden;
}

/* Couche décorative supplémentaire */
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(circle at 15% 20%, rgba(255, 105, 180, 0.15), transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(0, 191, 255, 0.15), transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(50, 205, 50, 0.15), transparent 50%);
  z-index: -1;
  animation: floatingBackground 25s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Animation background global */
@keyframes bgGradientShift {
  0% { background: linear-gradient(to bottom, #e0f7fa, #80deea); }
  50% { background: linear-gradient(to bottom, #80deea, #4dd0e1); }
  100% { background: linear-gradient(to bottom, #e0f7fa, #80deea); }
}

/* Animation des bulles colorées */
@keyframes floatingBackground {
  0% { background-position: 0% 50%, 100% 50%, 50% 100%; }
  50% { background-position: 50% 100%, 0% 50%, 100% 0%; }
  100% { background-position: 0% 50%, 100% 50%, 50% 100%; }
}

/* -------------------- */
/* Header sticky        */
/* -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10001;
}

/* -------------------- */
/* Menu Mobile          */
/* -------------------- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 250px !important;
    height: 100% !important;
    background: #3def2d !important;
    flex-direction: column !important;
    padding: 2rem 1rem !important;
    transition: right 0.3s ease !important;
    z-index: 9999 !important;
  }

  .nav-links.show {
    right: 0 !important;
  }

  .nav-links a {
    margin: 0.6rem 0 !important;
    padding: 0.7rem 1rem !important;
    color: #fff !important;
    border-radius: 0.4rem !important;
    text-align: left !important;
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.2) !important;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    cursor: pointer;
    background: transparent;
    border: none;
    z-index: 10000 !important;
  }

  .nav-toggle span {
    display: block;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
  }
}

/* -------------------- */
/* Hero Infrastructure  */
/* -------------------- */
.hero-infra {
  position: relative;
  min-height: 80vh;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 4rem 2rem;
  border-radius: 1rem;
  overflow: hidden;
}

/* Image de fond dans le HTML */
.hero-infra .hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-infra .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1);
  animation: heroBackgroundShift 30s linear infinite;
}

/* Overlay semi-transparent */
.hero-infra::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
  z-index: 1;
  animation: overlayPulse 8s ease-in-out infinite alternate;
}

/* Texte et visuels au-dessus */
.hero-infra .hero-text,
.hero-infra .hero-visual {
  position: relative;
  z-index: 2;
}

.hero-infra .kicker {
  display: block;
  font-weight: 700;
  color: #ffeb3b;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.hero-infra h1 {
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 15px rgba(0,0,0,0.5);
}

.hero-infra .lead {
  font-size: 1.3rem;
  color: #f0f0f0;
  line-height: 1.5;
  max-width: 600px;
}

.hero-infra .hero-visual img {
  max-width: 100%;
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  animation: visualFloat 6s ease-in-out infinite alternate;
}

@keyframes visualFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

/* -------------------- */
/* Cartes Infrastructure */
/* -------------------- */
.card {
  background: linear-gradient(135deg, #e1c7ad, #a8c2d1);
  color: #fff;
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  box-shadow: 0 6px 25px rgba(0,0,0,0.35);
  transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.6s ease;
  position: relative;
  overflow: hidden;
  animation: cardFloat 8s ease-in-out infinite alternate;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.05);
  transform: skewY(-5deg);
  z-index: 0;
}

.card:hover {
  transform: translateY(-12px) scale(1.05) rotate(1deg);
  box-shadow: 0 18px 40px rgba(0,0,0,0.5);
  background: linear-gradient(135deg, #bff3cc, #d0ecf9);
}

.card h3 {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
  position: relative;
  z-index: 1;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.5);
}

.card p {
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.card img {
  width: 100%;
  margin-top: 1rem;
  border-radius: 0.8rem;
  box-shadow: 0 6px 15px rgba(0,0,0,0.4);
  position: relative;
  z-index: 1;
}

/* Grille responsive */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Points forts / icônes */
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.hero-points li {
  background: linear-gradient(135deg, #fe8488, #fad0c4);
  padding: 0.8rem 1rem;
  border-radius: 0.8rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.4s ease;
  animation: pointFloat 6s ease-in-out infinite alternate;
}

.hero-points li:hover {
  transform: scale(1.1) rotate(-2deg);
  background: linear-gradient(135deg, #a051b8, #88a34d);
}

/* -------------------- */
/* Animations overlays hero (fond et overlay gardés) */
@keyframes heroBackgroundShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes overlayPulse {
  0% { background: linear-gradient(135deg, rgba(94, 77, 77, 0.3), rgba(0,0,0,0.5)); }
  50% { background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(0,0,0,0.3)); }
  100% { background: linear-gradient(135deg, rgba(0,0,0,0.3), rgba(0,0,0,0.5)); }
}

@keyframes pointFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* -------------------- */
/* Responsive           */
@media (max-width: 1024px) {
  .hero-infra h1 { font-size: 2.5rem; }
  .hero-infra .lead { font-size: 1.1rem; }
}

@media (max-width: 100px){
  .hero-infra { flex-direction: column; text-align: center; }
  .hero-infra .hero-visual { margin-top: 2rem; }
}
