@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;300&display=swap');

/* --- Variables et Base --- */
/* --- HERO GLITCH FONTS --- */
.hero-title-group {
    text-align: center;
    line-height: 1.2;
}

.punk-glitch {
    font-family: 'Lacquer', system-ui;
    font-size: 3rem;
    /* Adjusted for Lacquer readability */
    font-weight: 400;
    display: inline-block;
    color: var(--text-color);
}

.punk-glitch span {
    display: inline-block;
    will-change: transform;
    transition: transform 0.1s steps(2);
    /* Choppy glitch feel */
}

.static-contrast {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 4rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .punk-glitch {
        font-size: 1.5rem;
    }

    .static-contrast {
        font-size: 2.5rem;
    }
}

/* Original CSS Starts Here */
:root {
    --primary: #007BFF;
    --primary-light: #2f96ff;
    --primary-dark: #0056b3;
    --accent: #00e5ff;
    --text-light: #f8f9fa;
    --text-dark: #333;
    --bg-light: #f8f9fa;
    --bg-dark: #121212;
    --card-light: #ffffff;
    --card-dark: #1E1E1E;
    --shadow: rgba(0, 123, 255, 0.2);
    --glow: rgba(0, 229, 255, 0.6);
}

/* --- Base Styles --- */
body {
    font-family: 'Azeret Mono', monospace;
    background-color: #000;
    background-image: url('../assets/images/Desktop.png');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    color: var(--text-dark);
    transition: color 0.4s ease;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 0;
}

/* Background element suppressed for minimalistic design */
body::before {
    display: none;
}

/* ===========================================
   DUST CANVAS & TEXT REVEAL ANIMATIONS
   =========================================== */
#dust-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    /* Ne doit bloquer aucun clic */
    z-index: -500;
    /* Derrière le contenu mais DEVANT le fond en parallaxe (-999) */
}

/* Base class applied by JS for words */
.reveal-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%) rotate(5deg);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: bottom left;
}

.reveal-text.show .reveal-word {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

body.dark-mode {
    background-image: url('../assets/images/Desktop.png');
    /* Maintain the image in dark mode */
    background-color: #000;
    color: var(--text-light);
}

/* --- Page Loader --- */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #050505;
    /* Deep black to contrast neon */
    z-index: 9999;
    /* Max height */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.86, 0, 0.07, 1), opacity 0.8s ease;
}

#page-loader.loaded {
    transform: translateY(-100vh);
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
    max-width: 400px;
}

.loader-counter {
    font-size: 5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1;
    font-family: 'Azeret Mono', monospace;
    display: flex;
    align-items: flex-end;
}

.loader-counter span {
    font-size: 2rem;
    color: #06E6FF;
    margin-bottom: 10px;
    margin-left: 5px;
}

.loader-bar-container {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 15px;
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: #06E6FF;
    box-shadow: 0 0 10px #06E6FF;
    transition: width 0.1s ease;
}

.loader-text-modern {
    font-size: 0.8rem;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    animation: loaderPulseModern 2s infinite alternate;
}

@keyframes loaderPulseModern {
    0% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
    }
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 123, 255, 0.4);
    border-radius: 5px;
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

main {
    background-color: transparent;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* --- Section Styles --- */
.section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(135deg, rgba(0, 123, 255, 0.03) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: -1;
}

.dark-mode .section::before {
    background-image: none;
    /* Uniform space effect */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.container.show {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    letter-spacing: 1px;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #e0e0e0, #FFEC16, #FA6CE7, #ffffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 8s linear infinite;
    /* Adding a subtle drop shadow to container element is hard when text is clipped, dropping it or keeping text clean */
    filter: drop-shadow(0px 4px 10px rgba(0, 0, 0, 0.5));
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #FFEC16, #FA6CE7);
    border-radius: 2px;
    box-shadow: 0 0 10px #FFEC16;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.title-accent {
    color: var(--primary);
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    letter-spacing: 0.3px;
    font-weight: 500;

    /* Sleek container for readability over busy backgrounds */
    background: #0A0A0A;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 15px 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8);
    display: inline-block;
    /* Center hack for inline blocks with auto margins */
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.dark-mode .section-intro {
    color: rgba(255, 255, 255, 0.95);
}

/* --- About Hero Banner --- */
.about-banner {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 40px;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Hero Minimalist Section --- */
.hero,
.hero-section,
main>section:first-of-type,
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
}

.showreel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: -2;
}

.hero-background-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: -1;
}

/* Content of new minimalist hero */
.hero-content.minimalist {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    mix-blend-mode: difference;
    /* Contraste temps-réel avec la vidéo */
    color: #FFF;
}

.hero-title {
    font-size: 5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: inherit;
    margin: 0 0 15px 0;
    text-shadow: none !important;
    /* Pas d'ombre qui brouille le blend-mode */
}

.hero-tagline {
    font-size: 1.2rem;
    color: inherit;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 300;
    margin: 0;
    text-shadow: none !important;
}

.scroll-indicator {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    opacity: 0.7;
    transition: opacity 0.3s;
    cursor: pointer;
    z-index: 20;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator span {
    font-size: 0.9rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* --- About Card (Brutalist Minimal) --- */
.about-card {
    background-color: #0A0A0A;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    margin-top: 40px;
}

.about-content {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.about-text-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.presentation-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    line-height: 1.8;
    letter-spacing: 0.2px;
    margin: 0;
}

.profile-header h3 {
    color: rgba(255, 255, 255, 0.95);
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.profile-header .job-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    letter-spacing: 0.3px;
    margin: 0;
}

.about-text-container h4 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
    margin-bottom: 15px;
    margin-top: 15px;
    font-weight: 500;
}


/* --- Presentation Section --- */
.profile-image {
    flex: 0 0 300px;
    position: relative;
    perspective: 1000px;
    /* For 3D Tilt Effect */
}

.image-frame {
    width: 100%;
    height: 350px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
}

.image-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 15px;
    box-sizing: border-box;
    pointer-events: none;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.image-frame:hover img {
    transform: scale(1.05);
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-info h3 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    letter-spacing: 0.5px;
    font-weight: 600;
}

.dark-mode .profile-info h3 {
    color: rgba(255, 255, 255, 0.95);
}

.profile-info .job-title {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
    letter-spacing: 0.3px;
}

.dark-mode .profile-info .job-title {
    color: rgba(255, 255, 255, 0.9);
}

.presentation-text {
    color: #333;
    font-size: 1.1rem;
    line-height: 1.7;
    letter-spacing: 0.2px;
}

.dark-mode .presentation-text {
    color: rgba(255, 255, 255, 0.9);
}

.profile-info p {
    margin-bottom: 25px;
    line-height: 1.7;
    color: #333;
    font-size: 1.1rem;
    letter-spacing: 0.2px;
}

.dark-mode .profile-info p {
    color: rgba(255, 255, 255, 0.9);
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.skill-tag,
.tag,
.skill-badge,
[class*="badge"] {
    background-color: rgba(255, 236, 22, 0.1) !important;
    color: #FFEC16 !important;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 236, 22, 0.4) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dark-mode .skill-tag {
    background-color: rgba(255, 236, 22, 0.1) !important;
    border-color: rgba(255, 236, 22, 0.4) !important;
}

.skill-tag:hover,
.tag:hover,
.skill-badge:hover,
[class*="badge"]:hover {
    color: #FA6CE7 !important;
    border-color: #FA6CE7 !important;
    background-color: rgba(250, 108, 231, 0.1) !important;
    transform: translateY(-2px);
}

.cv-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: var(--background);
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cv-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3);
}

.btn-text {
    margin-right: 10px;
}

.btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.cv-button:hover .btn-icon {
    transform: translateY(3px);
}

/* --- Projects Header & Search --- */
.projects-header-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-container input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dark);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.dark-mode .search-container input {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-dark);
    opacity: 0.5;
    pointer-events: none;
    transition: color 0.3s ease;
}

.dark-mode .search-icon {
    color: var(--text-light);
}

.search-container input:focus+.search-icon {
    color: var(--primary);
    opacity: 1;
}

/* --- Project Filters --- */
.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-btn {
    background: #FA6CE7;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.4s ease;
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.dark-mode .filter-btn {
    background: #0a0a0a;
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.filter-btn:hover,
.filter-btn.active {
    color: white;
    border-color: #FFEC16;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

/* --- Project Grid (Flat 2D Minimal) --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
    width: 100%;
}

/* --- Project Cards --- */
.project-card {
    position: relative;
    display: block;
    /* Important car c'est une balise <a> */
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #0A0A0A;
    /* Fond noir profond pour les PNG transparents */
    border-radius: 4px;
    /* Très léger arrondi, presque brut */
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);

    /* Animation d'apparition au chargement */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    z-index: 10;
}

/* For filtering animation */
.project-card.hide-filter {
    display: none;
}

.dark-mode .project-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Discret */
}

.project-card.show {
    opacity: 1;
    transform: translateY(0);
}

.project-card img.project-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Léger zoom au survol */
.project-card:hover img.project-thumb {
    transform: scale(1.05);
}

.project-hover-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.project-card:hover .project-hover-video {
    opacity: 1;
}

.project-info {
    position: absolute;
    inset: 0;
    /* Remplit toute la carte */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover .project-info {
    opacity: 1;
}

.project-title {
    color: #FFF;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.project-role {
    color: #06E6FF;
    /* Ton Cyan exact */
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
    transform: translateY(10px);
    transition: transform 0.4s ease 0.05s;
    /* Léger délai pour un effet cascade */
}

/* Animation du texte qui remonte au survol */
.project-card:hover .project-title,
.project-card:hover .project-role {
    transform: translateY(0);
}

/* --- Contact Section --- */
#contact .container {
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
    margin: 0 auto;
    box-sizing: border-box;
}

#contactForm {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-panel {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    background-color: #0A0A0A;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.form-group {
    width: 100%;
    margin-bottom: 0;
    box-sizing: border-box;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #333;
    border-radius: 8px;
    background-color: #111;
    color: #FFF;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.5;
}

.submit-btn {
    color: #FFEC16;
    background-color: #FA6CE7;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    width: fit-content;
    align-self: center;
}

.submit-btn:hover {
    background: #FFEC16;
    color: #FA6CE7;
    transform: translateY(-2px);
}

/* Responsive styles for contact section */
@media screen and (max-width: 1024px) {
    .contact-panel {
        padding: 35px;
        max-width: 550px;
    }
}

@media screen and (max-width: 768px) {
    #contact .container {
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
    }

    .contact-panel {
        padding: 30px;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    #contactForm {
        gap: 20px;
    }

    .form-group {
        margin-bottom: 0;
    }

    .submit-btn {
        margin-top: 15px;
        padding: 12px 30px;
        width: 100%;
        max-width: 250px;
    }
}

@media screen and (max-width: 576px) {
    #contact .container {
        padding: 0 15px;
    }

    .contact-panel {
        padding: 25px;
    }

    #contactForm {
        gap: 15px;
    }

    .form-group label {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
}

@media screen and (max-width: 480px) {
    #contact .container {
        padding: 0 10px;
    }

    .contact-panel {
        padding: 20px;
        border-radius: 15px;
    }

    #contactForm {
        gap: 12px;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px;
        font-size: 0.9rem;
        border-radius: 6px;
    }

    .form-group textarea {
        min-height: 120px;
    }

    .submit-btn {
        padding: 10px 25px;
        font-size: 0.95rem;
        margin-top: 10px;
        border-radius: 25px;
    }

    #form-messages {
        font-size: 0.85rem;
        padding: 0.8rem;
        width: 100%;
        margin: 0;
        box-sizing: border-box;
    }
}

@media screen and (max-width: 360px) {
    .contact-panel {
        padding: 15px;
    }

    .form-group input,
    .form-group textarea {
        padding: 8px 10px;
    }

    .form-group textarea {
        min-height: 100px;
    }

    .submit-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* ===========================================
   SIDEBAR DOT NAVIGATION & LOGO
   =========================================== */



/* --- Sidebar Dot Navigation --- */
nav.sidebar-nav {
    position: fixed !important;
    top: 50% !important;
    right: 2rem !important;
    transform: translateY(-50%) !important;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 9998;
    mix-blend-mode: difference;
    pointer-events: none;
}

nav.sidebar-nav a {
    pointer-events: auto;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: transparent !important;
    border: 1px solid #FFF !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease;
    text-decoration: none;
    color: #FFF;
    padding: 0;
    overflow: visible !important; /* CRUCIAL: permet au label de déborder du cercle */
}

/* Label de navigation */
nav.sidebar-nav a .nav-label {
    position: absolute;
    right: 65px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    white-space: nowrap;
    color: #FFF;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* JS ajoute cette classe au mouseenter */
nav.sidebar-nav a .nav-label.visible {
    opacity: 1 !important;
    transform: translateY(-50%) translateX(0) !important;
}

/* Hover & Active states pour le cercle */
nav.sidebar-nav a:hover,
nav.sidebar-nav a.active {
    background-color: #FFF !important;
    transform: scale(1.1) translateZ(0);
}

nav.sidebar-nav a svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
    transition: color 0.3s ease;
    color: #FFF;
}

/* Quand survolé, on inverse la couleur du SVG */
nav.sidebar-nav a:hover svg,
nav.sidebar-nav a.active svg {
    color: #000 !important;
}

/* --- Footer Styles Updated --- */
footer,
.footer-separator {
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 60px 0 30px;
    position: relative;
    overflow: hidden;
    border-top: 2px solid #FFEC16 !important;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section {
    margin: 20px;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-section h3 {
    color: #FFEC16;
    margin-bottom: 25px;
    font-size: 1.4rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #FFEC16, #FA6CE7);
}

/* Styles pour les icÃ´nes sociales */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 8px;
    padding: 8px;
    position: relative;
}

.social-icon::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.social-icon svg {
    width: 24px;
    height: 24px;
    stroke: #ccc;
    transition: all 0.3s ease;
}

.social-icon:hover svg {
    stroke: white;
    transform: translateY(-3px);
}

.social-icon:hover::after {
    width: 100%;
}

/* Styles spÃ©cifiques pour chaque icÃ´ne */
.social-icon[aria-label="Instagram"]:hover svg rect,
.social-icon[aria-label="Instagram"]:hover svg path {
    fill: url(#gradient-instagram);
    stroke: var(--primary);
}

.social-icon[aria-label="LinkedIn"]:hover svg rect,
.social-icon[aria-label="LinkedIn"]:hover svg path,
.social-icon[aria-label="LinkedIn"]:hover svg circle {
    fill: url(#gradient-linkedin);
    stroke: var(--primary);
}

.social-icon[aria-label="Spotify"]:hover svg path {
    fill: url(#gradient-spotify);
    stroke: var(--primary);
}

/* Suppression des styles prÃ©cÃ©dents pour les liens sociaux */
.footer-section a.social-icon::before,
.footer-section a.social-icon::after {
    display: none;
}

.footer-section a.social-icon {
    padding-left: 0;
    margin: 8px;
}

/* Ajout du dÃ©gradÃ© SVG */
.social-icon svg {
    position: relative;
}

.social-icon svg defs {
    position: absolute;
    width: 0;
    height: 0;
}

.social-icon svg defs linearGradient {
    stop-color: white;
    stop-opacity: 1;
}

.social-icon svg defs linearGradient stop:first-child {
    stop-color: white;
}

.social-icon svg defs linearGradient stop:last-child {
    stop-color: var(--primary);
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    margin: 8px 0;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 15px;
}

.footer-section a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 20px;
    background-image: url('../images/chevron_forward.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
}

.footer-section a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: white;
    transition: width 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-section a:hover::after {
    width: 100%;
}

.footer-section a:hover::before {
    transform: translateX(3px);
}

.footer-section a:hover::before {
    transform: translateY(-50%) translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #999;
}

/* --- Scroll to Top Button --- */
#scrollToTop {
    position: fixed;
    bottom: 50px;
    right: 50px;
    width: 50px;
    height: 50px;
    background-color: #FA6CE7;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

#scrollToTop img {
    width: 20px;
    height: 20px;
}

#scrollToTop:hover {
    background-color: #FFEC16;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.5);
}

/* --- Hamburger Menu Styles (Version iOS 17) --- */
/* Menu hamburger masqué par défaut sur desktop */
.menu-toggle {
    display: none;
}

/* Dark mode toggle */
/* 2. CORRECTION DU DARK MODE TOGGLE */
.dark-mode-toggle {
    position: fixed;
    right: 90px;
    top: 20px;
    width: auto;
    height: 40px;
    border-radius: 25px;
    background: #151515;
    /* Solid dark glass for high contrast */
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    z-index: 999;
    /* Ensure it stays above everything */
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.95);
    /* Removed mix-blend-mode as it causes invisibility against same colors */
}

/* Mode sombre pour le toggle */
.dark-mode .dark-mode-toggle {
    background: #0a0a0a;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .dark-mode-toggle:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}


nav a {
    background: #151515;
    /* Solid dark glass for readability */
    padding: 0px 24px;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    font-family: inherit;
}


/* CSS avancé avec filter pour contraste automatique */
@supports (backdrop-filter: invert(1)) {
    nav a.auto-contrast {
        mix-blend-mode: normal;
    }
}

/* Version avec outline pour lisibilité maximale */
nav a.outlined {
    color: white;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 0 8px rgba(0, 0, 0, 0.8);
    mix-blend-mode: normal;
}

/* Version avec détection JavaScript du contraste */
.nav-light-bg {
    background: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
    text-shadow: none !important;
    mix-blend-mode: normal !important;
}

.nav-dark-bg {
    background: rgba(255, 255, 255, 0.8) !important;
    color: #333 !important;
    text-shadow: none !important;
    mix-blend-mode: normal !important;
}

/* 3. CORRECTION DU TEXTE DU DARK MODE TOGGLE - Animation rapide */
.mode-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    margin-right: 4px;
    position: relative;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}


.mode-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
    /* CORRECTION: 0.3s au lieu de 3s */
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.15),
        0 4px 16px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.dark-mode-toggle:hover .mode-text::after {
    width: 100%;
}

.dark-mode-toggle:hover .mode-text {
    color: white;
}

.dark-mode-toggle img {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
    position: static;
    opacity: 0.9;
}

.dark-mode-toggle:hover img {
    opacity: 1;
    transform: translateY(-1px);
}

.light-icon {
    display: none;
}

.dark-mode .light-icon {
    display: block;
}

.dark-mode .dark-icon {
    display: none;
}

/* Cacher la scrollbar par dÃ©faut */
::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* Style pour Firefox */
* {
    scrollbar-width: none;
}

/* --- Lightbox for projects --- */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#lightbox.active {
    opacity: 1;
    visibility: visible;
}

#lightbox-content {
    max-width: 90%;
    max-height: 90%;
}

#lightbox-content img,
#lightbox-content video {
    max-width: 100%;
    max-height: 90vh;
    border: 4px solid white;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
    z-index: 2001;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Mobile Navigation (Styles modifiés pour iOS 17) --- */
@media screen and (max-width: 767px) {
    header {
        background: none;
    }

    body.menu-open {
        overflow: hidden;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    #nameI {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    #Hinde {
        font-size: 2.5rem;
    }

    #scrollToTop {
        bottom: 90px;
        /* Au-dessus du dark-mode-toggle */
        right: 25px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    #scrollToTop img {
        width: 18px;
        height: 18px;
    }
}

/* --- Tablet Responsive --- */
@media screen and (min-width: 768px) and (max-width: 991px) {
    .section-title {
        font-size: 2.4rem;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .panel {
        padding: 30px;
    }


}

/* --- Small screens --- */
@media screen and (max-width: 576px) {



    .section {
        padding: 50px 0;
    }

    .container {
        width: 90%;
    }

    .panel {
        padding: 25px;
    }

    #nameI {
        font-size: 1.6rem;
        letter-spacing: 1.5px;
    }

    #Hinde {
        font-size: 2rem;
    }

    .profile-info h3 {
        font-size: 1.6rem;
    }

    .image-frame {
        height: 250px;
    }

    .footer-section {
        width: 100%;
        margin: 15px 0;
        align-items: center;
        text-align: center;
    }

    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-section a {
        padding-left: 0;
    }

    .footer-section a::before {
        display: none;
    }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.5);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* --- Additional Styling --- */
.title-accent {
    position: relative;
    display: inline-block;
}

.title-accent::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 8px;
    bottom: 0;
    left: 0;
    background: rgba(0, 123, 255, 0.1);
    z-index: -1;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Lightbox markup for project images */
#lightbox {
    display: none;
}

#lightbox.active {
    display: flex;
}

/* Fix for header navigation overlap */
main {
    padding-top: 70px;
}

/* Custom cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition:
        width 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        height 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    mix-blend-mode: difference;
}

.custom-cursor.active {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    border-color: transparent;
    opacity: 0.3;
}

/* Hide cursor on elements that don't need it */
button,
a,
input,
textarea,
.project-card,
.menu-toggle,
.dark-mode-toggle,
#scrollToTop {
    cursor: none;
}

/* Smooth transition for cursor over interactive elements */
.custom-cursor.hover {
    width: 30px;
    height: 30px;
    background-color: transparent;
    border-color: var(--primary);
    opacity: 0.8;
}

/* Base styles for interactive elements */
a,
button,
.cv-button,
.submit-btn,
.project-card,
.menu-toggle,
.dark-mode-toggle,
#scrollToTop {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Remove text selection on interactive elements */
a:focus,
button:focus,
.cv-button:focus,
.submit-btn:focus {
    outline: none;
}

/* Remove text selection on click */
a,
button,
.cv-button,
.submit-btn {
    -webkit-tap-highlight-color: transparent;
}

/* Remove text selection on mobile */
@media (max-width: 768px) {

    a,
    button,
    .cv-button,
    .submit-btn {
        -webkit-tap-highlight-color: transparent;
    }
}

/** --- End of CSS --- */
/* Add any additional styles below this comment */
#form-messages {
    margin-top: 1em;
    padding: 1em;
    border-radius: 8px;
    font-weight: bold;
    display: none;
}

#form-messages.success {
    background-color: #e0ffe0;
    color: #0a480a;
}

#form-messages.error {
    background-color: #ffe0e0;
    color: #6b0000;
}

/* Styles pour les vidÃ©os de projet */
.project-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
    transition: transform 0.6s ease;
    filter: contrast(1.1) brightness(1.05) saturate(1.1);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.project-card:hover .project-video {
    transform: scale(1.05);
}

/* Personnalisation des contrÃ´les vidÃ©o */
.project-video::-webkit-media-controls {
    background: transparent;
}

.project-video::-webkit-media-controls-panel {
    background: transparent;
}

.project-video::-webkit-media-controls-play-button,
.project-video::-webkit-media-controls-timeline,
.project-video::-webkit-media-controls-current-time-display,
.project-video::-webkit-media-controls-time-remaining-display,
.project-video::-webkit-media-controls-mute-button,
.project-video::-webkit-media-controls-volume-slider {
    color: white;
}

/* Style pour le mode sombre */
.dark-mode .project-video::-webkit-media-controls {
    background: transparent;
}

/* Ajustement pour la lightbox */
#lightbox-content video {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* Responsive styles for profile section */
@media (max-width: 1024px) {
    .panel {
        flex-direction: column;
        padding: 30px;
        gap: 30px;
    }

    .profile-image {
        flex: none;
        width: 250px;
        margin: 0 auto;
    }

    .profile-info {
        text-align: center;
    }

    .skills {
        justify-content: center;
    }

    .cv-button {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .profile-info h3 {
        font-size: 2rem;
    }

    .profile-info .job-title {
        font-size: 1.1rem;
    }

    .profile-image {
        width: 200px;
    }

    .panel {
        padding: 20px;
    }
}

@media (max-width: 480px) {

    #scrollToTop {
        bottom: 85px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    #scrollToTop img {
        width: 16px;
        height: 16px;
    }

    .profile-info h3 {
        font-size: 1.8rem;
    }

    .profile-info .job-title {
        font-size: 1rem;
    }

    .profile-image {
        width: 180px;
    }

    .skill-tag {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .cv-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Responsive styles for dark mode toggle */
@media (max-width: 768px) {
    .dark-mode-toggle {
        position: fixed;
        bottom: 20px;
        right: 20px;
        top: auto;
        background: rgba(0, 0, 0, 0.7);
        padding: 8px 15px;
        border-radius: 25px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .mode-text {
        display: none;
    }

    .dark-mode-toggle img {
        width: 24px;
        height: 24px;
        opacity: 1;
    }

    .dark-mode-toggle:hover {
        background: rgba(0, 0, 0, 0.8);
        transform: translateY(-2px);
    }
}

@media (max-width: 480px) {
    .dark-mode-toggle {
        bottom: 15px;
        right: 15px;
        padding: 6px 12px;
    }

    .dark-mode-toggle img {
        width: 20px;
        height: 20px;
    }
}

/* Hide custom cursor on mobile and tablet */
@media (max-width: 1024px) {
    .custom-cursor {
        display: none;
    }

    /* Restore default cursor for interactive elements */
    button,
    a,
    input,
    textarea,
    .project-card,
    .menu-toggle,
    .dark-mode-toggle,
    #scrollToTop {
        cursor: pointer;
    }
}

/* Responsive styles for contact form */
@media (max-width: 768px) {
    #contact .container {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
        margin: 0 auto;
    }

    .contact-panel {
        padding: 25px;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    #contactForm {
        width: 100%;
        gap: 15px;
    }

    .form-group {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 480px) {
    #contact .container {
        padding: 0 10px;
    }

    .contact-panel {
        padding: 20px;
        width: 100%;
        max-width: 100%;
    }

    #contactForm {
        gap: 12px;
    }

    #form-messages {
        font-size: 0.85rem;
        padding: 0.8rem;
        width: 100%;
        margin: 0;
    }
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

/* Smooth transitions for all elements */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth animations for project cards */
.project-card {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth transitions for navigation */
nav a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth transitions for buttons */
button,
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pop-up notification styles */
.notification-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 1rem;
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification-popup.show {
    transform: translateX(0);
}

.notification-popup.success {
    border-left: 4px solid #4CAF50;
}

.notification-popup.error {
    border-left: 4px solid #f44336;
}

.notification-popup .icon {
    width: 20px;
    height: 20px;
}

/* --- Effet de parallaxe léger (optionnel pour desktop) --- */
@media (min-width: 769px) {
    .floating-nav-parallax nav {
        transform: translateX(-50%) translateY(var(--scroll-offset, 0px));
        transition: transform 0.1s ease-out;
    }
}

/* --- Animation d'entrée des boutons flottants --- */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Appliquer l'animation aux boutons de navigation */
nav a {
    animation: slideInDown 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

nav a:nth-child(1) {
    animation-delay: 0.1s;
}

nav a:nth-child(2) {
    animation-delay: 0.2s;
}

nav a:nth-child(3) {
    animation-delay: 0.3s;
}

nav a:nth-child(4) {
    animation-delay: 0.4s;
}

/* --- Masquage intelligent de la navigation au scroll --- */
.nav-hidden {
    opacity: 0.7 !important;
    transform: translateX(-50%) translateY(-5px) !important;
}

/* --- Amélioration de l'accessibilité --- */
@media (prefers-reduced-motion: reduce) {
    nav a {
        animation: none;
        opacity: 1;
        transition: none;
    }

    .floating-nav-parallax nav {
        transform: translateX(-50%) !important;
    }
}

/* --- Focus visible pour l'accessibilité --- */
nav a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* --- Support pour les préférences de transparence réduite --- */
@media (prefers-reduced-transparency: reduce) {
    nav a {
        background: rgba(255, 255, 255, 0.9);
    }

    .dark-mode nav a {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* --- Optimisation pour les appareils tactiles --- */
@media (pointer: coarse) {
    nav a {
        padding: 14px 26px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }
}

/* --- Styles pour l'impression --- */
@media print {

    header,
    nav,
    .menu-toggle,
    .dark-mode-toggle {
        display: none !important;
    }

    main {
        padding-top: 0 !important;
    }
}

.userway_buttons_wrapper {
    position: fixed !important;
    /* nécessaire si le widget force sa position */
    top: 75px !important;
    /* décalage sous le dark-mode-toggle */
}

/* --- Ambient Toggle Button --- */
.ambient-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .ambient-toggle {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ambient-toggle:hover {
    transform: scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.4);
}

.equalizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 15px;
}

.equalizer .bar {
    width: 4px;
    background-color: var(--text-light);
    border-radius: 2px;
    opacity: 0.5;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

/* Base heights when OFF */
.equalizer .bar-1 {
    height: 40%;
}

.equalizer .bar-2 {
    height: 70%;
}

.equalizer .bar-3 {
    height: 30%;
}

.equalizer .bar-4 {
    height: 90%;
}

/* Playing state animations */
.ambient-toggle.playing .equalizer .bar {
    background-color: var(--primary);
    opacity: 1;
    animation: equalize 1s infinite alternate ease-in-out;
}

.ambient-toggle.playing .equalizer .bar-1 {
    animation-delay: -0.4s;
}

.ambient-toggle.playing .equalizer .bar-2 {
    animation-delay: -0.2s;
}

.ambient-toggle.playing .equalizer .bar-3 {
    animation-delay: 0s;
}

.ambient-toggle.playing .equalizer .bar-4 {
    animation-delay: -0.6s;
}

@keyframes equalize {
    0% {
        height: 20%;
    }

    100% {
        height: 100%;
        box-shadow: 0 0 10px var(--accent);
    }
}

/* --- Mobile Responsiveness Updates --- */

/* 1. Transformation de la Navigation (Bottom Bar) */
@media (max-width: 768px) {
    nav.sidebar-nav {
        top: auto !important;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        transform: none !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        background-color: rgba(10, 10, 10, 0.95) !important;
        padding: 1rem 0 !important;
        border-top: 1px solid rgba(6, 230, 255, 0.2) !important;
        backdrop-filter: blur(10px);
    }
    
    /* Masque les tooltips de texte sur mobile pour gagner de la place */
    nav.sidebar-nav a::before,
    nav.sidebar-nav .nav-label {
        display: none !important;
    }
    
    /* Réduit un peu la taille des cercles */
    nav.sidebar-nav a {
        width: 35px;
        height: 35px;
    }
}

/* 2. Adaptation de la Grille de Projets */
@media (max-width: 768px) {
    .project-gallery, 
    .projects-grid,
    .grid { 
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 0 1rem !important;
    }
}

/* 3. Gestion du Tactile (Suppression du Hover obligatoire) */
@media (max-width: 768px) {
    .project-info {
        opacity: 1 !important;
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0) 100%) !important;
    }
    
    .project-title, 
    .project-role {
        transform: translateY(0) !important;
    }
    
    /* Évite le zoom d'image intempestif au scroll */
    .project-card:hover img {
        transform: none !important;
    }
}