/* Portfolio Moderne - CSS Personnalisé */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary-blue: #3b82f6;
    --primary-purple: #8b5cf6;
    --success-green: #10b981;
    --warning-yellow: #f59e0b;
    --danger-red: #ef4444;
    --dark-bg: #111827;
    --dark-card: #1f2937;
    --text-light: #f9fafb;
    --text-muted: #9ca3af;
}

/* Base styles améliorés */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--dark-bg);
    overflow-x: hidden;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    font-optical-sizing: auto;
}

/* Typographie responsive améliorée */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

h2 {
    font-size: clamp(1.5rem, 6vw, 3rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.125rem, 4vw, 1.5rem);
    font-weight: 600;
}

h4 {
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 600;
}

p {
    font-weight: 400;
    letter-spacing: 0.01em;
    font-size: clamp(0.875rem, 2.5vw, 1rem);
}

/* Conteneurs responsive */
.container-responsive {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container-responsive {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-responsive {
        padding: 0 2rem;
    }
}

/* Grilles responsive */
.grid-responsive {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .grid-responsive {
        gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .grid-responsive.md-2-cols {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .grid-responsive.md-3-cols {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .grid-responsive {
        gap: 3rem;
    }
}

/* Cartes responsive */
.card-responsive {
    padding: 1rem;
    border-radius: 0.75rem;
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid rgba(75, 85, 99, 0.3);
    transition: all 0.3s ease;
}

@media (min-width: 640px) {
    .card-responsive {
        padding: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .card-responsive {
        padding: 2rem;
    }
}

.card-responsive:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Boutons responsive */
.btn-responsive {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
}

@media (min-width: 640px) {
    .btn-responsive {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

/* Navigation mobile améliorée */
.mobile-nav {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-nav.open {
    transform: translateX(0);
}

/* Espacement responsive */
.spacing-responsive {
    padding: 3rem 0;
}

@media (min-width: 640px) {
    .spacing-responsive {
        padding: 4rem 0;
    }
}

@media (min-width: 1024px) {
    .spacing-responsive {
        padding: 5rem 0;
    }
}

/* Textes responsive */
.text-responsive-sm {
    font-size: clamp(0.75rem, 2vw, 0.875rem);
}

.text-responsive-base {
    font-size: clamp(0.875rem, 2.5vw, 1rem);
}

.text-responsive-lg {
    font-size: clamp(1rem, 3vw, 1.125rem);
}

.text-responsive-xl {
    font-size: clamp(1.125rem, 3.5vw, 1.25rem);
}

/* Flexbox responsive */
.flex-responsive {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .flex-responsive.sm-row {
        flex-direction: row;
        gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .flex-responsive.md-row {
        flex-direction: row;
        gap: 2rem;
    }
}

/* Images responsive */
.img-responsive {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 0.5rem;
}

/* Masquer/afficher selon la taille d'écran */
.hidden-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hidden-mobile {
        display: block;
    }
    
    .hidden-desktop {
        display: none;
    }
}

/* Animations responsive */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Amélioration tactile */
@media (hover: none) and (pointer: coarse) {
    .card-responsive:hover {
        transform: none;
    }
    
    .btn-responsive:hover {
        transform: none;
    }
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animations fluides */
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Effet de glassmorphism amélioré */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Cartes de projets améliorées */
.project-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s;
}

.project-card:hover::before {
    left: 100%;
}

/* Navigation fixe améliorée */
.fixed-nav {
    backdrop-filter: blur(20px);
    background: rgba(17, 24, 39, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.fixed-nav.scrolled {
    background: rgba(17, 24, 39, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Boutons avec effets améliorés */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.2));
    transition: left 0.3s ease;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

/* Indicateurs de compétences simplifiés */
.skill-indicator {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.skill-indicator:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Suppression des anciennes barres de progression avec gradient */
.skill-progress {
    display: none;
}

/* Style pour les atouts sans étoiles */
.atout-item {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--success-green);
    transition: all 0.3s ease;
}

.atout-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

/* Particules d'arrière-plan améliorées */
.hero-bg {
    position: relative;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(16, 185, 129, 0.2) 0%, transparent 50%);
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Effets de survol pour les icônes sociales */
.social-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-icon:hover::before {
    opacity: 1;
}

.social-icon:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.social-icon i {
    position: relative;
    z-index: 1;
}

/* Animations d'apparition */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in-up.delay-1 { animation-delay: 0.1s; }
.fade-in-up.delay-2 { animation-delay: 0.2s; }
.fade-in-up.delay-3 { animation-delay: 0.3s; }
.fade-in-up.delay-4 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Indicateur de scroll */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.scroll-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-purple));
    transition: width 0.3s ease;
}

/* Responsive design amélioré */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.25rem !important;
    }
    
    .glass-card {
        margin: 16px;
    }
    
    .btn-primary {
        padding: 10px 24px;
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .section-padding {
        padding: 60px 16px !important;
    }
}

/* Mode haute performance */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Amélioration de l'accessibilité */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible pour l'accessibilité */
.focus-visible:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Optimisation des polices */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
}

/* Variables CSS pour la cohérence des couleurs */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
