/* ------------------------------------- */
/*               GLOBAL                  */
/* ------------------------------------- */

body, html {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f3f4ff;
}

html {
    scroll-behavior: smooth;
}

/* ------------------------------------- */
/*            HEADER (GRID)              */
/* ------------------------------------- */

.main-header {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    width: 100%;
}

.header-section {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: #f3f4ff;
}

/* Vidéo */
.section-1 {
    overflow: visible;
}

.video-fond {
    position: absolute;
    width: 90%;
    height: 90%;
    object-fit: contain;
    transition: 0.4s ease;
    margin-bottom: 40px;
}

.video-fond:hover {
    scale: 1.1;
}

/* NOM */
.section-2 {
    align-items: flex-end;
    padding-left: 2rem;
}

.name-left {
    font-size: 6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 0.9;
}

/* À propos */
.section-3 {
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 0;
    margin-top: -100px; /* tu peux ajuster la valeur */
}



.text-left {
    font-size: 3rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ------------------------------------- */
/*             REVEAL EFFECT             */
/* ------------------------------------- */

.reveal-container {
    position: absolute;
    inset: 0;
    pointer-events: auto;
}

.sub-link {
    color: inherit !important;        /* même couleur que le texte autour */
}


/* Texte reveal */
.reveal-text {
    position: absolute;
    font-size: 1.5rem;
    top: 4.5rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: 0.3s ease;
    margin-top: 100px; /* tu peux ajuster la valeur */
    
}

.section-3:hover .reveal-text {
    opacity: 1;
}

.reveal-text p {
    margin: 0;
}

/* ----------- GRID PRINCIPAL ----------- */

.gallery-grid {
    margin-top: 0rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
    padding: 50px;
    background: linear-gradient(180deg, #f3f4ff 0%, #f3f4ff 5%, #000000 100%);
}

/* ------------ CELLULES ------------- */

.grid-item {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f0f0f0;
    overflow: hidden;
    aspect-ratio: 3/4;
    border-radius: 10px;
    box-shadow: #00000033 0px 12px 20px;
}

.grid-item img {
    height: 30rem;
    width: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.grid-item img:hover {
    transform: scale(1.01);
}

/* -------- CARTE PORTFOLIO -------- */

.portfolio-card {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 3/4;
    transition: transform 0.5s ease;
}

.portfolio-card:hover img {
    transform: scale(1.02);
}

/* -------- OVERLAY -------- */

.info {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 33%;
    padding: 1.3rem;

    background: linear-gradient(180deg, #00000000 0%, #000000af 30%, #000000 100%);
    color: #f0f0f0;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.45s ease;
}

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

.info h3 {
    margin-top: 1rem;
    font-size: 2rem;
}

.info span {
    font-size: 1rem;
}

/* BOUTON */
.btn-project {
    margin-top: 0.4rem;
    display: inline-block;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    border-radius: 6px;
    text-decoration: none;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.2s ease;
}

.portfolio-card:hover .btn-project {
    opacity: 1;
    transform: translateY(0);
}

.btn-project:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
}

/* ===== ABOUT GRID ===== */

.about-grid {
    margin: 0 auto;
    padding: 80px 40px;
    background: #000000;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
}

.about-text-zone h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.about-text-zone p {
    font-size: 1.15rem;
    line-height: 1.7;
    opacity: 0.85;
    color: #f3f4ff;
}

.about-photo-zone img {
    width: 100%;
    object-fit: cover;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.about-contact-zone h3 {
    margin-bottom: 15px;
    font-size: 1.6rem;
    color: #f3f4ff;
}

.about-contact-zone p {
    font-size: 1.1rem;
    opacity: 0.85;
    color: #f3f4ff;
}

#about {
    scroll-margin-top: 120px; 
}

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

/* ---------------- TABLETTES ---------------- */
@media (max-width: 900px) {

    .main-header {
        margin-top: 2rem;
        padding: 0 1rem;
        grid-template-columns: 1fr 1fr 1fr; /* On garde 3 colonnes */
    }

    .name-left {
        font-size: 4rem;
    }

    .text-left {
        font-size: 2.2rem;
    }

    .video-fond {
        width: 85%;
        height: auto;
        margin-bottom: 10px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        padding: 30px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .about-photo-zone img {
        max-width: 350px;
        margin: 0 auto;
    }
}

/* ---------------- SMARTPHONES ---------------- */
@media (max-width: 600px) {

    /* HEADER toujours 3 colonnes */
    .main-header {
        margin-top: 1rem;
        padding: 0 1rem;
        grid-template-columns: 1fr 1fr 1fr;
    }

    .name-left {
        font-size: 2.3rem;
        text-align: center;
    }

    .text-left {
        font-size: 1.5rem;
        text-align: center;
    }

    .video-fond {
        position: static;
        width: 70%;
        margin: 0 auto;
    }

    /* === REVEAL TOUJOURS VISIBLE === */
    .reveal-container,
    .reveal-line,
    .reveal-text {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
        animation: none !important;
        transition: none !important;
    }

    .reveal-text {
        position: relative !important;
        z-index: 10 !important;
        text-align: center;
        margin-top: 10px;
    }

    .reveal-line {
        display: none !important;
    }

    /* Galerie */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    /* Footer */
    .footer-min {
        height: auto;
        padding: 20px;
        flex-direction: column;
        gap: 10px;
    }
}

/* ---------------------- */
/*   FOOTER - OVERRIDES   */
/* ---------------------- */

/* Cible à la fois <footer> et .footer-min (sécurise selon ton HTML) */
footer,
.footer-min {
    background: #000 !important;          /* fond noir */
    color: #fff !important;
    padding: 30px 20px !important;
    display: flex !important;             /* toujours en ligne */
    flex-direction: row !important;       /* force la direction */
    align-items: center !important;
    justify-content: center !important;  /* le texte est centré */
    width: 100%;
    position: relative !important;
    flex-wrap: nowrap !important;         /* empêche le retour à la ligne */
    box-sizing: border-box;
    z-index: 50;
}

/* Texte centré dans le footer */
footer .footer-text,
.footer-min .footer-text {
    flex: 1 1 auto !important;            /* occupe l'espace central */
    text-align: center !important;
    margin: 0;
    color: #fff !important;
    font-size: 16px;
}

/* Si ton HTML utilise .back-to-top > .arrow, on gère aussi ces classes */
footer .back-to-top,
.footer-min .back-to-top {
    position: absolute !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 60;
}

/* La flèche (span ou icone) : blanche */
footer .back-to-top .arrow,
.footer-min .back-to-top .arrow,
footer .footer-arrow,
.footer-min .footer-arrow {
    color: #ffffff !important;            /* couleur blanche */
    font-size: 24px !important;
    line-height: 1;
    display: inline-block;
    pointer-events: auto;
}

/* Ajustements mobiles : moins d'espace, même comportement */
@media (max-width: 600px) {
    footer,
    .footer-min {
        padding: 18px 14px !important;
    }

    footer .footer-text,
    .footer-min .footer-text {
        font-size: 14px !important;
    }

    footer .back-to-top,
    .footer-min .back-to-top {
        right: 14px !important;
    }

    footer .back-to-top .arrow,
    .footer-min .back-to-top .arrow,
    footer .footer-arrow,
    .footer-min .footer-arrow {
        font-size: 20px !important;
    }
}

/* ------------------------------------- */
/*        HEADER — FIX & CENTER          */
/* ------------------------------------- */

.main-header {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    width: 100%;
    max-width: 1300px;          /* LIMITE LA LARGEUR → centré */
    margin-left: auto;          /* Centre horizontalement */
    margin-right: auto;
    padding: 0 1rem;            /* Légères marges pour éviter collage */
    box-sizing: border-box;
}

/* Sections équilibrées */
.header-section {
    display: flex;
    justify-content: center;    /* Centre chaque item dans sa colonne */
    align-items: center;
    position: relative;
    background: #f3f4ff;
}

/* SECTION 2 — Nom */
.section-2 {
    padding-left: 0 !important; /* Empêche le décalage à gauche */
}

/* SECTION 3 — À propos */
.section-3 {
    padding-right: 0 !important;
    display: flex;
    justify-content: center !important; /* Empêche le collage à droite */
    text-align: center;
}

/* Texte du “À propos” bien centré */
.text-left {
    white-space: nowrap;
    text-align: center !important;
    margin: 0 auto;
}

/* ------------------------------------- */
/*           MOBILE FIX (600px)          */
/* ------------------------------------- */

@media (max-width: 600px) {

    .main-header {
        grid-template-columns: 1fr 1fr 1fr; /* On garde 3 colonnes */
        max-width: 100%;                   /* Full width mais centré */
        padding: 0 0.7rem;
    }

    /* On centre tout */
    .section-2,
    .section-3 {
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        padding: 0 !important;
    }

    .name-left {
        font-size: 2.3rem;
        text-align: center;
    }

    .text-left {
        font-size: 1.3rem;
        text-align: center !important;
        margin: 0 auto !important;
    }

    /* Vidéo */
    .video-fond {
        width: 85%;
        margin: 0 auto;
    }
}

/* ------------------------------------- */
/*     MOBILE — Ajustement A propos      */
/* ------------------------------------- */
/* ------------------------------------------------- */
/*   CORRECTIONS HEADER MOBILE : A PROPOS + LIENS    */
/* ------------------------------------------------- */

@media (max-width: 600px) {

    /* Recentrer proprement la colonne de droite */
    .section-3 {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding-top: 0 !important;
        margin-top: -10px; /* Monte le bloc À propos */
    }

    /* Titre À PROPOS légèrement plus haut */
    .text-left {
        margin-bottom: 5px !important;
        font-size: 1.4rem !important;
    }

    /* Rendre les liens visibles et noirs */
    .reveal-text {
        position: relative !important;
        opacity: 1 !important;
        text-align: center !important;
        margin-top: 5px !important;
        transform: none !important;
    }

    .sub-link {
        display: block !important;
        font-size: 1.2rem !important;
        color: #000 !important;
        text-decoration: underline !important;
        margin: 4px 0 !important;
        opacity: 1 !important;
    }

    /* Suppression complète de l’animation */
    .reveal-container,
    .reveal-line {
        display: none !important;
    }
    /* ----- MOBILE : Cacher la partie À PROPOS ----- */
@media (max-width: 600px) {

    /* Masque complètement la colonne de droite */
    .section-3 {
        display: none !important;
    }

    /* Recentrage du nom */
    .section-2 {
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }

    .name-left {
        font-size: 2.6rem;
        text-align: center;
    }

    /* Vidéo centrée */
    .video-fond {
        width: 80%;
        margin: 0 auto;
        position: static;
    }
}

}

/* ===================== */
/*     VERSION MOBILE    */
/*   Grid en 2 colonnes  */
/* ===================== */

@media (max-width: 600px) {

    /* --- Grid en 2 colonnes --- */
    .gallery-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
        padding: 15px !important;
    }

    /* --- Images plus petites --- */
    .grid-item {
        aspect-ratio: 3/4;
    }

    .portfolio-card img {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }

    /* =============================== */
    /*      ADAPTATION SANS HOVER      */
    /* =============================== */

    /* On rend l’overlay TOUJOURS visible */
    .info {
        opacity: 1 !important;
        transform: none !important;
        height: auto !important;
        background: linear-gradient(180deg, #f3f4ff00 0%, #00000087 40%, #000000 100%);
        padding: 0.8rem !important;
        display: flex !important;
        flex-direction: column;
        justify-content: flex-start;
        gap: 3px;
    }

    /* Titre plus petit */
    .info h3 {
        margin: 0 !important;
        font-size: 1rem !important;
    }

    /* Sous-titre */
    .info span {
        font-size: 0.75rem !important;
        opacity: 0.8;
    }

    /* Bouton toujours visible + plus compact */
    .btn-project {
        opacity: 1 !important;
        transform: none !important;
        font-size: 0.8rem !important;
        padding: 0.3rem 0.8rem !important;
        margin-top: 5px !important;
        max-width: fit-content;
        
    }

    /* Désactivation du hover (augmentation image inutile sur tel) */
    .portfolio-card:hover img,
    .grid-item img:hover {
        transform: none !important;
    }
}
