:root {
    --gold-color: #d4af37;
    --gold-light: #f5e29d;
    --dark-blue: #0a0e1a;
    --primary-blue: #01113a;
    --accent-blue: #1a1f3a;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url("/assets/images/background_hero.jpg") no-repeat center center fixed;
    background-size: cover;
    position: relative;
    color: #c6e4ed;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.60);
    z-index: -1;
}

/* Particules animées */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, var(--gold-color), transparent);
    border-radius: 50%;
    animation: float 8s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(1, 17, 58, 0.85);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-out;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: logoFloat 3s ease-in-out infinite;
}

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

.logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: transform 0.5s ease;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.logo img:hover {
    transform: rotate(360deg) scale(1.2);
}

.logo strong {
    color: white;
    font-size: 1.2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.menu-toggle {
    display: none;
    background: linear-gradient(135deg, var(--gold-color), var(--gold-light));
    border: none;
    color: var(--primary-blue);
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.8rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    transition: left 0.5s;
}

.nav-links a:hover::before {
    left: 100%;
}

.nav-links a:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: translateY(-3px);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    min-width: 200px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-content li {
    list-style: none;
}

.dropdown-content a {
    display: block;
    padding: 0.8rem 1.2rem;
    color: var(--primary-blue);
    transition: all 0.3s;
}

.dropdown-content a:hover {
    background: linear-gradient(90deg, var(--gold-color), var(--gold-light));
    transform: translateX(10px);
}

/* Search bar */
.search-bar-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0a2a7d 100%);
    padding: 1rem 3.5rem;
}

.search-bar-wrapper {
    position: relative;
    width: 100%;
    max-width: 360px;
    animation: fadeInRight 1s ease-out;
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.search-bar {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(212, 175, 55, 0.4);
}

.search-bar input {
    border: none;
    outline: none;
    padding: 0.8rem 1.2rem;
    flex: 1;
    font-size: 1rem;
}

.search-bar button {
    background: linear-gradient(135deg, #2c475e, #3b82f6);
    border: none;
    color: white;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.search-bar button:hover {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    transform: scale(1.1);
}

.search-results {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    color: var(--primary-blue);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.16);
    list-style: none;
    margin: 0.35rem 0 0 0;
    padding: 0.35rem 0;
    max-height: 260px;
    overflow-y: auto;
    z-index: 1200;
}

.search-results li {
    padding: 0.55rem 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-results li:hover,
.search-results li[aria-selected="true"] {
    background: #f0f4ff;
}

.btn-connexion {
    background: linear-gradient(90deg, var(--gold-color), var(--gold-light));
    color: var(--primary-blue);
    font-weight: 700;
    text-decoration: none;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.4s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
}

.btn-connexion:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.5);
}

/* Main content */
main {
    margin-top: 140px;
    padding: 2rem;
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 140px);
}

section {
    margin: 4rem auto;
    max-width: 1400px;
    animation: fadeInUp 1s ease-out;
    animation-fill-mode: both;
}

section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.4s; }
section:nth-child(4) { animation-delay: 0.6s; }
section:nth-child(5) { animation-delay: 0.8s; }

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

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-blue), #3b82f6, var(--gold-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(20deg); }
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold-color), transparent);
    animation: expandLine 2s ease-in-out infinite;
}

@keyframes expandLine {
    0%, 100% { width: 100px; }
    50% { width: 200px; }
}

.card {
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
    margin-bottom: 2rem;
}

.card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.3);
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1), transparent);
    animation: rotateGradient 10s linear infinite;
}

@keyframes rotateGradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.page-header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInUp 1s ease-out;
}

.page-header h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--gold-color), var(--gold-light), var(--gold-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.page-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Footer animé */
footer {
    background: linear-gradient(135deg, var(--primary-blue), #0a2a7d);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 5rem;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-color), transparent);
    animation: topLine 3s linear infinite;
}

@keyframes topLine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--gold-color);
    transform: translateY(-5px) rotate(360deg);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    transition: all 0.4s ease;
    text-decoration: none;
}

.social-btn:hover {
    background: linear-gradient(135deg, var(--gold-color), var(--gold-light));
    color: var(--primary-blue);
    transform: translateY(-10px) scale(1.2) rotate(360deg);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.5);
}

/* Responsive */
@media (max-width: 1200px) {
    nav {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(1, 17, 58, 0.98);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 1rem;
        align-items: flex-start;
        text-align: left;
    }

    .nav-links.active {
        display: flex;
    }

    .search-bar-container {
        background: transparent;
        backdrop-filter: blur(10px);
        padding: 0.8rem 1rem;
        flex-direction: row;
        gap: 0.8rem;
    }

    .search-bar-wrapper {
        max-width: 100%;
    }

    .search-bar {
        background: rgba(255, 255, 255, 0.95);
        max-width: 95%;
    }

    .search-bar input {
        font-size: 0.9rem;
        padding: 0.6rem 0.9rem;
    }

    .search-bar button {
        padding: 0.6rem 0.9rem;
    }

    .search-results {
        width: 95%;
    }

    .btn-connexion {
        width: 10%;
        justify-content: center;
        padding: 0.7rem 1rem;
        border-radius: 25px;
    }

    .btn-connexion span {
        display: none;
    }

    h2 {
        font-size: 2rem;
    }
}