/* Responsive styles for ConfortSenior.fr */

/* Base mobile-first approach */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    html {
        font-size: 65%; /* Slightly larger base size for tablets */
    }
    
    h1 {
        font-size: 3.6rem;
    }
    
    h2 {
        font-size: 3rem;
    }
    
    .hero {
        padding: var(--spacing-xxl) 0;
    }
    
    .hero h1 {
        font-size: 4.2rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    html {
        font-size: 68%; /* Larger base size for desktops */
    }
    
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    h1 {
        font-size: 4rem;
    }
    
    .hero {
        padding: calc(var(--spacing-xxl) * 1.5) 0;
    }
    
    .hero h1 {
        font-size: 4.8rem;
    }
    
    /* Enhanced desktop layouts */
    .product-grid, 
    .opinion-content {
        gap: var(--spacing-xl);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        padding: 0;
    }
    
    .hero {
        padding: calc(var(--spacing-xxl) * 2) 0;
    }
}

/* Mobile-specific overrides (phones, less than 768px) */
@media (max-width: 767.98px) {
    /* Adjust spacing for mobile */
    section {
        padding: var(--spacing-lg) 0;
    }
    
    /* Stack header elements */
    .site-header {
        text-align: center;
    }
    
    /* Make buttons full width on mobile */
    .cta-button {
        display: block;
        width: 100%;
    }
    
    /* Adjust table layout for mobile */
    table {
        font-size: 1.4rem;
    }
    
    th, td {
        padding: var(--spacing-xs);
    }
    
    /* Adjust footer links */
    .footer-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    /* Make gallery a 2-column grid on small screens */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Hero text adjustments */
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.8rem;
    }
    
    /* Product sections */
    .product-image, 
    .product-details,
    .opinion-image,
    .opinion-text {
        flex: 100%;
    }
    
    /* CTA section */
    .final-cta h2 {
        font-size: 2.8rem;
    }
}

/* Special adjustments for very small screens */
@media (max-width: 400px) {
    html {
        font-size: 60%; /* Slightly smaller base size for very small screens */
    }
    
    .gallery-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }
    
    .testimonials-grid {
        gap: var(--spacing-md);
    }
}

/* Print styles */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
        background: #fff;
        color: #000;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
    
    .site-header, 
    .hero, 
    .final-cta, 
    footer,
    .cta-button {
        display: none;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    .product-grid, 
    .opinion-content {
        display: block;
    }
    
    .product-image, 
    .product-details,
    .opinion-image,
    .opinion-text {
        width: 100%;
        margin-bottom: 20pt;
    }
    
    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 90%;
    }
}