/* ==========================================================================
   1. RESET & BASES (Identiques au Main)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cabin', sans-serif;
}

body {
    background-color: #181717;
}

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* ==========================================================================
   2. HEADER & NAVIGATION (Bouton Retour + Logo)
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    padding: 0 40px;
    z-index: 1001;
}

/* Le bouton "Retourner à l'accueil" */
header .navig {
    flex: 0 1 auto; /* Prend uniquement la place nécessaire au texte */
    order: 1;        /* Se place à gauche */
    display: flex;
    font-size: 1.4em;
    font-weight: 500;
    border-radius: 50px;
    border: 3px solid #e5e4e4;
    background-color: #181717; /* Fond pour être lisible sur les points */
}

header .navig a {
    text-decoration: none;
    padding: 10px 30px;
    color: #e5e4e4;
    transition: all 0.2s;
}

header .navig a:hover {
    transform: scale(1.1);
    color: #ed6a6c;
    background-color: #e5e4e4;
    border-radius: 50px;
}

/* Le Logo à droite */
header .logo {
    flex: 1; 
    display: flex;
    justify-content: flex-end;
    align-items: center;
    order: 3;
}

header .logo img {
    width: 15%; /* Taille du logo ajustée */
    height: auto;
}

/* Équilibreur invisible pour le flexbox (Optionnel si tu veux centrer) */
header::after {
    content: "";
    flex: 1;
    order: 2;
}

#burger-bouton { display: none; }

/* ==========================================================================
   3. TRANSITION DE PAGE & FOOTER
   ========================================================================== */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #181717;
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.page-transition.hidden {
    opacity: 0;
}

/* Réseaux sociaux fixés à gauche */
footer .reseaux {
    position: fixed;
    top: 4vh; 
    left: 20px; 
    height: 92vh;
    display: grid;
    grid-template-rows: repeat(10, 1fr);
    z-index: 1000;
    justify-items: center;
    align-items: center; 
}

footer img {
    height: 40px;
    filter: invert(100%);
    transition: transform 0.2s, filter 0.3s;
}

footer img:hover {
    transform: scale(1.2);
    filter: invert(100%) brightness(1.2);
}

footer a:nth-child(1) { grid-row: 2; }
footer a:nth-child(2) { grid-row: 5; }
footer a:nth-child(3) { grid-row: 8; }

/* ==========================================================================
   4. STRUCTURE DES SECTIONS & TITRES
   ========================================================================== */
section {
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;     
    color: #e5e4e4;
    scroll-snap-align: start;
    
    /* Fond avec points corail */
    background-color: #181717; 
    background: radial-gradient(#ed6a6c 1px, #181717 1px);
    background-size: 30px 30px;
    background-attachment: fixed;
}

h2 {
    font-size: 2.1em;
    background-color: #ed6a6c;
    color: #e5e4e4;
    padding: 15px 30px;
    border-radius: 50px;
    border: solid 3px #e5e4e4;
    text-align: center;
    transition: all 0.5s;
    margin-top: 150px; /* Espace pour le header */
}

/* ==========================================================================
   5. GALERIES D'IMAGES (Basket & Nature)
   ========================================================================== */

/* Grille 3 colonnes (Basket) */
.basket {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px; 
    padding: 40px;
    width: 100%;
    justify-items: center; 
    align-items: center;
}

/* Grille 2 colonnes (Nature) */
.nature {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px; 
    padding: 20px;
    width: 100%;
    justify-items: center; 
    align-items: center;
}

/* Style commun aux images de galeries */
.basket img, .nature img {
    width: 80%;
    object-fit: cover;
    border-radius: 50px;
    border: 2px solid #ed6a6c;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.basket img:hover, .nature img:hover {
    transform: scale(1.05);
}

/* ==========================================================================
   6. LIGHTBOX (Agrandissement d'image)
   ========================================================================== */
.lightbox {
    display: none; /* Affiché via JS */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 50px;
    border: 3px solid #ed6a6c;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    animation: zoom 0.3s ease; 
}

@keyframes zoom {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-lightbox {
    position: absolute;
    top: 40px;
    right: 40px;
    color: white;
    font-size: 60px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-lightbox:hover {
    color: #ed6a6c;
}

/* ==========================================================================
   7. RESPONSIVE DESIGN (PHOTO.CSS)
   ========================================================================== */

@media screen and (max-width: 900px) {
    /* Menu Burger (Identique au Main) */
    .burger-icone { display: flex; flex-direction: column; gap: 6px; cursor: pointer; z-index: 2000; order: 1; }
    .burger-icone span { display: block; width: 35px; height: 3px; background-color: #e5e4e4; border-radius: 5px; transition: 0.3s ease; }
    #burger-bouton:checked ~ .burger-icone span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    #burger-bouton:checked ~ .burger-icone span:nth-child(2) { opacity: 0; }
    #burger-bouton:checked ~ .burger-icone span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    header .navig {
        position: fixed; top: 0; right: -100%; width: 80%; height: 100vh;
        background-color: #181717; flex-direction: column; justify-content: center;
        align-items: center; gap: 40px; border-radius: 0; border-left: 3px solid #ed6a6c;
        transition: 0.5s ease; z-index: 1500;
    }
    #burger-bouton:checked ~ .navig { right: 0; }
    header .logo { order: 2; }
    header .logo img { width: 60px; }

    /* Adaptation des Grilles Photo */
    .basket, .nature {
        grid-template-columns: 1fr; /* Passage en une seule colonne */
        gap: 20px;
        padding: 20px;
    }

    .basket img, .nature img {
        width: 100%; /* Les photos prennent plus de place */
    }

    /* Titres et Footer */
    h2 { font-size: 1.6em; margin-top: 100px; padding: 10px 20px; }

    /* 3. Footer / Réseaux Sociaux */
    footer .reseaux {
        position: relative;
        height: auto;
        width: 100%;
        top: 0;
        left: 0;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 30px;
        padding: 40px 0;
        background-color: #181717;
    }
    footer {
    scroll-snap-align: end; /* Force le snap sur le bord inférieur du footer */
}
}

@media screen and (max-width: 480px) {
    header { padding: 0 20px; }
    .close-lightbox { top: 20px; right: 20px; font-size: 40px; }
}