/* =======================================================================
   mobile-app.css — Expérience "application mobile" pour Azazgaphone
   -----------------------------------------------------------------------
   Chargé APRÈS style.css et custom.css.
   Cible uniquement les téléphones / tablettes (<= 1199px).
   Le bureau (>= 1200px) reste volontairement inchangé.
   ======================================================================= */

/* =======================================================================
   1. BARRE D'ONGLETS BASSE (style application) — masquée sur bureau
   ======================================================================= */
.app-tabbar { display: none; }

@media (max-width: 1199px) {

  /* Évite le défilement horizontal parasite qui donne l'effet "zoomé" */
  html, body { overflow-x: hidden; }

  /* Laisse la place à la barre d'onglets fixe en bas */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }

  .app-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background-color: var(--white);
    border-top: 1px solid var(--cultured-2);
    box-shadow: 0 -4px 20px var(--black_10);
    z-index: 90;
  }

  .app-tab {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 1rem;
    font-weight: var(--fw-600);
    color: var(--gray-web);
    text-align: center;
    position: relative;
    transition: color var(--transition-1);
    -webkit-tap-highlight-color: transparent;
  }

  .app-tab ion-icon {
    font-size: 23px;
    --ionicon-stroke-width: 34px;
  }

  .app-tab.active,
  .app-tab:active { color: var(--hoockers-green); }

  .app-tab-badge {
    position: absolute;
    top: 6px;
    left: 50%;
    margin-left: 6px;
    background-color: var(--hoockers-green);
    color: var(--white);
    font-size: 9px;
    font-weight: var(--fw-700);
    line-height: 1;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Le bouton "retour en haut" doit passer au-dessus de la barre */
  .back-top-btn {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    right: 16px;
  }
}


/* =======================================================================
   2. RÉDUCTION DES TAILLES "zoomées" sur petits écrans
   ======================================================================= */
@media (max-width: 575px) {
  :root {
    --fs-1: 3.2rem;   /* titres hero */
    --fs-2: 2.8rem;   /* grands titres de section */
    --fs-3: 2.4rem;
    --fs-4: 2rem;
    --section-padding: 28px;
  }
}


/* =======================================================================
   3. EN-TÊTE + HERO plus compacts sur mobile
   ======================================================================= */
@media (max-width: 768px) {

  .hero-card {
    padding: 54px 22px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero-text {
    font-size: var(--fs-7);
    margin-block: 12px 22px;
  }

  .hero .price {
    font-size: var(--fs-6);
    margin-block-end: 16px;
  }

  /* Collections : cartes plus courtes et lisibles */
  .collection-card {
    min-height: 220px;
    padding: 26px 24px;
  }
  .collection-card .card-text { font-size: var(--fs-7); }

  /* Bannières services : plus courtes */
  .banner-card { min-height: 280px; padding: 26px; }
  .banner-card .card-subtitle { font-size: var(--fs-7); }

  /* Titres de boutique : moins d'espace gâché */
  .shop .title-wrapper { margin-block-end: 26px; }

  .feature .section-title,
  .blog .section-title { margin-block-end: 26px; }
}


/* =======================================================================
   4. CARROUSELS PRODUITS "glissables" (peek de la carte suivante)
   ======================================================================= */
@media (max-width: 574px) {
  /* On laisse dépasser ~40% de la carte suivante pour inviter au swipe.
     Le hero garde ses diapositives pleine largeur (.hero .scrollbar-item). */
  .shop .has-scrollbar .scrollbar-item { min-width: 62%; }

  .has-scrollbar {
    gap: 14px;
    scroll-padding-inline: 15px;
    /* défilement plus naturel facon application */
    -webkit-overflow-scrolling: touch;
  }

  /* La carte produit reste cliquable et bien proportionnée */
  .shop-card .card-content { padding-block: 14px; }

  /* Sur mobile, le bouton "ajouter au panier" est toujours visible */
  .shop-card .card-actions {
    opacity: 1;
    transform: translate(-12px, -50%);
    top: auto;
    bottom: 12px;
    right: 0;
    transform: translateX(-12px);
  }
}


/* =======================================================================
   5. FENÊTRE PRODUIT (modale) en "feuille" sur mobile
   ======================================================================= */
@media (max-width: 600px) {
  .product-modal-wrapper { align-items: flex-end; }

  .product-modal-content {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
    transform: translateY(40px);
  }
  .product-modal-wrapper.active .product-modal-content {
    transform: translateY(0);
  }

  .product-modal-body { padding: 22px; gap: 18px; }
  .product-modal-image { max-height: 280px; }
  .popup-title { font-size: var(--fs-5); }
}


/* =======================================================================
   6. SECTION INSTAGRAM
   ======================================================================= */
.instagram-section .ig-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-block-end: 28px;
}

.instagram-section .section-title { margin-block-end: 0; }

.ig-handle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: var(--fw-700);
  color: var(--hoockers-green);
  font-size: var(--fs-7);
}

.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.ig-item { width: 100%; }

.ig-link {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-3);
  overflow: hidden;
  /* Dégradé Instagram visible quand il n'y a pas (encore) d'image */
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.ig-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-2);
}

.ig-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 30px;
  background-color: var(--black_15);
  opacity: 0;
  transition: opacity var(--transition-1);
}

/* Pas d'image -> on montre toujours l'icône sur le dégradé */
.ig-link--empty .ig-overlay { opacity: 1; background-color: transparent; }

.ig-link:is(:hover, :focus-within) .ig-overlay { opacity: 1; }
.ig-link:is(:hover, :focus-within) .ig-img { transform: scale(1.08); }

.ig-follow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-inline: auto;
  margin-block-start: 30px;
}
.ig-follow ion-icon { font-size: 20px; }

@media (min-width: 768px) {
  .ig-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
  }
}


/* =======================================================================
   7. PANIER — boutons d'action (mail / appel)
   ======================================================================= */
.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-block-start: 26px;
}

.cart-actions .btn {
  width: 100%;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px;
  text-align: center;
  font-size: var(--fs-7);
}

.cart-actions .btn ion-icon { font-size: 20px; }
