/* Variables CSS */
:root {
    --primary-color: #2d3436;
    --secondary-color: #0984e3;
    --accent-color: #00b894;
    --text-color: #2d3436;
    --bg-color: #ffffff;
    --card-bg: #f5f6fa;
    --gradient-start: #0984e3;
    --gradient-end: #00b894;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 80px;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Assurer que le contenu principal prend tout l'espace disponible */
main {
    margin-top: var(--header-height);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header et Navigation */
header {
    background-color: rgba(45, 52, 54, 0.9);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    transition: background-color 0.3s ease;
}

header.scrolled {
    background-color: rgba(45, 52, 54, 0.95);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-menu a[aria-current="page"] {
    color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Hamburger menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: 0.3s ease;
}

/* Hero Section */
.hero-section {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
}

.intro {
    flex: 1;
    max-width: 800px;
    text-align: left;
}

.hero-section h1 {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-section h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 3rem;
    opacity: 0.8;
}

.about-me {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    text-align: left;
}

.about-me h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.skills {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.skills h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.skills h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.technical-skills, .soft-skills {
    margin-bottom: 1.5rem;
}

.skills ul {
    list-style: none;
    margin-left: 1rem;
}

.skills li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skills li i {
    color: var(--secondary-color);
}

/* Passions Section */
.passions {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.passions h2 {
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.passions > p {
    color: var(--text-color);
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.passions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

/* Style des cartes retournables */
.passion-card {
    width: 100%;
    height: 400px;
    position: relative;
}

.passion-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.passion-card:hover .passion-card-inner {
    transform: rotateY(180deg);
}

.passion-card-front, .passion-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.passion-card-front {
    background-color: white;
}

.passion-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.passion-card-front h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    margin: 0;
    padding: 1rem;
    font-size: 1.3rem;
}

.passion-card-back {
    background-color: transparent;
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    position: relative;
    background-size: cover;
    background-position: center;
}

.passion-card-back::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1;
}

.passion-card-back h3,
.passion-card-back p {
    position: relative;
    z-index: 2;
    color: white;
}

/* Ajout des images de fond pour chaque carte */
.passion-card:nth-child(1) .passion-card-back {
    background-image: url('../img/MHWilds_deluxe.png');
}

.passion-card:nth-child(2) .passion-card-back {
    background-image: url('../img/airsoft france.jpg');
}

.passion-card:nth-child(3) .passion-card-back {
    background-image: url('../img/cablebordel.jpg');
}

.profile-container {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: sticky;
    top: 100px;
}

.profile-image {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--shadow);
    border: 4px solid var(--secondary-color);
}

.cv-section {
    margin: 1rem 0;
}

.bouton-link1 {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 1.1rem;
}

.bouton-link1:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.social-icons a {
    color: var(--primary-color);
    font-size: 1.8rem;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Certifications Section */
.certifications-section {
    padding: 4rem 2rem;
    background-color: var(--card-bg);
    text-align: center;
}

.certifications-section h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.certification-logos {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.certification-logos img {
    max-width: 200px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: var(--transition);
}

.certification-logos img:hover {
    transform: scale(1.05);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

footer a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--secondary-color);
}

/* Media Queries */
@media screen and (max-width: 1024px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 4rem 1rem;
    }
    
    .intro {
        text-align: center;
    }
    
    .profile-container {
        flex: none;
        position: static;
        margin-top: 2rem;
    }
    
    .profile-image {
        width: 250px;
        height: 250px;
    }
}

@media screen and (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: var(--transition);
        padding: 2rem;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    }

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

    .hamburger.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

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

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

    .profile-image {
        width: 200px;
        height: 200px;
    }
}

@media screen and (max-width: 480px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section h2 {
        font-size: 1.75rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .profile-image {
        width: 180px;
        height: 180px;
    }

    .certification-logos img {
        max-width: 150px;
    }
}

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

article {
    animation: fadeIn 0.6s ease-out forwards;
}

article:nth-child(1) { animation-delay: 0.2s; }
article:nth-child(2) { animation-delay: 0.4s; }
article:nth-child(3) { animation-delay: 0.6s; }
article:nth-child(4) { animation-delay: 0.8s; }

/* Optimisations des performances */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}