/* ============================================
   Bijouterie Mille & Line - Responsive Styles
   Mobile First Approach
   ============================================ */

/* ========== Mobile Base (< 576px) ========== */
@media screen and (max-width: 575px) {
  :root {
    --container-padding: 1rem;
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  /* Header */
  .header-inner {
    padding: 0.75rem var(--container-padding);
  }

  .logo-text {
    font-size: 1.25rem;
  }

  .nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: var(--blur-glass);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: var(--space-xl);
    gap: 0;
  }

  .nav.active {
    display: flex;
  }

  .nav-link {
    padding: var(--space-md) var(--space-lg);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--glass-border);
    width: 100%;
    text-align: center;
  }

  .nav-link::after {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  /* Hero */
  .hero {
    min-height: 100svh;
    padding-top: 60px;
  }

  .hero-content {
    padding: var(--space-md);
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: var(--space-lg);
  }

  .hero-cta {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .hero-cta .btn {
    width: 100%;
  }

  .scroll-indicator {
    display: none;
  }

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

  /* Universe Cards */
  .universe-card {
    aspect-ratio: 16/10;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Filter */
  .filter-buttons {
    gap: var(--space-xs);
  }

  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  /* Service Card */
  .service-card {
    padding: var(--space-lg);
  }

  .service-icon {
    width: 48px;
    height: 48px;
  }

  /* Testimonial */
  .testimonial-card {
    padding: var(--space-lg);
  }

  /* Map */
  .map-container {
    height: 300px;
  }

  /* Page Header */
  .page-header {
    padding: calc(60px + var(--space-xl)) 0 var(--space-lg);
  }
}

/* ========== Small Tablets (576px - 767px) ========== */
@media screen and (min-width: 576px) and (max-width: 767px) {
  .nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: var(--blur-glass);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: var(--space-xl);
    gap: 0;
  }

  .nav.active {
    display: flex;
  }

  .nav-link {
    padding: var(--space-md) var(--space-lg);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--glass-border);
    width: 100%;
    text-align: center;
  }

  .nav-link::after {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

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

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

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .hero-title {
    font-size: 3rem;
  }
}

/* ========== Tablets (768px - 991px) ========== */
@media screen and (min-width: 768px) and (max-width: 991px) {
  .nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: var(--blur-glass);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: var(--space-xl);
    gap: 0;
  }

  .nav.active {
    display: flex;
  }

  .nav-link {
    padding: var(--space-md) var(--space-lg);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--glass-border);
    width: 100%;
    text-align: center;
  }

  .nav-link::after {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

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

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

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .hero-title {
    font-size: 3.5rem;
  }
}

/* ========== Small Desktops (992px - 1199px) ========== */
@media screen and (min-width: 992px) and (max-width: 1199px) {
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  }
}

/* ========== Large Desktops (>= 1200px) ========== */
@media screen and (min-width: 1200px) {
  :root {
    --container-max: 1200px;
  }

  .hero-title {
    font-size: 4.5rem;
  }
}

/* ========== Extra Large (>= 1400px) ========== */
@media screen and (min-width: 1400px) {
  :root {
    --container-max: 1320px;
  }
}

/* ========== Height Adjustments ========== */
@media screen and (max-height: 700px) {
  .hero {
    min-height: auto;
    padding: calc(80px + var(--space-xl)) 0 var(--space-xl);
  }

  .scroll-indicator {
    display: none;
  }
}

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .fade-in,
  .fade-in-left,
  .fade-in-right {
    opacity: 1;
    transform: none;
  }

  .stagger > * {
    opacity: 1;
    transform: none;
  }
}

/* ========== High Contrast Mode ========== */
@media (prefers-contrast: high) {
  :root {
    --glass-border: rgba(212, 175, 55, 0.5);
    --text-secondary: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.7);
  }

  .glass-card,
  .product-card,
  .service-card,
  .testimonial-card {
    border-width: 2px;
  }
}

/* ========== Print Styles ========== */
@media print {
  .header,
  .footer,
  .particles-container,
  .scroll-indicator,
  .hero-cta {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .section {
    padding: 1rem 0;
    page-break-inside: avoid;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .glass-card,
  .product-card,
  .service-card {
    background: white;
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* ========== Touch Device Optimizations ========== */
@media (hover: none) and (pointer: coarse) {
  .nav-link::after {
    display: none;
  }

  .product-card:hover,
  .glass-card:hover,
  .service-card:hover {
    transform: none;
  }

  .product-card:hover .product-image img,
  .universe-card:hover img {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }

  .btn:active {
    transform: scale(0.98);
  }
}

/* ========== Landscape Phone ========== */
@media screen and (max-width: 896px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: calc(60px + var(--space-lg)) 0 var(--space-lg);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    margin-bottom: var(--space-md);
  }

  .scroll-indicator {
    display: none;
  }
}
