/* Responsive Design */
@media (max-width: 1400px) {
    .nav-container,
    .hero,
    .footer-container,
    .page-content {
        max-width: 1140px;
    }
}

@media (max-width: 1200px) {
    .nav-container,
    .hero,
    .footer-container,
    .page-content {
        max-width: 960px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .nav-container,
    .hero,
    .footer-container,
    .page-content {
        max-width: 720px;
    }
    
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-subtitle {
        max-width: 100%;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .platforms-showcase {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .info-grid,
    .services-grid,
    .actuality-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-sidebar {
        width: 200px;
    }
    
    .admin-content {
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .nav-container,
    .hero,
    .footer-container,
    .page-content {
        max-width: 540px;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 1rem;
        right: 1rem;
        background: var(--surface);
        padding: 1.5rem;
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-xl);
        display: none;
        flex-direction: column;
        border: 1px solid var(--border-light);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.25rem;
        width: 100%;
    }
    
    .nav-links a {
        justify-content: center;
        padding: 1rem;
        border-radius: var(--radius-md);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .hero {
        padding: 1rem;
        margin-top: 4rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-primary, .btn-secondary, .btn-outline {
        width: 100%;
        justify-content: center;
    }
    
    .info-grid,
    .services-grid,
    .actuality-grid {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 3rem 1.5rem;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-section ul li a {
        justify-content: center;
    }
    
    .contact-info li {
        justify-content: center;
    }
    
    .admin-sidebar {
        display: none;
    }
    
    .admin-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    section {
        padding: 3rem 1rem;
    }
    
    .hero {
        margin-top: 3rem;
        min-height: auto;
        padding: 1rem 0;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .info-filters {
        gap: 0.25rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .platform-card.featured {
        padding: 1.5rem;
    }
    
    .page-header {
        padding: 6rem 1rem 3rem;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .footer-container {
        padding: 2rem 1rem;
    }
    
    .footer-bottom {
        padding: 1.5rem 1rem;
    }
}

/* Support pour les appareils très petits */
@media (max-width: 360px) {
    .nav-logo span {
        font-size: 1rem;
    }
    
    .nav-logo img {
        height: 24px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .btn-primary, .btn-secondary, .btn-outline {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .service-card,
    .info-card,
    .actuality-card {
        padding: 1.5rem;
    }
    
    .form-container {
        padding: 1.5rem 1rem;
    }
}

/* Support pour les hauteurs d'écran */
@media (max-height: 700px) {
    .hero {
        min-height: auto;
        padding: 4rem 0;
    }
}

/* Orientation paysage sur mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .navbar {
        padding: 0.5rem 0;
    }
    
    .nav-logo img {
        height: 24px;
    }
    
    .hero {
        margin-top: 3rem;
        padding: 1rem 0;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .hero-buttons {
        margin-bottom: 1rem;
    }
    
    .btn-small {
        padding: 0.375rem 1rem;
        font-size: 0.75rem;
    }
}

/* Support pour les modes sombres (préparatif) */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #000000;
        --surface: #1C1C1E;
        --surface-secondary: #2C2C2E;
        --surface-tertiary: #3A3A3C;
        --text-primary: #FFFFFF;
        --text-secondary: #8E8E93;
        --text-tertiary: #636366;
        --border: #38383A;
        --border-light: #2C2C2E;
    }
    
    .hero-content h1 {
        background: linear-gradient(135deg, #64D2FF, #5E5CE6);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

/* Animations pour les transitions */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
    
    .slide-in {
        animation: slideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
    
    .scale-in {
        animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Améliorations pour le toucher sur mobile */
@media (hover: none) and (pointer: coarse) {
    .nav-links a,
    .btn-primary,
    .btn-secondary,
    .btn-outline,
    .action-btn,
    .filter-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    input,
    select,
    textarea,
    button {
        font-size: 16px; /* Empêche le zoom sur iOS */
    }
    
    .nav-toggle {
        min-height: 44px;
        min-width: 44px;
    }
}