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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0e27;
    min-height: 100vh;
    color: #fff;
}

.navbar {
    background: rgba(21, 25, 50, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

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

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

.navbar-menu a {
    color: #8b92b0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: #00d4ff;
}

/* Sous-menu */
.navbar-menu .submenu {
    list-style: none;
}
.navbar-menu .has-submenu {
    position: relative;
}

.navbar-menu .submenu {
    display: none;
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(21, 25, 50, 0.98);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-radius: 10px;
    padding: 15px 0;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.3), 0 0 20px rgba(0, 212, 255, 0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.navbar-menu .has-submenu:hover .submenu {
    display: block;
}

.navbar-menu .submenu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid rgba(0, 212, 255, 0.4);
}

.navbar-menu .submenu li {
    padding: 0;
}

.navbar-menu .submenu a {
    display: block;
    padding: 8px 16px;
    color: #b8c5d6;
    transition: all 0.3s ease;
    font-size: 0.92rem;
    font-weight: 500;
}

.navbar-menu .submenu a:hover {
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
    padding-left: 30px;
    box-shadow: inset 4px 0 0 #00d4ff;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.navbar-toggle span {
    width: 25px;
    height: 3px;
    background: #00d4ff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hero {
    background: linear-gradient(135deg, #1a1f3a 0%, #0a0e27 100%);
    padding: 100px 20px 80px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 153, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 6s ease-in-out infinite reverse;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 50%, #00d4ff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    letter-spacing: -1px;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

.hero .subtitle {
    font-size: 1.1rem;
    color: #00d4ff;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 15px;
    opacity: 0.9;
}

.hero p {
    font-size: 1.3rem;
    color: #8b92b0;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.hero-decoration {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.hero-decoration span {
    width: 8px;
    height: 8px;
    background: #00d4ff;
    border-radius: 50%;
    animation: bounce 1.5s ease-in-out infinite;
}

.hero-decoration span:nth-child(2) {
    animation-delay: 0.3s;
}

.hero-decoration span:nth-child(3) {
    animation-delay: 0.6s;
}

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

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

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

.projects-grid.compact-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    background: #151932;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: #00d4ff;
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.2);
}

.project-image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #1a1f3a;
}

.project-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    transition: transform 0.4s ease;
}

.project-image-wrapper img.tipod-image {
    object-position: center bottom;
}

.project-card:hover .project-image-wrapper img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(10,14,39,0.9) 100%);
}

.project-content {
    padding: 35px;
}

.project-content h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #fff;
    font-weight: 700;
}

.project-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tech-badge {
    display: inline-block;
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.project-content p {
    color: #8b92b0;
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 1rem;
}

/* Bouton de retour pour les pages TP */
.back-btn {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 2000;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    color: #0a0e27;
    text-decoration: none;
    font-weight: 700;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.18);
    border: 1px solid rgba(0, 212, 255, 0.4);
}

.back-btn:hover {
    transform: translateY(-3px);
}

.back-btn .icon {
    font-size: 1.2rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    color: #0a0e27;
    padding: 14px 28px;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.project-link:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

footer {
    text-align: center;
    padding: 40px 20px;
    color: #8b92b0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 60px;
}

footer a {
    color: #00d4ff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Hero Buttons */
.hero-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 350px));
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 0 20px;
}

.hero-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 30px;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 60px;
    white-space: nowrap;
}

.hero-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.button-presentation {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.button-projets {
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    color: #0a0e27;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.button-tps {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.button-cordees {
    background: linear-gradient(135deg, #ffa751 0%, #ffe259 100%);
    color: #0a0e27;
    box-shadow: 0 4px 15px rgba(255, 167, 81, 0.3);
}

@media (max-width: 768px) {
                .hero-content .shine-text {
                    display: block;
                    text-align: center;
                    margin-left: auto;
                    margin-right: auto;
                    font-size: 2rem !important;
                    max-width: 100%;
                    word-break: break-word;
                }
            .project-card {
                width: 100% !important;
                margin-left: 0 !important;
                margin-right: 0 !important;
                box-sizing: border-box;
            }
            .project-content {
                padding: 10px !important;
            }
        .project-card {
            border-radius: 12px;
            padding: 10px 8px !important;
            width: 100%;
            box-sizing: border-box;
            margin-left: 0 !important;
            margin-right: 0 !important;
        }
    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(21, 25, 50, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        display: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-toggle {
        display: flex;
    }

    .hero {
        padding: 60px 20px 50px;
    }

    .hero h1 {
        font-size: 2rem;
        word-break: break-word;
        line-height: 1.1;
    }

    .hero .subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    .hero p {
        font-size: 1.1rem;
    }

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

    .project-content h2 {
        font-size: 1.6rem;
    }

    .hero-buttons {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 40px;
    }

    .hero-button {
        font-size: 1rem;
        padding: 16px 25px;
        white-space: normal;
    }
}
