/* ===== CONCEPTS SLIDER — responsive ===== */
@media (max-width: 1100px) {
  .concept-item {
    flex: 0 0 92vw;
  }
  .cs-nav--prev { left: 0; }
  .cs-nav--next { right: 0; }
}

/* ===== TABLET LARGE (1024px and down) ===== */
@media (max-width: 1024px) {
  .why-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .steps-grid::before {
    display: none;
  }

  .concept-main-swiper .swiper-slide {
    grid-template-columns: 1fr;
  }

  .slide-gallery {
    min-height: 350px;
  }

  .gallery-photo {
    min-height: 350px;
  }

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

/* ═══════════════════════════════════════════════════════════════
   MOBILE SWIPER → GRILLE CSS
   Actif quand JS ajoute .swiper-mobile-grid au body
   OU quand Swiper n'est pas disponible (.no-swiper)
   ═══════════════════════════════════════════════════════════════ */

/* Cache nav et thumb quand en mode grille */
.swiper-mobile-grid .concept-swiper-nav,
.swiper-mobile-grid .concept-thumb-nav,
.no-swiper .concept-swiper-nav,
.no-swiper .concept-thumb-nav {
  display: none;
}

/* Les slides deviennent des cartes empilées */
.swiper-mobile-grid .concept-main-swiper,
.no-swiper .concept-main-swiper {
  overflow: visible;
  height: auto !important;
}

/* Annule le layout grid desktop (48%/52%) sur les slides en mode mobile */
.swiper-mobile-grid .concept-main-swiper .swiper-slide,
.no-swiper .concept-main-swiper .swiper-slide {
  display: flex !important;
  grid-template-columns: unset !important;
}

.swiper-mobile-grid .swiper-wrapper,
.no-swiper .swiper-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 0 1.25rem;
  box-sizing: border-box;
  transform: none !important;
  width: 100% !important;
  max-width: 100%;
  flex-wrap: wrap;
}

.swiper-mobile-grid .swiper-slide,
.no-swiper .swiper-slide {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  border-radius: 8px;
  overflow: visible;
  box-shadow: 0 4px 20px rgba(44,44,40,.10);
  display: flex;
  flex-direction: column;
}

.swiper-mobile-grid .slide-gallery,
.no-swiper .slide-gallery {
  flex-shrink: 0;
  min-height: 220px;
  max-height: 320px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.swiper-mobile-grid .slide-gallery-inner,
.no-swiper .slide-gallery-inner {
  height: 100%;
  overflow: hidden;
}

.swiper-mobile-grid .gallery-photo,
.no-swiper .gallery-photo {
  min-height: 0;
  height: 100%;
}

.swiper-mobile-grid .gallery-photo img,
.no-swiper .gallery-photo img {
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.swiper-mobile-grid .slide-info,
.no-swiper .slide-info {
  padding: 1.25rem;
}

.swiper-mobile-grid .slide-steps-mini,
.no-swiper .slide-steps-mini {
  display: none; /* Allège l'affichage sur mobile */
}

/* ===== TABLET (768px and down) ===== */
/* ── Burger button — desktop: hidden ──────────────────────────────── */
.nav-burger {
  display: none;
}
.nav-cta-mobile {
  display: none;
}

@media (max-width: 768px) {
  :root {
    --spacing-lg: 2rem;
    --spacing-xl: 2.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .header-content {
    flex-wrap: wrap;
  }

  /* ── Mobile nav ─────────────────────────────────────────────────── */
  nav {
    flex-wrap: wrap;
    position: relative;
  }

  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    z-index: 101;
  }

  .nav-burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--gris-fonce);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  /* Animate to × when open */
  header.nav-open .nav-burger span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  header.nav-open .nav-burger span:nth-child(2) {
    opacity: 0;
  }
  header.nav-open .nav-burger span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Hide desktop CTA, show mobile CTA inside the dropdown */
  .nav-cta-desktop { display: none !important; }
  .nav-cta-mobile  { display: list-item; }

  /* Dropdown — hidden by default */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: rgba(248, 247, 244, 0.98);
    border-top: 1px solid rgba(44, 44, 40, 0.08);
    padding: var(--space-md) 0 var(--space-lg);
    gap: 0;
  }

  /* Visible when header has .nav-open */
  header.nav-open .nav-links {
    display: flex;
  }

  .nav-links li {
    list-style: none;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem var(--space-lg);
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gris-moyen);
    border-bottom: 1px solid rgba(44, 44, 40, 0.06);
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: var(--tiny-hotel);
    background: rgba(212, 168, 67, 0.05);
  }

  .nav-cta-mobile .cta-button {
    display: block;
    margin: var(--space-md) var(--space-lg) 0;
    text-align: center;
    width: auto;
  }

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

  .hero-image {
    order: -1;
  }

  .concept-item {
    flex: 0 0 94vw;
    grid-template-columns: 1fr;
  }

  .concept-visual {
    min-height: 260px;
  }

  .cs-nav {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

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

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

  .contact-content {
    grid-template-columns: 1fr;
  }

  /* Services mobile — colonne unique, hauteur image réduite */
  .services-content {
    grid-template-columns: 1fr;
  }

  .services-visual {
    min-height: 280px;
  }

  .swiper-container {
    height: 350px;
  }

  .why-grid {
    grid-template-columns: 1fr !important;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

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

  .slide-specs {
    grid-template-columns: 1fr 1fr;
  }

  .slide-info {
    padding: var(--space-lg) var(--space-md);
  }

  .slide-title {
    font-size: 28px;
  }

  .concepts-fallback-grid {
    grid-template-columns: 1fr;
  }

  .concept-swiper-nav {
    gap: var(--space-md);
  }

  .concept-thumb-nav {
    gap: var(--space-xs);
  }

  .radio-group {
    flex-direction: column;
  }
}

/* ===== MOBILE (480px and down) ===== */
@media (max-width: 480px) {
  .swiper-mobile-grid .swiper-wrapper,
  .no-swiper .swiper-wrapper {
    grid-template-columns: 1fr;
  }
  :root {
    font-size: 14px;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }

  .header {
    padding: var(--spacing-sm) 0;
  }

  .logo {
    font-size: 1rem;
  }

  .logo-img {
    width: 40px;
    height: 40px;
  }

  .nav {
    gap: var(--spacing-sm);
  }

  .nav-link {
    font-size: 0.9rem;
  }

  .cta-button {
    padding: 0.5rem 1rem;
  }

  .language-switcher {
    font-size: 0.8rem;
  }

  .hero {
    padding: var(--spacing-md) 0;
  }

  .hero-ctas {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

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

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

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .concepts-preview,
  .devis-page,
  .concepts-page {
    padding: var(--spacing-md) 0;
  }

  .concept-swiper-section {
    padding: 0;
  }

  .contact-page {
    padding: var(--spacing-md) 1.25rem;
  }

  .swiper-container {
    height: 250px;
  }

  .swiper-button-prev,
  .swiper-button-next {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .form {
    max-width: 100%;
  }

  fieldset {
    margin-bottom: var(--spacing-md);
  }

  .checkboxes-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .why-grid {
    grid-template-columns: 1fr !important;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

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

  .slide-specs {
    grid-template-columns: 1fr;
  }

  .steps-mini-list {
    flex-direction: column;
  }
}

/* ===== PRINT ===== */
@media print {
  .header,
  .footer,
  .cta-section,
  .hero-ctas,
  .section-cta {
    display: none;
  }

  body {
    font-size: 12px;
  }
}

#devis-iframe {
  height: 680px;
}

@media (max-width: 768px) {
  #devis-iframe {
    height: 92vh;
  }
}
