/* ===========================
   RESET & VARIABLES
   =========================== */

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

:root {
    /* Couleurs principales */
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --accent: #f093fb;
    
    /* Couleurs des cartes */
    --gitlab: #fc6d26;
    --pelican: #0ea5e9;
    --python: #3776ab;
    --jinja: #b41717;
    
    /* Couleurs neutres */
    --bg-dark: #0f0f23;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    
    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Bordures */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);
}

/* ===========================
   BASE STYLES
   =========================== */

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

/* Effet d'étoiles en arrière-plan */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.stars::before,
.stars::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 
        100px 200px white,
        300px 100px white,
        500px 300px white,
        700px 150px white,
        900px 250px white,
        200px 400px white,
        600px 500px white,
        800px 450px white,
        400px 600px white,
        1000px 550px white,
        150px 650px white,
        950px 700px white,
        450px 800px white,
        250px 900px white,
        750px 850px white;
    animation: twinkle 3s infinite;
}

.stars::after {
    animation-delay: 1.5s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    position: relative;
    z-index: 1;
}

/* ===========================
   HERO SECTION
   =========================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg) 0;
    position: relative;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    animation: fadeInUp 0.8s ease-out;
}

.logo-wrapper {
    margin-bottom: var(--spacing-md);
    animation: float 3s ease-in-out infinite;
}

.logo-icon {
    width: 120px;
    height: 120px;
    filter: drop-shadow(var(--shadow-glow));
}

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

.title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Hero Illustration */
.hero-illustration {
    flex: 1;
    position: relative;
    height: 500px;
    display: none;
}

@media (min-width: 1024px) {
    .hero-illustration {
        display: block;
    }
}

.floating-card {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
}

.card-1 {
    width: 300px;
    height: 200px;
    top: 50px;
    right: 100px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    animation: float 4s ease-in-out infinite;
}

.card-2 {
    width: 250px;
    height: 150px;
    top: 280px;
    right: 50px;
    animation: float 5s ease-in-out infinite 1s;
}

.card-3 {
    width: 200px;
    height: 180px;
    bottom: 50px;
    right: 200px;
    animation: float 3.5s ease-in-out infinite 0.5s;
}

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

/* ===========================
   SECTIONS
   =========================== */

main {
    padding: var(--spacing-xl) 0;
}

.links-section,
.social-section {
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}

.title-decoration {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 2px;
}

.section-description {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
}

/* ===========================
   CARDS GRID
   =========================== */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover::before {
    opacity: 1;
}

.link-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.link-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(102, 126, 234, 0.2);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    transition: transform 0.3s;
}

.link-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-icon svg {
    width: 36px;
    height: 36px;
    color: white;
}

.gitlab {
    background: linear-gradient(135deg, #fc6d26, #ff9b63);
}

.pelican {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
}

.python {
    background: linear-gradient(135deg, #3776ab, #4b8bbe);
}

.jinja {
    background: linear-gradient(135deg, #b41717, #e82e2e);
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--text);
}

.card p {
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: var(--spacing-sm);
}

.card-arrow {
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s;
    align-self: flex-end;
}

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

/* ===========================
   SOCIAL SECTION
   =========================== */

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    max-width: 800px;
    margin: 0 auto;
}

.social-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.social-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(102, 126, 234, 0.2);
}

.social-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: transform 0.3s;
}

.social-card:hover .social-icon {
    transform: scale(1.1) rotate(10deg);
}

.social-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.social-card span {
    font-weight: 600;
    font-size: 1rem;
}

/* ===========================
   FOOTER
   =========================== */

.footer {
    padding: var(--spacing-lg) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--spacing-xl);
}

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

.footer-content p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.footer-content strong {
    color: var(--primary);
    font-weight: 600;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        min-height: auto;
        padding: var(--spacing-md) 0;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .logo-wrapper {
        display: flex;
        justify-content: center;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .title-decoration {
        width: 40px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .social-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}