/* BODY */
html, body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    background-color: #F6F1EB;
    line-height: 1.5;
    font-family: 'Playfair Display', 'Inter';
}

/* MAIN LAYOUT */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas: 
        "galerie entreprise equipe"
        "boutons avis avis";
    gap: 20px;
    width: 100%;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    align-items: stretch;
}

/* LEFT - GALERIE */
.main-left-galerie {
    grid-area: galerie;
    width: 100%;
    padding-left: 10px;
}

.galerie-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.slide-active {
    opacity: 1;
}

/* LEFT - BOUTONS */
.main-left-boutons {
    grid-area: boutons;
    width: 100%;
    padding-left: 10px;
    margin-top: 20px;
    align-items: start;
}

.bouton-main {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bouton-main a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background-color: #6B7B63;
    color: #F6F1EB;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 30px;
    transition: 0.3s;
    font-family: 'Inter';
    font-size: 2rem;
    height: 135px;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bouton-main a:hover {
    background-color: #5C4033;
    font-weight: bold;
}

/* MIDDLE - ENTREPRISE */
.main-middle {
    text-align: center;
    background-color: #6B7B63;
    border-radius: 15px;
    color: #F6F1EB;
    box-shadow: 0 4px 6px #2F2F2F;
    width: 100%;
    height: auto;
    padding: 20px;
    grid-area: entreprise;
    overflow-y: auto;
}

.main-middle::-webkit-scrollbar {
    width: 6px;
}

.main-middle::-webkit-scrollbar-thumb {
    background-color: #F6F1EB;
    border-radius: 2px;
}

.main-middle h2 {
    font-family: 'Playfair Display';
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.main-middle p {
    line-height: 1.5;
    font-family: 'Inter';
    font-weight: 200;
    text-align: justify;
}

/* RIGHT - EQUIPE */
.main-right-equipe {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background-color: #5C4033;
    border-radius: 15px;
    color: #F6F1EB;
    padding: 15px;
    box-shadow: 0 4px 6px #2F2F2F;
    width: 100%;
    height: auto;
    box-sizing: border-box;
    grid-area: equipe;
    overflow: hidden;
}

.main-right-equipe h2 {
    font-family: 'Playfair Display';
    margin-bottom: 15px;
    font-size: 1.8rem;
    text-align: center;
}

.main-right-equipe p {
    line-height: 1.4;
    font-family: 'Inter';
    font-weight: 200;
    text-align: justify;
    overflow-y: auto;
}

.main-right-equipe img {
    width: 100%;
    height: 350px;              /* hauteur maîtrisée */
    object-fit: cover;
    border-radius: 10px;
    margin-top: auto;           /* pousse l’image en bas */
    flex-shrink: 0; 
}

.main-left-galerie,
.main-middle,
.main-right-equipe {
    max-height: 750px;
    height: 100%;
}

/* NOTES / AVIS */
.main-right-notes {
    grid-area: avis;
    background-color: #A28873;
    color: #F6F1EB;
    text-align: center;
    padding: 15px;
    border-radius: 15px;
    width: 100%;
    box-sizing: border-box;
}

.notes h2 {
    font-family: 'Playfair Display';
    font-size: 1.8rem;
    margin-top: 20px;
}

.notes h3 {
    font-family: 'Inter';
    font-weight: 100;
    font-size: 1rem;
    font-style: italic;
    margin-bottom: 20px;
}

.notes-btn {
    background-color: #F6F1EB;
    color: #A28873;
    display: flex;
    justify-content: space-between;
    width: 80%;
    border-radius: 10px;
    text-decoration: none;
    padding: 8px 15px;
    font-family: 'Inter';
    font-weight: 300;
    font-size: 1rem;
    font-style: italic;
    margin: 0 auto 15px auto;
    margin-bottom: 50px;
}

.notes-btn img {
    text-align: right;
    max-width: 100%;
    height: auto;
    display: block;
}

.notes-btn:hover {
    background-color: #5C4033;
}

.avis-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
}

.avis-box {
    background-color: #F6F1EB;
    color: #2F2F2F;
    border-radius: 10px;
    padding: 20px;
    flex: 1; 
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.avis-box h4 {
    margin-bottom: 8px;
    font-size: 1.1rem;
    color: #5C4033;
}

.avis-box .note img {
    margin-bottom: 12px;
    width: 15px;
    height: 15px;
}

.avis-box .note img:nth-child(n+6) {
    display: none;
}

.avis-box p {
    font-family: 'Inter';
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* MEDIA QUERIES */

/* TABLETTE (max-width: 1024px) */
@media (max-width: 1024px) {
    .main-layout {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "galerie"
            "entreprise"
            "equipe"
            "avis"
            "boutons";
        gap: 30px;
        padding: 20px;
    }

    /* Sections en pleine largeur */
    .main-left-galerie,
    .main-middle,
    .main-right-equipe,
    .main-right-notes,
    .main-left-boutons {
        width: 100%;
        max-height: none;
        height: auto;
    }

    /* Galerie responsive */
    .galerie-container {
        height: 50vh;
        min-height: 250px;
    }

    /* Images équipe adaptatives */
    .main-right-equipe img {
        height: auto;
        max-height: 250px;
        width: 100%;
    }

    /* Boutons adaptatifs */
    .bouton-main a {
        font-size: 1.5rem;
        height: auto;
        min-height: 100px;
        padding: 10px 20px;
    }
}

/* MOBILE (max-width: 600px) */
/* MOBILE (max-width: 600px) */
@media (max-width: 600px) {
    .main-layout {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "galerie"
            "entreprise"
            "equipe"
            "avis"
            "boutons";
        gap: 15px;
        padding: 10px;
        width: 100%;
        box-sizing: border-box; /* important pour que padding ne fasse pas dépasser */
        overflow-x: hidden;
    }

    .main-left-galerie,
    .main-middle,
    .main-right-equipe,
    .main-right-notes,
    .main-left-boutons {
        width: 100%;
        max-width: 100%;
        height: auto;
        padding: 5px 5px;
        box-sizing: border-box;
        margin: 0;
    }

    /* Galerie */
    .galerie-container {
        width: 100%;
        max-width: 100%;
        height: 200px; /* hauteur raisonnable */
    }

    .slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Images équipe */
    .main-right-equipe img {
        width: 100%;
        height: auto;
        max-height: 150px;
        object-fit: cover;
    }

    /* Boutons */
    .bouton-main a {
        width: 100%;
        font-size: 1rem;
        padding: 6px 10px;
        height: auto;
        min-height: 60px;
        box-sizing: border-box;
    }

    /* Notes / Avis */
    .avis-container {
        flex-wrap: wrap;
        gap: 5px;
        justify-content: center;
    }

    .avis-box {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 5px;
        font-size: 0.8rem;
    }

    .notes-btn {
        width: 100%;
        padding: 5px 8px;
        font-size: 0.8rem;
    }

    html, body {
        overflow-x: hidden;
    }
}

