/* ════════════════════════════════════════════
   RESET & BASE
════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:      #06060e;
    --bg2:     #0b0b18;
    --bg3:     #10101e;
    --white:   #f0f0f5;
    --gray:    #68687a;
    --gray2:   #1a1a2e;
    --gray3:   #262638;
    --accent:  #4a8fff;
    --purple:  #7c5ce8;
    --teal:    #2ec4b6;
    --radius:  22px;
    --nav-h:   60px;
    --font:    'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { display: block; }

/* ════════════════════════════════════════════
   AURORA BACKGROUND — premium animated glows
════════════════════════════════════════════ */
.aurora {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    filter: blur(72px);
}

/* Glow principal — bleu électrique en haut à droite */
.aurora-1 {
    width: 800px;
    height: 800px;
    top: -260px;
    right: -200px;
    background: radial-gradient(circle at 38% 38%,
        rgba(40, 110, 255, 0.38) 0%,
        rgba(100, 60, 220, 0.20) 38%,
        rgba(0, 180, 255, 0.08) 58%,
        transparent 72%
    );
    animation: aurora1 10s ease-in-out infinite alternate;
}

/* Halo violet doux — bas gauche */
.aurora-2 {
    width: 580px;
    height: 580px;
    bottom: 10%;
    left: -140px;
    background: radial-gradient(circle at 55% 55%,
        rgba(110, 50, 220, 0.22) 0%,
        rgba(60, 20, 140, 0.12) 42%,
        transparent 65%
    );
    animation: aurora2 14s ease-in-out infinite alternate;
}

/* Accent teal — milieu discret */
.aurora-3 {
    width: 340px;
    height: 340px;
    top: 45%;
    right: 15%;
    background: radial-gradient(circle,
        rgba(0, 180, 200, 0.10) 0%,
        transparent 68%
    );
    animation: aurora1 18s ease-in-out infinite alternate-reverse;
}

@keyframes aurora1 {
    0%   { opacity: 0.75; transform: scale(1)    rotate(0deg);  }
    100% { opacity: 1;    transform: scale(1.14) rotate(4deg);  }
}
@keyframes aurora2 {
    0%   { opacity: 0.6;  transform: scale(1)    rotate(0deg);  }
    100% { opacity: 0.95; transform: scale(1.10) rotate(-5deg); }
}

/* Grain de bruit très subtil pour la texture premium */
.noise-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.032;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 300px 300px;
}

/* Toutes les sections au-dessus du fond */
nav, section, footer,
.proj-modal-overlay, .modal-overlay { position: relative; z-index: 1; }

/* ════════════════════════════════════════════
   NAV
════════════════════════════════════════════ */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9000;
    transition: background 0.45s, border-color 0.45s;
    border-bottom: 1px solid transparent;
}
#navbar.scrolled {
    background: rgba(6, 6, 14, 0.80);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-bottom-color: rgba(255,255,255,0.07);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: var(--nav-h);
    padding: 0 32px;
    display: flex;
    align-items: center;
}
.nav-logo {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
    margin-right: auto;
    letter-spacing: 0.01em;
}
.nav-logo span { color: var(--accent); }

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 14px;
}
.nav-links > li { position: relative; }

.nav-links a, .nav-drop-btn {
    font-size: 0.8125rem;
    font-weight: 400;
    color: rgba(240,240,245,0.72);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    font-family: var(--font);
    white-space: nowrap;
}
.nav-links a:hover,
.nav-drop-btn:hover,
.nav-drop-btn[aria-expanded="true"] {
    color: var(--white);
    background: rgba(255,255,255,0.07);
}
.nav-drop-btn svg { transition: transform 0.25s; flex-shrink: 0; }
.nav-drop-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Dropdown */
.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 208px;
    list-style: none;
    background: rgba(10, 10, 22, 0.94);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    animation: dropIn 0.2s ease forwards;
}
.nav-dropdown.open { display: block; }
.nav-dropdown li a {
    display: block;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: rgba(240,240,245,0.78);
    transition: background 0.15s, color 0.15s;
}
.nav-dropdown li a:hover {
    background: rgba(74,143,255,0.13);
    color: var(--white);
}
@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.btn-nav {
    display: inline-flex; align-items: center;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 7px 18px;
    border-radius: 980px;
    background: var(--white);
    color: #080810;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    transition: opacity 0.2s, transform 0.2s;
    white-space: nowrap;
}
.btn-nav:hover { opacity: 0.88; transform: scale(1.02); }

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: 12px;
}
.nav-burger span {
    width: 22px; height: 1.5px;
    background: var(--white);
    display: block;
    transition: all 0.3s;
    transform-origin: center;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
    display: none;
    flex-direction: column;
    padding: 12px 28px 20px;
    gap: 2px;
    background: rgba(6,6,14,0.97);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-mobile > a {
    font-size: 0.9375rem;
    color: rgba(240,240,245,0.82);
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: block;
}
.nav-mobile-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    padding-top: 10px;
    padding-bottom: 6px;
    display: block;
}
.nav-mobile-sub {
    font-size: 0.875rem !important;
    color: rgba(240,240,245,0.65) !important;
    padding: 7px 0 7px 14px !important;
    border-bottom: 1px solid rgba(255,255,255,0.04) !important;
    text-decoration: none;
    display: block;
}
.nav-mobile-group { margin-bottom: 4px; }
.btn-nav-mobile {
    display: inline-block;
    text-decoration: none;
    width: fit-content;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 980px;
    background: var(--white);
    color: #080810;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    margin-top: 12px;
}

/* ════════════════════════════════════════════
   HERO
════════════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 max(32px, 8vw);
    padding-top: var(--nav-h);
    overflow: hidden;
}
.hero-content { max-width: 820px; }

.hero-eyebrow {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(18px);
    animation: fadeUp 0.8s 0.3s forwards;
}
.hero-title {
    font-size: clamp(3rem, 7.5vw, 6.5rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.036em;
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(28px);
    animation: fadeUp 0.9s 0.5s forwards;
}
.gradient-text {
    background: linear-gradient(130deg, #4a8fff 0%, #8b5cf6 48%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: clamp(0.95rem, 1.5vw, 1.2rem);
    font-weight: 300;
    color: var(--gray);
    line-height: 1.65;
    opacity: 0;
    transform: translateY(18px);
    animation: fadeUp 0.8s 0.7s forwards;
}

/* Scroll hint — ligne seule, sans texte */
.hero-scroll-hint {
    position: absolute;
    bottom: 44px;
    left: max(32px, 8vw);
    opacity: 0;
    animation: fadeUp 0.8s 1.2s forwards;
}
.scroll-line {
    width: 1px;
    height: 52px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.35), transparent);
    animation: scrollPulse 2.5s ease-in-out infinite;
}

.hero-counter {
    position: absolute;
    bottom: 44px;
    right: max(32px, 8vw);
    display: flex;
    align-items: center;
    gap: 28px;
    opacity: 0;
    animation: fadeUp 0.8s 1.4s forwards;
}
.counter-item { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.counter-item strong { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.counter-item span   { font-size: 0.67rem; color: var(--gray); letter-spacing: 0.07em; text-transform: uppercase; }
.counter-divider { width: 1px; height: 34px; background: var(--gray2); }

/* ════════════════════════════════════════════
   PROJECTS — layout 2 colonnes + zoom image
════════════════════════════════════════════ */
.project { position: relative; }

.scroll-container {
    height: 300vh;
    position: relative;
}

/* Position sticky : reste fixe pendant tout le scroll de la section */
.sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;       /* contient l'image qui grossit */
    background: var(--bg);  /* fond propre derrière l'image */
}

/* ── Colonne texte (gauche) ── */
.project-left {
    position: absolute;
    top: 0; left: 0;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 6% 60px max(32px, 6vw);
    z-index: 4;
}

.project-tag {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}
.project-title {
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin-bottom: 20px;
}
.project-teaser {
    font-size: clamp(0.875rem, 1.3vw, 1rem);
    font-weight: 300;
    color: var(--gray);
    line-height: 1.75;
    margin-bottom: 32px;
    max-width: 380px;
}

/* Invite à scroller — remplace le bouton dans le panel gauche */
.scroll-invite {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
}
.scroll-invite span {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray);
    white-space: nowrap;
}
.scroll-invite-line {
    width: 40px;
    height: 1px;
    background: linear-gradient(to right, var(--gray), transparent);
    animation: inviteSlide 2s ease-in-out infinite;
    transform-origin: left center;
}
@keyframes inviteSlide {
    0%,100% { opacity: 0.4; transform: scaleX(1); }
    50%      { opacity: 1;   transform: scaleX(1.35); }
}

/* Numéro géant en filigrane */
.project-num-bg {
    position: absolute;
    bottom: -20px;
    left: max(28px, 5vw);
    font-size: clamp(6rem, 16vw, 13rem);
    font-weight: 900;
    line-height: 1;
    color: rgba(255,255,255,0.03);
    letter-spacing: -0.08em;
    user-select: none;
    pointer-events: none;
}

/* Bouton "Voir le projet" dans le panel gauche */
.btn-see-project {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 11px 22px;
    border-radius: 980px;
    background: rgba(74,143,255,0.12);
    color: var(--accent);
    border: 1px solid rgba(74,143,255,0.28);
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    align-self: flex-start;
    letter-spacing: 0.01em;
}
.btn-see-project:hover {
    background: rgba(74,143,255,0.22);
    border-color: rgba(74,143,255,0.5);
    transform: translateX(3px);
}

/* ── Image (commence à droite, grossit vers plein écran) ──
   Position initiale définie par JS selon taille fenêtre */
.zoom-frame {
    position: absolute;
    z-index: 3;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 40px 120px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.07);
    will-change: width, height, left, top, border-radius;
}
.zoom-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* ── Overlay texte (apparaît quand image = plein écran) ── */
.zoom-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: flex-end;
    padding: max(48px, 5.5vw) max(44px, 6vw);
    opacity: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.90) 0%,
        rgba(0,0,0,0.50) 36%,
        rgba(0,0,0,0.08) 62%,
        transparent 100%
    );
    pointer-events: none;
}
.overlay-content h3 {
    font-size: clamp(2rem, 4.5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.08;
    margin-bottom: 18px;
}
.overlay-content p {
    font-size: clamp(0.875rem, 1.2vw, 1rem);
    font-weight: 300;
    line-height: 1.78;
    color: rgba(240,240,245,0.82);
    max-width: 550px;
    margin-bottom: 28px;
}
.btn-overlay-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 26px;
    border-radius: 980px;
    background: rgba(255,255,255,0.13);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.22);
    cursor: pointer;
    font-family: var(--font);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.2s, border-color 0.2s;
    pointer-events: all;
}
.btn-overlay-cta:hover {
    background: rgba(255,255,255,0.23);
    border-color: rgba(255,255,255,0.38);
}

/* ════════════════════════════════════════════
   ABOUT
════════════════════════════════════════════ */
.about-section {
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px max(32px, 8vw);
    background: var(--bg2);
    text-align: center;
}
.about-inner { max-width: 760px; }
.section-eyebrow {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 22px;
}
.section-title {
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.08;
    margin-bottom: 26px;
}
.section-text {
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
    font-weight: 300;
    line-height: 1.8;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 52px;
}
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.skill-item {
    background: var(--bg3);
    border: 1px solid var(--gray2);
    border-radius: 16px;
    padding: 26px 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    transition: border-color 0.3s, transform 0.3s;
}
.skill-item:hover { border-color: var(--gray3); transform: translateY(-3px); }
.skill-icon { font-size: 1rem; color: var(--accent); margin-bottom: 3px; }
.skill-item strong { font-size: 0.9375rem; font-weight: 600; }
.skill-item span { font-size: 0.8rem; font-weight: 300; color: var(--gray); line-height: 1.5; }

/* ════════════════════════════════════════════
   CONTACT SECTION
════════════════════════════════════════════ */
.contact-section {
    min-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px max(32px, 8vw);
    text-align: center;
    overflow: hidden;
}
.contact-section::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(74,143,255,0.09) 0%, transparent 70%);
    bottom: -80px; left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}
.contact-inner .section-text { margin-bottom: 36px; }
.btn-contact-open {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 14px 32px;
    border-radius: 980px;
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(74,143,255,0.35);
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-contact-open:hover {
    background: rgba(74,143,255,0.1);
    border-color: var(--accent);
    transform: scale(1.02);
}

/* ════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════ */
footer {
    padding: 26px max(32px, 8vw);
    border-top: 1px solid var(--gray2);
    background: var(--bg);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-logo { font-weight: 800; font-size: 0.9375rem; }
.footer-logo span { color: var(--accent); }
.footer-copy { font-size: 0.79rem; color: var(--gray); }
.footer-visits { font-size: 0.72rem; color: rgba(255,255,255,0.3); letter-spacing: 0.03em; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { font-size: 0.79rem; color: var(--gray); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }

/* ════════════════════════════════════════════
   MODAL PROJET — grow + flip de carte
════════════════════════════════════════════ */
.proj-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 3, 10, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, padding 0.45s ease;
    /* Perspective pour l'effet 3D du flip */
    perspective: 1600px;
}
.proj-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}
/* Mode app : le modal occupe presque tout l'écran */
.proj-modal-overlay.app-mode {
    padding: 12px;
}

.proj-modal-box {
    background: var(--bg2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 40px 100px rgba(0,0,0,0.75);
    /* Préserve la 3D pour les deux faces */
    transform-style: preserve-3d;
    /* Transition de taille fluide avant/après flip */
    transition: max-width 0.4s ease, height 0.4s ease, border-radius 0.4s ease;
}
/* Quand l'app est affichée : plein écran */
.proj-modal-overlay.app-mode .proj-modal-box {
    max-width: min(1100px, 96vw);
    height: 88vh;
    max-height: 88vh;
    border-radius: 18px;
}

/* ── Faces de la carte ── */
.pm-face {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Face avant : scroll si contenu long */
.pm-front {
    position: relative;   /* ancre le proj-modal-close ici — disparaît avec la face au flip */
    width: 100%;
    overflow-y: auto;
    max-height: 90vh;
    border-radius: 24px;
}
.proj-modal-overlay.app-mode .pm-front {
    max-height: 88vh;
}

/* Face arrière : retournée de 180°, révélée après flip */
.pm-back {
    position: absolute;
    inset: 0;
    transform: rotateY(180deg);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #0B1220;   /* fond de l'app Ma Qualité Première */
}

/* Barre de navigation de la face arrière */
.pm-back-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(11, 18, 32, 0.95);
    border-bottom: 1px solid rgba(212, 168, 75, 0.15);
    flex-shrink: 0;
    gap: 12px;
}
.pm-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(240,240,245,0.7);
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 980px;
    padding: 6px 14px;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.pm-back-btn:hover { background: rgba(255,255,255,0.13); color: var(--white); }

.pm-back-title {
    font-family: 'Pacifico', cursive;
    font-size: 1rem;
    font-weight: 400;
    color: rgba(212, 168, 75, 0.90);
    letter-spacing: 0.01em;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pm-close-back {
    position: static;    /* override absolute */
    flex-shrink: 0;
}

/* L'iframe occupe tout l'espace restant */
#pmIframe {
    flex: 1;
    width: 100%;
    border: none;
    display: block;
}

.pm-loader {
    position: absolute;
    inset: 50px 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: #06060e;
    z-index: 2;
    color: rgba(212,168,75,0.7);
    font-size: 0.9rem;
    transition: opacity 0.3s;
}
.pm-loader.hidden { opacity: 0; pointer-events: none; }

.pm-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(212,168,75,0.15);
    border-top-color: #D4A84B;
    border-radius: 50%;
    animation: pm-spin 0.7s linear infinite;
}
@keyframes pm-spin { to { transform: rotate(360deg); } }

.proj-modal-close {
    position: absolute;
    top: 16px; right: 16px;
    z-index: 2;
    background: rgba(255,255,255,0.08);
    border: none;
    color: var(--white);
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.proj-modal-close:hover { background: rgba(255,255,255,0.14); }

.pm-screenshot {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}
.pm-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pm-body {
    padding: 32px 36px 36px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.pm-tag {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    display: block;
}
.pm-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
}
.pm-desc {
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.78;
    color: var(--gray);
    margin-bottom: 28px;
}
.btn-pm {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 26px;
    border-radius: 980px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    letter-spacing: 0.01em;
    cursor: pointer;
    border: none;
    font-family: var(--font);
}
.btn-pm:hover { opacity: 0.88; transform: scale(1.02); }

/* ════════════════════════════════════════════
   MODAL CONTACT
════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 3, 10, 0.70);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-box {
    background: var(--bg2);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 24px;
    padding: 44px 44px 40px;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 40px 100px rgba(0,0,0,0.7);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }

.modal-close {
    position: absolute;
    top: 18px; right: 18px;
    background: rgba(255,255,255,0.07);
    border: none;
    color: var(--white);
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.13); }

.modal-header { margin-bottom: 32px; }
.modal-header .section-eyebrow { margin-bottom: 14px; }
.modal-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 10px;
}
.modal-header p { font-size: 0.875rem; color: var(--gray); font-weight: 300; }

/* Honeypot — invisible, piège les bots */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px; height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    tabindex: -1;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.form-group:last-of-type { margin-bottom: 0; }
.form-group label { font-size: 0.8rem; font-weight: 500; color: rgba(240,240,245,0.72); letter-spacing: 0.02em; }
.form-group input,
.form-group textarea {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--white);
    font-family: var(--font);
    transition: border-color 0.2s, background 0.2s;
    outline: none;
    width: 100%;
    resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.22); }
.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(74,143,255,0.55);
    background: rgba(74,143,255,0.06);
}
.form-group input.error,
.form-group textarea.error { border-color: rgba(255,80,80,0.6); }

.btn-send {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%;
    margin-top: 22px;
    padding: 13px 24px;
    border-radius: 980px;
    background: var(--accent);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    transition: opacity 0.2s, transform 0.2s;
}
.btn-send:hover:not(:disabled) { opacity: 0.88; transform: scale(1.01); }
.btn-send:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-send-loader {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.btn-send.loading .btn-send-label { display: none; }
.btn-send.loading .btn-send-loader { display: block; }

.form-success {
    text-align: center;
    padding: 20px 0 10px;
    animation: fadeUp 0.5s forwards;
}
.success-icon {
    width: 56px; height: 56px;
    background: rgba(46,196,182,0.14);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    color: var(--teal);
    margin: 0 auto 20px;
}
.form-success h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; }
.form-success p  { font-size: 0.9rem; color: var(--gray); line-height: 1.65; }

/* ════════════════════════════════════════════
   ANIMATIONS
════════════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
    0%, 100% { opacity: 0.35; }
    50%       { opacity: 1; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (max-width: 860px) {
    .nav-links, .btn-nav { display: none; }
    .nav-burger { display: flex; }
    .hero-counter { display: none; }
    /* Sur mobile l'image est centrée (pas de 2 colonnes) */
    .project-left {
        width: 100%;
        z-index: 4;
        padding: 40px max(24px, 5vw) 28px;
        justify-content: flex-end;
        background: linear-gradient(to top, var(--bg) 55%, transparent 100%);
    }
    .project-teaser { display: none; }
    .skills-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }
    .modal-box { padding: 32px 24px 28px; }
    .form-row { grid-template-columns: 1fr; }
    .pm-body { padding: 24px 24px 28px; }
}
@media (max-width: 500px) {
    :root { --nav-h: 52px; }
    .overlay-content p { display: none; }
    .proj-modal-box { border-radius: 16px; }
}
