/* --- CSS Compact & Carré --- */

/* 1. Le conteneur carré magique */
.square-card-link {
  display: block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  /* Ratio 1:1 garanti */
  aspect-ratio: 1 / 1;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* Respecter le gap de Bootstrap */
  height: 100%;
  width: 100%;
  box-sizing: border-box;
}

.square-card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* 2. L'image qui s'adapte au carré sans déformation */
.square-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* C'est ça qui "coupe" l'image pour qu'elle remplisse le carré */
  transition: transform 0.5s ease;
}

.square-card-link:hover .square-img {
  transform: scale(1.05);
}

/* 3. Le Titre sur l'image (plus lisible, économise de la place) */
.square-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 50%; /* Le dégradé prend la moitié basse */
}

.square-title {
  color: white;
  font-size: 1.1rem; /* Texte pas trop gros */
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
}

/* 4. Hero Section minimaliste */
.hero-compact {
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%); /* Fond gris très léger */
  padding: 2rem 0; /* Beaucoup moins de padding */
  text-align: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}

/* 5. Styles pour les cartes de catégories */
.hover-effect {
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.hover-effect:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
  border-color: #e2e8f0;
}

/* 6. Styles pour les boutons d'âge compacts */
.btn-outline-dark.btn-sm.rounded-pill {
  transition: all 0.2s ease;
}

.btn-outline-dark.btn-sm.rounded-pill:hover {
  background-color: #1f2937;
  color: white;
  border-color: #1f2937;
}

/* 7. Styles responsive pour les cartes carrées */
@media (max-width: 768px) {
  .row-cols-lg-6 > .col {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

@media (max-width: 576px) {
  .row-cols-lg-6 > .col {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* Forcer le gap horizontal sur mobile */
  .row-cols-2 > .col {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* 8. Styles pour les bordures colorées des cartes de catégories */
.border-primary {
  border-left-color: #6366f1 !important;
}
.border-success {
  border-left-color: #10b981 !important;
}
.border-warning {
  border-left-color: #f59e0b !important;
}
.border-info {
  border-left-color: #06b6d4 !important;
}
.border-danger {
  border-left-color: #ef4444 !important;
}
.border-secondary {
  border-left-color: #6b7280 !important;
}

/* 9. Styles pour la section "Découvrez aussi" */
.bg-white.border {
  transition: all 0.2s ease;
  border-color: #e5e7eb !important;
}

.bg-white.border:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #d1d5db !important;
}

/* 10. Responsive pour les icônes de catégories */
@media (max-width: 768px) {
  .col-lg-2 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

@media (max-width: 576px) {
  .col-lg-2 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* 11. Styles pour la nouvelle hero section - Style Astro */
.hero-compact {
  background: white;
  border: 1px solid #f1f5f9;
  border-radius: 2rem !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hero-compact .card {
  transition: all 0.3s ease;
  border: 1px solid #f1f5f9;
  border-radius: 1.5rem !important;
  background: white;
}

.hero-compact .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
  border-color: #e0e7ff;
}

.hero-compact .btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
}

.hero-compact .btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.hero-compact .btn-outline-primary {
  border-color: #e2e8f0;
  color: #475569;
  background: white;
  border-width: 2px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.hero-compact .btn-outline-primary:hover {
  background: white;
  border-color: #e0e7ff;
  color: #6366f1;
  transform: translateY(-2px);
}

/* 12. Styles pour aligner la hauteur de l'image avec les cartes */
.hero-compact .hero-image-container {
  height: auto;
  min-height: 278px;
}

.hero-compact .hero-cards-container {
  height: auto;
}

.hero-compact .row.align-items-center {
  align-items: stretch;
}

.hero-compact .col-md-5 .position-relative {
  height: auto;
  min-height: 278px;
}

.hero-compact .col-md-7 .row {
  height: auto;
}

.hero-compact .col-md-6 .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.hero-compact .col-md-6 .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 13. Responsive pour la hero section */
@media (max-width: 768px) {
  .hero-compact .col-md-5 {
    margin-bottom: 2rem;
  }

  .hero-compact .hero-image-container,
  .hero-compact .col-md-5 .position-relative {
    height: 250px;
  }

  .hero-compact .hero-cards-container,
  .hero-compact .col-md-7 .row {
    height: auto;
  }

  .hero-compact .col-md-6 {
    margin-bottom: 1rem;
    height: auto;
  }
}

@media (max-width: 576px) {
  .hero-compact {
    padding: 2rem 0;
  }

  .hero-compact .card-body {
    padding: 1.5rem;
  }

  .hero-compact .hero-image-container,
  .hero-compact .col-md-5 .position-relative {
    height: 200px;
  }
}

/* 14. Styles pour le modal d'exemple */
#exampleModal .modal-content {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
}

#exampleModal .modal-header {
  background-color: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

#exampleModal .modal-body {
  background-color: #f8fafc;
}

#exampleModal .modal-footer {
  background-color: #f1f5f9;
  border-top: 1px solid #e2e8f0;
}

/* ===== Styles Astro-like avec Bootstrap ===== */

/* Hero image hover effect */
.hero-image:hover {
  transform: rotate(0deg) !important;
}

/* Category cards hover effects */
.category-card {
  transition: all 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.category-card .category-img {
  transition: transform 0.5s ease;
}

.category-card:hover .category-img {
  transform: scale(1.1);
}

/* Service cards hover effects */
.service-card {
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
  border-color: #e0e7ff !important;
}

/* Age buttons hover effects */
.rounded-5 .btn.rounded-pill:hover {
  background-color: white !important;
  color: #4338ca !important;
}

/* Occasion cards hover effects */
.occasion-card {
  transition: all 0.3s ease;
}

.occasion-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
  border-color: #e0e7ff !important;
}

.occasion-card .occasion-icon {
  transition: transform 0.3s ease;
}

.occasion-card:hover .occasion-icon {
  transform: scale(1.1);
}

.occasion-card:hover .fw-bold {
  color: #6366f1 !important;
}

/* Primary button styles */
.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  color: white;
}

/* Font weight utilities */
.fw-black {
  font-weight: 900 !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

/* Rounded utilities for larger values */
.rounded-4 {
  border-radius: 1rem !important;
}

.rounded-5 {
  border-radius: 2rem !important;
}
