/* ========================================
           VARIABLES & RESET
        ======================================== */
:root {
    /* AAA High Contrast Palette */
    --color-bg: #0a0a0f;
    /* Darker, Matrix-friendly background */
    --color-bg-secondary: #1a1a24;
    /* Darker Teal for AAA contrast */
    --color-accent: #00DCE1;
    /* Cyan (Passes 7:1 on #703800) */
    --color-accent-secondary: #FFCC33;
    /* Gold/Peach (Passes AA/Large AAA on #703800) */
    --color-text: #ffffff;
    --color-text-muted: #e0e0e0;
    /* Solid light grey for guaranteed contrast */
    --color-border: rgba(255, 255, 255, 0.3);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Outfit', sans-serif;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fallbacks for older browsers */
body {
    background-color: #0a0a0f;
    /* Fallback for --color-bg */
    color: #ffffff;
    /* Fallback for --color-text */
}

/* Minimal Mode for Ultra-Legacy Browsers (IE4, Netscape 4) */
.minimal-mode body,
.minimal-mode {
    background: #000000 !important;
    color: #ffffff !important;
}

.minimal-mode .bg-gradient,
.minimal-mode .noise-overlay,
.minimal-mode #matrix-canvas,
.minimal-mode .bg-gradient,
.minimal-mode .noise-overlay {
    display: none !important;
    background: none !important;
}

.minimal-mode header,
.minimal-mode footer,
.minimal-mode section {
    background: #000 !important;
    position: static !important;
    padding: 20px !important;
    border: none !important;
}

/* Visibility Utilities */
.show-on-mobile {
    display: none !important;
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }

    .show-on-mobile {
        display: flex !important;
    }
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    font-family: var(--font-body);
    background-color: #0a0a0f;
    background-color: var(--color-bg);
    /* Explicitly set for accessibility tools */
    color: #ffffff;
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ========================================
           BACKGROUND EFFECTS
        ======================================== */
/* Wrap complex backgrounds in @supports to prevent crashes in IE4/Netscape 4 */
@supports (display: grid) {
    .bg-gradient {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: -1;
        background:
            radial-gradient(ellipse at 20% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
            radial-gradient(ellipse at 80% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    }

    .noise-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 1000;
        opacity: 0.03;
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    }
}

/* Matrix Canvas Background */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-color: var(--color-bg);
}

/* ========================================
           HEADER & NAVIGATION
        ======================================== */
header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    z-index: 2000;
    /* Above noise-overlay (1000) */
    background: transparent;
    backdrop-filter: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Re-enable clicks on interactive elements */
.logo,
.language-switcher,
.burger-menu {
    pointer-events: auto;
}

header.scrolled {
    padding: 1rem 3rem;
    background-color: #0a0a0f;
    /* Solid background for AAA auditing */
}

.logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--color-accent);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 2001;
    pointer-events: auto;
}

.lang-btn {
    padding: 0.5rem 0.75rem;
    min-width: 45px;
    text-align: center;
    background-color: #1a1a24;
    /* Solid dark background for contrast */
    border: 1px solid var(--color-accent);
    border-radius: 6px;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-weight: 600;
    cursor: pointer;
    pointer-events: auto;
    /* Ensure clickable */
}

.lang-btn:hover {
    background: var(--color-accent);
    color: var(--color-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.lang-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-bg);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.lang-divider {
    color: #808080;
    /* Solid mid-grey for contrast */
    font-weight: 300;
}

/* Burger Menu */
.burger-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
    z-index: 200;
    background: none;
    border: none;
    justify-self: end;
}

.burger-menu span {
    display: block;
    width: 30px;
    height: 2px;
    background: var(--color-text);
    transition: all 0.4s var(--transition-smooth);
    transform-origin: center;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: var(--color-accent);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background: var(--color-accent);
}

/* Navigation Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #0a0a0f;
    /* Solid background for AAA contrast */
    backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s var(--transition-smooth);
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Cacher le language switcher et rendre le header transparent quand le menu est ouvert */
body.menu-open .language-switcher,
body.menu-open .logo {
    display: none;
}

body.menu-open header {
    background: transparent;
    backdrop-filter: none;
    border-color: transparent;
}

.nav-menu {
    list-style: none;
    text-align: center;
}

.language-switcher-mobile {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 4rem;
    padding-bottom: 2rem;
    width: 100%;
}

.language-switcher-mobile .lang-btn {
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
}

.nav-overlay.active .nav-menu,
.nav-overlay.active .language-switcher-mobile {
    animation: fadeInUp 0.8s var(--transition-smooth) forwards;
}

.nav-menu li {
    margin: 0.75rem 0;
    overflow: visible;
}

.nav-menu a {
    font-size: 2.5rem;
    font-size: clamp(1.5rem, 6vw, 3rem);
    font-weight: 700;
    color: #ffffff;
    color: var(--color-text);
    text-decoration: none;
    display: inline-block;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(100%);
    -webkit-transform: translateY(100%);
    opacity: 0;
    line-height: 1.3;
    padding: 0.3em 0;
}

.nav-overlay.active .nav-menu a {
    transform: translateY(0);
    opacity: 1;
}

.nav-menu li:nth-child(1) a {
    transition-delay: 0.1s;
}

.nav-menu li:nth-child(2) a {
    transition-delay: 0.2s;
}

.nav-menu li:nth-child(3) a {
    transition-delay: 0.3s;
}

.nav-menu li:nth-child(4) a {
    transition-delay: 0.4s;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-secondary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--transition-smooth);
}

.nav-menu a:hover {
    color: var(--color-accent);
}

.nav-menu a:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-menu a.active {
    color: var(--color-accent);
}

/* ========================================
           SECTIONS
        ======================================== */
section {
    min-height: auto;
    padding: 40px 0;
    position: relative;
    z-index: 1;
    background: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 3rem;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-title span {
    color: var(--color-accent);
    /* Fallback for tools */
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

/* Section Divider */
.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), transparent);
    margin: 0;
}

/* ========================================
   HERO SECTION
======================================== */
#accueil {
    display: flex;
    align-items: center;
    padding-top: 0;
    min-height: 70vh;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    max-width: 1800px;
    padding: 0 2vw;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-content-left {
    grid-column: 1;
    padding-left: 1vw;
    padding-right: 1.5rem;
    z-index: 2;
}

.hero-subtitle {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s var(--transition-smooth) 0.2s forwards;
}

.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-family: var(--font-display);
    font-size: 4rem;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
    -webkit-animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}

.hero-title span {
    display: block;
    color: var(--color-accent-secondary);
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.75rem;
    color: var(--color-text-muted);
    max-width: 700px;
    margin-bottom: 0;
    opacity: 0;
    animation: fadeInUp 0.8s var(--transition-smooth) 0.6s forwards;
}

/* Right Side Text Block */
.hero-side-content {
    grid-column: 3;
    display: flex;
    justify-content: center;
    align-items: center;
}

.side-text-block {
    padding: 0 1rem;
    text-align: center;
    transition: all 0.4s var(--transition-smooth);
}

.side-text-block h3 {
    font-family: var(--font-display);
    font-size: clamp(4rem, 4vw, 5rem);
    font-weight: 700;
    text-align: center;
    justify-content: center;
}

.side-text-block p {
    font-size: clamp(0.8rem, 1vw, 1.1rem);
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Center Content (Logo) */
.hero-center-content {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    z-index: 2;
    margin-top: 5vh;
}

.hero-center-image img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--color-accent);
    box-shadow: 0 0 50px rgba(0, 245, 212, 0.5), 0 0 100px rgba(0, 245, 212, 0.2);
    background: transparent;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero-center-content p {
    font-size: 1.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
    line-height: 1.4;
    position: relative;
    text-align: center;
}

/* Mobile Responsiveness for Hero */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 100px;
    }

    .hero-content-left {
        max-width: 100%;
        padding: 0;
        margin-bottom: 3rem;
    }

    .hero-side-content {
        grid-column: 1;
        max-width: 100%;
        width: 100%;
        justify-content: center;
    }

    .side-text-block {
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
        text-align: center;
    }

    .side-text-block h3 {
        font-size: clamp(1.8rem, 5vw, 3rem);
        text-align: center;
        justify-content: center;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-center-content {
        max-width: 100%;
        width: 100%;
        padding: 2rem 0;
        order: 3;
    }

    .hero-center-content p {
        font-size: 1.25rem;
    }

    .hero-center-image img {
        width: 150px;
        height: 150px;
    }
}

/* ========================================
           ABOUT SECTION
        ======================================== */
#apropos {
    /* Background reverted (transparent) */
    padding: 4rem 2rem;
    margin-bottom: 4rem;
}

#apropos h2,
#apropos h3,
#apropos p,
#apropos span,
#apropos .section-title,
#apropos .section-subtitle {
    color: #ffffff !important;
}

#apropos .section-title span {
    color: #ffffff !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    background-color: var(--color-bg) !important;
}

.about-text-centered {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text-centered h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.about-text-centered p {
    color: #ffffff;
    margin-bottom: 1.5rem;
    line-height: 1.9;
    font-size: 1.1rem;
}

/* ========================================
            SKILLS SECTION NEW
        ======================================== */
.skills-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.skill-item {
    background: rgba(10, 10, 15, 0.4);
    border: 1px solid var(--color-border);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s var(--transition-smooth);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 280px;
    /* Assure une taille constante */
    cursor: default;
}

.skill-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    background: rgba(10, 10, 15, 0.8);
    box-shadow: 0 10px 30px rgba(0, 245, 212, 0.1);
}

.skill-icon-wrapper {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    transition: transform 0.4s var(--transition-smooth);
}

.skill-item:hover .skill-icon-wrapper {
    transform: scale(1.1);
}

.skill-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
}

.skill-item h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    transition: color 0.3s ease;
}

.skill-item p {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    opacity: 0;
    max-height: 0;
    transform: translateY(10px);
    transition: all 0.4s var(--transition-smooth);
    overflow: hidden;
}

.skill-item:hover p {
    opacity: 1;
    max-height: 100px;
    /* Ajustez selon la longueur du texte */
    transform: translateY(0);
    margin-top: 1rem;
}

/* ========================================
           PROJECTS SECTION
        ======================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-accent);
    box-shadow: 0 15px 50px rgba(255, 255, 255, 0.05);
}

.project-card.featured {
    border: 2px solid var(--color-accent);
    background: linear-gradient(135deg, #306061, #254a4b) !important;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--color-accent);
    color: var(--color-bg);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.project-image {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.project-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: block;
    /* Original color by default */
}

.project-card:hover .project-image img {
    transform: scale(1.1);
    /* Color remains by default */
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(48, 96, 97, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-bg);
    color: var(--color-text);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-link:hover {
    transform: translateX(5px);
    background: var(--color-accent);
    color: var(--color-bg);
}

.project-link.github:hover {
    background: var(--color-accent);
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.project-content p {
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background-color: #112b2c;
    /* Solid dark background for cyan text */
    color: var(--color-accent);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(0, 245, 212, 0.2);
}

.empty-projects {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid var(--color-border);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.empty-projects p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

/* ========================================
           CONTACT SECTION
        ======================================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.contact-info>p {
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.contact-details {
    list-style: none;
}

.contact-details li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
}

.contact-details li .icon {
    width: 50px;
    height: 50px;
    background: #1a1a24;
    /* Solid for accessibility link */
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: all 0.3s var(--transition-smooth);
    text-decoration: none;
    /* Fix blue underline */
}

.contact-details li:hover .icon {
    border-color: var(--color-accent);
    background: #244849;
    /* Solid hover */
}

.contact-details li strong {
    display: block;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}


.contact-form-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Alerts */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: fadeInUp 0.5s ease forwards;
}

.alert-success {
    background: rgba(0, 220, 225, 0.1);
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
}

.alert-error {
    background: rgba(255, 51, 51, 0.1);
    border: 1px solid #ff3333;
    color: #ff3333;
}

.contact-form-new {
    background: var(--color-bg-secondary);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 220, 225, 0.2);
    box-shadow: 0 0 30px rgba(0, 220, 225, 0.05);
    position: relative;
    overflow: hidden;
}

.contact-form-new::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 220, 225, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.form-title {
    text-align: center;
    font-size: 2.2rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}


.contact-form-new .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.contact-form-new .form-group {
    margin-bottom: 1.5rem;
}

.contact-form-new .form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-accent);
}

.contact-form-new .form-group input,
.contact-form-new .form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    /* Lighter background */
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* More visible border */
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form-new .form-group input:focus,
.contact-form-new .form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(0, 220, 225, 0.1);
}

.contact-form-new .form-group textarea {
    min-height: 200px;
    resize: vertical;
}

.form-consent {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    align-items: flex-start;
}

.checkbox-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 100%;
    width: 100%;
    z-index: 2;
}

.custom-checkbox {
    position: absolute;
    top: 0;
    left: 0;
    height: 24px;
    width: 24px;
    background: transparent;
    border: 2px solid var(--color-accent);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.checkbox-wrapper input:checked~.custom-checkbox {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.checkbox-wrapper input:checked~.custom-checkbox::after {
    content: '✓';
    position: absolute;
    color: var(--color-bg);
    font-weight: bold;
    font-size: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.form-consent label {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #ffffff;
    cursor: pointer;
}

.inline-link {
    color: var(--color-accent);
    text-decoration: underline;
    font-weight: 500;
}

.form-security {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.25rem;
    border-radius: 10px;
    margin-bottom: 2.5rem;
}

.security-icon {
    font-size: 1.2rem;
}

.form-security p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.form-submit-container {
    text-align: center;
}

.btn-submit-new {
    display: inline-block;
    width: auto;
    min-width: 250px;
    padding: 1.25rem 3rem;
    background: rgba(0, 220, 225, 0.1);
    border: 2px solid var(--color-accent);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-submit-new:hover {
    background: var(--color-accent);
    color: var(--color-bg);
    box-shadow: 0 10px 25px rgba(0, 220, 225, 0.3);
    transform: translateY(-3px);
}



/* ========================================
           FOOTER
        ======================================== */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
    position: relative;
    z-index: 1;
    background: transparent;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    padding: 0 1rem;
}

.social-links a {
    padding: 0.6rem 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s var(--transition-smooth);
    min-width: 100px;
}

.social-links a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-3px);
}

footer p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

footer p a {
    color: var(--color-accent);
    text-decoration: none;
}



/* Modal Mentions Légales */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--color-bg-secondary);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 15px;
    position: relative;
    padding: 3rem;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    transform: translateY(30px);
    transition: all 0.4s var(--transition-smooth);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--color-accent);
}

.modal-content h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--color-accent);
    text-align: center;
}

.legal-section {
    margin-bottom: 2rem;
}

.legal-section h3 {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.legal-section p,
.legal-text {
    color: var(--color-text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.legal-text ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.legal-text li {
    margin-bottom: 0.5rem;
}

/* ========================================
           ANIMATIONS
        ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--transition-smooth);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
           SCROLL TO TOP BUTTON
        ======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-secondary)) !important;
    color: var(--color-bg) !important;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 220, 225, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 90;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 220, 225, 0.5);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-bg);
    fill: none;
}

/* ========================================
           RESPONSIVE - TABLET (768px - 1024px)
        ======================================== */
@media (max-width: 1024px) {
    header {
        padding: 1rem 2rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .project-image img {
        height: 220px;
    }

    .section-header {
        margin-bottom: 3rem;
    }
}

/* ========================================
           RESPONSIVE - MOBILE (max 768px)
        ======================================== */
@media (max-width: 768px) {

    /* ---- HEADER ---- */
    header {
        padding: 1rem;
        display: grid !important;
        grid-template-columns: auto 1fr auto;
        align-items: center;
    }

    header.scrolled {
        padding: 0.75rem 1rem;
    }

    .logo {
        font-size: 1.5rem;
        color: var(--color-accent);
    }

    .language-switcher {
        display: none !important;
    }

    .lang-btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .burger-menu {
        padding: 12px;
        min-width: 44px;
        min-height: 44px;
        grid-column: 3;
        justify-self: end;
    }

    /* ---- SECTIONS ---- */
    section {
        min-height: auto;
        padding: 40px 0 30px;
    }

    .container {
        padding: 0 1rem;
    }

    .section-header {
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* ---- HERO (CRITICAL FIX: stack columns) ---- */
    #accueil {
        padding-top: 100px;
        min-height: auto;
    }

    .hero-container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto auto;
        text-align: center;
        padding: 0 1rem;
        gap: 1.5rem;
    }

    .hero-content-left {
        grid-column: 1;
        grid-row: 1;
        text-align: center;
        padding: 0;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .hero-center-content {
        grid-column: 1;
        grid-row: 2;
        max-width: 100% !important;
        margin-top: 0;
        padding: 0;
    }

    .hero-center-image img {
        width: 160px;
        height: 160px;
    }

    .hero-center-content p {
        font-size: 1rem;
        margin-top: 1rem;
    }

    .hero-side-content {
        grid-column: 1;
        grid-row: 3;
        display: flex !important;
        justify-content: center;
        align-items: center;
    }

    .side-text-block h3 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .side-text-block p {
        font-size: 0.95rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
        letter-spacing: 0.2em;
    }

    .hero-title {
        font-size: clamp(1.8rem, 9vw, 3rem);
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
        max-width: 90%;
    }

    /* ---- ABOUT ---- */
    .about-text-centered h3 {
        font-size: 1.5rem;
    }

    .about-text-centered p {
        font-size: 1rem;
    }

    /* ---- PROJECTS ---- */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-image {
        padding: 15px;
    }

    .project-image img {
        height: 200px;
    }

    .project-content {
        padding: 1.5rem;
    }

    .project-content h3 {
        font-size: 1.25rem;
    }

    .project-content p {
        font-size: 0.9rem;
    }

    .tech-tag {
        font-size: 0.8rem;
        padding: 0.35rem 0.8rem;
    }

    .project-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        min-height: 44px;
    }

    /* ---- CONTACT FORM ---- */
    .contact-wrapper {
        gap: 2rem;
    }

    .contact-info h3 {
        font-size: 1.5rem;
    }

    .contact-info>p {
        font-size: 0.95rem;
    }

    .contact-details li .icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .contact-form-new {
        padding: 1.5rem;
    }

    .contact-form-new .form-row {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    .contact-form-new .form-group {
        margin-bottom: 1rem;
    }

    .contact-form-new .form-group label {
        display: block;
        color: var(--color-accent) !important;
        font-weight: 600;
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
    }

    .contact-form-new .form-group input,
    .contact-form-new .form-group textarea {
        width: 100% !important;
        padding: 0.9rem 1rem !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 2px solid rgba(0, 220, 225, 0.3) !important;
        border-radius: 10px !important;
        color: #fff !important;
        font-size: 16px !important;
        min-height: 48px;
        box-sizing: border-box;
        -webkit-appearance: none;
        appearance: none;
    }

    .contact-form-new .form-group textarea {
        min-height: 150px;
        resize: vertical;
    }

    .form-consent {
        gap: 0.75rem;
        margin: 1.5rem 0;
    }

    .form-consent label {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .btn-submit-new {
        display: block !important;
        width: 100% !important;
        padding: 1.2rem 2rem !important;
        background: var(--color-accent) !important;
        color: var(--color-bg) !important;
        border: none !important;
        border-radius: 12px !important;
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        cursor: pointer;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        margin-top: 1rem;
        box-shadow: 0 5px 15px rgba(0, 220, 225, 0.3);
    }

    /* ---- FOOTER ---- */
    footer {
        padding: 2rem 0;
    }

    .social-links a {
        padding: 0.5rem 1rem;
        width: auto;
        height: auto;
    }

    footer p {
        font-size: 0.85rem;
        padding: 0 1rem;
    }

    /* ---- UTILITIES ---- */
    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
    }

    .nav-menu a {
        font-size: clamp(1.5rem, 8vw, 3rem);
    }
}

/* ========================================
           RESPONSIVE - SMALL PHONES (max 480px)
        ======================================== */
@media (max-width: 480px) {
    header {
        padding: 0.75rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .lang-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }

    .container {
        padding: 0 0.75rem;
    }

    section {
        padding: 35px 0 25px;
    }

    .section-title {
        font-size: clamp(1.5rem, 8vw, 2rem);
    }

    .hero-title {
        font-size: clamp(1.5rem, 10vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: 0.7rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .project-image img {
        height: 160px;
    }

    .project-content {
        padding: 1.25rem;
    }

    .empty-projects {
        padding: 2rem 1rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .nav-menu a {
        font-size: clamp(1.2rem, 7vw, 2rem);
    }

    .nav-menu li {
        margin: 1rem 0;
    }
}

/* ========================================
           TOUCH DEVICE OPTIMIZATIONS
        ======================================== */
@media (hover: none) and (pointer: coarse) {


    .project-card:hover {
        transform: none;
    }

    .social-links a:hover {
        transform: none;
    }

    /* Make project overlay always visible on touch */
    .project-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, 0.7);
    }

    /* Increase tap targets */
    .project-link {
        padding: 1rem 1.5rem;
    }
}

/* ========================================
           LANDSCAPE PHONE ORIENTATION
        ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
    section {
        min-height: auto;
        padding: 60px 0 40px;
    }

    #accueil {
        padding-top: 80px;
    }

    .hero-title {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
        margin-bottom: 1rem;
    }

    .hero-description {
        margin-bottom: 1.5rem;
    }
}

/* ========================================
           PWA INSTALL PROMPT
        ======================================== */
#pwa-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    width: 90%;
    max-width: 400px;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 220, 225, 0.3);
    border-radius: 16px;
    padding: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#pwa-install-prompt.visible {
    transform: translateX(-50%) translateY(0);
}

.pwa-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.pwa-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.pwa-text h4 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

.pwa-text p {
    margin: 2px 0 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.pwa-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-btn-install {
    background: #00DCE1;
    color: #0a0a0f;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pwa-btn-install:hover {
    background: #fff;
    transform: scale(1.05);
}

.pwa-btn-close {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

@media (min-width: 768px) {
    #pwa-install-prompt {
        display: none !important;
    }
}