/* E.T.D Projects - etd-projects.fr - contact@etd-projects.fr */

/* ============ <= 1200px ============ */
@media (max-width: 1200px) {
  :root { --gutter: 28px; }
  .lineart-wrap { width: clamp(280px, 34vw, 430px); top: 52px; }
  .products__grid { grid-template-columns: repeat(3, 1fr); gap: 26px; }
  .footer__top { grid-template-columns: 1.3fr 1fr 1fr 1.4fr; }
  .footer__col--maison { display: none; }
}

/* ============ <= 1000px (tablette paysage) ============ */
@media (max-width: 1000px) {
  .topbar__promo span:last-of-type,
  .topbar__promo { font-size: 10px; letter-spacing: 0.12em; }
  .hero__inner { min-height: 460px; padding-bottom: 76px; }
  .hero__col { width: min(54%, 460px); }
  .hero__photo { left: 46%; max-height: 430px; }
  .lineart-wrap { width: clamp(240px, 30vw, 360px); opacity: 0.9; top: 46px; }
  .hero__intro { max-width: 300px; }
  .showcase__inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .showcase__space { display: none; }

  .creations { grid-template-columns: 1fr; }
  .creations__img { min-height: 300px; }
  .creations__center { padding: 52px 32px; }

  .assurance__grid { grid-template-columns: 1fr; }
  .guide { justify-content: center; }

  .cart-wrap, .checkout-wrap { grid-template-columns: 1fr; gap: 36px; }
  .summary { position: static; }
}

/* ============ <= 760px (tablette portrait) ============ */
@media (max-width: 760px) {
  .topbar__inner { min-height: 54px; }
  /* Liens d'ancre caches sur mobile : la burger ouvre le menu overlay */
  .topbar__nav-left { display: none; }
  .burger {
    display: inline-flex;
    align-items: center; justify-content: center;
    color: #f3efec;
    width: 30px; height: 30px;
    order: -1;
  }
  .burger svg { width: 24px; height: 24px; }
  /* Langue masquee sur mobile pour eviter le tassement */
  .topbar__right .lang { display: none; }

  .hero__inner { padding: 24px 0 30px; }
  .hero__col { width: 100%; }
  .hero__brand .wm { width: min(280px, 72%); }
  .hero__photo {
    position: relative;
    left: auto; bottom: auto;
    height: auto;
    width: 72%;
    max-width: 320px;
    max-height: none;
    margin: 8px auto 0;
    z-index: 3;
  }
  .hero__deep { height: 78px; }
  .lineart-wrap { display: none; }
  .hero__intro { max-width: 100%; margin-top: 22px; }
  .showcase__inner { grid-template-columns: 1fr 1fr; gap: 18px; padding: 30px 0 40px; }

  .assurance__features { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(2) { border-right: 0; }
  .feature { border-bottom: 1px solid var(--line-soft); padding-bottom: 22px; }
  .feature:nth-last-child(-n+2) { border-bottom: 0; }

  .products__grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .product-card__add { opacity: 1; transform: none; }

  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .footer__brand { grid-column: 1 / -1; }
  .footer__news { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ============ <= 460px (mobile) ============ */
@media (max-width: 460px) {
  :root { --gutter: 18px; }
  .showcase__inner { grid-template-columns: 1fr; gap: 22px; }
  .showcase__rings { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .showcase__rings img { width: 40%; }
  .products__grid { grid-template-columns: 1fr 1fr; }
  .cart-line { grid-template-columns: 70px 1fr; grid-template-areas: "media name" "media qty" "total total"; row-gap: 10px; }
  .cart-line__media { grid-area: media; width: 70px; height: 70px; }
  .cart-line__total { text-align: left; }
  .field-row { grid-template-columns: 1fr; }
  .footer__legal { flex-wrap: wrap; gap: 14px; }
}

/* ============ menu mobile overlay ============ */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: var(--ink);
  color: #fff;
  padding: 80px 32px 32px;
  display: none;
  flex-direction: column;
  gap: 6px;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.04em;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-menu__close {
  position: absolute; top: 22px; right: 26px;
  color: #fff; font-size: 30px; line-height: 1;
}

/* ============ <= 950px : declinaison mobile du hero et de la galerie ============
   Les placements desktop du hero et de la galerie sont figes en styles inline (editeur
   ?hero, valeurs a ne pas toucher). Sous 950px on les neutralise (!important, seule voie
   plus forte que l'inline) et on deroule une composition empilee : wordmark centre,
   accroche + CTA, photo posee sur la bande rose. Demande Emmanuel 2026-07-24. */
@media (max-width: 950px) {
  .hero[style] { height: auto !important; overflow: hidden !important; }
  .hero__stage[style] {
    position: static !important;
    height: auto !important;
    transform: none !important;
    display: flex; flex-direction: column;
  }
  .hero__inner { order: 1; display: block; min-height: 0 !important; padding: 26px 0 0; width: 100%; }
  .hero__col { width: 100% !important; text-align: center; }
  .hero__brand { align-items: center; }
  .hero__brand .wm { width: min(300px, 78vw) !important; height: auto !important; transform: none !important; margin: 0 auto; }
  .hero__intro { max-width: 100% !important; margin: 16px auto 0; padding: 0 var(--gutter); }
  .hero__intro h2[style], .hero__intro .sep-diamond[style], .hero__intro p[style], .hero__intro .btn[style] { transform: none !important; }
  .hero__intro p { margin-left: auto; margin-right: auto; }
  .hero__intro .sep-diamond { display: flex; justify-content: center; }
  .hero__photo { order: 2; position: static !important; width: min(76vw, 340px) !important; height: auto !important; margin: 4px auto 0; display: block; }
  .hero-rose-bar[style] { display: none !important; }
  .lineart-wrap { display: none; }
  .hero__deep { height: 96px; }

  /* Galerie : plus de composition libre, un empilement simple portrait puis bagues */
  .showcase[style] { height: auto !important; overflow: hidden !important; }
  .showcase__inner { grid-template-columns: 1fr !important; gap: 20px; padding: 34px 0 40px; }
  .showcase__portrait img { transform: none !important; height: auto !important; width: 100% !important; max-width: 420px !important; margin: 0 auto; display: block; }
  .showcase__rings { flex-direction: row !important; flex-wrap: wrap; justify-content: center; gap: 10px; }
  .showcase__rings img { transform: none !important; width: 40% !important; height: auto !important; }
  .showcase__space { display: none; }

  /* Produits : la hauteur figee desktop coupait la fin de la grille en colonnes mobiles */
  .products[style] { height: auto !important; overflow: visible !important; margin-top: 40px !important; }
  /* Le bouton d'ajout (revele au survol en desktop) ne doit plus recouvrir le bijou :
     il sort du carre rose et se pose dessous, toujours visible. */
  .product-card__media { aspect-ratio: auto; flex-direction: column; gap: 12px; padding: 18px 10px 12px; }
  .product-card__media img { max-width: 100%; max-height: 130px; }
  .product-card__add { position: static; opacity: 1; transform: none; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Footer bas en mobile/petite tablette : GRID fiable. Ligne 1 = liens legaux (centres, pleine
   largeur). Ligne 2 = copyright (gauche) / FR EUR (centre) / pastille (droite), sur UNE ligne. */
@media (max-width: 760px) {
  .footer__bottom {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "legal legal legal"
      "copy  currency pastille";
    align-items: center;
    gap: 10px 10px;
    justify-content: stretch;
  }
  .footer__legal { grid-area: legal; justify-content: center; flex-wrap: wrap; gap: 10px 16px; }
  .footer__bottom .etd-copy { grid-area: copy; justify-self: start; font-size: 11px; }
  .footer__bottom .footer__currency { grid-area: currency; justify-self: center; font-size: 11px; }
  .footer__bottom .pastille-demo { grid-area: pastille; justify-self: end; margin-left: 0; }
}
/* tres petits ecrans : on retrecit un poil pour tout garder sur la ligne */
@media (max-width: 440px) {
  .footer__bottom { gap: 8px 6px; }
  .footer__bottom .etd-copy, .footer__bottom .footer__currency { font-size: 10px; }
  .footer__bottom .pastille-demo { transform: scale(0.86); transform-origin: right center; }
}
