/* ---------------------------------------------------- */
/* --- VARIABLES ET BASE --- */
/* ---------------------------------------------------- */
:root {
    --color-blue: #1d2b4e;
    --color-red: #e73642;
    --color-sky: #B3DEEF;
    --color-beige: #FFF9F0;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-beige);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* --- LOGO PERMANENT AU CENTRE --- */
.accueil {
    width: 80px;
    position: fixed;
    top: 2%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2500;
    cursor: pointer;
    transition: transform 0.5s;
}
.accueil:hover { transform: translateX(-50%) scale(1.3); }

/* ---------------------------------------------------- */
/* --- NAVIGATION / MENU HAMBURGER (CLONE À PROPOS) --- */
/* ---------------------------------------------------- */
.nav-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 30px;
    cursor: pointer;
    z-index: 2501;
    background: transparent;
    border: none;
}
.line {
    position: absolute;
    width: 100%;
    height: 4px;
    background-color: #1d2b4e;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.l1 { top: 0; }
.l2 { top: 13px; }
.l3 { top: 26px; }

.nav-toggle.active .l1 { transform: translateY(13px) rotate(45deg); background-color: var(--color-blue); }
.nav-toggle.active .l2 { opacity: 0; }
.nav-toggle.active .l3 { transform: translateY(-13px) rotate(-45deg); background-color: var(--color-blue); }

nav.nav-menu {
    position: fixed;
    inset: 0;
    background: rgba(255, 249, 240, 0.75);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(-110%);
    transition: transform 0.4s ease;
    z-index: 2000;
}
nav.nav-menu.active { transform: translateX(0); }

/* POSITIONNEMENT DU MENU (REMONTÉ ET DÉCALÉ À DROITE) */
.main {
    display: flex;
    width: 60%; 
    height: 65%; 
    justify-content: center; 
    align-items: center;
    gap: 30px; 
    margin-top: -60px;
    margin-left: 50px;
}

.container {
    position: relative;
    height: 100%; 
    width: 400px; 
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 30px;
    text-decoration: none;
    opacity: 0; 
    transform: translateY(20px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: filter 0.5s ease-in-out, transform 0.3s ease;
}

/* Images du menu */
.container:nth-child(1) { background-image: url('photos/moi.jpg'); }
.container:nth-child(2) { background-image: url('photos/photographie.jpg'); }

nav.nav-menu.active .main .container { animation: menuSlideUp 0.5s ease-out forwards; }
@keyframes menuSlideUp { 100% { opacity: 1; transform: translateY(0); } }

/* CHIFFRES ANIMÉS ET TYPO SOBRE MENU */
.numbers { font-family: 'Inter', sans-serif; font-size: 3.5em; font-weight: 700; color: white; display: flex; }
.digit { height: 90px; overflow: hidden; }
.digit span { display: block; height: 90px; line-height: 90px; text-align: center; }
@keyframes scrollUp { 100% { transform: translateY(-100%); } }
@keyframes scrollDown { 0% { transform: translateY(-100%); } 100% { transform: translateY(0); } }
.container:hover .digit span { animation: scrollUp 0.3s ease-in-out forwards; }
.container .digit span { animation: scrollDown 0.3s ease-in-out forwards; }

.container .nav { font-family: 'Inter', sans-serif; font-size: 22px; font-weight: 600; text-transform: uppercase; margin-top: 10px; color: white; text-decoration: none; }

/* CONTACTS MENU NOIR SOBRE */
.main2 { display: flex; width: 60%; justify-content: space-between; margin-top: 50px; margin-left: 50px; }
.main2 a { color: black; text-decoration: none; font-family: 'Inter', sans-serif; transition: 0.3s; font-weight: 600; }
.main2 a:hover { color: var(--color-red); }

/* ---------------------------------------------------- */
/* --- GALERIE PHOTOS (CONTENU) --- */
/* ---------------------------------------------------- */
.titre-galerie {
    font-family: "eight", sans-serif;
    text-align: center;
    font-size: 6vw;
    margin-top: 120px;
    color: var(--color-blue);
    text-transform: uppercase;
}

.mes-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
    padding: 40px 5% 100px 5%;
}

.photo-card {
    position: relative;
    height: 550px;
    border-radius: 30px;
    overflow: hidden;
    cursor: pointer;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* OVERLAY ET CONTENT */
.photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(29, 43, 78, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

.photo-card:hover img { transform: scale(1.1); }
.photo-card:hover .photo-overlay { 
    opacity: 1; 
    background: rgba(29, 43, 78, 0.75); 
}

.photo-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.photo-card h3 {
    font-family: "eight", sans-serif;
    font-size: 2.5rem;
    color: white;
    text-transform: uppercase;
    margin-bottom: 20px;
    text-align: center;
}

/* LE BOUTON BLANC PUR (VOIR-PLUS) */
.voir-plus {
    display: inline-block;
    padding: 12px 30px;
    background-color: white !important;
    color: var(--color-blue) !important;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none !important;
    transition: 0.3s ease;
    border: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.voir-plus:hover {
    background-color: var(--color-red) !important;
    color: white !important;
    transform: translateY(-3px);
}

/* ---------------------------------------------------- */
/* --- FOOTER : CENTRAGE HORIZONTAL DU COPYRIGHT --- */
/* ---------------------------------------------------- */
.footer {
    width: 100%;
    text-align: center; /* Centrage horizontal */
    padding: 50px 0;    /* Espace pour ne pas coller aux photos */
    background-color: transparent;
}

.footer p {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--color-blue);
    margin: 0;
    opacity: 0.7;
}

/* ---------------------------------------------------- */
/* --- PAGE TENNIS (CORRIGÉ POUR ORDRE CORRECT) --- */
/* ---------------------------------------------------- */
/* Conteneur principal */
.container2 {
    max-width: 1400px;
    margin: 100px auto;
    padding: 0 20px;
}

/* Grille GRID (Ordre : Gauche -> Droite) */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes égales */
    gap: 20px; /* Espace entre les photos */
    width: 100%;
}

/* Item de la grille */
.grid-item {
    width: 100%;
    position: relative;
    /* On retire break-inside et margin-bottom qui servaient aux colonnes */
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Remplit bien la case */
    display: block;
    border-radius: 4px; /* Optionnel */
    transition: filter 0.3s ease, transform 0.3s ease;
}

/* Effet au survol */
.grid-item:hover {
    transform: scale(1.02);
    z-index: 2;
}

.grid-item:hover img {
    filter: brightness(0.9);
}

/* --- ANIMATION REVEAL (Gardée intacte) --- */
/* État initial : invisible et décalé vers le bas */
.grid-item.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease; 
}

/* État final : quand le JS ajoute la classe "active" */
.grid-item.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive : Adaptation tablettes et mobiles */
@media (max-width: 900px) {
    .grid { 
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur tablette */
    }
}

@media (max-width: 600px) {
    .grid { 
        grid-template-columns: 1fr; /* 1 colonne sur mobile */
    }
}

/* Fond du lightbox */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Cache par défaut */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* L'image à l'intérieur (la "fenêtre" qui s'ouvre) */
#lightbox img {
    max-width: 90%;
    max-height: 80vh;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    border-radius: 4px;
    
    /* Effet de zoom arrière par défaut */
    transform: scale(0.7);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* État actif quand on clique */
#lightbox.active {
    opacity: 1;
    visibility: visible;
}

#lightbox.active img {
    transform: scale(1); /* L'image s'ouvre en grand */
}

/* Croix de fermeture */
.close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 50px;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.3s ease;
}

.close:hover {
    transform: rotate(90deg) scale(1.2);
}