/* body { background-color: red !important; } */


/* --- Variables et Base --- */
: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: var(--bg-light);
    color: var(--text-dark);
    transition: background 0.4s ease, color 0.4s ease;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

main {
    background-color: transparent;
}

/* --- 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;
}

.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);
    background: transparent;
}

.dark-mode .container.show {
    background: transparent;
    box-shadow: none;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    letter-spacing: 1px;
    font-weight: 700;
    color: #000;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.dark-mode .section-title {
    color: #fff;
}

.title-accent {
    color: var(--primary);
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 1.2rem;
    color: var(--text-dark);
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.dark-mode .section-intro {
    color: rgba(255, 255, 255, 0.9);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 0;
    overflow: hidden;
    margin-top: -70px;
}

.hero-background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Overlay sombre pour améliorer la visibilité du texte */
    z-index: -1;
}

.hero-content {
    text-align: center;
    padding: 0 20px;
    max-width: 800px;
    position: relative;
    z-index: 1; /* Assure que le contenu reste au-dessus de la vidéo */
}

#nameI {
    font-family: "Atkinson Hyperlegible Mono", monospace;
    font-weight: 300;
    font-size: 2.2rem;
    margin-bottom: 30px;
    opacity: 0.8;
    letter-spacing: 3px;
}

#Hinde {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 30px;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 123, 255, 0.8), 0 0 20px rgba(110, 187, 255, 0.5);
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    0% {
        text-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
    }
    100% {
        text-shadow: 0 0 20px rgba(0, 229, 255, 0.8), 0 0 30px rgba(110, 187, 255, 0.5);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: -135px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    opacity: 0.7;
    transition: opacity 0.3s;
    cursor: pointer;
}

.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);
    }
}

/* --- Panel Component --- */
.panel {
    background: rgba(0, 0, 0, 0.81);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 40px;
}

.panel .presentation-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.7;
    letter-spacing: 0.2px;
}

.dark-mode .panel .presentation-text {
    color: rgba(255, 255, 255, 0.9);
}

.panel .job-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
    margin-bottom: 25px;
    letter-spacing: 0.3px;
}

.dark-mode .panel .job-title {
    color: rgba(255, 255, 255, 0.9);
}

.panel h3 {
    color: rgba(255, 255, 255, 0.95);
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    letter-spacing: 0.5px;
    font-weight: 600;
}

.dark-mode .panel h3 {
    color: rgba(255, 255, 255, 0.95);
}

.dark-mode .panel {
    background: rgba(0, 0, 0, 0.81);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 123, 255, 0.15);
}

/* --- Presentation Section --- */
.profile-image {
    flex: 0 0 300px;
    position: relative;
}

.image-frame {
    width: 100%;
    height: 350px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.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 {
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.dark-mode .skill-tag {
    background-color: rgba(0, 123, 255, 0.15);
    border-color: rgba(0, 123, 255, 0.3);
}

.skill-tag:hover {
    background: rgba(0, 255, 255, 0.2);
    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);
}

/* --- Project Grid --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
}

/* --- Project Cards --- */
.project-card {
    background: transparent;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dark-mode .project-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-card.show {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 123, 255, 0.25);
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.card-image {
    background: #f0f0f0;
    height: 220px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    border-radius: 15px 15px 0 0;
}

.dark-mode .card-image {
    background: #333;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 123, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hover-overlay span {
    color: white;
    font-weight: 500;
    padding: 8px 20px;
    border: 2px solid white;
    border-radius: 30px;
    font-size: 0.9rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.project-card:hover .hover-overlay {
    opacity: 1;
}

.project-card:hover .hover-overlay span {
    transform: translateY(0);
}

.project-card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    background: rgba(0, 0, 0, 0.81);
    padding: 25px;
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin: 0 0 15px 0;
    color: var(--text-light);
    font-size: 1.6rem;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-content p {
    margin: 0;
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.dark-mode .card-content h3 {
    color: var(--text-light);
}

.dark-mode .card-content p {
    color: var(--text-light);
}

/* --- 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 {
    background: rgba(0, 0, 0, 0.81);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.dark-mode .contact-panel {
    background: rgba(0, 0, 0, 0.81);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.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 rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    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 {
    background: var(--primary);
    color: white;
    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: var(--primary-dark);
    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;
    }
}

/* --- Header Styles Updated --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
}

header:hover {
    background: rgba(0, 0, 0, 0.8);
}

nav {
    max-width: 1200px;
    width: 80%;
    margin: 0 auto;
    padding: 15px 0;
    display: flex;
    justify-content: center;
    gap: 30px;
}

nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 400;
    position: relative;
    padding: 8px 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

nav a:hover::before,
nav a.active::before {
    width: 100%;
}

nav a:hover,
nav a.active {
    color: white;
}

/* --- Footer Styles Updated --- */
footer {
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 60px 0 30px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.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: var(--primary);
    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, var(--primary), var(--accent));
}

/* 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;
    color: var(--primary);
    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-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: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    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: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.5);
}

/* --- Hamburger Menu Styles --- */
.menu-toggle {
    display: none;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    border: none;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dark-mode .menu-toggle {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hamburger {
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--text-dark);
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.dark-mode .hamburger span {
    background: white;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2),
.hamburger span:nth-child(3) {
    top: 9px;
}

.hamburger span:nth-child(4) {
    top: 18px;
}

.menu-open .hamburger span:nth-child(1),
.menu-open .hamburger span:nth-child(4) {
    top: 9px;
    width: 0;
    left: 50%;
}

.menu-open .hamburger span:nth-child(2) {
    transform: rotate(45deg);
}

.menu-open .hamburger span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Dark mode toggle */
.dark-mode-toggle {
    position: fixed;
    right: 20px;
    top: 20px;
    width: auto;
    height: 40px;
    border-radius: 20px;
    background: transparent;
    border: none;
    cursor: none;
    z-index: 101;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    transition: all 0.3s ease;
}

.mode-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    margin-right: 4px;
    position: relative;
}

.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;
}

.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.8;
}

.dark-mode-toggle:hover img {
    opacity: 1;
    transform: translateY(-2px);
}

.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 --- */
@media screen and (max-width: 767px) {
    header {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .menu-toggle {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
    }
    
    .menu-open nav {
        transform: translateX(0);
    }
    
    nav a {
        color: white;
        text-decoration: none;
        font-size: 1.5rem;
        margin: 15px 0;
        padding: 10px 20px;
        position: relative;
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease;
    }
    
    .menu-open nav a {
        opacity: 1;
        transform: translateX(0);
    }
    
    .menu-open nav a:nth-child(1) { transition-delay: 0.1s; }
    .menu-open nav a:nth-child(2) { transition-delay: 0.2s; }
    .menu-open nav a:nth-child(3) { transition-delay: 0.3s; }
    .menu-open nav a:nth-child(4) { transition-delay: 0.4s; }
    
    nav a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, var(--primary), var(--accent));
        transition: width 0.3s ease;
    }
    
    nav a:hover::after,
    nav a.active::after {
        width: 100%;
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    #Hinde {
        font-size: 2.5rem;
    }
}

/* --- 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;
    }
    
    nav {
        padding: 0 20px;
    }
    
    nav a {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}

/* --- Small screens --- */
@media screen and (max-width: 576px) {
    .section {
        padding: 50px 0;
    }
    
    .container {
        width: 90%;
    }
    
    .panel {
        padding: 25px;
    }
    
    #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) {
    .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);
        backdrop-filter: blur(5px);
        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;
}