/* ==========================================================================
   La Fabrique by Coco — Responsive
   Breakpoints : 1024px (tablette) / 768px (mobile large) / 480px (mobile)
   ========================================================================== */

/* ---------- TABLETTE — 1024px ---------- */
@media (max-width: 1024px) {
  :root { --header-height: 76px; }

  .container,
  .wide-container {
    width: min(960px, 100% - 48px);
  }

  .split,
  .method-layout,
  .coaching-layout,
  .rdv-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .split-reverse > :first-child { order: 0; }
  .split-reverse > :last-child  { order: 0; }

  .card-grid,
  .testimonials-grid,
  .project-grid,
  .price-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .method-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }

  .gallery figure.large  { grid-row: span 2; }
  .gallery figure.wide   { grid-column: span 2; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 24px;
  }
  .footer-columns h3 {
    margin-bottom: 8px;
    font-size: 10.5px;
  }
  .footer-columns a,
  .footer-columns span {
    font-size: 12.5px;
    margin-bottom: 5px;
  }
  .footer-brand-block img { height: 36px; margin-bottom: 12px; }
  .footer-brand-block p { font-size: 12.5px; margin-bottom: 12px; }
  .instagram-link { padding: 8px 16px; font-size: 12px; }

  .cta-panel {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- MOBILE LARGE — 768px ---------- */
@media (max-width: 768px) {
  :root { --header-height: 68px; }

  body { font-size: 16px; }

  .container,
  .wide-container {
    width: min(720px, 100% - 32px);
  }

  .section { padding: clamp(64px, 12vw, 100px) 0; }

  .title-xl { font-size: clamp(36px, 10vw, 56px); }
  .title-lg { font-size: clamp(28px, 8vw, 42px); }

  /* Nav mobile */
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    transform: translateY(-100%);
    transition: transform 480ms cubic-bezier(0.22, 0.61, 0.36, 1);
    z-index: 90;
  }

  .main-nav.is-open {
    transform: translateY(0);
  }

  .main-nav a {
    font-size: 22px;
    font-family: var(--font-titre);
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  .nav-cta {
    margin-top: 12px;
    font-size: 14px;
    padding: 14px 32px;
  }

  /* Hero */
  .hero {
    min-height: 92vh;
    padding: calc(var(--header-height) + 60px) 0 60px;
  }

  .hero-content { max-width: 100%; padding-left: 22px; }

  .hero-badges {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 32px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
  }

  .hero-badge { font-size: 11px; padding: 6px 14px; }

  /* Grids → 1 col */
  .card-grid,
  .testimonials-grid,
  .project-grid,
  .price-grid,
  .method-steps,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field.is-full { grid-column: 1; }
  .form-submit { justify-content: stretch; }
  .form-submit .btn { width: 100%; }

  /* Gallery → 2 col on tablette / behaviour reset */
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }

  .gallery figure.large  { grid-row: span 1; }
  .gallery figure.wide   { grid-column: span 2; }

  /* Testimonials → horizontal scroll */
  .testimonials-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 8px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .testimonials-grid::-webkit-scrollbar { display: none; }
  .testimonials-grid { scrollbar-width: none; }

  .testimonial-card {
    flex: 0 0 84%;
    scroll-snap-align: start;
  }

  /* Footer */
  .footer-columns {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* CTA panel */
  .cta-panel {
    padding: 40px 28px;
    text-align: left;
  }

  /* Internal nav — fade on scrollable edges */
  .internal-nav {
    position: relative;
  }

  .internal-nav::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 48px;
    background: linear-gradient(90deg, transparent, rgba(246, 243, 238, 0.95));
    pointer-events: none;
  }

  /* Disable tilt + cursor on touch */
  .premium-card,
  .project-card {
    transform-style: flat;
  }
}

/* ---------- MOBILE — 480px ---------- */
@media (max-width: 480px) {
  :root { --header-height: 64px; }

  body { font-size: 15px; }

  .container,
  .wide-container {
    width: 100% - 32px;
    padding-inline: 16px;
    margin-inline: 0;
  }

  .section { padding: 64px 0; }

  .title-xl {
    font-size: clamp(36px, 10vw, 48px);
    line-height: 1.0;
  }

  .title-lg {
    font-size: clamp(28px, 8vw, 38px);
  }

  /* Buttons full width on mobile */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .section-head .btn { width: 100%; justify-content: center; }

  .btn { padding: 14px 26px; }

  /* Hero */
  .hero {
    min-height: 88vh;
  }

  .hero-content {
    padding-left: 18px;
  }

  .hero-content::before { height: 50px; top: 40px; }

  /* Gallery */
  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .gallery figure.large,
  .gallery figure.wide {
    grid-row: auto;
    grid-column: auto;
  }

  /* Coaching panel */
  .coaching-panel { padding: 32px 24px; }
  .rdv-card {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .rdv-card .price-tag { font-size: 22px; }

  /* Form */
  .form-shell { padding: 28px 20px; }
  .contact-aside { padding: 28px 22px; }

  /* FAQ */
  .faq-item summary { padding: 18px 20px; font-size: 16px; }
  .faq-item .faq-body { padding: 0 20px 20px; font-size: 15px; }

  /* CTA panel */
  .cta-panel {
    padding: 36px 24px;
    border-radius: 22px;
  }

  .cta-panel h2 { font-size: 30px; }

  /* Filtres galerie */
  .filtres-galerie {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .filtres-galerie::-webkit-scrollbar { display: none; }
  .filtres-galerie .filtre { flex-shrink: 0; }

  /* Process step */
  .process-step { padding: 24px 20px; }

  /* Story quote */
  .story-quote { padding: 28px 12px; }
}

/* ==========================================================================
   V2 CORRECTIONS — Responsive pour nouveaux composants
   ========================================================================== */

@media (max-width: 1024px) {
  .prestation-grid,
  .temoignages-grid,
  .methode-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* v6.7 : tablette — main au-dessus, stack empilé dessous (le wrapper le gère naturellement) */
  .coaching-grid {
    grid-template-columns: 1fr;
  }
  .coaching-main { min-height: 280px; }

  .cta-panel-open {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .chiffres-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .chiffre-item {
    border-right: none;
    border-bottom: 1px solid rgba(246, 243, 238, 0.08);
    padding: 36px 20px;
  }
  .chiffre-item:last-child { border-bottom: none; }
}

@media (max-width: 768px) {
  /* Internal nav fade visible */
  .internal-nav-wrapper::after { display: block; }

  /* Prestations / témoignages / méthode steps → 1 col */
  .prestation-grid,
  .temoignages-grid,
  .methode-steps-grid {
    grid-template-columns: 1fr;
  }

  /* Témoignages : décalage vertical retiré sur mobile (sinon ça casse le flow) */
  .temoignage-card:nth-child(2) {
    transform: translateY(0);
    border-radius: 20px 4px 20px 4px;
  }
  .temoignage-card:nth-child(2):hover {
    transform: translateY(-4px);
  }

  /* Timeline : ajustement padding */
  .methode-timeline { padding: 0 24px; }
  .timeline-dots    { left: 24px; right: 24px; }

  /* Coaching grid */
  .coaching-grid {
    grid-template-columns: 1fr;
  }
  .coaching-main { min-height: 240px; }

  /* Prestation card : numéro plus petit */
  .prestation-num { font-size: 80px; right: 16px; top: -4px; }

  /* Citation principale : tirets en bas */
  .citation-principale { padding: 0 24px; }
  .citation-principale::before,
  .citation-principale::after { display: none; }

  /* Filigrane actes plus petit */
  .histoire-acte::before { font-size: 90px; }

  /* Avant/après slider hauteur */
  .aa-slider { min-height: 240px; }
}

@media (max-width: 480px) {
  .prestation-card { padding: 32px 24px 24px; }
  .prestation-num  { font-size: 60px; }

  .temoignage-card { padding: 44px 24px 24px; }
  .temoignage-card::before { font-size: 60px; }

  .methode-step { padding: 24px 20px; }
  .methode-step h3 { font-size: 22px; }

  .coaching-main { padding: 28px 24px; }
  .coaching-etape { padding: 24px 20px; }

  .cta-panel-open h2 { font-size: 36px; }

  .chiffre-num { font-size: 56px; }
}

/* ---------- V3 — Formes organiques responsive ---------- */
@media (max-width: 1024px) {
  .pourquoi-visual { grid-template-columns: 1fr; gap: 32px; }
  .pourquoi-visual figure { max-width: 320px; margin: 0 auto; }
}

@media (max-width: 768px) {
  .placo-visual-real { max-width: 100%; }
  .placo-visual-inset { width: 120px; height: 120px; bottom: -12px; right: -12px; }
  .deco-niche { display: none; }
}

/* ---------- TOUCH DEVICES — disable hover-only effects ---------- */
@media (hover: none) {
  .premium-card:hover,
  .project-card:hover {
    transform: none;
  }

  .cursor-dot { display: none; }
}

/* ==========================================================================
   V7 — CORRECTIONS RESPONSIVE MOBILE (intégration WordPress)
   ========================================================================== */

@media (max-width: 768px) {

  /* --- 1. MÉTHODE : cartes droites empilées (fix :nth-of-type vs :nth-child) --- */
  .methode-steps-zigzag {
    height: auto !important;
    display: flex !important;
    flex-direction: column;
    gap: 18px;
  }
  .methode-step-row,
  .methode-step-row:nth-of-type(1),
  .methode-step-row:nth-of-type(2),
  .methode-step-row:nth-of-type(3),
  .methode-step-row:nth-of-type(4) {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .methode-path-svg { display: none !important; }

  /* --- 2. TÉMOIGNAGES : cartes visibles (masques réduits + largeur adaptée) --- */
  .temoignages-outer::before,
  .temoignages-outer::after,
  .section-temoignages .temoignages-outer::before,
  .section-temoignages .temoignages-outer::after {
    width: 28px !important;
  }
  .section-temoignages .temoignage-card {
    width: min(82vw, 330px) !important;
  }
  .temoignages-track {
    gap: 16px;
    padding: 8px 16px;
  }

  /* --- 3. FOOTER : 2 colonnes au lieu de 1 (moins long) --- */
  .footer-columns {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 28px 20px !important;
  }
}

@media (max-width: 400px) {
  /* Sur très petits écrans, on garde 2 colonnes (liens courts) mais resserré */
  .footer-columns {
    gap: 22px 14px !important;
  }
}
