/* Styles responsive pour les écrans mobiles */

@media screen and (max-width: 768px) {
    :root {
        --side-margin: 5%; /* Réduction des marges latérales sur mobile */
    }

    .container {
        width: calc(100% - var(--side-margin) * 2);
        padding: 0 10px;
    }

    #main-nav {
        width: calc(100% - var(--side-margin) * 2);
        padding: 10px 0;
    }

    .nav-links {
        position: absolute;
        right: 0;
        top: 70px;
        background-color: var(--bg-color);
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        transform: translateY(-150%);
        transition: transform 0.5s ease-in;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .nav-active {
        transform: translateY(0%);
    }

    .burger {
        display: block;
    }

    /* Hero section adjustments */
    .hero {
        padding: 80px 0 60px;
    }

    .hero-content {
        padding: 0 20px;
        text-align: center;
    }

    .hero h1 {
        font-size: 1.8rem;
        text-align: center;
    }

    .hero h2 {
        font-size: 1.2rem;
        text-align: center;
    }

    .hero p {
        font-size: 1rem;
        text-align: center;
    }

    .keywords {
        justify-content: center;
    }

    /* Section spacing */
    section {
        padding: 40px 0;
    }

    section h2 {
        font-size: 1.5rem;
    }

    /* Cards adjustments */
    .cards {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }

    /* Projects and other layouts */
    .project-showcase, .about-grid, .contact-grid {
        flex-direction: column;
        gap: 30px;
    }

    .project-card.featured {
        flex-direction: column;
    }

    .project-info h3, .about-text h2 {
        font-size: 1.4rem;
    }

    .project-image img {
        max-width: 100%;
    }

    .about-image {
        order: -1;
    }

    /* Skills page */
    .skill-item {
        margin-bottom: 15px;
    }

    /* Form elements */
    .form-group input, .form-group textarea, .submit-btn {
        font-size: 16px; /* Prevent zoom on mobile */
        padding: 10px;
    }
}

/* Small mobile screens */
@media screen and (max-width: 480px) {
    :root {
        --side-margin: 3%; /* Marges encore plus réduites pour très petits écrans */
    }

    .logo span {
        font-size: 1rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .cta-button, .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .social-icon {
        width: 35px;
        height: 35px;
    }

    .social-svg-icon {
        width: 16px;
        height: 16px;
    }
}
