/* Palette neutre premium */
:root {
    --primary: #4f6d7a;
    --primary-light: #7a94a1;
    --primary-dark: #2f4a54;
    --secondary: #7a6e5a;
    --dark: #111827;
    --dark-gray: #374151;
    --medium-gray: #6b7280;
    --light-gray: #e5e7eb;
    --light: #f7f6f3;
    --white: #fff
}

[data-theme="dark"] {
  --bg-color: #020617; /* proche de slate-950 */
  --text-color: #020617; /* gris clair lisible */
  --primary: #020617; /* bleu cyan doux (comme tailwind sky-400) */
  --secondary: #94a3b8; /* gris bleuté clair */
  --accent: #020617; /* bleu accentué */
  --dark-gray: #1e293b; /* gris foncé pour boutons */
}
* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: linear-gradient(135deg, var(--dark), var(--dark-gray));
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    color: var(--dark-gray);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem
}

/* Nav */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    transition: box-shadow .25s ease, background-color .25s ease
}

.main-nav.scrolled {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .08)
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0
}

.logo {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    padding: .5rem .7rem;
    border: 2px solid var(--primary);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.nav-links {
    display: flex;
    gap: 1.25rem;
    align-items: center
}

.nav-links a {
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: .35rem 0;
    transition: color .25s ease
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width .25s ease
}

.nav-links a:hover {
    color: var(--primary)
}

.nav-links a:hover::after {
    width: 100%
}

.toggle {
    border: 1px solid var(--light-gray);
    background: #fff;
    color: var(--dark-gray);
    border-radius: 999px;
    padding: .4rem .8rem;
    font-weight: 600;
    cursor: pointer
}

/* Hero */
.interactive-bg {
    position: relative;
    width: 100%;
    min-height: 80vh;
    background: linear-gradient(-45deg, #000000, #020617, #e7e5df, #e1dfd8);
    background-size: 300% 300%;
    animation: gradientMove 14s ease infinite;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    overflow: hidden;
    padding-left: clamp(1rem, 6vw, 6rem);
    padding-top: clamp(2rem, 8vh, 5rem)
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

.interactive-bg::before,
.interactive-bg::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: .38;
    z-index: 0
}

.interactive-bg::before {
    width: 640px;
    height: 640px;
    top: -150px;
    left: -200px;
    animation: floatLarge 12s ease-in-out infinite
}

.interactive-bg::after {
    width: 560px;
    height: 560px;
    bottom: -160px;
    right: -160px;
    animation: floatLarge 14s ease-in-out infinite
}

@keyframes floatLarge {
    0% {
        transform: translateY(0) scale(1)
    }

    50% {
        transform: translateY(-28px) scale(1.04)
    }

    100% {
        transform: translateY(0) scale(1)
    }
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    color: var(--dark)
}

.hero-title {
    color: var(--dark);
    letter-spacing: -.02em;
    line-height: 1.1;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .02), 0 12px 30px rgba(17, 24, 39, .06)
}

.subtitle {
    color: var(--medium-gray);
    font-size: 1.125rem;
    margin-top: .5rem
}

.cta-buttons {
    display: flex;
    gap: .75rem;
    margin-top: 1rem
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 12px 20px;
    background: linear-gradient(135deg, #5e7680, #4f6d7a);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    border-radius: 28px;
    border: none;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
    box-shadow: 0 8px 24px rgba(79, 109, 122, .18)
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(79, 109, 122, .22)
}

@keyframes neonPulse {
  0%, 100% {
    box-shadow: 0 0 6px var(--primary), 0 0 12px var(--primary);
  }
  50% {
    box-shadow: 0 0 12px var(--primary), 0 0 24px var(--primary);
  }
}

.cta-button.secondary {
  background: white;
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 6px;
  padding: 2px 8px;
  backdrop-filter: blur(2px);
  animation: neonPulse 2s ease-in-out infinite;
  transition: 0.3s ease;
}

.cta-button.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Section title */
.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
    color: var(--dark-gray)
}

.section-title span {
    color: var(--primary)
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px
}

/* Portfolio */
.portfolio-section {
    padding: 4rem 0
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem
}

.portfolio-item {
    background: #fff;
    border-radius: .6rem;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(16, 24, 40, .06);
    transition: transform .28s ease, box-shadow .28s ease;
    position: relative
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 40px rgba(16, 24, 40, .08)
}

.portfolio-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform .5s ease
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.05)
}

.portfolio-content {
    padding: 1.2rem 1.5rem
}

.portfolio-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .4rem
}

.tag {
    display: inline-block;
    margin-right: .4rem;
    margin-bottom: .4rem;
    padding: .25rem .5rem;
    background: #eef2f6;
    color: #2f4a54;
    border-radius: .5rem;
    font-size: .75rem;
    font-weight: 600
}

/* CV */
.cv-container {
    margin: 2rem auto
}

.cv-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem
}

.cv-photo img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--primary)
}

.cv-intro h3 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--primary-dark)
}

.cv-title {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: .6rem
}

.cv-contact p {
    margin: .3rem 0;
    color: var(--medium-gray)
}

.cv-contact p::before {
    content: "•";
    color: var(--primary);
    margin-right: .5rem
}

.cv-section h3 {
    border-bottom: 3px solid var(--primary);
    padding-bottom: .5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1.25rem
}

.cv-item {
    background: #fff;
    padding: 1.5rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, .06);
    margin-bottom: 1rem
}

.cv-company {
    font-style: italic;
    color: var(--medium-gray)
}

.cv-date {
    font-size: .9rem;
    color: var(--medium-gray);
    margin-bottom: .6rem
}

/* Contact */
.contact-section {
    padding: 4rem 0;
    background: var(--light)
}

.professional-form {
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: .6rem;
    box-shadow: 0 10px 30px rgba(2, 6, 23, .04)
}

.form-row {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1rem
}

.form-row .form-group {
    flex: 1
}

.form-group {
    margin-bottom: .9rem
}

.form-group label {
    display: block;
    margin-bottom: .4rem;
    font-weight: 600;
    color: var(--dark-gray);
    font-size: .95rem
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: .5rem;
    font-size: 1rem;
    transition: border-color .25s ease, box-shadow .25s ease;
    background: #fff;
    color: var(--dark-gray)
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 6px 18px rgba(79, 109, 122, .12)
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease
}

.submit-btn:hover {
    transform: translateY(-3px);
    background: var(--primary-dark);
    box-shadow: 0 12px 30px rgba(79, 109, 122, .16)
}

/* Footer */
.main-footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(-45deg, #f7f6f3, #ecebe6, #e7e5df, #e1dfd8);
    background-size: 300% 300%;
    animation: gradientMove 14s ease infinite;
    padding-top: 60px;
    padding-bottom: 24px;
    border-top: 1px solid rgba(17, 24, 39, .08);
    color: #111827;
    backdrop-filter: blur(8px)
}

.footer-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: start
}

.footer-links a {
    color: #374151;
    text-decoration: none;
    transition: color .2s ease
}

.footer-links a:hover {
    color: var(--primary)
}

.social-icons {
    display: flex;
    gap: .75rem;
    align-items: center
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(17, 24, 39, .06);
    border-radius: 50%;
    color: #111827;
    text-decoration: none;
    transition: transform .25s ease, background-color .25s ease
}

.social-icons a:hover {
    transform: scale(1.06);
    background-color: rgba(17, 24, 39, .12);
    color: var(--primary)
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    color: #374151;
    font-size: .95rem
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
    will-change: opacity, transform
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0)
}

/* Loader overlay */
.page-overlay {
    position: fixed;
    inset: 0;
    background: rgba(247, 246, 243, .7);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center
}

.page-overlay.show {
    opacity: 1
}

.loader-ring {
    width: 56px;
    height: 56px;
    position: relative
}

.loader-ring .dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulseDot 1.2s ease infinite
}

.loader-ring .dot:nth-child(2) {
    animation-delay: .2s
}

.loader-ring .dot:nth-child(3) {
    animation-delay: .4s
}

@keyframes pulseDot {

    0%,
    100% {
        opacity: .2;
        transform: translate(-50%, -50%) scale(.8)
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.06)
    }
}

/* Responsive */
@media(max-width:1024px) {
    .header-content h1 {
        font-size: 2.4rem
    }

    .section-title {
        font-size: 2rem
    }

    .portfolio-img {
        height: 200px
    }
}

@media(max-width:768px) {
    .nav-links {
        gap: 1rem
    }

    .form-row {
        flex-direction: column;
        gap: 1rem
    }

    .interactive-bg {
        min-height: 64vh;
        padding: 2rem 0 2rem 1rem
    }
}

@media(max-width:480px) {
    .container {
        padding: 0 1rem
    }

    .header-content h1 {
        font-size: 1.7rem
    }

    .subtitle {
        font-size: 1rem
    }

    .section-title {
        font-size: 1.5rem
    }

    .interactive-bg::before,
    .interactive-bg::after {
        display: none
    }
}

/* --- Visual enhancements --- */
/* Grain texture overlay */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(0, 0, 0, .03) 1px, transparent 1px);
    background-size: 3px 3px;
    opacity: .35;
    pointer-events: none;
    mix-blend-mode: multiply
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #4f6d7a, #7a94a1);
    box-shadow: 0 0 12px rgba(79, 109, 122, .4);
    z-index: 80
}

/* Decorative wave separator */
.wave-sep {
    height: 88px;
    background: radial-gradient(120% 80% at 50% -10%, rgba(79, 109, 122, .12) 0%, rgba(79, 109, 122, 0) 60%)
}

/* Back to top */
.back-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--light-gray);
    background: linear-gradient(135deg, #5e7680, #4f6d7a);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 14px 36px rgba(79, 109, 122, .26);
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease;
    z-index: 70
}

.back-top.show {
    opacity: 1;
    transform: translateY(0)
}

/* Social badges */
.social-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(17, 24, 39, .06);
    color: #111827;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: .02em;
    transition: transform .25s ease, background-color .25s ease
}

.social-badge:hover {
    transform: translateY(-2px);
    background: rgba(17, 24, 39, .12);
    color: var(--primary)
}

/* Portfolio tilt and shine */
.portfolio-item {
    perspective: 800px
}

.portfolio-item .shine {
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 200px at 50% -20%, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0));
    opacity: .35;
    pointer-events: none;
    transition: opacity .2s ease
}

.portfolio-item:hover .shine {
    opacity: .45
}

/* Button ripple element */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    background: rgba(255, 255, 255, .6);
    animation: ripple .6s ease-out forwards
}

@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: .6
    }

    100% {
        width: 220px;
        height: 220px;
        opacity: 0
    }
}

/* Glossy cards */
.portfolio-item,
.cv-item,
.professional-form {
    border: 1px solid rgba(79, 109, 122, .14);
    background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .86));
    backdrop-filter: blur(2px)
}

/* Section subtle divider under titles */
.section-title {
    position: relative
}

.section-title::before {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(79, 109, 122, .5), transparent)
}

/* --- Deep visual layer upgrades --- */
/* Cursor ring */
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 90;
    mix-blend-mode: multiply;
    transition: width .15s ease, height .15s ease, border-color .2s ease, background-color .2s ease;
    background: rgba(79, 109, 122, .06)
}

.cursor-ring.hover {
    width: 32px;
    height: 32px;
    background: rgba(79, 109, 122, .12)
}

.cursor-glow {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 89;
    filter: blur(80px);
    mix-blend-mode: screen;
    background: radial-gradient(closest-side, rgba(79, 109, 122, .35), rgba(122, 148, 161, .18), transparent 70%);
    transform: translate(-50%, -50%)
}

/* Decorative blobs in Hero */
.decor-blobs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1
}

.decor-blobs span {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: .28;
    animation: blobFloat 18s ease-in-out infinite
}

.decor-blobs span:nth-child(1) {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle at 30% 30%, rgba(79, 109, 122, .22), rgba(79, 109, 122, 0));
    top: 12%;
    left: 6%;
    animation-duration: 22s
}

.decor-blobs span:nth-child(2) {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle at 70% 40%, rgba(122, 148, 161, .22), rgba(122, 148, 161, 0));
    bottom: 18%;
    right: 10%;
    animation-duration: 20s
}

.decor-blobs span:nth-child(3) {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at 50% 70%, rgba(47, 74, 84, .22), rgba(47, 74, 84, 0));
    top: 28%;
    right: 28%;
    animation-duration: 24s
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1)
    }

    50% {
        transform: translate(20px, -18px) scale(1.06)
    }

    100% {
        transform: translate(0, 0) scale(1)
    }
}

/* Nav active link */
.nav-links a.active {
    color: var(--primary);
    font-weight: 700
}

.nav-links a.active::after {
    width: 100%
}

/* --- Premium visual pack v2 --- */
/* Glass nav refinement */
.main-nav {
    background: rgba(255, 255, 255, .86);
    border-bottom: 1px solid rgba(79, 109, 122, .12);
    backdrop-filter: blur(8px);
}

.logo {
    box-shadow: 0 6px 16px rgba(79, 109, 122, .12)
}

/* Hero CTA outline glow */
.cta-button {
    position: relative
}

.cta-button::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 28px;
    background: linear-gradient(120deg, rgba(255, 255, 255, .4), rgba(255, 255, 255, 0));
    opacity: .6;
    pointer-events: none
}

/* Portfolio link overlay */
.portfolio-link {
    position: relative
}

.portfolio-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(800px 320px at 50% -10%, rgba(79, 109, 122, .18), rgba(79, 109, 122, 0));
    opacity: 0;
    transition: opacity .25s ease
}

.portfolio-item:hover .portfolio-link::before {
    opacity: .3
}

/* Floating labels */
.form-group {
    position: relative
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: .9rem;
    background: #fff;
    padding: 0 .4rem;
    border-radius: .25rem;
    color: var(--medium-gray);
    transition: all .18s ease;
    pointer-events: none
}

.form-group input,
.form-group textarea {
    padding: 1rem 1rem .9rem 1rem
}

.form-group:focus-within label {
    top: -.55rem;
    color: var(--primary);
    font-weight: 600
}

.form-group.has-value label {
    top: -.55rem;
    color: var(--dark-gray)
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important
    }
}

/* --- Premium visual pack v3 --- */
/* Nav shrink on scroll */
.main-nav.small .container {
    padding: .5rem 0
}

.main-nav.small {
    box-shadow: 0 10px 26px rgba(79, 109, 122, .18)
}

/* Hero title refined gradient */
.hero-title {
    background: linear-gradient(180deg, #2f4a54 0%, #4f6d7a 50%, #7a94a1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

/* Portfolio section subtle grid pattern */
.portfolio-section::before {
    content: "";
    position: absolute;
    inset: -20px 0 0 0;
    background-image: linear-gradient(rgba(79, 109, 122, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 109, 122, .04) 1px, transparent 1px);
    background-size: 18px 18px, 18px 18px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .0) 0%, rgba(0, 0, 0, .6) 20%, rgba(0, 0, 0, .6) 80%, rgba(0, 0, 0, .0) 100%);
    pointer-events: none
}

.portfolio-section {
    position: relative
}

/* Image skeleton + reveal */
.portfolio-img {
    opacity: 100;
    transform: scale(1.03);
    transition: opacity .5s ease, transform .5s ease, filter .5s ease
}

.portfolio-img[data-loaded="true"] {
    opacity: 1;
    transform: scale(1);
    filter: none
}

/* Magnetic CTA hover hint */
.cta-button {
    will-change: transform
}

/* CV timeline accent */
.cv-section {
    position: relative
}

.cv-section::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(79, 109, 122, .25), rgba(79, 109, 122, .05));
    border-radius: 2px
}

/* Inputs focus glow refined */
.form-group input:focus,
.form-group textarea:focus {
    box-shadow: 0 8px 22px rgba(79, 109, 122, .16)
}

/* --- Premium visual pack v4 (aurora + glitch + confetti hooks) --- */
/* Aurora gradient overlay */
.aurora {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1
}

.aurora::before,
.aurora::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    mix-blend-mode: screen
}

.aurora::before {
    width: 60vw;
    height: 60vw;
    left: -8vw;
    top: -6vw;
    background: conic-gradient(from 180deg at 50% 50%, rgba(79, 109, 122, .28), rgba(122, 148, 161, .18), rgba(47, 74, 84, .22), transparent 60%);
    animation: auroraSpin 24s linear infinite
}

.aurora::after {
    width: 48vw;
    height: 48vw;
    right: -6vw;
    bottom: -8vw;
    background: radial-gradient(circle at 40% 60%, rgba(122, 148, 161, .25), rgba(79, 109, 122, .2), transparent 55%);
    animation: auroraPulse 16s ease-in-out infinite
}

@keyframes auroraSpin {
    0% {
        transform: rotate(0deg)
    }

    100% {
        transform: rotate(360deg)
    }
}

@keyframes auroraPulse {

    0%,
    100% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.08)
    }
}

/* Glitch micro effect on title */
@keyframes glitchShift {
    0% {
        text-shadow: 1px 0 rgba(47, 74, 84, .3), -1px 0 rgba(122, 148, 161, .3)
    }

    20% {
        text-shadow: -2px 1px rgba(47, 74, 84, .25), 2px -1px rgba(122, 148, 161, .25)
    }

    40% {
        text-shadow: 1px -2px rgba(47, 74, 84, .25), -1px 2px rgba(122, 148, 161, .25)
    }

    60% {
        text-shadow: -1px 1px rgba(47, 74, 84, .3), 1px -1px rgba(122, 148, 161, .3)
    }

    80% {
        text-shadow: 0 0 rgba(47, 74, 84, .3), 0 0 rgba(122, 148, 161, .3)
    }

    100% {
        text-shadow: 1px 0 rgba(47, 74, 84, .3), -1px 0 rgba(122, 148, 161, .3)
    }
}

.hero-title.glitch {
    animation: glitchShift .7s ease
}

/* Confetti canvas helper */
.confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 85
}

/* Modal viewer */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .35);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 95
}

.modal.show {
    display: flex;
    animation: fadeIn .25s ease
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.modal-dialog {
    width: min(900px, 92vw);
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .9));
    box-shadow: 0 30px 80px rgba(79, 109, 122, .30);
    transform: scale(.98);
    animation: pop .25s ease
}

@keyframes pop {
    from {
        transform: scale(.98)
    }

    to {
        transform: scale(1)
    }
}

.modal-media {
    position: relative;
    max-height: 60vh;
    overflow: hidden
}

.modal-image {
    width: 100%;
    display: block
}

.modal-body {
    padding: 1.25rem 1.5rem
}

.modal-title {
    margin: 0 0 .5rem;
    color: var(--primary-dark);
    font-size: 1.4rem;
    font-weight: 800
}

.modal-desc {
    color: var(--medium-gray);
    margin: 0 0 .75rem
}

.modal-tags {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--light-gray);
    background: #fff;
    color: var(--dark);
    font-size: 20px;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(79, 109, 122, .18)
}

.modal-close:hover {
    background: var(--primary);
    color: #fff
}

/* Cursor glow */
.cursor-glow {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 89;
    filter: blur(80px);
    mix-blend-mode: screen;
    background: radial-gradient(closest-side, rgba(79, 109, 122, .35), rgba(122, 148, 161, .18), transparent 70%);
    transform: translate(-50%, -50%)
}

/* CTA shimmer */
.cta-button::after {
    animation: shimmer 2.5s linear infinite;
    background-size: 200% auto
}

@keyframes shimmer {
    0% {
        background-position: 0 0
    }

    100% {
        background-position: 200% 0
    }
}

/* --- Visual pack v5: masonry, scroll-snap, vignette, refined cards --- */
/* Scroll snap */
html,
body {
    scroll-snap-type: y proximity;
}

.interactive-bg,
.portfolio-section,
.cv-container,
.contact-section,
.main-footer {
    scroll-snap-align: start;
    scroll-margin-top: 80px;
}

/* Masonry grid (desktop) */
.portfolio-grid.masonry {
    column-count: 3;
    column-gap: 2rem;
}

.portfolio-grid.masonry .portfolio-item {
    display: inline-block;
    width: 100%;
    margin: 0 0 2rem;
    break-inside: avoid;
}

@media (max-width: 1200px) {
    .portfolio-grid.masonry {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .portfolio-grid.masonry {
        column-count: 1;
    }
}

/* Edge vignette */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(120% 100% at 50% -10%, rgba(79, 109, 122, 0.10), transparent 60%), radial-gradient(120% 100% at 50% 110%, rgba(79, 109, 122, 0.10), transparent 60%);
}

/* Card refinement */
.portfolio-item,
.cv-item,
.professional-form {
    transition: transform .35s ease, box-shadow .35s ease, border-color .25s ease;
}

.portfolio-item:hover,
.cv-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 28px 54px rgba(79, 109, 122, .22);
    border-color: rgba(79, 109, 122, .22);
}

/* Sticky section titles on large screens */
@media (min-width: 1024px) {
    .section-title {
        position: sticky;
        top: 76px;
        z-index: 2;
        background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .70));
        backdrop-filter: blur(6px);
        padding-top: .6rem;
        padding-bottom: 1rem;
        margin-top: 0;
    }
}

.portfolio-img {
    display: block !important;
    width: 100%;
    height: auto;
    border: 1px solid red;
    /* juste pour tester si l'image est là */
}