/* Responsive.css - Styles responsifs qui respectent le design original */

/* Base responsive */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Header responsive */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Menu déroulant responsive */
.dropdown-menu {
    position: absolute;
    min-width: 200px;
    z-index: 1000;
}

/* ----- MEDIA QUERIES ----- */

/* Extra-small devices (phones, up to 576px) */
@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .logo-image {
        height: 40px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .article-actions {
        flex-direction: column;
    }
    
    .article-card h3 {
        font-size: 1.1rem;
    }
    
    .issue-actions {
        flex-direction: column;
    }
    
    .article-tag {
        font-size: 0.7rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .articles-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: auto;
        background-color: var(--primary-blue);
        padding: 1rem;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        max-height: calc(100vh - 70px);
        z-index: 999;
    }
    
    .main-nav.active {
        transform: translateX(0);
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .nav-links li {
        margin: 0.5rem 0;
        width: 100%;
    }
    
    .nav-links a {
        width: 100%;
        display: block;
        padding: 0.8rem 1rem;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding-left: 1.2rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
        max-height: 500px;
    }
    
    .dropdown-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .dropdown-toggle i {
        transition: transform 0.3s;
    }
    
    .dropdown.active .dropdown-toggle i {
        transform: rotate(180deg);
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero {
        height: auto;
        min-height: 300px;
    }
    
    .article-card {
        margin-bottom: 1rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 768px) and (max-width: 991px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Support pour le mode tactile */
@media (hover: none) {
    .article-card:hover {
        transform: none;
    }
    
    .article-actions a:hover {
        transform: none;
    }
}

/* Support pour l'orientation */
@media (orientation: portrait) {
    .hero {
        height: 40vh;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .main-nav {
        max-height: 80vh;
    }
}

/* Support pour l'impression */
@media print {
    .main-header,
    .menu-toggle,
    .article-actions,
    .footer {
        display: none;
    }
    
    main {
        padding-top: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
    
    .article-card {
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ddd;
    }
} 