/* ===== RESPONSIVE DESIGN ===== */

/* Tablettes (1024px et moins) - menu hamburger plein écran */
@media (max-width: 1024px) {
    .nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--white);
        transition: var(--transition);
        z-index: 999;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .nav.active { left: 0; }
    .nav-list { flex-direction: column; gap: 2rem; text-align: center; }
    .nav-link { font-size: 1.5rem; padding: 1rem 0; }
    .mobile-menu-toggle { display: flex; position: absolute; top: 0; right: 0; z-index: 1002; }
    .mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }
}

/* Tablettes (768px et moins) */
@media (max-width: 768px) {
    /* Variables ajustées */
    :root {
        --container-padding: 0.75rem;
        --section-padding: 3rem 0;
    }
    
    /* Typographie ajustée */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    /* Header mobile */
    .header-content { padding-bottom: 44px; }
    .nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--white);
        transition: var(--transition);
        z-index: 999;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .nav-link {
        font-size: 1.5rem;
        padding: 1rem 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero section */
    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    /* Services grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    /* Advantages grid */
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Testimonials grid */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    /* Services page */
    .services-nav-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .service-nav-item {
        padding: 1rem;
    }
    
    .service-nav-item img {
        width: 30px;
        height: 30px;
    }
    
    .service-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        display: flex;
        flex-direction: column;
        min-height: auto;
    }

    .service-text,
    .service-image {
        max-width: 100%;
        flex: 1 1 100%;
    }

    .service-image {
        justify-content: center;
        align-items: center;
    }
    
    .service-features {
        justify-content: center;
    }
    
    /* Partners page */
    .partner-card,
    .partner-card-alt {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .partner-card-alt .partner-logo {
        order: 1;
    }
    
    .commitment-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* About page */
    .story-content,
    .team-content,
    .commitment-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    /* Réduire le padding-top pour la section histoire */
    .story-section { padding-top: 50px !important; }
    
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .experience-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Contact page */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Réduire le padding-top sur mobile */
    .contact-info {
        padding-top: 50px !important;
    }
    
    .form-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* CTA buttons */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Mobile-only elements */
    .mobile-only {
        display: inline-block;
    }
}

/* Mobiles (480px et moins) */
@media (max-width: 480px) {
    /* Variables ajustées */
    :root {
        --container-padding: 0.5rem;
        --section-padding: 2rem 0;
    }
    
    /* Typographie plus petite */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    /* Header plus compact */
    .header-content {
        padding: 0.75rem 0;
        padding-bottom: calc(0.75rem + 20px);
    }
    
    .logo-img {
        height: 40px;
        width: auto;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    /* Services nav plus compact */
    .services-nav-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .service-nav-item {
        padding: 0.75rem;
    }
    
    .service-nav-item span {
        font-size: 0.875rem;
    }
    
    /* Cards plus compactes */
    .service-card,
    .contact-card,
    .testimonial-card,
    .value-card,
    .commitment-item,
    .faq-item {
        padding: 1.5rem;
    }
    
    .partner-card {
        padding: 1.5rem;
    }
    
    /* Form plus compact */
    .form-container {
        padding: 1.5rem;
    }
    
    .contact-form {
        gap: 1rem;
    }
    
    /* Boutons plus petits */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    /* Stats plus petits */
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.875rem;
    }
    
    /* Icons plus petits */
    .advantage-icon,
    .value-icon,
    .commitment-icon {
        font-size: 2rem;
    }
    
    .contact-icon {
        font-size: 2rem;
    }
    
    /* Service features plus compactes */
    .service-features {
        flex-direction: column;
        align-items: center;
    }
    
    .feature {
        width: 100%;
        justify-content: center;
    }
    
    /* Hours plus compactes */
    .hours-item {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
    
    /* Map plus petit */
    .map-container iframe {
        height: 300px;
    }
}

/* Centrer le logo des Cygnes dans le footer sur mobile/tablette */
@media (max-width: 768px) {
    .footer-logo { margin-left: auto; margin-right: auto; }
}

/* Suppression du max-width de .hero-subtitle sur la page d'accueil en mobile */
@media (max-width: 768px) {
    .home .hero-subtitle { max-width: none; }
}

/* Très petits écrans (320px et moins) */
@media (max-width: 320px) {
    /* Variables encore plus compactes */
    :root {
        --container-padding: 0.25rem;
        --section-padding: 1.5rem 0;
    }
    
    /* Typographie minimale */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Cards très compactes */
    .service-card,
    .contact-card,
    .testimonial-card,
    .value-card,
    .commitment-item,
    .faq-item,
    .partner-card {
        padding: 1rem;
    }
    
    /* Services nav en une colonne */
    .services-nav-grid {
        grid-template-columns: 1fr;
    }
    
    /* Boutons pleine largeur */
    .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Stats en une colonne */
    .experience-stats {
        grid-template-columns: 1fr;
    }
}

/* Orientation paysage sur mobile */
@media (max-width: 768px) and (orientation: landscape) {
    /* Header plus compact */
    .header-content {
        padding: 0.5rem 0;
    }
    
    /* Hero plus compact */
    .hero {
        padding: 2rem 0;
    }
    
    .hero .container {
        gap: 1.5rem;
    }
    
    /* Sections plus compactes */
    .section-padding {
        padding: 2rem 0;
    }
    
    /* Navigation plus compacte */
    .nav-list {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 1.25rem;
        padding: 0.75rem 0;
    }
}

/* Écrans haute résolution (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Amélioration de la netteté des images */
    .logo-img,
    .service-icon img,
    .service-nav-item img,
    .partner-img,
    .service-img,
    .story-img,
    .team-img,
    .commitment-img,
    .hero-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Mode sombre (si supporté) */
@media (prefers-color-scheme: dark) {
    /* Note: Le site est conçu pour un mode clair, mais on peut ajouter des ajustements si nécessaire */
    .header {
        background-color: transparent;
        box-shadow: none;
    }
    
    .nav-link {
        color: #fff;
    }
    
    .mobile-menu-toggle span {
        background-color: #fff;
    }
}

/* Impression */
@media print {
    /* Masquer les éléments non nécessaires à l'impression */
    .header,
    .mobile-menu-toggle,
    .cta-section,
    .footer {
        display: none;
    }
    
    /* Ajuster les couleurs pour l'impression */
    body {
        color: #000;
        background: #fff;
    }
    
    .hero {
        background: #fff !important;
        color: #000;
    }
    
    .hero-title,
    .hero-subtitle {
        color: #000;
    }
    
    /* Optimiser les marges */
    .container {
        max-width: none;
        padding: 0;
    }
    
    .section-padding {
        padding: 1rem 0;
    }
}

/* Accessibilité - Focus visible */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Amélioration de l'accessibilité */
@media (prefers-contrast: high) {
    :root {
        --primary-blue: #000080;
        --primary-yellow: #ffff00;
        --text-light: #000000;
        --border-color: #000000;
    }
    
    .btn-primary {
        border: 2px solid #000000;
    }
    
    .btn-secondary {
        border: 2px solid #000000;
    }
}

/* Support des écrans tactiles */
@media (hover: none) and (pointer: coarse) {
    /* Augmenter la taille des zones cliquables */
    .btn {
        min-height: 44px;
        padding: 1rem 1.5rem;
    }
    
    .nav-link {
        padding: 1rem 0;
    }
    
    .service-nav-item {
        min-height: 80px;
    }
    
    .contact-card {
        min-height: 200px;
    }
    
    /* Améliorer l'espacement pour les doigts */
    .services-grid,
    .advantages-grid,
    .testimonials-grid,
    .contact-grid {
        gap: 1.5rem;
    }
    
    .service-features {
        gap: 1rem;
    }
    
    .feature {
        padding: 0.75rem 1rem;
        min-height: 44px;
    }
} 