* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Open Sans', sans-serif;
    background-color: #f7f4ed;
    color: #4a4a4a;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-image: url('photos/fond.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

header {
    background-color: rgba(107, 142, 35, 0.9);
    color: #f7f4ed;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

nav a {
    text-decoration: none;
    margin: 0.5rem;
}

nav button {
    background-color: rgba(143, 188, 143, 0.9);
    color: #f7f4ed;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s, transform 0.3s;
    font-weight: 500;
    font-size: 1rem;
}

nav button:hover {
    background-color: rgba(152, 251, 152, 0.9);
    transform: translateY(-2px);
}

.carousel-container {
    position: relative;
    height: 30vh;
    min-height: 200px;
    overflow: hidden;
    background-color: rgba(210, 197, 170, 0.9);
    perspective: 1000px;
}

.carousel {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.5s ease-in-out;
    transform-style: preserve-3d;
    position: relative;
    z-index: 1;
}

.carousel img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: all 0.5s ease-in-out;
    backface-visibility: hidden;
}

.carousel img.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.carousel img.prev {
    transform: translate(-150%, -50%) scale(0.6) rotateY(45deg);
    opacity: 0.4;
    filter: blur(3px);
    visibility: visible;
    z-index: 1;
}

.carousel img.next {
    transform: translate(50%, -50%) scale(0.6) rotateY(-45deg);
    opacity: 0.4;
    filter: blur(3px);
    visibility: visible;
    z-index: 1;
}


.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px;
    text-decoration: none;
    font-size: 18px;
    z-index: 3;
    cursor: pointer;
    transition: background-color 0.3s;
}

.carousel-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-arrow.left {
    left: 10px;
}

.carousel-arrow.right {
    right: 10px;
}

.item-details {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #6b5b3d;
}

.item-status {
    font-size: 1rem;
    font-weight: 500;
    color: #8B4513;
}

.item-info {
    font-size: 0.9rem;
    color: #4a4a4a;
    line-height: 1.5;
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    background-color: rgba(250, 248, 243, 0.9);
    overflow-y: auto;
    border-top: 1px solid #e0d8c9;
    border-bottom: 1px solid #e0d8c9;
    margin: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    -webkit-overflow-scrolling: touch;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem;
    background-color: rgba(250, 248, 243, 0.9);
    border-top: 1px solid #e0d8c9;
    border-bottom: 1px solid #e0d8c9;
    margin: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #6b5b3d;
    margin-bottom: 0.7rem;
    text-align: center;
    font-size: 1.8rem;
}

h3 {
    color: #6b5b3d;
    margin-bottom: 0.7rem;
    text-align: center;
    font-size: 1.4rem;
}

.catalogue {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.catalogue-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid #00bfff; /* Bleu cyan */
    transition: all 0.3s ease;
}

.catalogue-item:hover {
    border-width: 4px;
    box-shadow: 0 0 15px #00bfff; /* Effet de lueur avec le bleu cyan */
    transform: scale(1.02);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    overflow: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    display: block;
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.text-content {
    overflow-y: auto;
}

p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

li {
    margin-left: 1rem;
}

.juments-page .catalogue-item {
    border: 2px solid #FF69B4; /* Rose moyen */
}

.juments-page .catalogue-item:hover {
    box-shadow: 0 0 15px #FF69B4; /* Rose moyen */
}
.message {
    text-align: center;
    color: #4a4a4a;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn-home {
    background-color: #8B4513;
    color: #f7f4ed;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-home:hover {
    background-color: #a0522d;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn-home:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-home:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.5);
}

.contact-container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.contact-form {
    flex: 1;
}

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

label {
    font-weight: bold;
    color: #6b5b3d;
}

input, textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

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

button[type="submit"] {
    background-color: #8B4513;
    color: #f7f4ed;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-size: 1rem;
    align-self: flex-start;
}

button[type="submit"]:hover {
    background-color: #a0522d;
}

.map-container {
    flex: 1;
    height: 400px;
}

footer {
    background-color: #8B4513;
    color: #f7f4ed;
    padding: 1rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    flex-shrink: 0;
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    flex-wrap: wrap; /* Ajouté pour permettre le wrapping sur mobile */
}

footer div {
    flex: 1;
    margin: 0 1rem;
    text-align: center;
}

footer h4 {
    color: #FFE4B5;
    margin-bottom: 0.5rem;
}

footer a {
    color: inherit;
    text-decoration: none;
}

footer a:hover {
    text-decoration: none;
}

footer .fab {
    font-size: 2rem;
    margin: 0 0.5rem;
    color: #ffffff;
    transition: color 0.3s ease;
}

footer .fab:hover {
    color: #e0e0e0;
}

.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        height: 100vh;
    }
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .menu-toggle {
        display: block;
        background-color: #6b8e23;
        color: #fff;
        border: none;
        border-radius: 4px;
        padding: 0.5rem 0.75rem;
        font-size: 1.2rem; /* Augmenté pour une meilleure visibilité */
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    .menu-toggle:hover {
        background-color: #556b2f;
    }

    .menu-toggle .menu-icon,
    .menu-toggle .close-icon {
        font-weight: bold;
    }

    .menu-toggle .close-icon {
        display: none;
    }

    .menu-toggle.active .menu-icon {
        display: none;
    }

    .menu-toggle.active .close-icon {
        display: inline;
    }

    nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%; /* Ajusté pour positionner le menu juste en dessous du header */
        left: 0;
        background-color: rgba(107, 142, 35, 0.9);
        padding: 1rem;
        z-index: 9; /* Assure que le menu est au-dessus des autres éléments */
    }

    nav.active {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        margin: 0.2rem;
    }

    nav button {
        background-color: transparent;
        color: #fff;
        border: 1px solid #fff;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    nav button:hover {
        background-color: #fff;
        color: #6b8e23;
    }



    .carousel-container {
        height: 25vh;
        min-height: 150px;
    }

    main {
        flex: 1 0 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-content {
        padding: 1rem;
        margin: -1rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    footer {
        flex-direction: column; /* Change la direction du flex sur mobile */
        padding: 1rem 0.5rem; /* Ajuste le padding pour plus d'espace */
        align-items: center; /* Centre les éléments horizontalement */

    }

    footer div {
        margin: 0.5rem 0; /* Ajoute de l'espace entre les sections */
        text-align: center; /* Aligne le texte à gauche pour une meilleure lisibilité */
        width: 100%; /* Assure que chaque div prend toute la largeur */
    }

    footer h4 {
        font-size: 1rem; /* Ajuste la taille de la police pour les titres */
    }

    footer p {
        font-size: 0.9rem; /* Ajuste la taille de la police pour le texte */
        line-height: 1.4; /* Augmente l'interligne pour améliorer la lisibilité */
    }
}
