/* Global Theme Variables */
:root {
    --bg-color: #0d0d0f;
    --card-bg: #16161a;
    --accent-color: #e2b714;
    --text-primary: #f1f1f1;
    --text-secondary: #a0a0aa;
    --border-color: #27272a;
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* For custom cursor */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Cursor */
.custom-cursor {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
}

.custom-cursor-follower {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(226, 183, 20, 0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease-out, width 0.2s, height 0.2s;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    z-index: 1000;
    background: rgba(13, 13, 15, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 2px;
}
.logo span { color: var(--accent-color); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-color);
}

.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0;
    list-style: none;
    display: none;
    min-width: 180px;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
}
.dropdown-menu li a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--accent-color);
}

/* Language Selector */
.lang-selector { position: relative; }
.lang-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
}
.lang-dropdown {
    position: absolute;
    right: 0;
    top: 120%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    min-width: 140px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.lang-selector:hover .lang-dropdown { display: flex; }
.lang-dropdown button {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    text-align: left;
    font-size: 0.85rem;
    cursor: pointer;
}
.lang-dropdown button:hover {
    background: rgba(226, 183, 20, 0.15);
    color: var(--accent-color);
}

.admin-link-btn {
    color: var(--text-secondary);
    transition: color 0.3s;
}
.admin-link-btn:hover { color: var(--accent-color); }

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.hero-bg-slider {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.hero-bg-slider .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
.hero-bg-slider .slide.active { opacity: 1; }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13,13,15,0.4) 0%, rgba(13,13,15,0.85) 100%);
    z-index: 2;
}
.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 1rem;
}
.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}
.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
}
.btn-primary { background: var(--accent-color); color: #000; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(226, 183, 20, 0.3); }
.btn-outline { border: 1px solid var(--border-color); color: #fff; margin-left: 1rem; }
.btn-outline:hover { background: rgba(255,255,255,0.05); }

.scroll-down {
    position: absolute;
    bottom: 2rem;
    z-index: 3;
    animation: bounce 2s infinite;
    color: var(--text-secondary);
}

/* Portfolio Section */
.portfolio-section, .about-section, .contact-section {
    padding: 6rem 4rem;
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.section-header p { color: var(--text-secondary); }

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}
.tab-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.6rem 1.4rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}
.tab-btn.active, .tab-btn:hover {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.gallery-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 380px;
    background: var(--card-bg);
    cursor: pointer;
}
.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-card:hover img { transform: scale(1.08); }
.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-card:hover .gallery-card-overlay { opacity: 1; }
.gallery-card-overlay h3 { font-size: 1.2rem; color: #fff; }
.gallery-card-overlay p { font-size: 0.85rem; color: var(--accent-color); }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox-content { max-width: 80%; max-height: 80%; text-align: center; }
.lightbox-content img { max-width: 100%; max-height: 70vh; border-radius: 8px; }
.lightbox-caption { margin-top: 1rem; color: #fff; }
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    color: #fff;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
}
.lightbox-close { top: 2rem; right: 2rem; }
.lightbox-prev { left: 2rem; }
.lightbox-next { right: 2rem; }

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}
.info-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}
.btn-whatsapp { background: #25d366; color: #fff; border: none; text-decoration: none; padding: 0.5rem 1rem; border-radius: 6px; display: inline-block; margin-top: 0.5rem; }

.contact-form .form-group { margin-bottom: 1.2rem; }
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
}

footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

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

@media (max-width: 768px) {
    .navbar { padding: 1rem 1.5rem; }
    .nav-links { display: none; }
    .hero-content h1 { font-size: 2.2rem; }
    .contact-container { grid-template-columns: 1fr; }
}
.portfolio-browser{max-width:1200px;margin:0 auto 28px}.portfolio-breadcrumb{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:16px}.portfolio-breadcrumb button{background:none;border:0;color:inherit;cursor:pointer;font:inherit;padding:5px}.folder-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}.folder-card{background:#1d1d20;border:1px solid #333;color:#fff;border-radius:12px;padding:20px;text-align:left;cursor:pointer;display:flex;gap:12px;align-items:center;font-size:16px}.folder-card:hover{border-color:#ffc400}.folder-card span{font-size:24px}

/* V3.2 — navigation visuelle des dossiers par couvertures photo */
.folder-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
    gap:1.5rem;
}
.folder-photo-card{
    position:relative;
    height:300px;
    border:0;
    padding:0;
    border-radius:12px;
    overflow:hidden;
    background:var(--card-bg);
    cursor:pointer;
    color:#fff;
    text-align:left;
}
.folder-photo-card img,
.folder-photo-placeholder{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    transition:transform .45s ease;
}
.folder-photo-placeholder{
    background:linear-gradient(135deg,#27272c,#111114);
}
.folder-photo-card:hover img{transform:scale(1.06)}
.folder-photo-overlay{
    position:absolute;
    inset:0;
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    padding:1.5rem;
    background:linear-gradient(0deg,rgba(0,0,0,.88) 0%,rgba(0,0,0,.15) 68%,rgba(0,0,0,.05) 100%);
}
.folder-photo-overlay h3{
    margin:0 0 .35rem;
    font-size:1.35rem;
    color:#fff;
}
.folder-photo-overlay span{
    color:var(--accent-color);
    font-size:.88rem;
    font-weight:600;
}
.portfolio-breadcrumb{
    margin-bottom:1.25rem;
}
.portfolio-breadcrumb button:hover{color:var(--accent-color)}
#gallery-grid:empty{display:none}
@media(max-width:768px){
    .folder-grid{grid-template-columns:1fr}
    .folder-photo-card{height:240px}
}


/* V3.4.4 — lightbox navigation */
.lightbox-prev,.lightbox-next{
    z-index:2010;
    width:56px;
    height:72px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:12px;
    background:rgba(0,0,0,.38);
    pointer-events:auto;
}
.lightbox-prev:hover,.lightbox-next:hover{background:rgba(245,189,0,.92);color:#111}
.lightbox-prev:disabled,.lightbox-next:disabled{display:none!important}
#order-photo-btn{position:relative;z-index:2011}


/* V3.4.7 — navigation mobile */
.mobile-menu-btn{
    display:none;
    width:44px;height:40px;border:1px solid var(--border-color);border-radius:9px;
    background:rgba(255,255,255,.06);padding:9px;flex-direction:column;justify-content:space-between;
}
.mobile-menu-btn span{display:block;height:2px;background:#fff;border-radius:2px;width:100%}
@media (hover:none),(pointer:coarse){
    *{cursor:auto!important}
    .custom-cursor,.custom-cursor-follower{display:none!important}
}
@media (max-width:768px){
    .navbar{padding:1rem 1.1rem;gap:.7rem;flex-wrap:wrap}
    .logo{font-size:1rem;flex:1}
    .mobile-menu-btn{display:flex;order:2}
    .lang-selector{order:3}
    .admin-link-btn{order:4}
    .nav-links{
        order:5;width:100%;display:none!important;flex-direction:column;align-items:stretch;gap:0;
        padding:.6rem 0 .2rem;margin:0;border-top:1px solid var(--border-color)
    }
    .navbar.mobile-open .nav-links{display:flex!important}
    .nav-links li{width:100%}
    .nav-links a{display:block;padding:.85rem .35rem;font-size:1rem}
    .dropdown-menu{
        position:static;display:none!important;width:100%;margin:.1rem 0 .4rem;padding:.2rem .5rem;
        box-shadow:none;background:#151519
    }
    .dropdown.mobile-submenu-open .dropdown-menu{display:block!important}
    .dropdown:hover .dropdown-menu{display:none}
}


/* V3.4.11 — sélecteur de langue cliquable */
.lang-selector.lang-open .lang-dropdown{display:flex}
@media (hover:none),(pointer:coarse){
    .lang-selector:hover .lang-dropdown{display:none}
    .lang-selector.lang-open .lang-dropdown{display:flex}
}
@media (max-width:768px){
    .lang-dropdown{right:0;top:115%;z-index:1200;max-height:70vh;overflow:auto}
}


/* V3.4.12 — protection dissuasive des photographies */
.gallery-card img,
.folder-photo-card img,
.lightbox-content img,
.about-image img,
.hero-bg-slider{
    -webkit-user-select:none;
    user-select:none;
    -webkit-user-drag:none;
    -webkit-touch-callout:none;
}
.gallery-card img,
.folder-photo-card img,
.lightbox-content img,
.about-image img{
    pointer-events:none;
}


/* V3.4.16 — chaque grande section occupe au moins un écran complet */
#hero,
#portfolio,
#about,
#contact{
    min-height:100vh;
    min-height:100svh;
    box-sizing:border-box;
    scroll-margin-top:90px;
}

/* Les sections de contenu gardent leur mise en page normale,
   mais ne laissent plus apparaître la section précédente/suivante
   lorsqu'on y accède depuis le menu. */
#portfolio,
#about,
#contact{
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
}

/* Sur mobile, on tient compte de la barre de navigation plus compacte. */
@media (max-width:768px){
    #hero,
    #portfolio,
    #about,
    #contact{
        min-height:100svh;
        scroll-margin-top:76px;
    }
}


/* V3.4.17 — correction iPhone : menu et sections */
html{
    scroll-padding-top:84px;
}
@media (max-width:768px){
    html{scroll-padding-top:72px}
    #hero,
    #portfolio,
    #about,
    #contact{
        min-height:100vh;
        min-height:100svh;
        min-height:100dvh;
        box-sizing:border-box;
        position:relative;
        overflow:clip;
    }

    /* Une section ouverte depuis le menu commence toujours sous la barre fixe. */
    #portfolio,
    #about,
    #contact{
        padding-top:max(5.5rem, calc(env(safe-area-inset-top) + 4.5rem));
    }

    /* Le menu et le sous-menu doivent disparaître dès qu'un choix est fait. */
    .navbar:not(.mobile-open) .nav-links{display:none!important}
    .dropdown:not(.mobile-submenu-open) .dropdown-menu{display:none!important}
}


/* V3.4.18 — sous-menu Portfolio immédiat sur iPhone */
@media (max-width:768px){
    .dropdown.mobile-submenu-open .dropdown-menu{
        display:block!important;
        max-height:52vh;
        overflow-y:auto;
        -webkit-overflow-scrolling:touch;
    }
}

/* V3.4.19 — centrage des images de couverture des thèmes principaux */
.folder-photo-card img {
    object-fit: cover;
    object-position: center center !important;
}


/* Navigation horizontale des catégories et sous-catégories (tous écrans) */
#folder-grid.folder-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 .9rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
#folder-grid .folder-photo-card,
#folder-grid .folder-card {
    flex: 0 0 clamp(220px, 28vw, 330px);
    min-width: 0;
    scroll-snap-align: start;
}
@media (max-width: 768px) {
    #folder-grid .folder-photo-card,
    #folder-grid .folder-card { flex-basis: min(76vw, 300px); }
}

/* V3.4.20 — flèches des dossiers visibles sur ordinateur et mobile */
.folder-carousel { position:relative; min-width:0; }
#folder-grid.folder-grid { scroll-behavior:smooth; scrollbar-width:none; }
#folder-grid.folder-grid::-webkit-scrollbar { display:none; }
.folder-arrow {
    position:absolute; top:50%; transform:translateY(-50%); z-index:5;
    width:46px; height:58px; display:flex; align-items:center; justify-content:center;
    border:1px solid rgba(255,255,255,.35); border-radius:12px;
    background:rgba(13,13,15,.82); color:#fff; font-size:38px; line-height:1;
    cursor:pointer; touch-action:manipulation; box-shadow:0 3px 16px rgba(0,0,0,.5);
}
.folder-arrow-prev { left:5px; }
.folder-arrow-next { right:5px; }
.folder-arrow:hover, .folder-arrow:focus-visible { background:var(--accent-color); color:#111; }
.folder-arrow[hidden] { display:none!important; }
@media(max-width:768px) {
    .folder-arrow { width:43px; height:60px; font-size:36px; background:rgba(13,13,15,.88); }
    .folder-arrow-prev { left:2px; }
    .folder-arrow-next { right:2px; }
}


/* V3.4.21 — À propos compact : image et texte ensemble */
#about.about-section { padding:clamp(5.5rem,9vh,7rem) clamp(1rem,4vw,4rem) 2rem; }
#about .about-container {
    width:min(1080px,100%); margin:auto; display:grid;
    grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);
    align-items:center; gap:clamp(1rem,3vw,3rem);
}
#about .about-image { min-width:0; display:flex; justify-content:center; align-items:center; }
#about .about-image img {
    display:block; width:auto; max-width:100%; height:auto;
    max-height:min(58vh,510px); object-fit:contain; border-radius:12px;
}
#about .about-text { min-width:0; }
#about .about-text h2 { font-size:clamp(1.4rem,2.4vw,2.2rem); line-height:1.2; margin-bottom:.8rem; }
#about .about-text p { font-size:clamp(.88rem,1.15vw,1rem); line-height:1.48; margin-bottom:.65rem; }
@media(max-width:768px){
    #about.about-section { padding:calc(env(safe-area-inset-top) + 4.8rem) 1rem 1rem; overflow-y:auto; }
    #about .about-container { display:flex; flex-direction:column; gap:.7rem; justify-content:flex-start; }
    #about .about-image img { max-height:min(29dvh,240px); max-width:100%; object-fit:contain; }
    #about .about-text h2 { font-size:1.35rem; margin-bottom:.45rem; }
    #about .about-text p { font-size:clamp(.8rem,3.4vw,.94rem); line-height:1.35; margin-bottom:.45rem; }
}

/* V3.4.21 — une couverture entière à la fois sur téléphone */
@media(max-width:768px){
    #folder-grid.folder-grid { gap:0; scroll-snap-type:x mandatory; padding-bottom:0; }
    #folder-grid .folder-photo-card, #folder-grid .folder-card {
        flex:0 0 100%; width:100%; max-width:100%; scroll-snap-align:start;
    }
    #folder-grid .folder-photo-card { height:min(54vh,390px); }
    #folder-grid .folder-photo-card img { object-fit:contain!important; background:#16161a; }
    .folder-arrow { z-index:10; }
}


/* V3.4.22 — À propos : légèrement plus haut et photo un peu plus grande */
@media (min-width:769px) {
  #about .about-container { margin:0 auto auto; }
  #about.about-section { padding-top:clamp(5rem,7vh,6rem); }
  #about .about-image img { max-height:min(64vh,560px); }
}
@media (max-width:768px) {
  #about.about-section { padding-top:calc(env(safe-area-inset-top) + 4.3rem); }
  #about .about-container { margin:0 auto auto; }
  #about .about-image img { max-height:min(32dvh,265px); }
}

/* V3.4.23 — portfolio mobile en bandeaux horizontaux */
.scroll-down { display:none!important; }
@media(max-width:768px) {
  #portfolio.portfolio-section { padding:calc(env(safe-area-inset-top) + 4.3rem) .85rem 1.5rem; overflow:visible; }
  #portfolio .section-header { margin-bottom:1.1rem; }
  #portfolio .section-header h2 { font-size:1.75rem; }
  #portfolio .portfolio-browser { margin-bottom:1rem; }
  #portfolio .portfolio-breadcrumb { margin-bottom:.7rem; }
  #folder-grid.folder-grid { gap:.7rem; scroll-snap-type:x proximity; }
  #folder-grid .folder-photo-card, #folder-grid .folder-card {
    flex:0 0 min(44vw,205px); width:min(44vw,205px); max-width:none;
    scroll-snap-align:start;
  }
  #folder-grid .folder-photo-card { height:clamp(170px,46vw,245px); }
  #folder-grid .folder-photo-card img { object-fit:cover!important; }
  #folder-grid .folder-photo-overlay { padding:.7rem; }
  #folder-grid .folder-photo-overlay h3 { font-size:1rem; }
  #folder-grid .folder-photo-overlay span { font-size:.72rem; }
  #gallery-grid.gallery-grid {
    display:flex; flex-wrap:nowrap; gap:.7rem; overflow-x:auto; overflow-y:hidden;
    scroll-snap-type:x mandatory; scroll-behavior:smooth;
    scrollbar-width:none; -webkit-overflow-scrolling:touch;
    padding:0 0 .35rem;
  }
  #gallery-grid.gallery-grid::-webkit-scrollbar { display:none; }
  #gallery-grid .gallery-card {
    flex:0 0 100%; min-width:0; height:min(60dvh,510px);
    scroll-snap-align:start; background:#16161a;
  }
  #gallery-grid .gallery-card img { object-fit:contain; }
  #gallery-grid .gallery-card:hover img { transform:none; }
  #gallery-grid .gallery-card-overlay { opacity:1; padding:1rem; pointer-events:none; }
  #gallery-grid .gallery-card-overlay:empty { display:none; }
  .gallery-carousel { position:relative; min-width:0; }
  .gallery-arrow { position:absolute; top:50%; transform:translateY(-50%); z-index:8;
    display:flex; justify-content:center; align-items:center; width:38px; height:56px;
    background:rgba(13,13,15,.83); color:white; border:1px solid rgba(255,255,255,.4);
    border-radius:10px; font-size:32px; cursor:pointer; }
  .gallery-arrow-prev { left:3px; } .gallery-arrow-next { right:3px; }
  .gallery-arrow[hidden] { display:none!important; }
}
@media(min-width:769px) { .gallery-arrow { display:none!important; } }

/* V3.4.25 — carrousel stable et galerie mobile en vignettes */
@media (max-width:768px) {
  #portfolio.portfolio-section { min-width:0; max-width:100%; overflow-x:clip; }
  #portfolio .portfolio-browser { width:100%; max-width:100%; min-width:0; }
  #portfolio .folder-carousel { width:100%; max-width:100%; min-width:0; overflow:hidden; }
  #folder-grid.folder-grid {
    display:flex; flex-wrap:nowrap; width:100%; max-width:100%; min-width:0;
    overflow-x:auto; overflow-y:hidden; overscroll-behavior-x:contain;
    scroll-snap-type:none; touch-action:pan-x; -webkit-overflow-scrolling:touch;
    scroll-behavior:smooth; gap:.7rem;
  }
  #folder-grid .folder-photo-card, #folder-grid .folder-card {
    flex:0 0 min(44vw,205px); min-width:0; width:min(44vw,205px);
  }
  #gallery-grid.gallery-grid {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
    gap:.7rem; overflow:visible; scroll-snap-type:none;
  }
  #gallery-grid .gallery-card {
    width:100%; min-width:0; height:clamp(145px,37vw,230px);
    scroll-snap-align:none;
  }
  #gallery-grid .gallery-card img { object-fit:cover; }
  #gallery-grid .gallery-card:hover img { transform:none; }
  .gallery-arrow { display:none!important; }
  .lightbox.active { flex-direction:column; padding:3.5rem .65rem 5.5rem; }
  .lightbox-content img { object-fit:contain; max-height:calc(100dvh - 17rem); }
  .lightbox-prev,.lightbox-next { top:auto; bottom:1rem; }
}
@media (max-width:768px) and (orientation:landscape) {
  .lightbox-prev,.lightbox-next { bottom:.35rem; }
}


/* V3.4.26 — photos agrandies uniquement dans la visionneuse */
.lightbox-content {
  max-width: min(94vw, 1600px);
  max-height: 94dvh;
}
.lightbox-content img {
  max-width: 100%;
  max-height: 84dvh;
  width: auto;
  height: auto;
  object-fit: contain;
}
@media (max-width: 768px) {
  .lightbox.active {
    padding: 2.5rem .45rem 4.75rem;
  }
  .lightbox-content {
    max-width: 98vw;
    max-height: calc(100dvh - 7.5rem);
  }
  .lightbox-content img {
    max-height: calc(100dvh - 10rem);
  }
}
@media (max-width: 768px) and (orientation: landscape) {
  .lightbox.active { padding: .5rem 3.5rem 2.8rem; }
  .lightbox-content { max-width: 96vw; max-height: 92dvh; }
  .lightbox-content img { max-height: calc(100dvh - 3.8rem); }
}


/* Contact : formulaire à gauche, coordonnées à droite */
.contact-container > .contact-form { grid-column: 1; grid-row: 1; }
.contact-container > .contact-info { grid-column: 2; grid-row: 1; }
@media (max-width: 768px) {
  .contact-container > .contact-form,
  .contact-container > .contact-info { grid-column: 1; grid-row: auto; }
}


/* V3.4.27 — navigation : un seul décalage sous la barre fixe.
   Anciennement scroll-padding-top et scroll-margin-top s'additionnaient. */
html { scroll-padding-top: 0; }
#hero, #portfolio, #about, #contact { scroll-margin-top: 84px; }
@media (max-width: 768px) {
  html { scroll-padding-top: 0; }
  #hero, #portfolio, #about, #contact { scroll-margin-top: 72px; }
}
