/* ==========================================================================
   1. RESET & BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #222;
    background: #f9f9f9;
    overflow-x: hidden;
}

/* Texture de fond topo */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("images/topo.svg");
    background-size: 600px;
    opacity: 0.02;
    pointer-events: none;
    z-index: -1;
}

/* Cache radicalement toute vidéo injectée hors des conteneurs prévus */
body > video {
    display: none !important;
}

/* ==========================================================================
   2. NAVIGATION (PC)
   ========================================================================== */
nav {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.nav-logo a {
    color: #fff !important;
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    font-family: 'Barlow Condensed', sans-serif;
}

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

.nav-links a {
    color: #fff !important;
    text-decoration: none;
    font-family: 'Barlow Condensed', sans-serif !important;
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: opacity 0.3s;
}

.nav-links a:hover { opacity: 0.7; }
.nav-links a.active { border-bottom: 2px solid #fff; }

.burger {
    display: none; /* Caché sur PC */
    cursor: pointer;
    font-size: 1.6rem;
    color: #fff;
    z-index: 101;
}

/* ==========================================================================
   3. MENU MOBILE
   ========================================================================== */
.mobile-nav {
    position: fixed !important;
    inset: 0 !important;
    background: #000 !important;
    display: none; /* Géré par JS (display: flex) */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-nav.open {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.mobile-nav a {
    color: white !important;
    font-size: 2.5rem;
    margin: 15px 0;
    text-decoration: none;
    font-family: 'Barlow Condensed', sans-serif !important;
    text-transform: uppercase;
}

.close-nav {
    position: absolute;
    top: 25px;
    right: 35px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
}

/* ==========================================================================
   4. HERO (ACCUEIL, ABOUT, CONTACT)
   ========================================================================== */
#hero {
    position: relative;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#hero.small-hero {
    height: 35vh !important;
    min-height: 250px;
    background-image: url("images/header/miniature-header.png") !important;
    background-size: cover !important;
    background-position: center !important;
}

.hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-content h1, 
.hero-content p, 
.subtitle-home {
    color: #ffffff !important;
    text-transform: uppercase;
    font-family: 'Barlow Condensed', sans-serif !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content h1 {
    font-size: 3.5rem;
    letter-spacing: 5px;
    font-weight: 700;
}

.signature-img {
    width: 400px;
    max-width: 80%;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
    display: block;
    margin: 0 auto -10px; /* Rapproche le sous-titre */
}

.subtitle-home {
    font-size: 1.2rem;
    letter-spacing: 5px;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    color: #fff;
    font-size: 2rem;
    z-index: 5;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* ==========================================================================
   5. PORTFOLIO (FILTRES ET GRILLES)
   ========================================================================== */
.portfolio-top-bar {
    text-align: center;
    padding: 60px 20px 30px;
}

.portfolio-title h2 {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.filter-menu {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.filter-btn {
    background: none;
    border: none;
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    color: #999;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s;
}

.filter-btn.active { color: #000; font-weight: 700; }

.gallery-container {
    max-width: 1600px;
    margin: 0 auto 60px;
    padding: 0 20px;
    display: grid;
    /* Force 5 colonnes sur les grands écrans */
    grid-template-columns: repeat(5, 1fr); 
    gap: 15px;
}

.photo-item {
    position: relative;
    overflow: hidden;
    background: #000;
    aspect-ratio: 9 / 16;
}

#gallery .photo-item { aspect-ratio: 4 / 5; }

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

.photo-item:hover img, .photo-item:hover video { transform: scale(1.05); }

.video-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    z-index: 2;
    pointer-events: none;
}

.photo-title {
    position: absolute; bottom: 25px; width: 100%; text-align: center;
    color: #fff; z-index: 3;
    font-family: 'Barlow Condensed', sans-serif;
}

.photo-title h3 { font-size: 1.3rem; text-transform: uppercase; }
.photo-subtitle { font-size: 0.85rem; opacity: 0.8; }

.play-icon {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 55px; height: 55px; border: 2px solid #fff; border-radius: 50%;
    background: rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.2rem; z-index: 4; transition: background 0.3s;
}

.photo-item:hover .play-icon { background: rgba(0,0,0,0.5); }

/* ==========================================================================
   6. MODAL (LECTEUR VIDÉO CORRIGÉ)
   ========================================================================== */
.modal {
    position: fixed; 
    inset: 0; 
    background: #000; /* Fond noir total */
    z-index: 100000; 
    display: none; 
    align-items: center; 
    justify-content: center;
    padding: 0;
}

.modal.open { display: flex; }

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Garde le ratio vertical sans déformer */
}

/* Croix de fermeture mobile-friendly */
.close-modal {
    position: absolute; 
    top: 20px; 
    right: 20px; 
    color: #fff; 
    font-size: 35px; 
    cursor: pointer;
    z-index: 100001;
    background: rgba(0, 0, 0, 0.5);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}

/* Contact Section */
.contact-section { max-width: 1100px; margin: 80px auto; padding: 0 30px; }
.contact-container { display: grid; grid-template-columns: 1fr 1.5fr; gap: 80px; align-items: start; }
.contact-info h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 2rem; text-transform: uppercase; margin-bottom: 20px; }
.info-item { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.info-item i { width: 25px; font-size: 1.2rem; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-family: 'Barlow Condensed'; text-transform: uppercase; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ddd; font-family: 'Montserrat'; border-radius: 4px; }
.submit-btn { width: 100%; padding: 15px; background: #222; color: #fff; border: none; font-family: 'Barlow Condensed'; font-weight: 600; text-transform: uppercase; cursor: pointer; letter-spacing: 2px; }

/* Footer */
footer { display: flex; justify-content: center; align-items: center; gap: 20px; padding: 40px 20px; color: #999; font-size: 0.9rem; }
.socials a { color: #999; font-size: 1.2rem; transition: color 0.3s; }
.socials a:hover { color: #222; }

/* ==========================================================================
   7. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
    .nav-links { display: none !important; }
    .burger { display: block !important; }
    .contact-container { grid-template-columns: 1fr; gap: 50px; }
    .contact-info { text-align: center; }
    .info-item { justify-content: center; }
    .hero-content h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    .gallery-container { grid-template-columns: 1fr; padding: 10px; gap: 10px; }
    #hero { height: 80vh; }
    #hero.small-hero { height: 25vh !important; }
    .signature-img { width: 250px; }
    .hero-content h1 { font-size: 2rem; }
    footer { flex-direction: column; gap: 10px; padding: 30px 10px; }
    
    /* Correction spécifique lecteur vertical mobile */
    .modal-content video {
        width: 100vw;
        height: auto;
    }
    .close-modal {
        top: 15px;
        right: 15px;
        font-size: 30px;
    }
}

.hero-bg-video::-webkit-media-controls,
.hero-bg-video::-webkit-media-controls-panel,
.hero-bg-video::-webkit-media-controls-play-button,
.hero-bg-video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

.hero-bg-video {
  pointer-events: none; /* empêche toute interaction */
}