/* Styles généraux */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f0f0;
    background-image: url('https://www.transparenttextures.com/patterns/white-wall.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

header {
    background: #333;
    color: #fff;
    padding: 1.5rem 0; /* Réduit l'espacement vertical */
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    font-size: 2.5rem; /* Réduit la taille du titre */
    font-family: 'Poppins', sans-serif;
    margin: 0;
    font-weight: 700;
}

nav {
    margin-top: 0.5rem;
}

nav a {
    color: #ff6347;
    text-decoration: none;
    margin: 0 1.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ffd700;
}

/* Sections */
section {
	 background-attachment: fixed;
    background-position: center;
    background-size: cover;
    padding: 4rem 1rem;
    max-width: 1000px;
    margin: auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

section h2 {
     font-size: 1.8rem; /* Réduit la taille de police pour les petits écrans */
    white-space: nowrap; /* Empêche le texte de se couper */
    overflow: hidden; /* Masque tout texte qui déborde */
    text-overflow: ellipsis; /* Affiche des "..." si le texte est trop long */
}

section p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
}

/* Services */
.services-images {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    overflow-x: auto;
}

.service-item {
    flex: 0 0 auto;
    text-align: center;
    width: 150px;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.service-item a {
    display: block;
    width: 180px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-item img:hover {
    transform: scale(1.1);
}

.link-text {
    font-size: 1.2rem;
    white-space: nowrap;
    font-weight: bold;
    text-decoration: underline;
    color: #333;
    margin-bottom: 0.5rem;
    display: inline-block;
    cursor: pointer;
    transition: color 0.3s ease;
}

.link-text:hover {
    color: #ff6347;
}

/* Portfolio */
#portfolio-gallery-container {
    width: 600px; /* Largeur fixe pour la galerie */
    height: 200px; /* Hauteur fixe pour la galerie */
    overflow: hidden; /* Masquer les images qui débordent */
    margin: 0 auto; /* Centrer horizontalement */
    margin-bottom: 30px;
    position: relative;
}

#portfolio-gallery {
    display: flex;
    gap: 20px;
    animation: scrollImages 20s linear infinite;
}

#portfolio-gallery img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#portfolio-gallery img:hover {
     transform: scale(1.05); /* Zoom léger */
    transition: transform 0.3s ease-in-out; /* Transition fluide */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

@keyframes scrollImages {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Footer */
footer {
    background: rgba(51, 51, 51, 0.9);
    color: #fff;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

footer p {
    font-size: 1rem;
    color: #ddd;
}

/* Contact - Zones de saisie agrandies et centrées */
section#contact form div {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

section#contact input,
section#contact textarea {
    width: 90%; /* Ajuste la largeur pour être plus flexible */
    padding: 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 0.5rem;
}

section#contact button {
    width: 90%;
    padding: 1rem;
    font-size: 1.2rem;
    background-color: #ff6347;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;

}

section#contact button:hover {
    background-color: #ffd700;
}

/* Responsive Design */
@media screen and (max-width: 768px) {

    /* Services - Alignement côte à côte des boutons */
    .services-images {
        display: flex;
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
        padding: 0 1rem;
    }

    .service-item {
        flex: 1 1 48%;
        max-width: 48%;
        text-align: center;
        margin-bottom: 1rem;
    }

    .service-item a {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 12px;
	 transform: translateY(-5px);  /* Léger mouvement vers le haut */
        box-shadow: 0 12px 18px rgba(0, 0, 0, 0.2); /* Ombre plus marquée */
        overflow: hidden;
    }

    .service-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Section Mes réalisations */
    #portfolio-gallery-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }

    #portfolio-gallery {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        max-width: 100%;
    }

    /* Contact - Adaptation des champs */
    section#contact input,
    section#contact textarea {
        width: 90%; /* Les champs occupent 90% de la largeur */
        padding: 1rem;
        font-size: 1rem;
        border: 1px solid #ccc;
        border-radius: 4px;
        margin-top: 0.5rem;
    }

    section#contact button {
        width: 90%;
        padding: 1rem;
        font-size: 1.2rem;
        background-color: #ff6347;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
    }
    section#contact button:hover {
        background-color: #ffd700;
    }
}
/* Style de la barre de défilement */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1); 
}

::-webkit-scrollbar-thumb {
    background: #ff6347; 
    border-radius: 10px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #ffd700;
}
