/**
 Theme Name: Astra Child
 Author: Brainstorm Force
 Author URI: https://wpastra.com/about/
 Description: Child theme for Astra. Custom HERO for StreamlineGoals.
 Version: 1.0.0
 License: GNU GPL v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: astra-child
 Template: astra
*/

/* ========== Base safe-guards ========== */
body.home { background:#fff; }
#primary, #main { margin:0; padding:0; }

/* ========== HERO — StreamlineGoals (full-width par défaut) ========== */
.sg-hero{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 40px 22px;

  /* plein écran malgré le container Astra */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  border-radius: 0;

  text-align: center;
  color: #fff;
  background: url('https://streamlinegoals.com/wp-content/uploads/2025/09/Fonds-hero-2.jpeg') center/cover no-repeat;
}

.sg-hero__bg{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.60); /* + dense pour plus de contraste */
}

.sg-hero__inner{
  position: relative;
  z-index: 1;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  margin: 0 auto;
  text-align: center;
}

.sg-hero h1{
  font-size: clamp(34px, 5vw, 56px);
  margin: 0 0 14px;
  line-height: 1.1;
  letter-spacing: .2px;
  color:#fff;                 /* H1 bien blanc */
  text-shadow: 0 4px 14px rgba(0,0,0,.35);
}

.sg-hero p{
  margin: 0 0 20px;
  font-size: 1.2rem;
  opacity: .95;
  color:#fff;
}

.sg-hero__cta{
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.sg-btn{
  display: inline-block;
  padding: 12px 22px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: background .25s ease, transform .2s ease, box-shadow .2s ease;
}
.sg-btn:hover{ transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.sg-btn--primary{ background:#6b5bff; color:#fff; }
.sg-btn--primary:hover{ background:#5748d0; }
.sg-btn--ghost{ background:transparent; border:1px solid #6b5bff; color:#fff; box-shadow: inset 0 0 0 1px rgba(107,91,255,.25); }

/* ================= VARIANTE “BOXED” =================
   Ajoute la classe .sg-hero--boxed sur le <section> pour ce rendu :
   image arrondie + ombre + panneau sombre central */
.sg-hero.sg-hero--boxed{
  /* annule le full-width et centre mathématiquement */
  width: min(1200px, 92vw);
  max-width: 1200px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 48px 0 36px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.30);
}

/* air intérieur */
.sg-hero.sg-hero--boxed .sg-hero__inner{
  min-height: 120px;
  padding: 60px 32px;
}

/* panneau “verre” SANS flou (fond net) */
.sg-hero__panel{
  max-width: 860px;
  padding: 32px 36px;
  margin: 0 auto;
  text-align: center;

  background: rgba(10,13,22,.52);          /* verre sombre, pas de blur */
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}

/* Titre très lisible */
.sg-hero.sg-hero--boxed .sg-hero__panel h1{
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: .02em;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 0 12px;
  color:#fff !important;
  opacity:1 !important;
  text-shadow: 0 4px 14px rgba(0,0,0,.35);
}

/* Sous-texte lisible */
.sg-hero.sg-hero--boxed .sg-hero__panel p{
  color: rgba(255,255,255,.95);
  font-size: clamp(16px, 2.2vw, 18px);
  margin-bottom: 20px;
}

/* ================== Responsive ================== */
@media (max-width:1024px){
  .sg-hero, .sg-hero__inner { min-height: 960px; }
}
@media (max-width:640px){
  .sg-hero{ min-height: 420px; padding: 28px 18px; }
  .sg-hero__inner{ max-width: 95%; min-height: 420px; }

  .sg-hero.sg-hero--boxed{
    width: min(96vw, 1200px);
    margin: 32px auto 28px;
    left: 50%;
    transform: translateX(-50%);
  }
  .sg-hero.sg-hero--boxed .sg-hero__inner{ padding: 36px 18px; }
  .sg-hero__panel{ max-width: 95%; padding: 22px 18px; }
}

/* Option : plein écran vertical
   .sg-hero, .sg-hero__inner{ min-height: 100vh; }
*/


/* ===== Category grid (clean + centered) ===== */
.sg-cats{
  padding:48px 0 16px;
}
.sg-cats__wrap{
  max-width:1200px;
  margin:0 auto;
  padding:0 22px;
}
.sg-cats__title{
  text-align:center;
  font-size:clamp(22px,3vw,28px);
  text-transform:lowercase;
  margin:0 0 24px;
}

/* largeur de carte configurable */
:root { --sg-card: 360px; }

/* Grille centrée — FLEXBOX pour centrer la DERNIÈRE rangée */
.sg-cats__grid{
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  justify-content:center;   /* centre chaque ligne */
  align-items:stretch;
}

/* Carte */
.sg-cat{
  flex: 0 1 var(--sg-card); /* largeur cible */
  max-width:var(--sg-card);
  width:100%;
  display:block;
  text-decoration:none;
  color:inherit;
  background:#fff;
  border:1px solid #e9ecf1;
  border-radius:18px;
  overflow:hidden;
  transition:transform .15s ease, box-shadow .15s ease;
}
.sg-cat:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 22px rgba(0,0,0,.08);
}

/* Media responsive avec ratio fixe */
.sg-cat__img{
  display:block;
  position:relative;
  aspect-ratio:16/10;
  background:#f4f6ff;
}
.sg-cat__img img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Libellé centré */
.sg-cat__label{
  display:block;
  padding:12px 14px;
  font-size:16px;
  text-transform:lowercase;
  text-align:center;
  font-weight:600;
}

/* Mobile : 1 colonne, toujours centré */
@media (max-width:760px){
  .sg-cat{
    flex-basis: min(var(--sg-card), 100%);
  }
}
