/* ================================================================
   BERGEC — Styles spécifiques à la page d'accueil (index.html)
   Charte graphique : Rouge #CC1122 | Bleu #1A3F7A | Gris route
   ================================================================ */


/* ================================================================
   1. SECTION HERO — Bannière principale
   ================================================================ */
.hero {
  min-height: 100vh;
  /* Dégradé inspiré du fond du logo : sombre en haut, bleu marine en bas */
  background: linear-gradient(145deg,
    var(--sombre)      0%,
    var(--bleu-fonce)  45%,
    var(--bleu)        100%
  );
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 130px 24px 80px;
}

/* Fond décoratif */
.hero-fond {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Grille de fond subtile (effet tech) */
.grille-fond {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Simulation de la route du logo */
.route-fond {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 100%;
  background: linear-gradient(to top, rgba(142, 154, 175, 0.18) 0%, transparent 55%);
  clip-path: polygon(38% 100%, 62% 100%, 68% 0%, 32% 0%);
}

/* Lignes de route animées */
.route-fond::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: repeating-linear-gradient(
    to top,
    rgba(255, 255, 255, 0.28) 0px,
    rgba(255, 255, 255, 0.28) 28px,
    transparent 28px,
    transparent 56px
  );
  animation: defilementRoute 1.8s linear infinite;
}

@keyframes defilementRoute {
  from { background-position: 0 0; }
  to   { background-position: 0 56px; }
}

/* Cercles décoratifs (évoquent l'ovale du logo) */
.cercle-1,
.cercle-2,
.cercle-3 {
  position: absolute;
  border-radius: 50%;
  animation: pulsation 4s ease-in-out infinite;
  border: 1px solid rgba(204, 17, 34, 0.15);
}

.cercle-1 { top: 8%;  right: 8%;  width: 420px; height: 420px; }
.cercle-2 { top: 14%; right: 14%; width: 270px; height: 270px; border-color: rgba(204, 17, 34, 0.22); animation-delay: 0.6s; }
.cercle-3 { top: 20%; right: 20%; width: 140px; height: 140px; border-color: rgba(204, 17, 34, 0.30); animation-delay: 1.2s; }

@keyframes pulsation {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.04); opacity: 0.5; }
}

/* Corps du hero (contenu principal) */
.hero-corps {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

/* Badge d'accroche */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(204, 17, 34, 0.14);
  border: 1px solid rgba(204, 17, 34, 0.3);
  color: #ffaaaa;
  padding: 8px 22px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 28px;
}

/* Titre principal */
.hero-titre {
  font-family: var(--police-titre);
  font-size: clamp(32px, 6vw, 66px);
  font-weight: 800;
  color: var(--blanc);
  line-height: 1.1;
  margin-bottom: 18px;
}

/* Mot en rouge dans le titre */
.hero-titre span { color: var(--rouge); }

/* Sous-titre */
.hero-sous {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  margin-bottom: 14px;
}

/* Description */
.hero-desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.62);
  max-width: 620px;
  margin: 0 auto 38px;
  line-height: 1.85;
}

/* Boutons du hero */
.hero-boutons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Indicateur de défilement (souris animée) */
.indicateur-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.souris-scroll {
  width: 27px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.souris-scroll span {
  display: block;
  width: 4px;
  height: 8px;
  background: var(--blanc);
  border-radius: 2px;
  animation: rebondSouris 1.6s ease-in-out infinite;
}

@keyframes rebondSouris {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(12px); opacity: 0.25; }
}


/* ================================================================
   2. SECTION STATISTIQUES — Chiffres clés
   ================================================================ */
.stats-section {
  background: linear-gradient(135deg, var(--bleu-fonce), var(--bleu));
  padding: 62px 0;
  position: relative;
  overflow: hidden;
}

/* Grille de fond subtile */
.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.stats-grille {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--rayon);
  overflow: hidden;
  position: relative;
}

/* Chaque statistique */
.stat {
  background: rgba(255, 255, 255, 0.05);
  padding: 38px 20px;
  text-align: center;
  transition: var(--transition);
  cursor: default;
}

.stat:hover { background: rgba(204, 17, 34, 0.18); }

/* Grand chiffre */
.stat-nombre {
  font-family: var(--police-titre);
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  color: var(--blanc);
  line-height: 1;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.stat-nombre .plus { font-size: 24px; color: var(--rouge); }
.stat-nombre .mot  { font-size: 26px; font-weight: 700; }

/* Libellé de la statistique */
.stat-label {
  font-family: var(--police-titre);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

/* Sous-libellé */
.stat-hint { font-size: 12px; color: rgba(255, 255, 255, 0.45); }


/* ================================================================
   3. APERÇU DES SERVICES — Grille de services sur la page d'accueil
   ================================================================ */
.apercu-services { background: var(--fond-clair); }

.services-apercu-grille {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* Carte d'aperçu service */
.carte-apercu {
  background: var(--blanc);
  border-radius: var(--rayon-lg);
  padding: 32px 24px;
  border: 1px solid var(--bordure);
  transition: var(--transition);
  cursor: default;
  text-align: center;
}

.carte-apercu:hover {
  transform: translateY(-6px);
  box-shadow: var(--ombre-lg);
  border-color: transparent;
}

/* Icône du service */
.apercu-icone {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--bleu), var(--bleu-clair));
  border-radius: 50%;  /* Cercle = évoque l'ovale du logo */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blanc);
  font-size: 24px;
  margin: 0 auto 18px;
  transition: var(--transition);
}

.carte-apercu:hover .apercu-icone {
  background: linear-gradient(135deg, var(--rouge-fonce), var(--rouge));
  transform: scale(1.1) rotate(5deg);
}

.carte-apercu h3 {
  font-family: var(--police-titre);
  font-size: 16px;
  font-weight: 700;
  color: var(--sombre);
  margin-bottom: 10px;
}

.carte-apercu p {
  font-size: 14px;
  color: var(--discret);
  line-height: 1.7;
}


/* ================================================================
   4. SECTION AVANTAGES — Pourquoi nous
   Fond sombre avec texture de grille (identité visuelle sombre)
   ================================================================ */
.pourquoi-section {
  background: linear-gradient(145deg, var(--sombre), var(--bleu-fonce));
  position: relative;
  overflow: hidden;
}

/* Grille de fond */
.pourquoi-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
}

.avantages-grille {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative; /* pour passer au-dessus du ::before */
}

/* Carte d'avantage */
.carte-avantage {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--rayon-lg);
  padding: 32px 24px;
  transition: var(--transition);
}

.carte-avantage:hover {
  background: rgba(204, 17, 34, 0.14);
  border-color: rgba(204, 17, 34, 0.28);
  transform: translateY(-4px);
}

/* Icône de l'avantage */
.av-icone {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--rouge-fonce), var(--rouge));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blanc);
  font-size: 20px;
  margin-bottom: 16px;
}

.carte-avantage h3 {
  font-family: var(--police-titre);
  font-size: 16px;
  font-weight: 700;
  color: var(--blanc);
  margin-bottom: 10px;
}

.carte-avantage p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.8;
}


/* ================================================================
   5. BANDEAU APPEL À L'ACTION (CTA)
   ================================================================ */
.cta-bandeau {
  /* Dégradé en diagonale rouge → bleu : couleurs du logo */
  background: linear-gradient(135deg, var(--rouge-fonce) 0%, var(--rouge) 40%, var(--bleu) 100%);
  position: relative;
  overflow: hidden;
}

/* Texture de fond */
.cta-bandeau::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.cta-contenu {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.cta-texte h2 {
  font-family: var(--police-titre);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: var(--blanc);
  margin-bottom: 8px;
}

.cta-texte p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.75);
}

.cta-boutons {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Bouton blanc sur fond coloré */
.cta-boutons .btn-rouge {
  background: var(--blanc);
  color: var(--rouge);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cta-boutons .btn-rouge:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--rouge-fonce);
}


/* ================================================================
   6. RESPONSIVE ACCUEIL
   ================================================================ */
@media (max-width: 1024px) {
  .stats-grille             { grid-template-columns: repeat(2, 1fr); }
  .services-apercu-grille   { grid-template-columns: repeat(2, 1fr); }
  .avantages-grille         { grid-template-columns: repeat(2, 1fr); }
  .cta-contenu              { flex-direction: column; text-align: center; }
  .cta-boutons              { justify-content: center; }
}

@media (max-width: 768px) {
  .hero-boutons             { flex-direction: column; align-items: center; }
  .stats-grille             { grid-template-columns: repeat(2, 1fr); }
  .services-apercu-grille   { grid-template-columns: 1fr; }
  .avantages-grille         { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grille { grid-template-columns: 1fr 1fr; }
}
