/* Responsive Design */

/* Tablettes */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-container {
        padding-left: 60px;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .experts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablettes portrait et petits écrans */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0.75rem 0;
    }
    
    .nav {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    .hero-section {
        padding: 6rem 0;
    }
    
    /* Optimisations vidéo pour tablettes */
    .hero-video {
        /* Réduire la qualité sur tablettes pour les performances */
        opacity: 0.6;
    }
    
    .hero-container {
        padding-left: 40px;
        padding-right: 20px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-feature {
        font-size: 1rem;
    }
    
    /* Optimisations vidéo pour mobile */
    .hero-video {
        /* Sur mobile, on peut désactiver la vidéo pour économiser la bande passante */
        display: none;
    }
    
    /* Overlay noir pour mobile pour améliorer la lisibilité */
    .hero-overlay {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            135deg, 
            rgba(0, 0, 0, 0.6) 0%, 
            rgba(0, 0, 0, 0.4) 50%,
            rgba(0, 0, 0, 0.7) 100%
        );
        z-index: 2;
    }
    
    /* Fallback avec image sur mobile */
    .hero-section::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: url('../assets/Images/CPABG.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.8;
        z-index: 1;
    }
    
    .cta-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    /* Section formulaire pleine largeur */
    .full-width-form-section {
        padding: 4rem 0;
    }
    
    .contact-form-main .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Masquer le mockup du livre blanc sur mobile */
    .form-with-mockup {
        grid-template-columns: 1fr;
    }
    
    .mockup-container {
        display: none;
    }
    
    /* Section expertise + images */
    .expertise-form-section {
        padding: 4rem 0;
    }
    
    .expertise-form-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .dynamic-image-container {
        display: none;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    .expertise {
        padding: 60px 0;
    }
    
    .expertise-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 400px;
    }
    
    .expertise-card {
        padding: 1.5rem;
    }
    
    .experts {
        padding: 60px 0;
    }
    
    .experts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .expert-card {
        padding: 1.5rem;
    }
    
    .cta-section {
        padding: 60px 0;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1.1rem;
    }
    
    /* Footer moderne responsive */
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-brand {
        max-width: none;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-bottom-right {
        justify-content: center;
    }
    
    .modal {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-content {
        padding: 1rem;
    }
    
    .download-form {
        gap: 1rem;
    }
}

/* Smartphones */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .header-content {
        padding: 0.5rem 0;
    }
    
    .logo {
        height: 35px;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
    
    .hero-section {
        padding: 5rem 0;
    }
    
    .hero-container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-feature {
        font-size: 0.9rem;
    }
    
    .feature-check {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }
    
    /* Section formulaire mobile */
    .full-width-form-section {
        padding: 3rem 0;
    }
    
    .form-container-full {
        padding: 2rem;
    }
    
    .submit-button-main {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .expertise {
        padding: 50px 0;
    }
    
    .expertise-card {
        padding: 1.25rem;
    }
    
    .expertise-card h3 {
        font-size: 1.1rem;
    }
    
    .expertise-card p {
        font-size: 0.9rem;
    }
    
    .experts {
        padding: 50px 0;
    }
    
    .expert-card {
        padding: 1.25rem;
    }
    
    .expert-photo {
        width: 80px;
        height: 80px;
    }
    
    .expert-card h3 {
        font-size: 1.1rem;
    }
    
    .expert-card p {
        font-size: 0.9rem;
    }
    
    .cta-section {
        padding: 50px 0;
    }
    
    .cta-content h2 {
        font-size: 1.75rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    /* Footer mobile */
    .footer-main {
        gap: 1.5rem;
    }
    
    .footer-logo-text {
        font-size: 1.5rem;
    }
    
    .footer-bottom-right {
        flex-direction: column;
        gap: 1rem;
    }
    
    .modal {
        width: 98%;
        margin: 10px;
    }
    
    .modal-header h3 {
        font-size: 1.25rem;
    }
    
    .form-group input {
        padding: 0.625rem;
        font-size: 0.9rem;
    }
    
    .checkbox-label {
        font-size: 0.85rem;
    }
    
    .submit-button {
        padding: 0.875rem;
        font-size: 1rem;
    }
}

/* Très petits écrans */
@media (max-width: 360px) {
    .hero-container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .hero-feature {
        font-size: 0.85rem;
    }
    
    .feature-check {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .cta-content h2 {
        font-size: 1.5rem;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .expertise-card,
    .expert-card {
        padding: 1rem;
    }
    
    .card-icon {
        font-size: 2rem;
    }
    
    .form-container-full {
        padding: 1.5rem;
    }
    
    .submit-button-main {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Optimisations pour les écrans haute résolution */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo,
    .footer-logo,
    .book-mockup,
    .expert-photo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Mode sombre (si supporté par le navigateur) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-light: #9ca3af;
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-dark: #030712;
        --border-color: #374151;
    }
    
    .header {
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
    }
    
    .hero {
        background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    }
    
    .expertise {
        background: var(--bg-primary);
    }
    
    .experts {
        background: var(--bg-secondary);
    }
    
    .expertise-card,
    .expert-card,
    .modal {
        background: var(--bg-secondary);
        border-color: var(--border-color);
    }
}

/* Animations et transitions pour les performances */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .book-mockup {
        animation: none;
    }
}

/* Amélioration de l'accessibilité */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #1e3a8a;
        --text-primary: #000000;
        --text-secondary: #333333;
        --border-color: #666666;
    }
    
    .cta-button,
    .submit-button {
        border: 2px solid #000000;
    }
    
    .nav-link:focus,
    .cta-button:focus,
    .submit-button:focus,
    input:focus {
        outline: 3px solid #000000;
        outline-offset: 2px;
    }
}
