/* ============================================
   FANNY CONUS – Design Mobile Premium
   Mobile-first : dynamique, ludique, élégant
   ============================================ */

/* ====== VARIABLES MOBILE ====== */
:root {
  --radius-mobile: 20px;
  --section-gap: 64px;
}

/* ====== RESET MOBILE ====== */
@media (max-width: 768px) {
  body { overflow-x: hidden; }

  /* ====== NAVBAR MOBILE ====== */
  #navbar { padding: 14px 0; }
  #navbar.scrolled { padding: 10px 0; }
  .nav-container { padding: 0 20px; }
  .nav-logo .logo-text { font-size: 1.3rem; }
  .nav-links { display: none !important; }

  /* Hamburger redesigné */
  .hamburger {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
  }
  .hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }
  #navbar.scrolled .hamburger span { background: var(--turquoise-dark); }
  .hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); background: white; }
  .hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background: white; }

  /* ====== MENU FULLSCREEN ====== */
  #mobile-menu {
    position: fixed;
    inset: 0;
    background: linear-gradient(160deg, #004a56 0%, #007a8a 50%, #00b4c8 100%);
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
  }
  #mobile-menu.open {
    transform: translateX(0);
    visibility: visible;
  }
  #mobile-menu .close-btn {
    position: absolute;
    top: 20px; right: 24px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 44px; height: 44px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
  }
  #mobile-menu .close-btn:hover { background: rgba(255,255,255,0.25); }
  #mobile-menu nav a {
    display: block;
    text-align: center;
    padding: 18px 40px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.4s, transform 0.4s, color 0.2s;
  }
  #mobile-menu.open nav a { opacity: 1; transform: translateY(0); }
  #mobile-menu.open nav a:nth-child(1) { transition-delay: 0.08s; }
  #mobile-menu.open nav a:nth-child(2) { transition-delay: 0.14s; }
  #mobile-menu.open nav a:nth-child(3) { transition-delay: 0.20s; }
  #mobile-menu.open nav a:nth-child(4) { transition-delay: 0.26s; }
  #mobile-menu.open nav a:nth-child(5) { transition-delay: 0.32s; }
  #mobile-menu.open nav a:nth-child(6) { transition-delay: 0.38s; }
  #mobile-menu nav a:hover { color: white; }
  #mobile-menu .menu-cta {
    margin-top: 30px;
    background: white;
    color: var(--turquoise-dark) !important;
    padding: 14px 40px !important;
    border-radius: 30px;
    font-size: 1rem !important;
    font-family: 'Raleway', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
  }
  #mobile-menu .menu-footer {
    position: absolute;
    bottom: 30px;
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
  }

  /* ====== HERO MOBILE ====== */
  #hero {
    min-height: 100svh;
    background: #004a56 !important;
    display: flex;
    align-items: flex-end;
    padding-bottom: 0;
  }
  /* Ken Burns plus doux sur mobile */
  .hslide { animation-duration: 10s !important; }
  /* Label en bas à gauche sur mobile */
  #hero-slide-label {
    right: 16px !important;
    bottom: 110px !important;
    font-size: 0.65rem !important;
  }
  #hslide-name { font-size: 0.78rem !important; }
  /* Dots plus proches du bas */
  #hero-dots { bottom: 88px !important; }
  .hero-content {
    grid-template-columns: 1fr !important;
    padding: 80px 24px 40px !important;
    gap: 0 !important;
    width: 100%;
  }
  .hero-text { text-align: center; }
  .hero-tag {
    font-size: 0.72rem;
    letter-spacing: 3px;
    padding: 5px 16px;
    background: rgba(255,255,255,0.18);
  }
  .hero-text h1 {
    font-size: clamp(2.6rem, 12vw, 3.2rem) !important;
    line-height: 1.1 !important;
    margin: 16px 0 14px !important;
  }
  .hero-text p {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin-bottom: 28px !important;
    opacity: 0.88;
  }
  .hero-buttons {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 12px !important;
  }
  .btn-primary, .btn-secondary {
    width: 100%;
    max-width: 280px;
    text-align: center;
    padding: 15px 24px !important;
    font-size: 0.95rem !important;
  }
  .hero-stats {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 !important;
    margin-top: 35px !important;
    padding-top: 24px !important;
    border-top: 1px solid rgba(255,255,255,0.2);
  }
  .stat {
    flex: 0 0 50%;
    text-align: center;
    padding: 10px 0;
  }
  .stat .number { font-size: 1.6rem !important; }
  .stat .label { font-size: 0.65rem !important; }
  .hero-gallery { display: none !important; }

  /* Drip bottom */
  .hero-drip { display: none; }

  /* ====== WHATSAPP BANNER ====== */
  .whatsapp-banner { display: none; }

  /* ====== LIVRAISON BANNER ====== */
  .delivery-banner {
    font-size: 0.78rem !important;
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 10px;
    line-height: 1.6;
  }
  .delivery-banner span {
    display: inline-block !important;
    white-space: nowrap;
  }
  .delivery-banner span:contains('|') { display: none !important; }

  /* ====== SECTION HEADERS MOBILE ====== */
  .section-header { margin-bottom: 35px !important; }
  .section-header h2 {
    font-size: clamp(1.8rem, 7vw, 2.2rem) !important;
  }
  .section-tag { font-size: 0.7rem !important; letter-spacing: 2.5px; }
  .divider { margin: 12px auto 0; }

  /* ====== FEATURED WORKS — CAROUSEL ====== */
  #featured { padding: 50px 0 60px !important; }
  #featured > div { max-width: 100% !important; }
  #featured .section-header,
  #featured .gallery-filters,
  #featured > div > div:last-child {
    padding-left: 20px;
    padding-right: 20px;
  }
  .gallery-filters { gap: 8px !important; margin-bottom: 30px !important; flex-wrap: wrap; }
  .filter-btn { padding: 7px 16px !important; font-size: 0.8rem !important; }

  /* Carousel horizontal */
  .gallery-grid {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 14px !important;
    padding: 10px 20px 20px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .gallery-grid::-webkit-scrollbar { display: none; }
  .gallery-grid .art-card {
    flex: 0 0 82vw !important;
    max-width: 320px !important;
    scroll-snap-align: start !important;
    display: block !important;
  }
  .art-card-img { aspect-ratio: 4/3 !important; }

  /* ====== CATEGORIES MOBILE ====== */
  #categories { padding: 50px 20px !important; }
  .categories-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
  }
  .cat-card { padding: 22px 15px !important; border-radius: 14px !important; }
  .cat-icon { font-size: 1.8rem !important; margin-bottom: 10px !important; }
  .cat-card h3 { font-size: 0.95rem !important; margin-bottom: 5px !important; }
  .cat-card p { font-size: 0.75rem !important; }

  /* ====== ABOUT PREVIEW ====== */
  #about-preview { padding: 50px 20px !important; }
  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
  .about-img-stack { display: none !important; }
  .about-text h2 { font-size: 1.7rem !important; margin-bottom: 15px !important; }
  .about-text p { font-size: 0.9rem !important; line-height: 1.75 !important; }
  .about-quote {
    padding: 15px 18px !important;
    font-size: 0.95rem !important;
    margin: 20px 0 !important;
  }

  /* ====== TIMELINE EXPOSITIONS ====== */
  #exhibitions-preview { padding: 50px 20px !important; }
  .timeline::before { left: 12px !important; width: 2px !important; }
  .timeline-item {
    grid-template-columns: 28px 1fr !important;
    gap: 15px !important;
    margin-bottom: 25px !important;
  }
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    grid-column: 2 !important;
    text-align: left !important;
  }
  .timeline-item .timeline-empty { display: none !important; }
  .timeline-dot { width: 12px !important; height: 12px !important; margin-top: 6px; }
  .timeline-content { padding: 16px 18px !important; border-radius: 12px !important; }
  .timeline-content h3 { font-size: 0.9rem !important; }
  .timeline-content p { font-size: 0.8rem !important; }
  .timeline-year { font-size: 0.75rem !important; }

  /* ====== HOME STAGING ====== */
  #home-staging-preview { padding: 50px 20px !important; }
  .staging-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .staging-card-header { padding: 25px 22px !important; }
  .staging-card-header h3 { font-size: 1.2rem !important; }
  .staging-card-body { padding: 20px 22px !important; }

  /* ====== CUSTOM ORDER ====== */
  #custom-order { padding: 60px 20px !important; }
  #custom-order h2 { font-size: 2rem !important; }
  .custom-steps { gap: 12px !important; }
  .custom-step { width: 140px !important; padding: 20px 12px !important; }
  .custom-step h4 { font-size: 0.82rem !important; }
  .custom-step p { font-size: 0.72rem !important; }
  .btn-gold { padding: 13px 32px !important; font-size: 0.92rem !important; }

  /* ====== FOOTER ====== */
  footer { padding: 50px 20px 30px !important; }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    text-align: center;
  }
  .social-links { justify-content: center !important; }
  .footer-bottom {
    flex-direction: column !important;
    gap: 10px !important;
    text-align: center !important;
    font-size: 0.75rem !important;
  }

  /* ====== PAGE HERO (pages internes) ====== */
  .page-hero {
    padding: 110px 20px 55px !important;
  }
  .page-hero h1 { font-size: clamp(2rem, 9vw, 2.8rem) !important; }
  .page-hero p { font-size: 0.9rem !important; }
  .breadcrumb { font-size: 0.75rem !important; }

  /* ====== GALERIE ABSTRAITS PAGE ====== */
  #abstractGallery, #portraitGallery {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 14px !important;
    padding: 8px 20px 20px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #abstractGallery::-webkit-scrollbar,
  #portraitGallery::-webkit-scrollbar { display: none; }
  #abstractGallery .art-card,
  #portraitGallery .art-card {
    flex: 0 0 80vw !important;
    max-width: 310px !important;
    scroll-snap-align: start !important;
    display: block !important;
  }

  /* ====== MODAL ====== */
  .modal-content {
    grid-template-columns: 1fr !important;
    border-radius: 20px 20px 0 0;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    top: auto;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 24px 24px 0 0;
  }
  .modal-img { min-height: 250px !important; border-radius: 24px 24px 0 0; }
  .modal-overlay { align-items: flex-end !important; padding: 0 !important; }

  /* ====== FORMULAIRE CONTACT ====== */
  .contact-form { padding: 0 !important; }
  main > div[style*="grid-template-columns:1fr 1.6fr"] {
    grid-template-columns: 1fr !important;
  }

  /* ====== BADGES ====== */
  .badge { font-size: 0.65rem !important; padding: 4px 10px !important; }
  .badge-given { font-size: 0.62rem !important; padding: 3px 8px !important; }

  /* Section spacing general */
  main { padding: 40px 20px 70px !important; }
}

/* ====== PETIT MOBILE ====== */
@media (max-width: 390px) {
  .hero-text h1 { font-size: 2.3rem !important; }
  .gallery-grid .art-card { flex: 0 0 88vw !important; }
  .categories-grid { grid-template-columns: 1fr !important; }
  .cat-card { display: flex; align-items: flex-start; gap: 14px; text-align: left; }
  .cat-icon { font-size: 1.6rem !important; margin-bottom: 0 !important; flex-shrink: 0; }
}

/* ====== BOUTON WHATSAPP FLOTTANT ====== */
#wa-float {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 8000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
#wa-float .wa-bubble {
  background: #25D366;
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  cursor: pointer;
  animation: waPulse 2.5s infinite;
  transition: transform 0.2s;
}
#wa-float .wa-bubble:hover,
#wa-float .wa-bubble:active { transform: scale(1.1); }
#wa-float .wa-bubble svg { width: 28px; height: 28px; fill: white; }
#wa-float .wa-tooltip {
  background: #1a1a1a;
  color: white;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px) translateX(6px);
  transition: all 0.3s;
  pointer-events: none;
}
#wa-float.show-tip .wa-tooltip {
  opacity: 1;
  transform: translateY(0) translateX(0);
}
@keyframes waPulse {
  0%   { box-shadow: 0 4px 20px rgba(37,211,102,0.45); }
  50%  { box-shadow: 0 4px 30px rgba(37,211,102,0.7), 0 0 0 10px rgba(37,211,102,0.12); }
  100% { box-shadow: 0 4px 20px rgba(37,211,102,0.45); }
}

/* ====== SCROLL INDICATOR CAROUSEL ====== */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 8px 0 4px;
}
.carousel-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(0,180,200,0.25);
  transition: all 0.3s;
  cursor: pointer;
}
.carousel-dot.active {
  background: var(--turquoise);
  width: 20px;
  border-radius: 4px;
}
@media (min-width: 769px) {
  .carousel-dots { display: none; }
}

/* ====== STICKY BOTTOM CTA (mobile seulement) ====== */
.sticky-cta-mobile {
  display: none;
}
@media (max-width: 768px) {
  .sticky-cta-mobile {
    display: block;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, white 35%);
    padding: 30px 20px 20px;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
  }
  .sticky-cta-mobile.visible {
    opacity: 1;
    pointer-events: all;
  }
  .sticky-cta-mobile a {
    display: block;
    background: var(--turquoise);
    color: white;
    text-align: center;
    padding: 15px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(0,123,138,0.3);
  }
}

/* ====== ANIMATIONS ENTRÉE ====== */
@media (max-width: 768px) {
  .fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
  /* Hero text entre immédiatement */
  .hero-text.fade-in {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ====== LIVRAISON BANNER MOBILE ====== */
@media (max-width: 768px) {
  .delivery-banner {
    flex-direction: column !important;
    gap: 4px !important;
    padding: 12px 20px !important;
    font-size: 0.8rem !important;
    text-align: center;
  }
  /* Masquer les | */
  .delivery-banner span:nth-child(even) { display: none !important; }
}
