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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === STYLE 1: MODERNE MINIMAL (Vert/Turquoise dominant) === */
/*:root {
    --primary: #10b981;
    --secondary: #0ea5e9;
    --accent: #ef4444;
    --dark: #1f2937;
    --light: #f8fafc;
    --gradient: linear-gradient(135deg, #10b981 0%, #0ea5e9 100%);
}
*/
/* === STYLE 2: ÉNERGIQUE (Rouge dominant) - Décommente pour utiliser === */
/*
:root {
    --primary: #ef4444;
    --secondary: #10b981;
    --accent: #0ea5e9;
    --dark: #1f2937;
    --light: #fef2f2;
    --gradient: linear-gradient(135deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
}
*/

/* === STYLE 3: PROFESSIONNEL (Bleu dominant) - Décommente pour utiliser === */

:root {
    --primary: #3AF2FF;
    --secondary: #2F6BFF;
    --accent: #00008B;
    --dark: #050816;
    --light: #F5F7FF;
    --gradient: linear-gradient(135deg, #3AF2FF 0%, #2F6BFF 55%, #00008B 100%);
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 10px 30px rgba(47, 107, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(47, 107, 255, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: #2f3c66;
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: white;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    transition: 0.3s;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 20px 80px;
    background: var(--light);
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder {
    width: 500px;
    height: 600px;
    background: var(--gradient);
    border-radius: 20px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}

.image-placeholder::before {
    content: '';
    position: absolute;
    inset: 20px;
    background: white;
    border-radius: 15px;
    z-index: 1;
}

/* Portfolio */
.portfolio {
    padding: 120px 0;
    background: white;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .overlay {
    transform: translateY(0);
}

/* Contenu */
.contenu {
    padding: 120px 0;
    background: var(--light);
}

.contenu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contenu-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contenu-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.contenu-card i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.contenu-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

/* About */
.about {
    padding: 120px 0;
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--dark);
}

.about-text p {
    font-size: 1.2rem;
    color: #6b7280;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.stats {
    display: flex;
    gap: 3rem;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.about-placeholder {
    width: 100%;
    height: 400px;
    background: var(--gradient);
    border-radius: 20px;
}

/* Contact */
.contact {
    padding: 120px 0;
    background: var(--light);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group input,
.contact-form textarea {
    padding: 1rem 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.contact-form textarea {
    grid-column: 1 / -1;
    resize: vertical;
    width: 100%;
}

/* Footer */
footer {
    background: #2f3c66;
    color: white;
    text-align: center;
    padding: 3rem 0 1.5rem;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 100px 20px 60px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-group {
        grid-template-columns: 1fr;
    }
    
    .stats {
        justify-content: center;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}
/* === AJOUTS / CORRECTIONS PORTFOLIO, HERO ET VIDÉOS === */
.hero {
    gap: 4rem;
    justify-content: center;
}

.hero-photo-frame {
    overflow: hidden;
    padding: 20px;
}

.hero-photo-frame::before {
    z-index: 0;
}

.hero-photo {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 15px;
}

.portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    grid-auto-rows: 360px;
    align-items: stretch;
}

.portfolio-item {
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    font: inherit;
    text-align: left;
    background: #111827;
    appearance: none;
}

.portfolio-item:nth-child(3n + 1) {
    grid-row: span 2;
}

.portfolio-item:nth-child(4n) {
    grid-column: span 2;
}

.portfolio-item:focus-visible {
    outline: 4px solid var(--primary);
    outline-offset: 4px;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    background: rgba(5, 10, 25, 0.92);
    backdrop-filter: blur(12px);
}

.lightbox.active {
    display: flex;
}

.lightbox-image {
    max-width: min(1100px, 92vw);
    max-height: 78vh;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: white;
    color: #111827;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: scale(1.08);
}

.lightbox-caption {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    width: min(900px, calc(100% - 2rem));
    padding: 1rem 1.25rem;
    border-radius: 18px;
    color: white;
    text-align: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.lightbox-caption h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.section-intro {
    max-width: 720px;
    margin: -2rem auto 3rem;
    text-align: center;
    color: #6b7280;
    font-size: 1.1rem;
}

.section-intro code {
    padding: 0.15rem 0.35rem;
    border-radius: 6px;
    background: rgba(14, 165, 233, 0.12);
    color: var(--dark);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.video-card {
    overflow: hidden;
    background: white;
    border-radius: 24px;
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.10);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.15);
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111827;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-card h3,
.video-card p {
    padding: 0 1.5rem;
}

.video-card h3 {
    margin-top: 1.5rem;
    color: var(--dark);
}

.video-card p {
    margin: 0.5rem 0 1.5rem;
    color: #6b7280;
}

body.lightbox-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .portfolio-item:nth-child(3n + 1),
    .portfolio-item:nth-child(4n) {
        grid-row: auto;
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .image-placeholder {
        width: min(420px, 92vw);
        height: 520px;
    }

    .portfolio-grid {
        grid-auto-rows: 320px;
    }

    .lightbox {
        padding: 5rem 1rem 1rem;
    }

    .lightbox-caption {
        position: static;
        transform: none;
        margin-top: 1rem;
    }
}

/* === RESPONSIVE + VISUAL POLISH 2026 === */
/* Smoothly animatable hero glow variables */
@property --glow-a-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 18%;
}

@property --glow-a-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 22%;
}

@property --glow-b-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 78%;
}

@property --glow-b-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 30%;
}

@property --glow-c-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 48%;
}

@property --glow-c-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 82%;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 86px;
}

:root {
    --nav: #2f3c66;
    --muted: #64748b;
    --surface: #ffffff;
    --shadow-soft: 0 18px 50px rgba(5, 8, 22, 0.11);
    --shadow-strong: 0 28px 80px rgba(5, 8, 22, 0.22);
}

body {
    background: var(--light);
}

.container {
    width: min(100%, 1200px);
}

.navbar {
    background: rgba(47, 60, 102, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.85rem 0;
}

.navbar.scrolled {
    background: rgba(47, 60, 102, 0.97);
    box-shadow: 0 12px 36px rgba(5, 8, 22, 0.18);
    padding: 0.65rem 0;
}

.logo {
    min-width: 0;
    color: #ffffff;
}

.logo img {
    height: 52px !important;
    width: auto;
    filter: drop-shadow(0 8px 16px rgba(5, 8, 22, 0.22));
}

.logo span {
    color: #ffffff;
    font-size: 1.45rem;
    line-height: 1.1;
}

.nav-link {
    padding: 0.45rem 0;
}

.hamburger {
    border: 0;
    background: transparent;
    padding: 0.6rem;
    margin: -0.6rem;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
}

.hamburger span {
    background: #ffffff;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hero {
    --glow-a-x: 18%;
    --glow-a-y: 22%;
    --glow-b-x: 78%;
    --glow-b-y: 30%;
    --glow-c-x: 48%;
    --glow-c-y: 82%;
    --glow-hue: 0deg;
    --glow-saturation: 1.08;
    --glow-opacity: 0.68;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-inline: max(20px, calc((100vw - 1180px) / 2 + 20px));
    background: linear-gradient(135deg, #f8fbff 0%, #f5f7ff 52%, #f3f9ff 100%);
}

.hero::before {
    content: '';
    position: absolute;
    inset: -8%;
    z-index: -1;
    background-image: url("images/hero-bg-light.webp");
    background-size: cover;
    background-position: 50% 50%;
    opacity: 0.96;
    animation: none;
    transform: scale(1.03);
}

.hero::after {
    content: '';
    position: absolute;
    inset: -14%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at var(--glow-a-x) var(--glow-a-y), rgba(58, 242, 255, 0.38), transparent 29%),
        radial-gradient(circle at var(--glow-b-x) var(--glow-b-y), rgba(14, 165, 233, 0.30), transparent 34%),
        radial-gradient(circle at var(--glow-c-x) var(--glow-c-y), rgba(125, 211, 252, 0.22), transparent 38%),
        radial-gradient(circle at 88% 82%, rgba(47, 107, 255, 0.06), transparent 30%);
    filter: blur(26px) saturate(var(--glow-saturation)) hue-rotate(var(--glow-hue));
    mix-blend-mode: soft-light;
    opacity: var(--glow-opacity);

    will-change: filter, opacity;
}

.hero-content,
.hero-image {
    position: relative;
    z-index: 1;
}

.hero-title {
    color: var(--dark);
    font-size: 4rem;
    letter-spacing: 0;
}

.hero-buttons {
    margin-top: 2rem;
}

.btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-primary {
    box-shadow: 0 14px 34px rgba(47, 107, 255, 0.24);
}

.btn-primary:hover {
    box-shadow: 0 20px 44px rgba(47, 107, 255, 0.32);
}

.hero-photo-frame {
    width: 480px;
    height: 590px;
    border-radius: 28px;
    transform: translateZ(0);
    box-shadow: var(--shadow-strong);
}

.hero-photo-frame::before {
    inset: 16px;
    border-radius: 22px;
}

.hero-photo {
    border-radius: 22px;
}

.portfolio,
.contenu,
.about,
.contact {
    padding: 110px 0;
}

.portfolio {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.section-title {
    font-size: 3rem;
    letter-spacing: 0;
    margin-bottom: 3.5rem;
}

.section-intro {
    max-width: 700px;
    color: var(--muted);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: clamp(190px, 18vw, 240px);
    gap: clamp(1rem, 2vw, 1.5rem);
}

.portfolio-item {
    min-height: 0;
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    isolation: isolate;
    background: #111827;
}

.portfolio-item:nth-child(1) {
    grid-column: span 5;
    grid-row: span 2;
}

.portfolio-item:nth-child(2) {
    grid-column: span 4;
    grid-row: span 1;
}

.portfolio-item:nth-child(3) {
    grid-column: span 3;
    grid-row: span 2;
}

.portfolio-item:nth-child(4) {
    grid-column: span 4;
    grid-row: span 1;
}

.portfolio-item:nth-child(5) {
    grid-column: span 4;
    grid-row: span 1;
}

.portfolio-item:nth-child(6) {
    grid-column: span 4;
    grid-row: span 1;
}

.portfolio-item::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    background: transparent;
    transition: opacity 0.25s ease;
}

.portfolio-item:hover::after {
    opacity: 1;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

.overlay {
    z-index: 2;
    min-height: 50%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transform: none;
    padding: clamp(1.15rem, 2.4vw, 2rem);
    background: linear-gradient(180deg, transparent 0%, rgba(5, 8, 22, 0.28) 34%, rgba(5, 8, 22, 0.88) 100%);
}

.overlay h3 {
    font-size: 1.45rem;
    line-height: 1.15;
}

.overlay p {
    opacity: 0.86;
}

.contenu {
    background: linear-gradient(180deg, #f5f7ff 0%, #ffffff 100%);
}

.video-card {
    border-radius: 20px;
    border: 1px solid rgba(47, 60, 102, 0.08);
    box-shadow: var(--shadow-soft);
}

.video-card:hover {
    box-shadow: var(--shadow-strong);
}

.video-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(58, 242, 255, 0.14), rgba(0, 0, 139, 0.08));
}

.about-content {
    gap: clamp(2rem, 5vw, 4rem);
}

.about-text h2 {
    letter-spacing: 0;
}

.about-placeholder {
    min-height: 360px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.about-placeholder::after {
    content: '';
    position: absolute;
    inset: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.46);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 40%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 18px);
}

.contact-form {
    max-width: 680px;
    padding: 2rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(47, 60, 102, 0.08);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.form-group input,
.contact-form textarea {
    width: 100%;
    background: #ffffff;
}

.lightbox {
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding: 5.5rem 2rem 1.5rem;
}

.lightbox-image {
    width: auto;
    max-width: min(1120px, 92vw);
    max-height: calc(100vh - 190px);
    max-height: calc(100dvh - 190px);
    flex: 0 1 auto;
}

.lightbox-caption {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    width: min(780px, 92vw);
    margin: 0;
    flex: 0 0 auto;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
}

.lightbox-caption h3 {
    line-height: 1.2;
}

@media (max-width: 1050px) {
    .hero {
        gap: 2.5rem;
    }

    .hero-title {
        font-size: 3.25rem;
    }

    .hero-photo-frame {
        width: 380px;
        height: 500px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
    }

    .portfolio-item,
    .portfolio-item:nth-child(1),
    .portfolio-item:nth-child(2),
    .portfolio-item:nth-child(3),
    .portfolio-item:nth-child(4),
    .portfolio-item:nth-child(5),
    .portfolio-item:nth-child(6) {
        grid-column: auto;
        grid-row: auto;
        aspect-ratio: 4 / 5;
    }

    .portfolio-item:nth-child(3),
    .portfolio-item:nth-child(6) {
        aspect-ratio: 16 / 11;
    }
}

@media (max-width: 768px) {
    body.nav-open {
        overflow: hidden;
    }

    .navbar {
        padding: 0.75rem 0;
    }

    .nav-container {
        gap: 1rem;
    }

    .logo img {
        height: 44px !important;
    }

    .logo span {
        font-size: 1.05rem;
    }

    .nav-menu {
        left: 1rem;
        right: 1rem;
        top: 76px;
        width: calc(100% - 2rem);
        border-radius: 20px;
        background: rgba(47, 60, 102, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 22px 60px rgba(5, 8, 22, 0.28);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-12px);
    }

    .nav-menu.active {
        left: 1rem;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-link {
        color: #ffffff;
        font-size: 1.05rem;
    }

    .hero {
        min-height: auto;
        gap: 2rem;
        padding: 112px 18px 64px;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-buttons .btn {
        flex: 1 1 170px;
        max-width: 270px;
    }

    .hero-photo-frame {
        width: min(82vw, 360px);
        height: min(108vw, 460px);
        animation: none;
    }

    .portfolio,
    .contenu,
    .about,
    .contact {
        padding: 76px 0;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 2.4rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .portfolio-item,
    .portfolio-item:nth-child(3),
    .portfolio-item:nth-child(6) {
        aspect-ratio: 4 / 5;
        border-radius: 18px;
    }

    .overlay {
        min-height: 44%;
        padding: 1.25rem;
    }

    .about-text h2 {
        font-size: 2.2rem;
    }

    .about-text p {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }

    .stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .contact-form {
        padding: 1.25rem;
        border-radius: 20px;
    }

    .lightbox {
        padding: 5rem 1rem 1rem;
    }

    .lightbox-image {
        max-height: calc(100vh - 220px);
        max-height: calc(100dvh - 220px);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .logo span {
        max-width: 150px;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-buttons {
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: none;
    }

    .section-title {
        font-size: 2rem;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .form-group {
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 46px;
        height: 46px;
    }
}

@media (hover: none) {
    .portfolio-item:hover {
        transform: none;
    }

    .portfolio-item:active {
        transform: scale(0.985);
    }

    .portfolio-item::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes frameFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

@keyframes backdropFlow {
    0% {
        background-position: 48% 48%;
        transform: translate3d(-1%, -1%, 0) scale(1.02);
    }
    100% {
        background-position: 54% 52%;
        transform: translate3d(1%, 1%, 0) scale(1.05);
    }
}

@keyframes auraBreath {
    0% {
        transform: translate3d(-1%, 0, 0) scale(1);
    }
    100% {
        transform: translate3d(1%, -1%, 0) scale(1.04);
    }
}
/* === END RESPONSIVE + VISUAL POLISH 2026 === */

/* === CONTENT EXPANSION 2026 === */
.social-strip {
    padding: 1.1rem 0;
    background: linear-gradient(90deg, #2f3c66 0%, #263255 48%, #2f3c66 100%);
    color: #ffffff;
}

.social-strip-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.social-strip-content p {
    margin: 0;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

.social-strip-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-strip-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #ffffff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.social-strip-links a:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(58, 242, 255, 0.55);
}

.portfolio-grid {
    grid-auto-flow: dense;
}

.portfolio-item:nth-child(7) {
    grid-column: span 3;
    grid-row: span 2;
}

.portfolio-item:nth-child(8) {
    grid-column: span 3;
    grid-row: span 2;
}

.portfolio-item:nth-child(9) {
    grid-column: span 6;
    grid-row: span 1;
}

.portfolio-item:nth-child(10) {
    grid-column: span 3;
    grid-row: span 1;
}

.portfolio-item:nth-child(11) {
    grid-column: span 6;
    grid-row: span 1;
}

.portfolio-item:nth-child(12) {
    grid-column: span 3;
    grid-row: span 2;
}

/* Photos ajoutées au-delà de la 12e : 3 par ligne, format paysage */
.portfolio-item:nth-child(n + 13) {
    grid-column: span 4;
    grid-row: span 1;
}

.services {
    padding: 110px 0;
    background: #ffffff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.service-card {
    min-height: 250px;
    padding: 2rem;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(47, 60, 102, 0.09);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-strong);
}

.service-card i {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.4rem;
    border-radius: 16px;
    color: #ffffff;
    font-size: 1.35rem;
    background: var(--gradient);
    box-shadow: 0 14px 28px rgba(47, 107, 255, 0.22);
}

.service-card h3 {
    margin-bottom: 0.8rem;
    color: var(--dark);
    font-size: 1.35rem;
}

.service-card p {
    color: var(--muted);
    line-height: 1.75;
}

.content-showcase {
    display: grid;
    grid-template-columns: 0.95fr 1.25fr 0.95fr;
    gap: clamp(1rem, 2vw, 1.5rem);
    align-items: stretch;
}

.content-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 440px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(47, 60, 102, 0.08);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-strong);
}

.content-card img {
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.featured-content-card img {
    height: 285px;
}

.content-card div {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.4rem;
}

.content-card span,
.eyebrow {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 0.8rem;
    color: var(--secondary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.content-card h3 {
    color: var(--dark);
    font-size: 1.35rem;
    margin-bottom: 0.65rem;
}

.content-card p {
    color: var(--muted);
    line-height: 1.7;
}

.content-card a {
    margin-top: auto;
    color: var(--secondary);
    font-weight: 700;
    text-decoration: none;
}

.content-card a:hover {
    color: var(--accent);
}

.social-section {
    padding: 110px 0;
    background: linear-gradient(135deg, #050816 0%, #1b2445 58%, #2f3c66 100%);
    color: #ffffff;
}

.social-section-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.social-copy h2 {
    font-size: clamp(2.3rem, 4vw, 3.5rem);
    line-height: 1.05;
    margin-bottom: 1.2rem;
}

.social-copy p {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.1rem;
    line-height: 1.8;
}

.social-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.social-actions .btn {
    gap: 0.55rem;
}

.social-mosaic {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    grid-template-rows: 210px 210px;
    gap: 1rem;
}

.social-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
}

.social-mosaic img:first-child {
    grid-row: span 2;
}

.about-collage {
    display: grid;
    grid-template-columns: 1fr 0.85fr;
    grid-template-rows: 210px 210px;
    gap: 1rem;
    min-height: 430px;
}

.collage-shot {
    overflow: hidden;
    display: block;
    border: 0;
    padding: 0;
    border-radius: 20px;
    background: #111827;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.collage-shot:first-child {
    grid-row: span 2;
}

.collage-shot img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.collage-shot:hover img {
    transform: scale(1.06);
}

.stats {
    gap: 1rem;
    flex-wrap: wrap;
}

.stat {
    min-width: 130px;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid rgba(47, 60, 102, 0.08);
}

.stat h3 {
    font-size: 1.55rem;
    line-height: 1.15;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
}

footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 0.35rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1050px) {
    .portfolio-item:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
    }

    .services-grid,
    .content-showcase,
    .social-section-layout {
        grid-template-columns: 1fr;
    }

    .content-showcase {
        max-width: 720px;
        margin: 0 auto;
    }

    .content-card,
    .featured-content-card {
        min-height: auto;
    }

    .content-card img,
    .featured-content-card img {
        height: 260px;
    }
}

@media (max-width: 768px) {
    .social-strip-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .social-strip-links {
        width: 100%;
    }

    .social-strip-links a {
        flex: 1 1 180px;
        justify-content: center;
    }

    .services,
    .social-section {
        padding: 76px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        min-height: auto;
        padding: 1.5rem;
    }

    .content-card img,
    .featured-content-card img {
        height: 220px;
    }

    .social-actions .btn {
        flex: 1 1 180px;
    }

    .social-mosaic,
    .about-collage {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 170px 170px;
        gap: 0.8rem;
    }

    .social-mosaic img,
    .collage-shot {
        border-radius: 16px;
    }

    .about-collage {
        min-height: 350px;
    }
}

@media (max-width: 520px) {
    .social-strip-links a {
        flex-basis: 100%;
    }

    .social-mosaic,
    .about-collage {
        grid-template-rows: 150px 150px;
    }

    .content-card img,
    .featured-content-card img {
        height: 200px;
    }
}
/* === END CONTENT EXPANSION 2026 === */

/* === THEME, NAV, FOOTER, CONTACT 2026 === */
.nav-menu {
    margin-left: auto;
}

.navbar {
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(47, 107, 255, 0.16);
    box-shadow: 0 10px 34px rgba(5, 8, 22, 0.08);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 46px rgba(5, 8, 22, 0.13);
}

.logo span,
.nav-link {
    color: var(--dark);
}

.logo span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hamburger span {
    background: var(--dark);
}

footer {
    background:
        radial-gradient(circle at 18% 0%, rgba(58, 242, 255, 0.22), transparent 32%),
        radial-gradient(circle at 82% 18%, rgba(0, 0, 139, 0.26), transparent 34%),
        linear-gradient(135deg, #050816 0%, #151b36 54%, #0a1240 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-status {
    min-height: 1.4rem;
    margin-top: 1rem;
    color: var(--secondary);
    font-weight: 700;
    text-align: center;
}

.contact-direct {
    margin-top: 0.6rem;
    text-align: center;
    color: var(--muted);
}

.contact-direct a {
    color: var(--secondary);
    font-weight: 700;
    text-decoration: none;
}

.contact-direct a:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    

    

    .nav-menu {
        background: linear-gradient(135deg, rgba(5, 8, 22, 0.98), rgba(5, 12, 70, 0.98));
    }

    .nav-link {
        color: #ffffff;
    }
}
/* === END THEME, NAV, FOOTER, CONTACT 2026 === */

/* === THEME BUTTON FALLBACK + SOCIAL FIX === */

/* === END THEME BUTTON FALLBACK + SOCIAL FIX === */

/* === FINAL POLISH: ICON BUTTON, LINKS, SCROLL 2026 === */
a {
    text-underline-offset: 0.18em;
}

footer a,
footer .social-links a,
.social-section a,
.social-actions a,
.content-card a {
    text-decoration: none;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-item.reveal-on-scroll,
.service-card.reveal-on-scroll,
.content-card.reveal-on-scroll,
.collage-shot.reveal-on-scroll {
    transition: opacity 0.65s ease, transform 0.65s ease, box-shadow 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
/* === END FINAL POLISH: ICON BUTTON, LINKS, SCROLL 2026 === */

/* === CONTACT SECURITY + ACCESSIBILITY === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.form-honey {
    display: none !important;
}

.contact-form button:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}
/* === END CONTACT SECURITY + ACCESSIBILITY === */

/* === PORTFOLIO LIQUID GLASS 2026 === */
.portfolio-item,
.collage-shot {
    --glass-x: 50%;
    --glass-y: 50%;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transform: translateZ(0);
}

.portfolio-item img,
.collage-shot img {
    transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.65s ease;
    will-change: transform;
}

.portfolio-item::before,
.collage-shot::before,
.portfolio-item::after,
.collage-shot::after {
    content: '';
    position: absolute;
    inset: 0;
    display: block;
    border-radius: inherit;
    pointer-events: none;
}

.portfolio-item::before,
.collage-shot::before {
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.06) 34%, rgba(255, 255, 255, 0) 54%),
        radial-gradient(circle at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.10) 18%, transparent 44%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        inset 0 -18px 36px rgba(255, 255, 255, 0.06);
    opacity: 0;
    transform: scale(0.985);
    transition: opacity 0.34s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.34s ease;
    -webkit-backdrop-filter: blur(7px) saturate(1.08);
    backdrop-filter: blur(7px) saturate(1.08);
}

.portfolio-item::after,
.collage-shot::after {
    z-index: 3;
    background:
        radial-gradient(circle at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.44) 0%, rgba(255, 255, 255, 0.19) 13%, rgba(255, 255, 255, 0.06) 27%, transparent 48%);
    mix-blend-mode: screen;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.32s ease, transform 0.58s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.overlay {
    z-index: 4;
}

@media (hover: hover) and (pointer: fine) {
    .portfolio-item:hover,
    .collage-shot:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-strong);
    }

    .portfolio-item:hover img,
    .collage-shot:hover img {
        transform: scale(1.045);
        filter: contrast(1.03) saturate(1.02);
    }

    .portfolio-item:hover::before,
    .collage-shot:hover::before {
        opacity: 1;
        transform: scale(1);
    }

    .portfolio-item:hover::after,
    .collage-shot:hover::after {
        opacity: 0.72;
        transform: scale(1.03);
    }
}

.portfolio-item.is-liquid-tapping::before,
.collage-shot.is-liquid-tapping::before {
    animation: liquidGlassPulse 0.62s ease both;
}

.portfolio-item.is-liquid-tapping::after,
.collage-shot.is-liquid-tapping::after {
    animation: liquidGlassWash 0.68s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.liquid-wave {
    position: absolute;
    left: var(--wave-x, 50%);
    top: var(--wave-y, 50%);
    z-index: 5;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.14) 42%, transparent 68%);
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.24), 0 0 22px rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(8px) saturate(1.05);
    backdrop-filter: blur(8px) saturate(1.05);
    transform: translate(-50%, -50%) scale(0.25);
    animation: liquidWave 0.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    mix-blend-mode: screen;
}

@keyframes liquidGlassPulse {
    0% {
        opacity: 0;
        transform: scale(0.985);
    }
    38% {
        opacity: 1;
        transform: scale(1.005);
    }
    100% {
        opacity: 0;
        transform: scale(1.02);
    }
}

@keyframes liquidGlassWash {
    0% {
        clip-path: circle(0% at var(--glass-x) var(--glass-y));
        opacity: 0.72;
        transform: scale(0.98);
    }
    64% {
        clip-path: circle(68% at var(--glass-x) var(--glass-y));
        opacity: 0.34;
    }
    100% {
        clip-path: circle(96% at var(--glass-x) var(--glass-y));
        opacity: 0;
        transform: scale(1.04);
    }
}

@keyframes liquidWave {
    0% {
        opacity: 0.74;
        transform: translate(-50%, -50%) scale(0.25);
    }
    58% {
        opacity: 0.38;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(18);
    }
}

@media (hover: none) {
    .portfolio-item:hover,
    .collage-shot:hover {
        transform: none;
    }

    .portfolio-item:active,
    .collage-shot:active {
        transform: scale(0.985);
    }

    .portfolio-item::before,
    .collage-shot::before,
    .portfolio-item::after,
    .collage-shot::after {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-item::before,
    .collage-shot::before,
    .portfolio-item::after,
    .collage-shot::after,
    .liquid-wave {
        animation: none !important;
        transition: none !important;
    }
}
/* === END PORTFOLIO LIQUID GLASS 2026 === */

/* === PERFORMANCE PASS 2026 === */
.portfolio,
.services,
.contenu,
.about,
.contact {
    content-visibility: auto;
    contain-intrinsic-size: 900px;
}

.content-card img,
.content-card video,
.featured-content-card img,
.featured-content-card video {
    width: 100%;
    object-fit: cover;
}

.content-card video {
    height: 230px;
    display: block;
    background: #111827;
}

.featured-content-card video {
    height: 285px;
}
/* === END PERFORMANCE PASS 2026 === */


/* Site uniquement en mode clair */
:root {
    color-scheme: light;
}

/* === IDENTITÉ AFTERBURNER : logo, néon bleu/cyan === */
.logo img {
    border-radius: 12px;
    box-shadow: 0 0 0 1px rgba(58, 242, 255, 0.55), 0 0 18px rgba(58, 242, 255, 0.45);
}

.hero .btn-secondary {
    color: #00008B;
    border-color: #2F6BFF;
}

.hero .btn-secondary:hover {
    background: #2F6BFF;
    border-color: #2F6BFF;
    color: #ffffff;
}

.service-card i {
    box-shadow: 0 0 22px rgba(58, 242, 255, 0.35);
}

.portfolio-item:hover,
.collage-shot:hover {
    box-shadow: 0 28px 80px rgba(5, 8, 22, 0.22), 0 0 0 1px rgba(58, 242, 255, 0.5), 0 0 28px rgba(58, 242, 255, 0.28);
}

footer .social-links a:hover {
    color: #3AF2FF;
    box-shadow: 0 0 16px rgba(58, 242, 255, 0.45);
}
/* === END IDENTITÉ AFTERBURNER === */

/* === PROTECTION DES PHOTOS === */
img,
.portfolio-item,
.collage-shot {
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

.portfolio-item img,
.collage-shot img,
.hero-photo,
.lightbox-image {
    pointer-events: none;
}

.lightbox-figure {
    position: relative;
    display: inline-block;
    flex: 0 1 auto;
    line-height: 0;
    max-width: 100%;
}

.lightbox-figure::after {
    content: '\00A9  Afterburner Studio';
    position: absolute;
    right: 16px;
    bottom: 14px;
    line-height: 1;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.78);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
    pointer-events: none;
}
/* === END PROTECTION DES PHOTOS === */

/* === PORTFOLIO : CASCADE AUTOMATIQUE SELON LE FORMAT DES PHOTOS === */
/* La hauteur de chaque vignette suit le ratio de sa photo (calculé dans script.js). */
.portfolio {
    content-visibility: visible;
}

.portfolio .portfolio-grid {
    --pf-gap: clamp(1rem, 2vw, 1.5rem);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 4px;
    grid-auto-flow: row dense;
    column-gap: var(--pf-gap);
    row-gap: 0;
    align-items: start;
}

.portfolio .portfolio-grid .portfolio-item {
    grid-column: auto;
    grid-row: auto;
    align-self: start;
    width: 100%;
    height: auto;
    min-height: 0;
    margin-bottom: var(--pf-gap);
    aspect-ratio: var(--ratio, 4 / 3);
}

.portfolio .portfolio-grid .portfolio-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1050px) {
    .portfolio .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .portfolio .portfolio-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
/* === END PORTFOLIO CASCADE AUTOMATIQUE === */

/* === PHOTO AGRANDIE : PLUS GRANDE + FLÈCHE POUR MASQUER LE TEXTE === */
.lightbox {
    --lb-reserved: 14.2rem;   /* place prise par le haut + le texte quand il est visible */
    gap: 1rem;
    padding: 4rem clamp(0.5rem, 2vw, 2rem) 1rem;
}

.lightbox.caption-hidden {
    --lb-reserved: 8.4rem;    /* seule la flèche reste : la photo grandit */
}

.lightbox .lightbox-close {
    top: 0.9rem;
    right: 1rem;
    width: 44px;
    height: 44px;
}

.lightbox .lightbox-image {
    max-width: min(1700px, 96vw);
    max-height: calc(100vh - var(--lb-reserved));
    max-height: calc(100dvh - var(--lb-reserved));
    transition: max-height 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Légende : flèche au-dessus, texte dans une boîte qui se replie vers le bas */
.lightbox .lightbox-caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: min(780px, 92vw);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.lightbox-caption-body {
    width: 100%;
    display: grid;
    grid-template-rows: 1fr;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    transition: grid-template-rows 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease, transform 0.45s ease;
}

.lightbox-caption-inner {
    min-height: 0;
    overflow: hidden;
}

.lightbox-caption-inner h3 {
    padding-top: 0.9rem;
}

.lightbox-caption-inner p {
    padding-bottom: 0.9rem;
}

.lightbox.caption-hidden .lightbox-caption-body {
    grid-template-rows: 0fr;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}

.lightbox-caption-toggle {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.lightbox-caption-toggle::before {
    content: '';
    width: 9px;
    height: 9px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.35s ease;
}

.lightbox.caption-hidden .lightbox-caption-toggle::before {
    transform: translateY(2px) rotate(-135deg);
}

.lightbox-caption-toggle:hover,
.lightbox-caption-toggle:focus-visible {
    border-color: #3AF2FF;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 14px rgba(58, 242, 255, 0.5);
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .lightbox .lightbox-image,
    .lightbox-caption-body {
        transition: none;
    }
}

/* Portfolio : conserver la compatibilité avec script.js */
.portfolio {
    content-visibility: visible;
}

.portfolio .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 4px;
    grid-auto-flow: row dense;
    column-gap: clamp(1rem, 2vw, 1.5rem);
    row-gap: 0;
    align-items: start;
}

.portfolio .portfolio-grid .portfolio-item {
    width: 100%;
    height: auto;
    min-height: 0;
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
    align-self: start;
}

.portfolio .portfolio-grid .portfolio-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1050px) {
    .portfolio .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .portfolio .portfolio-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
/* Correctif portfolio mobile */
@media (max-width: 640px) {
    .portfolio {
        display: block !important;
        visibility: visible !important;
        content-visibility: visible !important;
    }

    .portfolio .portfolio-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-auto-rows: 4px !important;
        grid-auto-flow: row !important;
        row-gap: 0 !important;
        overflow: visible !important;
    }

    .portfolio .portfolio-item {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        margin-bottom: 16px !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .portfolio .portfolio-item img {
        display: block !important;
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
}

/* === PORTFOLIO : SECTIONS (FILTRES) === */
.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin: 0 0 2rem;
}

.portfolio-filter {
    appearance: none;
    cursor: pointer;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: inherit;
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    border: 1px solid rgba(47, 107, 255, 0.35);
    background: rgba(47, 107, 255, 0.06);
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.portfolio-filter:hover {
    background: rgba(47, 107, 255, 0.16);
}

.portfolio-filter:focus-visible {
    outline: 2px solid var(--primary, #3af2ff);
    outline-offset: 2px;
}

.portfolio-filter[aria-pressed="true"] {
    color: #050816;
    background: var(--primary, #3af2ff);
    border-color: var(--primary, #3af2ff);
}

.portfolio .portfolio-grid .portfolio-item[hidden] {
    display: none !important;
}
@media (max-width: 640px) {
    /* Mobile : une seule rangée de boutons qu'on fait défiler du doigt */
    .portfolio-filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0 -1rem 1.5rem;
        padding: 0.25rem 1rem;
    }

    .portfolio-filters::-webkit-scrollbar {
        display: none;
    }

    .portfolio-filter {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}
/* === END PORTFOLIO SECTIONS === */
