/* 
* DM FORMATION - Responsive Stylesheet
* Author: Cascade
* Version: 1.0
*/

/* ===== RESPONSIVE STYLES ===== */

/* Extra large devices (large desktops, 1200px and up) */
@media (max-width: 1400px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-grid {
        gap: var(--spacing-xl);
    }
}

/* Large devices (desktops, 992px and up) */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }

    html {
        font-size: 15px;
    }

    .hero-content h2 {
        font-size: 3rem;
    }

    .about-image::after {
        display: none;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }

    html {
        font-size: 14px;
    }

    .section-padding {
        padding: 4rem 0;
    }

    .hero {
        padding: 8rem 0 7rem; /* Augmenté le padding en bas pour éviter que le contenu soit coupé */
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-content {
        text-align: center;
        order: 2;
    }
    
    .hero-image-container {
        order: 1;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
        margin: 0 auto var(--spacing-xl);
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        order: 1;
    }

    .about-content {
        order: 2;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .contact-form {
        padding: var(--spacing-lg);
        text-align: center;
    }
    
    .form-success,
    .form-error {
        padding: var(--spacing-md);
    }
    
    .form-success i,
    .form-error i {
        font-size: 2.5rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .contact-form .btn-block {
        margin: 0 auto;
        display: block;
        max-width: 100%;
    }
    
    .info-item {
        margin-bottom: var(--spacing-md);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-list {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: left var(--transition-normal);
        box-shadow: var(--shadow-md);
        z-index: 999;
    }

    .nav-list.active {
        left: 0;
    }

    .nav-item {
        margin: 0 0 1.5rem;
    }

    .nav-link {
        font-size: 1.1rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 767.98px) {
    /* Masquer la vague qui cause des problèmes d'affichage */
    .hero-shape {
        display: none !important;
    }
    .container {
        max-width: 540px;
    }

    html {
        font-size: 13px;
    }

    .section-padding {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .hero {
        padding: 7rem 0 7rem; /* Augmenté le padding en bas pour éviter que le contenu soit coupé */
        margin-bottom: 1rem; /* Ajoute un espace supplémentaire après la section hero */
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }
    
    .hero-badge {
        width: 100px;
        height: 100px;
    }
    
    .badge-inner {
        width: 90px;
        height: 90px;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    .services-grid,
    .features-grid,
    .formations-slider,
    .testimonials-slider {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .formation-content {
        text-align: center;
    }
    
    .formation-meta {
        justify-content: center;
    }
    
    .formation-content .btn {
        margin: 0 auto;
        display: inline-block;
    }

    .about-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }
    
    .about-content {
        text-align: center;
    }
    
    .about-content .section-header {
        text-align: center;
    }
    
    /* Centrer le trait sous le titre "À propos" en version mobile */
    .about-content .text-left .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .stat-item {
        flex: 0 0 45%;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .contact {
        border-radius: var(--border-radius-md);
    }
    
    .contact-form,
    .contact-info-section {
        padding: var(--spacing-md);
    }
    
    .info-item i {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .footer-bottom-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 1rem;
    }

    html {
        font-size: 12px;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .service-card,
    .formation-card,
    .testimonial-card {
        padding: 1.5rem;
        text-align: center;
    }
    
    .service-link {
        display: inline-block;
        margin: 0 auto;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .social-links {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .footer-about,
    .footer-links,
    .footer-social h3,
    .contact-info {
        text-align: center;
    }
    
    .footer h3 {
        text-align: center;
    }
    
    .footer h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input {
        border-radius: var(--border-radius-md);
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 0.5rem;
    }

    .newsletter-form button {
        width: 100%;
        border-radius: var(--border-radius-md);
        padding: 0.75rem;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        right: 15px;
        bottom: 15px;
    }

    /* Adjust spacing for mobile */
    .header-content {
        padding: 0.75rem 0;
    }

    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo-img {
        max-height: 40px;
    }

    .feature-item {
        flex-direction: column;
        text-align: center;
    }

    .feature-icon {
        margin: 0 auto 1rem;
    }

    .info-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .info-item i {
        margin: 0 auto 1rem;
    }
}

/* Fix for very small devices */
@media (max-width: 359.98px) {
    html {
        font-size: 11px;
    }

    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-tagline {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .hero-stats .stat-item {
        align-items: center;
    }
    
    .hero-badge {
        width: 80px;
        height: 80px;
        bottom: -10px;
        right: -10px;
    }
    
    .badge-inner {
        width: 70px;
        height: 70px;
    }
    
    .badge-text {
        font-size: 0.7rem;
    }
    
    .service-icon,
    .feature-icon,
    .info-item i {
        width: 50px;
        height: 50px;
    }

    .service-icon i,
    .feature-icon i {
        font-size: 1.5rem;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .nav-list {
        padding-top: 1rem;
        overflow-y: auto;
    }

    .nav-item {
        margin-bottom: 0.75rem;
    }

    .hero {
        padding: 5rem 0 3rem;
    }
}

/* Styles spécifiques pour la page mentions légales */
.legal-page-section {
    padding-top: calc(var(--section-padding) + 70px); /* Ajoute un espace supplémentaire pour compenser la navbar */
}

/* Ajustements responsives pour la page mentions légales */
@media (max-width: 991.98px) {
    .legal-page-section {
        padding-top: calc(4rem + 70px); /* Correspond au padding de section-padding dans ce breakpoint */
    }
}

@media (max-width: 767.98px) {
    .legal-page-section {
        padding-top: calc(3rem + 70px); /* Correspond au padding de section-padding dans ce breakpoint */
    }
    
    .legal-content {
        text-align: center;
    }
    
    .legal-section {
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    .legal-page-section {
        padding-top: calc(3rem + 60px); /* Légèrement réduit pour les très petits écrans */
    }
    
    .legal-page-section .section-title {
        font-size: 1.8rem; /* Taille de police réduite pour les petits écrans */
        margin-bottom: 0.75rem;
    }
    
    .legal-page-section .section-subtitle {
        font-size: 0.9rem;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .back-to-top,
    .cta-buttons,
    .contact-form,
    .newsletter-form {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
        background-color: #fff;
    }

    a {
        text-decoration: underline;
        color: #000;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .section-padding {
        padding: 1rem 0;
    }

    .hero {
        padding: 1rem 0;
        background: none;
    }

    .hero-shape {
        display: none;
    }

    .about-grid,
    .contact-grid,
    .services-grid,
    .features-grid,
    .formations-slider,
    .testimonials-slider {
        display: block;
    }

    .service-card,
    .feature-item,
    .formation-card,
    .testimonial-card {
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
}
