/* =========================
   RESET
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(180deg, #f4f6f8, #e9edf1);
    text-align: center;
    padding: 20px;
}

h1, h2 {
    margin-bottom: 25px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: auto;
}

/* =========================
   BOUTONS MODERNES
========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 26px;
    margin: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Boutons multi-lignes (texte intégré) */
.multi-line-btn {
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    min-width: 240px;
}

/* =========================
   GALERIE INDEX : 4 IMAGES HORIZONTALES
========================= */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 images sur 1 ligne */
    gap: 20px;
    margin-top: 45px;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.25);
    transition: transform 0.3s ease;
}

.card img:hover {
    transform: scale(1.05);
}

.card p {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #444;
    text-align: center;
}

/* =========================
   PAGES pageX.php : IMAGE 25% PLUS PETITE
========================= */
.image-center {
    margin-bottom: 20px;
}

.image-center img {
    width: 75%;         /* réduit la largeur de 25% */
    max-width: 750px;   /* anciennement 1000px */
    height: auto;
    border-radius: 14px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* Boutons au-dessus de l'image sur pageX.php */
.buttons-top {
    margin-bottom: 15px;
}

.buttons-top .btn {
    margin: 0 10px 10px 10px;
}

/* =========================
   FORMULAIRE (zone protégée)
========================= */
input[type="password"] {
    width: 100%;
    max-width: 300px;
    padding: 12px;
    font-size: 1rem;
    border-radius: 10px;
    border: 1px solid #ccc;
}

/* =========================
   RESPONSIVE
========================= */

/* Tablette : 2 images par ligne */
@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .multi-line-btn {
        min-width: 200px;
        font-size: 0.95rem;
    }

    .image-center img {
        width: 90%;
        max-width: 100%;
    }
}

/* Mobile : 1 image par ligne */
@media (max-width: 450px) {
    .gallery {
        grid-template-columns: 1fr;
    }

    .multi-line-btn {
        min-width: 160px;
        padding: 14px 18px;
    }

    .image-center img {
        width: 100%;
        max-width: 100%;
    }
}
