/* ==============================================
   HERO SOCIAI - Mobile Typo and Layout Optimizations
   ============================================== */

/* Base smoothing for better readability */
.hero-sociai {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tablet adjustments */
@media (max-width: 1024px) {
  .hero-sociai .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Mobile - Optimized */
@media (max-width: 768px) {
  .hero-sociai {
    min-height: auto;
    padding-top: 70px !important; /* ensure below fixed header */
    padding-bottom: 24px;
  }

  .hero-sociai .grid {
    gap: 2rem !important;
    text-align: center;
  }

  /* Reduce vertical gaps created by utility classes */
  .hero-sociai .space-y-8 > * + * {
    margin-top: 1rem;
  }

  /* Promo badge line */
  .hero-sociai .hero-promo {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #1f2937; /* stronger contrast on mobile */
  }
  .hero-sociai .hero-promo span:first-child {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
  }

  /* Title */
  .hero-sociai h1 {
    font-size: clamp(1.875rem, 8.5vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #111827;
  }
  .hero-sociai h1 svg {
    width: 56px;
    height: 24px;
  }

  /* Paragraphs */
  .hero-sociai p {
    font-size: 1rem;
    line-height: 1.6;
    color: #374151 !important; /* improve contrast */
    max-width: 92%;
    margin-left: auto;
    margin-right: auto;
  }

  /* Buttons */
  .hero-sociai .hero-buttons-sociai {
    flex-direction: column;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.75rem;
    justify-content: center;
    padding: 0 0.75rem;
    max-width: 680px;
    margin: 0 auto;
  }
  /* Neutraliser le décalage horizontal de space-x-4 quand en colonne */
  .hero-sociai .hero-buttons-sociai > :not([hidden]) ~ :not([hidden]) {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .hero-sociai .hero-buttons-sociai > a,
  .hero-sociai .hero-buttons-sociai > button {
    width: 100%;
    max-width: 320px;
    min-height: 52px;
    font-weight: 600;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1.2; /* uniform text box height */
    letter-spacing: 0.01em;
    border-width: 1.5px; /* uniform border thickness for both */
    border-style: solid;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important; /* uniform shadow */
  }
  .hero-sociai .hero-buttons-sociai > a .w-6,
  .hero-sociai .hero-buttons-sociai > a .h-6,
  .hero-sociai .hero-buttons-sociai > button .w-6,
  .hero-sociai .hero-buttons-sociai > button .h-6 {
    width: 1.25rem !important;
    height: 1.25rem !important;
  }
  .hero-sociai .hero-buttons-sociai > a i,
  .hero-sociai .hero-buttons-sociai > button i {
    width: 1rem !important;
    height: 1rem !important;
  }
  .hero-sociai .hero-buttons-sociai > a:focus,
  .hero-sociai .hero-buttons-sociai > button:focus {
    outline: 2px solid rgba(99, 102, 241, 0.5);
    outline-offset: 2px;
  }
  .hero-sociai .hero-buttons-sociai > a:first-child,
  .hero-sociai .hero-buttons-sociai > button:first-child {
    border-color: transparent; /* keep visual style but same sizing */
  }
  .hero-sociai .hero-buttons-sociai > a:last-child,
  .hero-sociai .hero-buttons-sociai > button:last-child {
    border-width: 1.5px;
    background-color: #ffffff;
    border-color: #d1d5db; /* ensure consistent visual border */
  }

  /* Touch optimizations */
  .hero-sociai button {
    -webkit-tap-highlight-color: transparent;
  }
  .hero-sociai button:active {
    transform: translateY(1px) scale(0.98);
    transition: transform 0.08s ease-out;
  }

  /* Lighter shadow to reduce paint cost */
  .hero-sociai .shadow-lg {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .hero-sociai {
    padding-top: 64px !important;
  }
  .hero-sociai .hero-promo {
    font-size: 0.85rem;
  }
  .hero-sociai h1 {
    font-size: clamp(1.75rem, 9.5vw, 2.25rem);
    line-height: 1.12;
  }
  .hero-sociai p {
    font-size: 0.95rem;
    max-width: 95%;
  }
  .hero-sociai .hero-buttons-sociai {
    padding: 0 1rem;
    max-width: 560px;
    margin: 0 auto;
    gap: 0.75rem;
  }
  .hero-sociai .hero-buttons-sociai > a,
  .hero-sociai .hero-buttons-sociai > button {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: 9999px;
  }
}