/* Variables */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-dark: #1a202c;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--bg-white);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.btn-contact {
    background: var(--gradient-primary);
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    order: 1;
}

.hero-visual {
    order: 2;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.greeting {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 400;
}

.name {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title {
    font-size: 2rem;
    color: var(--text-dark);
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Bouton CV avec icône */
.btn-secondary[href*="cvdesignr"]::before {
    content: "📄 ";
    margin-right: 0.5rem;
}

.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

/* Container de l'image avec effet 3D */
.profile-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Wrapper de l'image avec rotation 3D */
.profile-image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
    transition: transform 0.3s ease;
    animation: float 6s ease-in-out infinite;
}

.profile-image-wrapper:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.05);
}

/* Image principale */
.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    position: relative;
    z-index: 2;
    
    /* Bordure floutée multi-couches */
    box-shadow: 
        0 0 0 15px rgba(102, 126, 234, 0.1),
        0 0 0 30px rgba(118, 75, 162, 0.08),
        0 0 60px rgba(102, 126, 234, 0.3),
        0 20px 80px rgba(0, 0, 0, 0.2),
        inset 0 0 50px rgba(255, 255, 255, 0.1);
    
    /* Filtre pour adoucir les bords */
    filter: contrast(1.1) brightness(1.05);
    
    /* Animation de morphing de la forme */
    animation: morph 8s ease-in-out infinite;
}

/* Effet de bordure floutée externe */
.profile-image-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.4) 0%, 
        rgba(118, 75, 162, 0.4) 50%,
        rgba(240, 147, 251, 0.4) 100%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    filter: blur(25px);
    z-index: 1;
    animation: morph 8s ease-in-out infinite;
    opacity: 0.8;
}

/* Effet de lueur interne */
.profile-image-wrapper::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    right: 10%;
    bottom: 10%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(255, 255, 255, 0.3) 0%, 
        transparent 60%);
    border-radius: inherit;
    z-index: 3;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* Formes flottantes décoratives */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.shape {
    position: absolute;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.15) 0%, 
        rgba(240, 147, 251, 0.15) 100%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    filter: blur(20px);
    animation: shapeFloat 8s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: -50px;
    left: -50px;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    bottom: -30px;
    right: -30px;
    animation-delay: 2s;
}

.shape-3 {
    width: 180px;
    height: 180px;
    top: 50%;
    left: -80px;
    transform: translateY(-50%);
    animation-delay: 4s;
}

/* Animation de flottement */
@keyframes float {
    0%, 100% {
        transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) translateY(0px);
    }
    50% {
        transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) translateY(-20px);
    }
}

/* Animation de morphing de forme */
@keyframes morph {
    0%, 100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }
    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }
    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
}

/* Animation des formes flottantes */
@keyframes shapeFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) rotate(120deg);
    }
    66% {
        transform: translateY(15px) rotate(240deg);
    }
}

/* Section Styles */
section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

/* About Section */
.about {
    background: var(--bg-white);
    position: relative;
    z-index: 5;
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-light);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-info {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-value:hover {
    color: var(--primary-color);
}

/* Style spécial pour le lien d'adresse */
.location-link {
    display: inline-block;
    cursor: pointer;
    position: relative;
}

.location-link::after {
    content: ' 🗺️';
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.9em;
}

.location-link:hover::after {
    opacity: 1;
}

.location-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-card {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    z-index: 10;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Skills Section */
.skills {
    background: var(--bg-light);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(30px);
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Experience Section */
.experience {
    background: var(--bg-white);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateX(-30px);
}

.timeline-marker {
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid white;
    box-shadow: var(--shadow-md);
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.timeline-date {
    display: inline-block;
    background: var(--gradient-accent);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.timeline-content li {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.tech-used {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-used span {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.35rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Projects Section */
.projects {
    background: var(--bg-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.9);
}

.project-card:hover {
    transform: translateY(-10px) scale(1);
    box-shadow: var(--shadow-lg);
}

.project-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.project-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.project-link {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.project-link:hover {
    transform: translateX(5px);
}

.projects-footer {
    text-align: center;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-info h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Mettre la photo en premier sur mobile */
    .hero-content {
        order: 2;
    }

    .hero-visual {
        order: 1;
        height: 350px;
        margin-top: 0;
        margin-bottom: 1rem;
    }

    .profile-image-wrapper {
        width: 280px;
        height: 280px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .name {
        font-size: 2.5rem;
    }

    .title {
        font-size: 1.5rem;
    }
    
    .greeting {
        font-size: 1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-links a:not(.btn-contact) {
        display: none;
    }

    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero {
        padding: 100px 0 60px;
    }

    /* Photo en premier et centrée sur mobile */
    .hero-content {
        order: 2;
        text-align: center;
    }

    .hero-title {
        align-items: center;
    }

    .hero-visual {
        order: 1;
        height: 300px;
        margin-bottom: 2rem;
    }

    .profile-image-wrapper {
        width: 240px;
        height: 240px;
        transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
        /* Animation plus subtile sur mobile */
        animation: floatMobile 4s ease-in-out infinite;
    }

    @keyframes floatMobile {
        0%, 100% {
            transform: perspective(1000px) rotateY(0deg) rotateX(0deg) translateY(0px);
        }
        50% {
            transform: perspective(1000px) rotateY(0deg) rotateX(0deg) translateY(-10px);
        }
    }

    .shape {
        display: none;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-description {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .timeline-marker {
        left: 1px;
    }
}
