/*
 * Warmstone - Styles Personnalisés Premium
 * Design System : Warm Stone Palette avec Tailwind CSS
 */

:root {
  /* Palette Warm Stone Premium */
  --warmstone-beige: #E8DDD0;
  --warmstone-sand: #D4C4B0;
  --warmstone-tan: #B8A693;
  --warmstone-brown: #8B7865;
  --warmstone-dark: #5A4A3A;
  --warmstone-gold: #C4A35A;
  --warmstone-accent: #A67C52;

  /* Greys sophistiqués */
  --stone-light: #F5F3F0;
  --stone-grey: #E0DCD5;
  --stone-dark: #3E3835;

  /* Shadows élégantes */
  --shadow-sm: 0 2px 8px rgba(90, 74, 58, 0.08);
  --shadow-md: 0 4px 16px rgba(90, 74, 58, 0.12);
  --shadow-lg: 0 8px 32px rgba(90, 74, 58, 0.16);
  --shadow-xl: 0 16px 48px rgba(90, 74, 58, 0.20);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--stone-dark);
  background: var(--stone-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography Premium */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--warmstone-dark);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

/* Navigation Premium Ultra-Moderne */
.navbar-premium {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 2px 20px rgba(90, 74, 58, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(196, 163, 90, 0.1);
}

/* Fix mega menu background for readability */
.navbar-premium .group:hover > div {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px);
}

.navbar-premium.scrolled {
  box-shadow: 0 4px 24px rgba(90, 74, 58, 0.15);
  background: rgba(255, 255, 255, 1);
}

/* Navigation Links Premium */
.nav-link-premium {
  position: relative;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--warmstone-dark);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.5rem 0;
}

.nav-link-premium::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--warmstone-gold), var(--warmstone-accent));
  border-radius: 2px 2px 0 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link-premium:hover {
  color: var(--warmstone-gold);
}

.nav-link-premium:hover::before,
.nav-link-premium.active::before {
  transform: translateX(-50%) scaleX(1);
}

/* CTA Button Premium */
.btn-premium {
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, var(--warmstone-gold) 0%, var(--warmstone-accent) 100%);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(196, 163, 90, 0.3);
  overflow: hidden;
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 163, 90, 0.4);
}

/* Hamburger Premium */
.hamburger-premium {
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 10px;
  background: rgba(196, 163, 90, 0.1);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.hamburger-premium:hover {
  background: rgba(196, 163, 90, 0.2);
}

.hamburger-premium span {
  width: 30px;
  height: 3px;
  background: linear-gradient(90deg, var(--warmstone-gold), var(--warmstone-accent));
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-premium.active span:nth-child(1) {
  transform: rotate(45deg) translate(9px, 9px);
}

.hamburger-premium.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-premium.active span:nth-child(3) {
  transform: rotate(-45deg) translate(9px, -9px);
}

/* Mobile Menu Premium */
.mobile-menu-premium {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 380px;
  height: 100vh;
  background: linear-gradient(to bottom, #ffffff 0%, #FAF9F7 100%);
  box-shadow: -4px 0 40px rgba(0, 0, 0, 0.15);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  padding: 2rem 0;
  overflow-y: auto;
}

.mobile-menu-premium.active {
  right: 0;
}

.mobile-overlay-premium {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9998;
}

.mobile-overlay-premium.active {
  opacity: 1;
  pointer-events: all;
}

/* Legacy Support */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.98);
}

.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--warmstone-gold);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--warmstone-beige) 0%, var(--warmstone-sand) 100%);
  overflow: visible;
}

.hero-content {
  position: relative;
  z-index: 1;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Buttons Premium */
.btn-primary {
  background: linear-gradient(135deg, var(--warmstone-gold) 0%, var(--warmstone-accent) 100%);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--warmstone-accent) 0%, var(--warmstone-gold) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary span {
  position: relative;
  z-index: 1;
}

.btn-secondary {
  background: white;
  color: var(--warmstone-dark);
  padding: 1rem 2.5rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  border: 2px solid var(--warmstone-tan);
}

.btn-secondary:hover {
  background: var(--warmstone-tan);
  color: white;
  transform: translateY(-2px);
}

/* Cards Premium */
.service-card,
.testimonial-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--warmstone-gold), var(--warmstone-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover,
.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

/* Icon Containers */
.icon-container {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--warmstone-beige), var(--warmstone-sand));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* Galerie Masonry */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(90, 74, 58, 0.8) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Formulaire Premium */
.form-group {
  margin-bottom: 1.5rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--stone-grey);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--warmstone-gold);
  box-shadow: 0 0 0 4px rgba(196, 163, 90, 0.1);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--warmstone-dark);
}

/* Calculateur */
.calculator-container {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  margin: 2rem auto;
}

.calculator-result {
  background: linear-gradient(135deg, var(--warmstone-gold), var(--warmstone-accent));
  color: white;
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  margin-top: 2rem;
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.price-display {
  font-size: 3rem;
  font-weight: 800;
  margin: 1rem 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* CTA Flottant Mobile */
.floating-cta {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Accordion FAQ */
.accordion-item {
  background: white;
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.accordion-header {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s ease;
}

.accordion-header:hover {
  background: var(--stone-light);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-content.active {
  max-height: 500px;
  padding: 0 1.5rem 1.5rem;
}

/* Testimonials Carousel */
.testimonials-container {
  position: relative;
  overflow: hidden;
  padding: 2rem 0;
}

.testimonial-card {
  min-width: 100%;
  transition: transform 0.5s ease;
}

/* Stats Section */
.stat-card {
  text-align: center;
  padding: 2rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--warmstone-gold), var(--warmstone-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: white;
  box-shadow: var(--shadow-xl);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  padding: 2rem;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9998;
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: var(--warmstone-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Loading Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--stone-grey) 25%, var(--stone-light) 50%, var(--stone-grey) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Footer Premium Ultra-Moderne */
.footer-premium {
  background: linear-gradient(180deg, #2D2420 0%, #1F1915 100%);
  position: relative;
  overflow: hidden;
}

.footer-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(196, 163, 90, 0.3) 50%, transparent 100%);
}

/* Trust Badges Section */
.footer-trust-badges {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem 0;
}

.trust-badge {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trust-badge:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Footer Links */
.footer-premium a {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.footer-premium a:hover {
  color: var(--warmstone-gold) !important;
  transform: translateX(4px);
}

/* Footer Headings */
.footer-premium h3 {
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-premium h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--warmstone-gold), var(--warmstone-accent));
  border-radius: 2px;
}

/* Footer List Items */
.footer-premium ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-premium ul li {
  margin-bottom: 0.875rem;
  padding-left: 0;
  position: relative;
}

/* Remove arrows from footer navigation on desktop */
.footer-premium ul li::before {
  display: none;
}

/* Social Media Icons */
.footer-premium .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-premium .social-icon:hover {
  background: linear-gradient(135deg, var(--warmstone-gold), var(--warmstone-accent));
  transform: translateY(-4px) rotate(5deg);
  box-shadow: 0 8px 16px rgba(196, 163, 90, 0.3);
  border-color: transparent;
}

.footer-premium .social-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Footer CTA Button */
.footer-premium .btn-footer-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--warmstone-gold) 0%, var(--warmstone-accent) 100%);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(196, 163, 90, 0.3);
  margin-top: 2rem;
}

.footer-premium .btn-footer-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 163, 90, 0.5);
}

/* Mobile menu logo centering */
.mobile-menu-premium .flex.items-center.gap-3 {
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.mobile-menu-premium .flex.items-center.gap-3 img {
  height: 4rem;
}

/* Footer Bottom Bar */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
  background: rgba(0, 0, 0, 0.2);
}

.footer-bottom a:hover {
  transform: none;
  text-decoration: underline;
}

/* Star Rating */
.star-rating {
  display: flex;
  gap: 2px;
}

.star-rating svg {
  width: 18px;
  height: 18px;
  fill: #FFD700;
  filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.3));
}

/* Responsive Utilities */
@media (max-width: 768px) {
  .hero-section {
    min-height: 70vh;
    padding: 2rem 1rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }

  .btn-primary,
  .btn-secondary {
    padding: 0.875rem 2rem;
    font-size: 0.95rem;
  }

  .calculator-container {
    padding: 1.5rem;
  }

  .price-display {
    font-size: 2rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .footer-premium ul li {
    padding-left: 0;
  }

  .footer-premium ul li::before {
    display: none;
  }

  .trust-badge {
    margin-bottom: 1rem;
  }

  /* Mobile footer logo centering and enlarging */
  .footer-premium img[alt="Warmstone Logo"] {
    height: 5rem;
    margin-left: auto;
    margin-right: auto;
  }

  /* Mobile header logo centering */
  .navbar-premium .h-20 {
    height: 4rem;
  }
}

/* Lazy Loading */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Print Styles */
@media print {
  .navbar,
  .floating-cta,
  .mobile-menu {
    display: none;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus States */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 3px solid var(--warmstone-gold);
  outline-offset: 2px;
}

/* Smooth Transitions */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
