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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #1d1d1f;
    line-height: 1.6;
}

/* Header Apple-style (repris de la page sportive) */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.logo h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1d1d1f;
    text-decoration: none;
}

.logo a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.ticker {
    flex: 1;
    text-align: center;
    margin: 0 40px;
    overflow: hidden;
}

.ticker-content {
    font-size: 0.9rem;
    font-weight: 500;
    color: #007AFF;
    animation: ticker 20s linear infinite;
    white-space: nowrap;
}

@keyframes ticker {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.auth-buttons {
    display: flex;
    gap: 8px;
}

.auth-buttons a {
    padding: 8px 16px;
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.auth-buttons a:hover {
    background: #007AFF;
    color: white;
    transform: translateY(-1px);
}

/* Main Content */
main {
    padding-top: 100px;
    min-height: 100vh;
}

.hero-section {
    text-align: center;
    padding: 60px 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    background: linear-gradient(135deg, #007AFF, #34C759, #FF9500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #6e6e73;
    font-weight: 400;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Projects Container */
.projects-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

/* Gallery Item */
.gallery-item {
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.gallery-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Image Container */
.image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover .image-container img {
    transform: scale(1.1);
}

/* Overlay Effect */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.8), rgba(52, 199, 89, 0.8));
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.view-project {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 12px 24px;
    border: 2px solid white;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.view-project:hover {
    background: white;
    color: #007AFF;
}

/* Project Info */
.project-info {
    padding: 25px 30px;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d1d1f;
}

.project-category {
    font-size: 0.9rem;
    color: #6e6e73;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category Colors */
.gallery-item[data-category="programming"] {
    border-left: 4px solid #007AFF;
}

.gallery-item[data-category="research"] {
    border-left: 4px solid #34C759;
}

.gallery-item[data-category="web"] {
    border-left: 4px solid #FF9500;
}

.gallery-item[data-category="gaming"] {
    border-left: 4px solid #FF3B30;
}

.gallery-item[data-category="event"] {
    border-left: 4px solid #AF52DE;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-content p {
    color: #6e6e73;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    color: #007AFF;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #0056b3;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Error State */
.image-error {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.image-error::after {
    content: '📷';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0.3;
}

/* Loading animation */
.loading {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 16px;
        gap: 12px;
    }

    .ticker {
        margin: 0;
        width: 100%;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 40px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .gallery-item {
        margin: 0 10px;
    }

    .image-container {
        height: 200px;
    }

    .project-info {
        padding: 20px 25px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    main {
        padding-top: 140px;
    }
}

@media (max-width: 480px) {
    .projects-container {
        padding: 0 10px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .hero-section {
        padding: 40px 15px 30px;
    }

    .project-title {
        font-size: 1.2rem;
    }
}