/* ==========================================================================
   UNIV-BELOTE - Responsive CSS
   Media Queries
   ========================================================================== */

/* === TABLET (max-width: 1024px) === */
@media (max-width: 1024px) {
  :root {
    --text-4xl: 2rem;
    --text-5xl: 2.5rem;
  }

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

  .hero-stats {
    gap: var(--spacing-xl);
  }
}

/* === MOBILE LARGE (max-width: 768px) === */
@media (max-width: 768px) {
  :root {
    --text-3xl: 1.5rem;
    --text-4xl: 1.75rem;
  }

  /* Header */
  .main-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: var(--spacing-xl);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    overflow-y: auto;
  }

  .main-nav.active {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: var(--spacing-md) 0;
    font-size: var(--text-lg);
    border-bottom: 1px solid var(--color-border);
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: 0 0 0 var(--spacing-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
  }

  .nav-item.active .nav-dropdown {
    max-height: 500px;
  }

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

  .menu-toggle {
    display: flex;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .header-cta {
    display: none;
  }

  /* Sections */
  .section {
    padding: var(--spacing-2xl) 0;
  }

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

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

  .footer-brand {
    order: -1;
  }

  /* Article */
  .article-content h1 {
    font-size: var(--text-3xl);
  }

  .article-content h2 {
    font-size: var(--text-xl);
  }

  /* Tables */
  .table-wrapper {
    margin: var(--spacing-md) calc(var(--spacing-lg) * -1);
    padding: 0 var(--spacing-lg);
  }

  table {
    font-size: var(--text-sm);
  }

  th, td {
    padding: var(--spacing-sm);
  }

  /* CTA Box */
  .cta-box {
    padding: var(--spacing-xl);
  }

  .cta-box h3 {
    font-size: var(--text-xl);
  }

  /* Mode cards grid */
  .modes-grid {
    grid-template-columns: 1fr;
  }

  /* Strategy cards */
  .strategies-grid {
    grid-template-columns: 1fr;
  }

  /* Page header */
  .page-header {
    padding: calc(70px + var(--spacing-xl)) 0 var(--spacing-xl);
  }

  .page-header h1 {
    font-size: var(--text-2xl);
  }
}

/* === MOBILE SMALL (max-width: 480px) === */
@media (max-width: 480px) {
  :root {
    --text-2xl: 1.25rem;
    --text-3xl: 1.375rem;
    --text-4xl: 1.5rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2rem;
    --spacing-3xl: 2.5rem;
  }

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

  /* Buttons */
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: var(--text-sm);
  }

  .btn-lg {
    padding: 0.875rem 1.5rem;
  }

  /* Hero */
  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: var(--text-sm);
  }

  .floating-card {
    width: 50px;
    height: 68px;
    font-size: 1.25rem;
  }

  /* Cards */
  .mode-card {
    padding: var(--spacing-lg);
  }

  .mode-card-illustration {
    width: 60px;
    height: 60px;
    font-size: 1.75rem;
  }

  /* Stats */
  .stat-number {
    font-size: var(--text-3xl);
  }

  /* Article */
  .article-content {
    font-size: var(--text-sm);
  }

  .article-content h1 {
    font-size: var(--text-2xl);
  }

  .article-content h2 {
    font-size: var(--text-lg);
  }

  .article-content h3 {
    font-size: var(--text-base);
  }

  /* Breadcrumb */
  .breadcrumb {
    font-size: var(--text-xs);
    flex-wrap: wrap;
  }
}

/* === DESKTOP GRID UTILITIES === */
@media (min-width: 769px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

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

/* === LARGE SCREENS (min-width: 1400px) === */
@media (min-width: 1400px) {
  :root {
    --max-width: 1320px;
  }
}

/* === PRINT === */
@media print {
  .site-header,
  .site-footer,
  .hero-cards,
  .cta-box,
  .btn,
  .scroll-indicator {
    display: none !important;
  }

  .hero {
    min-height: auto;
    padding: var(--spacing-lg) 0;
    background: none;
    color: var(--color-dark);
  }

  .hero h1 {
    color: var(--color-dark);
    text-shadow: none;
  }

  .article-content {
    max-width: 100%;
  }

  a {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: var(--text-sm);
    color: var(--color-text-muted);
  }
}

/* === HIGH CONTRAST MODE === */
@media (prefers-contrast: high) {
  :root {
    --color-text: #000000;
    --color-text-light: #333333;
    --color-border: #000000;
  }

  .btn {
    border: 2px solid currentColor;
  }

  .card,
  .mode-card,
  .strategy-card {
    border: 2px solid var(--color-dark);
  }
}

/* === DARK MODE PREFERENCE (future enhancement) === */
/*
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0F172A;
    --color-bg-alt: #1E293B;
    --color-text: #E2E8F0;
    --color-text-light: #94A3B8;
    --color-border: #334155;
    --color-white: #1E293B;
    --color-secondary: #F1F5F9;
  }
}
*/
