/* Section commune */
section {
    padding: 5rem 10%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    overflow: visible;
}

section:nth-child(even) {
    background: #f9f9f9;
}

.section-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--p-5);
    font-weight: 300;
}

.section-content p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* À propos */
#apropos {
    grid-template-columns: auto 1fr;
}

.about-image {
    width: 100%;
    height: 400px;
    
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    position: relative;
}

.about-image img {
    height: 100%;
    border-radius: 100%;
    object-fit: cover;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

/* Mes Travaux - Diaporama */
.gallery-preview {
    width: 100%;
    height: 400px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.gallery-item {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    border-radius: 10px;
    
}

.gallery-item.active {
    opacity: 1;
}

.gallery-item:nth-child(1) {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--p-2) 60%, transparent), 
        color-mix(in srgb, var(--p-3) 60%, transparent)), 
        url('../images/creation1.png') center/cover no-repeat;
}

.gallery-item:nth-child(2) {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--p-5) 60%, transparent), 
        color-mix(in srgb, var(--p-4) 60%, transparent)), 
        url('../images/creation2.png') center/cover no-repeat;
}

.gallery-item:nth-child(3) {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--special-color) 60%, transparent), 
        color-mix(in srgb, var(--p-2) 60%, transparent)), 
        url('../images/creation3.png') center/cover no-repeat;
}

.gallery-item img {
    height: 100%;
    object-fit: cover;
}

/* Flèches de navigation */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    color: var(--p-5);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s;
}

.gallery-arrow:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.gallery-arrow.prev {
    left: 20px;
}

.gallery-arrow.next {
    right: 20px;
}

/* Points de navigation */
.gallery-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid white;
}

.gallery-dot.active {
    background: white;
    transform: scale(1.3);
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--special-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: var(--p-5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Contact */
.contact-info {
    background: linear-gradient(135deg, var(--p-5), var(--p-4));
    padding: 2.5rem;
    border-radius: 10px;
    color: white;
}

.contact-info h2 {
    color: white !important;
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: white !important;
    margin-bottom: 2rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-details p {
    margin: 0.8rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
    transition: all 0.3s;
}

.social-links a:hover {
    background: rgba(255,255,255,0.3);
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

input, textarea {
    padding: 1rem;
    border: 2px solid var(--p-3);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--p-5);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

a {
    color: var(--p-5);
    text-decoration: underline;
}

/* Responsive */
@media screen and (max-width: 700px) {
    #apropos {
        grid-template-columns: 1fr;
        padding: 2.5rem 6%;
        gap: 1.5rem;
        height: auto;
        min-height: unset;
    }  

    #apropos .about-image {
        height: 220px;
        order: 2;
    }

    #apropos .section-content {
        order: 1;
    }
}

@media screen and (max-width: 950px) {
    section:not(#apropos) {
        grid-template-columns: 1fr;
        padding: 2.5rem 6%;
        gap: 1.5rem;
        height: auto;
        min-height: unset;
    }

    /* Texte avant image dans toutes les sections */
    #travaux .section-content,
    #contact form {
        order: 1;
    }

    #travaux .gallery-preview,
    #contact .contact-info {
        order: 2;
    }

    .section-content h2 {
        font-size: 1.6rem;
    }

    .section-content p {
        font-size: 1rem;
    }

    .gallery-preview {
        height: 220px;
    }

    .hero h1 {
        font-size: 2.2rem;
        letter-spacing: 1px;
    }

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

    .contact-info {
        padding: 1.5rem;
    }

    .social-links {
        flex-wrap: wrap;
    }

    textarea {
        min-height: 100px;
    }
}

@media screen and (max-width: 480px) {
    .section-content h2 {
        font-size: 1.4rem;
    }

    .about-image,
    .gallery-preview {
        height: 180px;
    }

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

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