/* 
* Power Lighthouse - Styles responsifs
* Styles pour l'adaptation du site à différentes tailles d'écran
*/

/* ------------------------------
   Tablettes (paysage)
------------------------------ */
@media (max-width: 1200px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .figures-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg) var(--spacing-md);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-about {
        grid-column: span 2;
        max-width: 100%;
    }
}

/* ------------------------------
   Tablettes (portrait)
------------------------------ */
@media (max-width: 992px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .about-image {
        order: -1;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ------------------------------
   Mobiles (paysage)
------------------------------ */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
    
    section {
        padding: var(--spacing-lg) 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .main-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        box-shadow: var(--box-shadow);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-speed) ease;
        z-index: 1000;
    }
    
    .main-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .main-menu li {
        margin: 0;
    }
    
    .main-menu a {
        display: block;
        padding: var(--spacing-sm) var(--spacing-md);
        border-bottom: 1px solid var(--light-grey-color);
    }
    
    .main-menu a:after {
        display: none;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .testimonials-slider {
        flex-direction: column;
    }
    
    .testimonial-card {
        min-width: auto;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter .form-group {
        flex-direction: column;
    }
    
    .newsletter input[type="email"] {
        width: 100%;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    
    .newsletter button {
        width: 100%;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .article-meta {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-buttons button {
        width: 100%;
    }
}

/* ------------------------------
   Mobiles (portrait)
------------------------------ */
@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .figures-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-about {
        grid-column: span 1;
    }
    
    .article-author {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin-right: 0;
        margin-bottom: var(--spacing-sm);
    }
    
    .thank-you-actions {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .thank-you-actions .btn {
        width: 100%;
    }
}

/* ------------------------------
   Petits mobiles
------------------------------ */
@media (max-width: 375px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .cookie-modal-content {
        width: 95%;
    }
}

/* ------------------------------
   Animations pour menu mobile
------------------------------ */
@media (max-width: 768px) {
    .mobile-menu-active {
        overflow: hidden;
    }
    
    .main-menu.active {
        animation: slideDown 0.3s ease forwards;
    }
    
    @keyframes slideDown {
        0% {
            transform: translateY(-20px);
            opacity: 0;
        }
        100% {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* ------------------------------
   Impression
------------------------------ */
@media print {
    header, footer, .cookie-banner, .cookie-modal, 
    .newsletter, .social-links, .related-articles {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    img {
        page-break-inside: avoid;
        max-width: 100% !important;
    }
    
    .container {
        width: 100%;
        max-width: none;
        padding: 0;
    }
    
    .article-content, .legal-content {
        max-width: none;
    }
    
    @page {
        margin: 2cm;
    }
}
