/* Variables CSS */
:root {
    --primary-color: #FF5733;
    --secondary-color: #00BFFF;
    --accent-color: #FFD700;
    --dark-color: #1a1a1a;
    --gray-dark: #2a2a2a;
    --gray-medium: #666666;
    --gray-light: #f5f5f5;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #FF5733 0%, #FF8A65 100%);
    --gradient-secondary: linear-gradient(135deg, #00BFFF 0%, #87CEEB 100%);
    --gradient-accent: linear-gradient(135deg, #FFD700 0%, #FFF8DC 100%);
    --shadow-small: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-large: 0 8px 24px rgba(0,0,0,0.2);
    --border-radius: 8px;
    --border-radius-large: 16px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--white);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
    margin-bottom: 1rem;
    color: var(--gray-medium);
}

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

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

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.phoenix-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(255, 87, 51, 0.3));
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

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

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

.bar {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
}

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

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

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

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

.btn-full {
    width: 100%;
    justify-content: center;
}

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

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 60px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 87, 51, 0.1);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.hero-title {
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--gray-medium);
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-medium);
    font-weight: 500;
}

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

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 500px;
}

.floating-cards {
    position: relative;
    height: 100%;
}

.floating-card {
    position: absolute;
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    min-width: 140px;
    animation: float 6s ease-in-out infinite;
}

.floating-card i {
    font-size: 2rem;
    color: var(--primary-color);
}

.floating-card span {
    font-weight: 500;
    font-size: 0.9rem;
}

.card-1 {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.card-2 {
    top: 30%;
    right: 10%;
    animation-delay: -2s;
}

.card-3 {
    bottom: 30%;
    left: 10%;
    animation-delay: -4s;
}

.card-4 {
    bottom: 10%;
    right: 25%;
    animation-delay: -6s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary-color);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Section commune */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Services Section */
.services {
    background: var(--white);
}

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

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-small);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-large);
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.service-card p {
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--gray-medium);
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.service-link {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.service-link:hover {
    text-decoration: underline;
}

/* Expertise Section */
.expertise {
    background: var(--gray-light);
}

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

.tech-category h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-badge {
    background: var(--white);
    color: var(--dark-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-small);
    transition: var(--transition);
}

.tech-badge:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

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

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

.project-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-small);
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-large);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-header h3 {
    margin: 0;
    color: var(--dark-color);
}

.project-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 8px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--white);
}

.badge-python { background: #3776ab; }
.badge-ml { background: #ff6b6b; }
.badge-web { background: #00d2ff; }
.badge-responsive { background: #4ecdc4; }

.project-stats {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--gray-medium);
}

.project-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 1rem;
}

.project-link:hover {
    text-decoration: underline;
}

/* Contact Section */
.contact {
    background: var(--gray-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.contact-info p {
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-small);
}

.contact-method i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.contact-method a {
    color: var(--primary-color);
    font-weight: 500;
}

.contact-method a:hover {
    text-decoration: underline;
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-small);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand .brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section a {
    display: block;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-visual {
        height: 300px;
        order: -1;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        justify-content: center;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-container {
        padding: 100px 15px 40px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-categories {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .floating-card {
        min-width: 120px;
        padding: 1rem;
    }
    
    .floating-card i {
        font-size: 1.5rem;
    }
    
    .floating-card span {
        font-size: 0.8rem;
    }
}

/* Animations et effets supplémentaires */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll snap pour une navigation fluide */
html {
    scroll-snap-type: y mandatory;
}

section {
    scroll-snap-align: start;
}

/* Loading state pour les formulaires */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}