/* ASTRO HUB - 3 CARTES PARFAITEMENT ALIGNÉES */

/* Section principale */
.astro-hub-section {
  position: relative;
  width: 100%;
  padding: 40px 20px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: visible;
  min-height: auto;
  background-color: transparent; /* Par défaut transparent */
}

/* Overlay */
.astro-hub-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, var(--overlay-opacity, 0.65));
  z-index: 1;
}

/* Forcer la suppression de l'overlay quand pas d'image */
.astro-hub-section.no-overlay .astro-hub-overlay {
  display: none !important;
}

.astro-hub-section.no-overlay::before,
.astro-hub-section.no-overlay::after {
  display: none !important;
}

/* Container */
.astro-hub-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: visible;
}

/* Titre */
.astro-hub-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--contrast, #333333);
  text-align: center;
  margin: 0 0 70px 0;
  text-shadow: none;
}

/* GRID - ALIGNEMENT PARFAIT DES 3 CARTES */
.astro-hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
  align-items: stretch;
  overflow: visible;
}

/* LIENS DES CARTES */
.astro-hub-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.astro-hub-card-link:hover {
  text-decoration: none;
  color: inherit;
}

.astro-hub-card-link:hover .astro-hub-card {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

/* CARTES - HAUTEUR FLEXIBLE RESPONSIVE */
.astro-hub-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  
  /* HAUTEUR FIXE IDENTIQUE POUR TOUTES LES CARTES */
  height: 500px;
  
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect moved to card-link */

.astro-hub-card-link:hover .astro-hub-band {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: rgba(255, 255, 255, 0.4);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Contenu carte */
.astro-hub-card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  height: 400px;
}

/* Badge */
.astro-hub-badge {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  align-self: flex-start;
}

/* Images/Icônes */
.astro-hub-image {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.astro-hub-card-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Image plus grande pour la carte du milieu */
.astro-hub-card:nth-child(2) .astro-hub-card-img {
  width: 100px;
  height: 100px;
}

.astro-hub-icon {
  width: 48px;
  height: 48px;
  background: #e5e7eb;
  border-radius: 8px;
}

.astro-hub-illustration {
  width: 120px;
  height: 80px;
  background: #f3f4f6;
  border-radius: 8px;
}

/* Titre carte */
.astro-hub-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
  margin: 0 0 16px 0;
  text-align: center;
}

/* Texte carte */
.astro-hub-card-text {
  font-size: 0.95rem;
  color: #666666;
  line-height: 1.5;
  text-align: center;
  margin-bottom: auto;
  flex: 1;
  
  /* Empêcher débordement - texte tronqué sur 3 lignes */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Footer avec bandeau */
.astro-hub-card-footer {
  margin-top: auto;
  flex-shrink: 0;
  overflow: visible;
  height: 100px;
}

.astro-hub-band {
  background: var(--accent-color, #8b5cf6);
  min-height: 80px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  margin: 0;
  border-radius: 0 0 16px 16px;
  transition: all 0.3s ease;
}

/* Designs variés pour chaque carte */

/* Carte 1: Design ondulé */
.astro-hub-card-link:nth-child(1) .astro-hub-band {
  border-radius: 0 50px 16px 16px;
}

/* Carte 2: Design avec pointe centrale */
.astro-hub-card-link:nth-child(2) .astro-hub-band {
  border-radius: 0 0 16px 16px;
  position: relative;
}

.astro-hub-card-link:nth-child(2) .astro-hub-band::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-bottom: 15px solid var(--accent-color, #8b5cf6);
}

/* Carte 3: Design en escalier */
.astro-hub-card-link:nth-child(3) .astro-hub-band {
  border-radius: 16px 0 16px 16px;
}

/* Suppression de l'effet courbe qui déborde */

/* Bouton */
.astro-hub-button {
  background: rgba(255, 255, 255, 0.95);
  color: #8b5cf6 !important;
  padding: 12px 28px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  position: relative;
  z-index: 2;
  transition: all 0.25s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  display: inline-block;
}

.astro-hub-button:hover {
  background: #ffffff;
  color: #8b5cf6 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  text-decoration: none !important;
}

/* Footer */
.astro-hub-footer {
  text-align: center;
  margin-top: 20px;
}

.astro-hub-footer p {
  color: var(--contrast, #333333);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.astro-hub-footer a {
  color: var(--accent, #60a5fa);
  text-decoration: underline;
  font-weight: 600;
}

.astro-hub-footer a:hover {
  color: var(--accent-2, #93c5fd);
}

/* Style spécial pour background blanc */
.astro-hub-section.no-overlay .astro-hub-footer p {
  color: #333333;
}

.astro-hub-section.no-overlay .astro-hub-footer a {
  color: #1e73be;
}

.astro-hub-section.no-overlay .astro-hub-footer a:hover {
  color: #0f5a94;
}

/* RESPONSIVE - HAUTEURS FLEXIBLES */
@media (max-width: 1024px) {
  .astro-hub-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  
  .astro-hub-card {
    height: 450px;
  }
  
  .astro-hub-card-content {
    height: 360px;
  }
  
  .astro-hub-card-footer {
    height: 90px;
  }
  
  .astro-hub-band {
    min-height: 70px;
    padding: 16px;
    border-width: 1.5px;
    border-top-width: 2.5px;
    box-shadow: 
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      0 1.5px 6px rgba(0, 0, 0, 0.08);
  }
}

@media (max-width: 768px) {
  .astro-hub-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .astro-hub-section {
    padding: 30px 16px;
    background-attachment: scroll;
    min-height: auto;
  }
  
  .astro-hub-title {
    font-size: 1.75rem;
    margin-bottom: 20px;
  }
  
  .astro-hub-card {
    height: 420px;
  }
  
  .astro-hub-card-content {
    height: 340px;
  }
  
  .astro-hub-card-footer {
    height: 80px;
  }
  
  .astro-hub-band {
    min-height: 60px;
    padding: 14px;
    border-width: 1px;
    border-top-width: 2px;
    box-shadow: 
      inset 0 0.5px 0 rgba(255, 255, 255, 0.1),
      0 1px 4px rgba(0, 0, 0, 0.06);
  }
  
  /* Ajustements responsive pour les designs variés */
  .astro-hub-card-link:nth-child(1) .astro-hub-band {
    border-radius: 0 30px 16px 16px;
  }
  
  .astro-hub-card-link:nth-child(2) .astro-hub-band::before {
    top: -10px;
    border-left-width: 15px;
    border-right-width: 15px;
    border-bottom-width: 10px;
  }
  
  .astro-hub-card-link:nth-child(3) .astro-hub-band {
    border-radius: 12px 0 16px 16px;
  }
}

/* Les cartes gardent leur hauteur fixe définie ci-dessus */