@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

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

/* =========================
   COULEURS
========================= */
:root {
    --beige: #BF8E63;
    --bleu-fonce: #072A40;
    --bleu-moyen: #274659;
}

html, body {
    height: 100%;
}


/* =========================
   GLOBAL
========================= */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f7f7f7;
    color: var(--bleu-fonce);
    line-height: 1.7;

    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


/* =========================
   HEADER
========================= */
header {
    background-color: white;
    padding: 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #58788C;
}

.logo img {
    height: 100px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--bleu-moyen);
    font-weight: 500;
}

nav a:hover {
    color: var(--beige);
}



/* =========================
   MAIN
========================= */
main {
    max-width: 1100px;
    margin: 80px auto;
    padding: 0 20px;
    flex: 1;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

h2 {
    margin-top: 40px;
    font-size: 2rem;
    margin-bottom: 20px;
}

p {
    margin-bottom: 15px;
    color: #333;
}

/* =========================
   GALERIE PRINCIPALE
========================= */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 25px;
    margin-top: 50px;
}

/* Carte */
.card {
    background-color: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}

/* Image */
.card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.card:hover img {
    transform: scale(1.1);
}

/* Infos */
.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background-color: var(--bleu-fonce);
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.card:hover .card-info {
    transform: translateY(0);
}

.card-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.card-info span {
    font-size: 0.9rem;
    color: var(--beige);
}



/* =========================
   MINI GALERIE
========================= */
.mini-gallery {
    margin-top: 60px;
    display: grid;
    grid-template-columns: repeat(17, 1fr);
    gap: 16px;
    width: 100%;
    justify-items: center;
}


.mini-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mini-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    background-color: #f4f4f4;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.vertical-text {
    margin-top: 8px;
    font-size: 12px;
    letter-spacing: 1px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);   /* 🔑 inversion du sens */
    color: #333;
}


/* =========================
   RESPONSIVE
========================= */

/* Galerie principale */
@media (max-width: 1024px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}

/* Mini galerie */
@media (max-width: 900px) {
    .mini-gallery {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 500px) {
    .mini-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =========================
   FOOTER
========================= */
footer {
    border-top: 1px solid #BF8E63;
    background-color: #072A40;
    text-align: center;
    padding: 20px;
    color: white;
}



/* =========================
   CONTACT
========================= */

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 15px;
    max-width: 700px;
    background-color: #f9f9f9;
}

.contact-photo {
    width: 200px;
    height: auto;
    object-fit: cover;
    border: 2px solid #333;
    border-radius: 5px; /* léger arrondi, mais pas rond */
}

.contact-info h2 {
    margin: 0 0 10px 0;
}

.contact-info p {
    margin: 5px 0;
}

.social-icon {
    width: 24px;
    height: 24px;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 15px;
    max-width: 700px;
    background-color: #f9f9f9;
    flex-wrap: wrap; /* permet le passage en colonne sur petit écran */
}

.contact-photo {
    width: 200px;
    height: auto;
    object-fit: cover;
    border: 2px solid #333;
    border-radius: 5px; /* léger arrondi */
    flex-shrink: 0; /* évite que la photo se réduise trop */
}

.contact-info {
    flex: 1; /* prend le reste de l'espace */
}

.contact-info h2 {
    margin: 0 0 10px 0;
}

.contact-info p {
    margin: 5px 0;
}

.social-icon {
    width: 24px;
    height: 24px;
}

/* MEDIA QUERY pour petit écran */
@media (max-width: 600px) {
    .contact-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .contact-photo {
        width: 100%;
        max-width: 300px; /* limite la taille de la photo */
    }

    .contact-info {
        width: 100%;
    }
}

/* Intro */
.intro img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

/* MEDIA QUERIES */
@media (max-width: 768px) {
    nav {
    width: 100%;          /* occupe toute la largeur */
}

nav ul {
    width: 100%;          /* chaque item prend toute la largeur */
    max-height: 80vh;     /* limite la hauteur du menu à 80% de l'écran */
    overflow-y: auto;     /* ajoute un scroll si le menu dépasse */
}

    header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .logo img { height: 70px; }
    nav ul { flex-direction: column; gap: 10px; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
}

@media (max-width: 600px) {
    /* Galerie principale */
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .card img { height: 130px; }

    /* Mini-gallery */
    .mini-gallery { grid-template-columns: repeat(4, 1fr); gap: 10px; }

    /* Intro */
    .intro { flex-direction: column; }
    .intro img { width: 100%; height: auto; }

    /* Contact */
    .contact-card { flex-direction: column; align-items: center; text-align: center; }
    .contact-photo { width: 100%; max-width: 300px; }
    .contact-info { width: 100%; }


}

@media (max-width: 600px) {
    .card-info {
        transform: translateY(0) !important; /* force l'affichage */
        position: relative; /* pour qu'elle s'affiche dans le flux normal */
        background-color: var(--bleu-fonce);
        color: white;
        padding: 10px;
    }

    .card img {
        transform: none; /* enlever le zoom au hover si tu veux */
    }
}


