*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.site-footer {
  margin-top: 2rem;
  padding: 1rem 0 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: #7b6c5e;
}


.image-gallery {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 12px;
        }

        .image-gallery img {
            width: 100%;          /* s’adapte à la largeur du téléphone */
            height: auto;         /* garde les proportions */
            display: block;
            border-radius: 12px;  /* coins arrondis (optionnel) */
            object-fit: cover;
        }

/* =========================
   FIX AFFICHAGE CARTE
========================= */

.map-container {
    width: 100%;
    margin-top: 20px;
}

.map-embed {
    width: 100%;
    height: 400px;
    min-height: 300px;
    border-radius: 12px;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
}

/* Responsive mobile */
@media (max-width: 768px) {
    .map-embed {
        height: 300px;
    }
}

/* =======================================================
   OPTIMISATION MOBILE GLOBALE - IMAGES / MENU / MAP / FORM
======================================================= */

/* ---------- IMAGES EVENEMENTS ---------- */
.annonce-images,
.image-gallery,
.gallery,
.preview-images {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.annonce-images img,
.image-gallery img,
.gallery img,
.preview-images img,
.annonce-image-principale img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
}

/* ---------- CARTE ---------- */
.map-container,
.map-embed,
#map {
    width: 100%;
    max-width: 100%;
}

/* ---------- FORMULAIRES ---------- */
form input,
form select,
form textarea,
button {
    width: 100%;
    max-width: 100%;
}

/* ---------- MENU BURGER ---------- */
@media (max-width: 768px) {

    .nav-toggle {
        display: block !important;
        z-index: 9999;
    }

    .main-nav {
        display: none;
        width: 100%;
        background: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        padding: 15px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }

    .main-nav.is-open {
        display: block !important;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 12px;
    }

    .annonce-images,
    .gallery,
    .image-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .map-embed {
        height: 280px !important;
    }

    .annonce-image-principale img {
        max-height: 260px;
        object-fit: contain;
    }
}

/* ---------- TRES PETITS ECRANS ---------- */
@media (max-width: 480px) {

    .annonce-images,
    .gallery,
    .image-gallery {
        grid-template-columns: 1fr;
    }

    .map-embed {
        height: 240px !important;
    }
}

/* ---------- ADMIN TABLE RESPONSIVE ---------- */
.admin-table,
table {
    width: 100%;
    overflow-x: auto;
    display: block;
}
