/* ============================================
   BlueWeb Création — responsive.css
   Corrections overflow + drawer mobile
   ============================================ */

/* ====== Grand écran (1440px+) ====== */
@media (min-width: 1440px) {
  :root { --container: 1320px; }
}

/* ====== Ordinateur (1024px → 1439px) ====== */
@media (max-width: 1199px) {
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer__col--brand { grid-column: 1 / -1; }
}

@media (max-width: 1023px) {
  .hero__inner { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
  .hero__content { max-width: 640px; margin-inline: auto; }
  .hero__cta,
  .hero__stats { justify-content: center; }
  .hero__sub { margin-inline: auto; }
  .hero__visual { order: -1; }
  .mock { transform: none; }

  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--2 { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { max-width: 320px; margin-inline: auto; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* ============================================
   ⭐ TABLETTE + MOBILE (≤ 900px)
   Navigation en drawer fixe + accordéons
   ============================================ */
@media (max-width: 900px) {

  /* ⭐⭐⭐ CRUCIAL : enlève le backdrop-filter qui casse le fixed */
  .header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--surface) !important;
    width: 100%;
    max-width: 100vw;
  }

  /* ⭐ Drawer latéral robuste */
  .nav {
    position: fixed !important;
    top: 0;
    right: 0;
    left: auto;
    width: min(340px, 88vw) !important;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--surface);
    box-shadow: -10px 0 40px rgba(0,0,0,.18);
    padding: 5rem 1.5rem 2rem;
    transform: translate3d(100%, 0, 0);
    transition: transform .3s cubic-bezier(.4,0,.2,1), visibility .3s;
    z-index: 95;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    will-change: transform;
    backface-visibility: hidden;
    visibility: hidden;
    pointer-events: none;
  }
  .nav.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  /* Liste principale */
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: .15rem;
    width: 100%;
  }
  .nav__list > li { width: 100%; }

  .nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: .9rem 1rem;
    font-size: 1rem;
    border-radius: 10px;
    text-align: left;
  }
  .nav__link.is-active::after { display: none; }
  .nav__link.is-active { background: color-mix(in srgb, var(--blue) 12%, transparent); }

  /* Toggle dropdown */
  .nav__link--toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: .9rem 1rem;
    font-size: 1rem;
    text-align: left;
    color: var(--text-soft);
    border-radius: 10px;
  }
  .nav__link--toggle:hover {
    background: color-mix(in srgb, var(--blue) 8%, transparent);
    color: var(--blue);
  }
  .nav__chevron {
    flex-shrink: 0;
    transition: transform .25s ease;
  }
  .nav__item--has-menu.is-open .nav__chevron {
    transform: rotate(180deg);
  }

  /* Dropdown → accordéon */
  .nav__dropdown {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    min-width: 0 !important;
    width: 100%;
    padding: 0 0 0 .75rem;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s cubic-bezier(.4,0,.2,1);
  }
  .nav__dropdown::before { display: none !important; }
  .nav__item--has-menu.is-open .nav__dropdown { max-height: 500px; }

  .nav__drop-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem .85rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--blue) 5%, transparent);
    margin-bottom: .3rem;
  }
  .nav__drop-link small { display: none; }
  .nav__drop-link strong { font-size: .95rem; }
  .nav__drop-icon { font-size: 1.1rem; }

  /* Section mobile extra */
  .nav__mobile-extra {
    display: flex !important;
    flex-direction: column;
    gap: .75rem;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
  }
  .nav__mobile-link {
    padding: .85rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
    color: var(--text-soft);
  }
  .nav__mobile-extra .lang {
    display: flex;
    gap: .5rem;
  }
  .nav__mobile-extra .lang__btn {
    padding: .55rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 600;
  }
  .nav__mobile-extra .lang__btn.is-active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
  }

  /* Header mobile */
  .lang--desktop,
  .header__cta { display: none !important; }
  .burger { display: flex !important; }

  .trust { flex-direction: column; text-align: center; }
  .trust .btn { width: 100%; }
}

/* ============================================
   MOBILE (≤ 767px)
   ============================================ */
@media (max-width: 767px) {
  :root { --header-h: 64px; }

  .container { width: calc(100% - 1.75rem); }

  /* Header compact */
  .header__inner { gap: .65rem; }
  .logo__text small { display: none; }
  .logo__mark { width: 36px; height: 36px; font-size: 1rem; }
  .logo__text strong { font-size: 1rem; }
  .header__actions { gap: .4rem; }
  .theme-toggle { width: 38px; height: 38px; font-size: 1rem; }
  .burger { width: 38px; height: 38px; }

  /* Sections */
  .section { padding: 2.75rem 0; }
  .section__title { font-size: 1.55rem; }
  .section__sub { font-size: .95rem; }

  /* Grilles en 1 colonne */
  .grid--4,
  .grid--3,
  .grid--2 { grid-template-columns: 1fr; }

  /* Hero */
  .hero { padding: 2.5rem 0 3rem; }
  .hero__title { font-size: 1.85rem; }
  .hero__sub { font-size: .95rem; }
  .hero__cta { flex-direction: column; align-items: stretch; gap: .6rem; }
  .hero__cta .btn { width: 100%; }
  .hero__stats { flex-wrap: wrap; gap: 1rem 1.5rem; }
  .hero__stats li { flex: 1 1 40%; min-width: 0; }
  .hero__stats strong { font-size: 1.25rem; }
  .hero__stats span { font-size: .75rem; }

  .float-card { display: none; }
  .hero__visual .mock { animation: none; }

  /* Étapes */
  .steps { grid-template-columns: 1fr; gap: 1rem; }
  .step { padding: 1.25rem; }
  .step__num { width: 56px; height: 56px; font-size: 1rem; }

  /* Packs */
  .pack__actions { flex-direction: column; gap: .5rem; }
  .pack__actions .btn { width: 100%; }

  /* Projets */
  .project__actions { flex-direction: column; gap: .5rem; }
  .project__actions .btn { width: 100%; }

  /* Formules */
  .pricing .price-card--featured { transform: none; }
  .pricing .price-card--featured:hover { transform: translateY(-5px); }

  /* Formulaire de contact */
  .contact-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .contact-info { order: 2; }
  .contact-form-wrap { order: 1; padding: 1.5rem 1.25rem; }

  .form-row { grid-template-columns: 1fr; gap: .9rem; }
  .form-group label { font-size: .85rem; }
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;    /* ⭐ pas de zoom iOS */
    padding: .8rem .95rem;
  }

  .contact-card { padding: 1rem; }
  .contact-card__icon { width: 40px; height: 40px; font-size: 1.05rem; }
  .contact-card h4 { font-size: .9rem; }
  .contact-card a,
  .contact-card p { font-size: .82rem; }

  /* Trust */
  .trust { padding: 1.5rem; }
  .trust__logo { width: 64px; height: 64px; font-size: 1.75rem; }

  /* CTA band */
  .cta-band__actions { flex-direction: column; align-items: stretch; gap: .6rem; }
  .cta-band__actions .btn { width: 100%; }

  /* Page hero */
  .page-hero { padding: 2rem 0 1.5rem; }
  .page-hero h1 { font-size: 1.7rem; }
  .page-hero p { font-size: .95rem; }

  /* Footer */
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
  .footer__col--brand { grid-column: 1 / -1; }
  .footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: .35rem;
  }

  /* FABs */
  .whatsapp-fab { width: 50px; height: 50px; bottom: 1rem; right: 1rem; }
  .to-top { bottom: 1rem; left: 1rem; width: 42px; height: 42px; }
}

/* ============================================
   TRÈS PETITS ÉCRANS (≤ 400px)
   ============================================ */
@media (max-width: 400px) {
  .container { width: calc(100% - 1.25rem); }
  .hero__title { font-size: 1.6rem; }
  .footer__grid { grid-template-columns: 1fr; }
  .burger { width: 36px; height: 36px; }
  .theme-toggle { width: 36px; height: 36px; }
  .pack__actions { flex-direction: column; }
  .pack__actions .btn { width: 100%; }
  .project__actions { flex-direction: column; }
}