* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HIÉRARCHIE Z-INDEX - Ordre logique */
.language-switch {
    position: fixed;
    top: 10px; 
    right: 25px;
    z-index: 1001;
}

.language-switch button {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.language-switch button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Mobile */
@media (max-width: 768px) {
    .language-switch {
        top: 15px; 
        right: 18px;
    }
    
    .language-switch button {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .nav-container {
        margin: 0 80px 0 auto; /* Cohérent avec le style principal */
    }
    
    .hamburger {
        margin-right: 0;
    }
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 120px 0 auto; 
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    color: #2563eb;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #2563eb;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Section Hero */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff08" points="0,1000 1000,0 1000,1000"/></svg>');
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-content h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.btn {
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn.primary {
    background: #2563eb;
    color: white;
    border: 2px solid #2563eb;
}

.btn.primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn.secondary:hover {
    background: white;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

/* Éviter les conflits entre boutons globalement */
.btn, button {
    isolation: isolate;
    pointer-events: auto;
}

/* S'assurer que tous les boutons ont une zone de clic suffisante */
.btn, button, .carousel-btn, .indicator {
    min-height: 44px; /* Recommandation d'accessibilité */
    min-width: 44px;
}

/* Améliorer la visibilité sur les écrans tactiles */
@media (hover: none) {
    .btn:active, button:active, .carousel-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* Styles des sections */
section {
    padding: 100px 0;
}

section:nth-child(even) {
    background: #f8fafc;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #1e293b;
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #2563eb;
    border-radius: 2px;
}

/* Section À propos */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.2rem;
    text-align: center;
    line-height: 1.8;
    color: #64748b;
}

/* Section Formation */
.education-item {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.education-header h3 {
    font-size: 1.5rem;
    color: #2563eb;
    font-weight: 600;
}

.date {
    background: #e2e8f0;
    color: #475569;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
}

.education-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.courses-section h4 {
    color: #1e293b;
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.courses-section ul {
    list-style: none;
}

.courses-section li {
    padding: 8px 0;
    color: #64748b;
    position: relative;
    padding-left: 25px;
}

.courses-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

/* Section Expérience */
.experience-item {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.experience-header {
    margin-bottom: 30px;
}

.experience-header h3 {
    font-size: 1.5rem;
    color: #2563eb;
    margin-bottom: 10px;
}

.company {
    display: block;
    font-size: 1.2rem;
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 10px;
}

.experience-details h4 {
    color: #1e293b;
    margin: 20px 0 15px 0;
}

.experience-details ul {
    list-style: none;
}

.experience-details li {
    padding: 8px 0;
    color: #64748b;
    position: relative;
    padding-left: 25px;
}

.experience-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* Section Projets */
#projects {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
}

#projects h2 {
    color: white;
}

#projects h2::after {
    background: #06b6d4;
}

.projects-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    /* Améliorations tactiles */
    touch-action: pan-y pinch-zoom; /* Permet le swipe horizontal, bloque le vertical */
    user-select: none; /* Évite la sélection de texte pendant le swipe */
    -webkit-user-select: none;
    cursor: grab; /* Indique que c'est interactif */
}

.projects-carousel:active {
    cursor: grabbing; /* Pendant l'interaction */
}

.carousel-container {
    overflow: hidden;
    border-radius: 15px;
    /* Transition smooth pour les animations */
    transition: transform 0.3s ease;
}

.project-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 15px;
    display: none;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Amélioration tactile */
    position: relative;
}

.project-card.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Indicateur swipe sur mobile */
@media (max-width: 768px) {
    .project-card::after {
        content: "← Swipez pour naviguer →";
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.6);
        opacity: 0;
        animation: swipeHint 3s ease-in-out 2s infinite;
    }
}

@keyframes swipeHint {
    0%, 90%, 100% { opacity: 0; }
    10%, 80% { opacity: 1; }
}

.project-card h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #06b6d4;
}

.project-card p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

.project-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tags span {
    background: rgba(6, 182, 212, 0.2);
    color: #06b6d4;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 100; 
    pointer-events: auto;
    margin: 0 10px;
    touch-action: manipulation;
}

.carousel-btn:hover {
    background: rgba(6, 182, 212, 0.3);
    border-color: #06b6d4;
    transform: scale(1.1);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #06b6d4;
    transform: scale(1.3);
}

/* Interests Section */
.interest-item {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.interest-icon {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.interest-text h3 {
    color: #1e293b;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.interest-text p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 20px;
}

.music-photo-placeholder {
    background: #e2e8f0;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    color: #64748b;
    border: 2px dashed #cbd5e1;
}

.music-photo {
    text-align: center;
    margin-top: 20px;
}

.music-photo img {
    transition: transform 0.3s ease;
}

.music-photo img:hover {
    transform: scale(1.05);
}

/* Associations Section */
.association-item {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.association-icon {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.association-text h3 {
    color: #1e293b;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.association-text p:nth-of-type(1) {
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 15px;
}

.association-text p:nth-of-type(2) {
    color: #64748b;
    line-height: 1.7;
}

/* Contact Section */
#contact {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
}

#contact h2 {
    color: white;
}

#contact h2::after {
    background: #10b981;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 25px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 150px;
    height: 120px;
    text-align: center;
    box-sizing: border-box;
}

.contact-link:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.2);
}

.contact-link i {
    font-size: 2.5rem;
    color: #10b981;
}

.contact-link span {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

/* Footer */
footer {
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 40px 0;
}

footer p {
    margin-bottom: 10px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 40px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    /* Ajuster l'espacement du hero sur mobile */
    .hero-content {
        padding-top: 80px; 
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .education-details {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .interest-item,
    .association-item {
        flex-direction: column;
        text-align: center;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .carousel-controls {
        gap: 15px;
    }

    .carousel-btn {
        width: 45px;
        height: 45px;
    }

    section {
        padding: 60px 0;
    }

    section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .education-item,
    .experience-item {
        padding: 25px;
    }

    .project-card {
        padding: 25px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-controls {
        gap: 10px;
        margin-top: 20px;
    }

    /* Améliorer l'espacement des boutons héros */
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}
