/* CSS Variables & Theme Tokens */
:root {
    /* Colors */
    --bg-main: #09090b;
    --bg-alt: #18181b;
    --bg-card: rgba(24, 24, 27, 0.6);
    --bg-card-hover: rgba(39, 39, 42, 0.8);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --accent-red: #e11d48;
    --accent-red-hover: #be123c;
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Effects */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout */
    --nav-height: 80px;
    --container-w: 1200px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
}

.section.alt-bg {
    background-color: var(--bg-alt);
    position: relative;
}

.text-gradient {
    background: linear-gradient(135deg, #ff4d4d, var(--accent-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-blue {
    background: linear-gradient(135deg, #60a5fa, var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--glass-border);
}

.nav-container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.logo-icon {
    color: var(--accent-red);
    font-size: 1.75rem;
}

/* Logo — fond blanc visible et arrondi sur tous les modes */
.logo img {
    border-radius: 8px;
    overflow: hidden;
}

.hero-content img[alt="Logo PPCV Hero"] {
    border-radius: 16px;
    overflow: hidden;
}

.nav-menu {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    white-space: nowrap;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-muted);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-red);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg .bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    transform: scale(1.05); /* slightly scaled for animation potential */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient overlay for readability and dramatic mood */
    background: linear-gradient(to right, rgba(9, 9, 11, 0.95) 0%, rgba(9, 9, 11, 0.7) 50%, rgba(9, 9, 11, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInUp 1s ease-out forwards;
}

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

.hero-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(225, 29, 72, 0.15);
    color: #ff4d4d;
    border: 1px solid rgba(225, 29, 72, 0.3);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(3rem, 5vw + 1rem, 5.5rem);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-red);
    color: white;
    border: 1px solid var(--accent-red);
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.4);
}

.btn-primary:hover {
    background: var(--accent-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 29, 72, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.scroll-indicator p {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.mouse {
    width: 24px;
    height: 36px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 12px); opacity: 0; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

/* Features/Club Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem 2rem;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* Teams Section */
.teams-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.team-card {
    flex: 1 1 300px;
    max-width: 350px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-blue);
}

.team-card:nth-child(n+3)::before {
    background: var(--text-muted); /* Different color for departementale */
}

.team-level {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.division-regionale {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
}

.division-departementale {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
}

.team-card h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.team-division {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.team-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.team-link i {
    font-size: 0.875rem;
    transition: transform 0.2s;
}

.team-link:hover {
    color: var(--accent-red);
}

.team-link:hover i {
    transform: translateX(4px);
}

/* Links Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.link-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(225, 29, 72, 0.3);
    color: var(--accent-red);
}

.link-card i {
    font-size: 2rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.link-card:hover i {
    color: var(--accent-red);
    transform: scale(1.1);
}

.link-card span {
    font-weight: 600;
}

/* Footer */
.footer {
    border-top: 1px solid var(--glass-border);
    background: var(--bg-alt);
    padding-top: 5rem;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .logo-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.footer-brand p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-size: 1.25rem;
}

.social-links a:hover {
    background: var(--accent-red);
    transform: translateY(-3px);
}

.footer h4 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent-red);
    padding-left: 5px;
}

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact i {
    color: var(--accent-red);
}

.footer-bottom {
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsiveness */
@media (max-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(9, 9, 11, 0.95);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--glass-border);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-menu.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .nav-container {
        position: relative;
    }
}

/* Light Mode Variables */
html.light {
    --bg-main: #f8fafc;
    --bg-alt: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 1);
    
    --text-main: #0f172a;
    --text-muted: #475569;
    
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

html.light .navbar.scrolled {
    background: rgba(248, 250, 252, 0.85);
}

html.light .hero-overlay {
    background: linear-gradient(to right, rgba(248, 250, 252, 0.95) 0%, rgba(248, 250, 252, 0.7) 50%, rgba(248, 250, 252, 0.4) 100%);
}

html.light .btn-secondary {
    color: var(--text-main);
    border: 1px solid rgba(0,0,0,0.2);
}

html.light .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
}

html.light .mobile-toggle {
    color: var(--text-main);
}


/* ----- PREMIUM UPGRADE V2 ----- */
:root {
    --brand-red: #e6192b;
    --brand-blue: #1e3a8a;
    --brand-gold: #fbbf24;
}

/* Ambient Background Orbs */
.ambient-wrapper {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    background: var(--bg-main);
}
.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: orb-float 20s infinite ease-in-out alternate;
}
.orb-red {
    top: -10%; left: -10%;
    width: 50vw; height: 50vw;
    background: var(--brand-red);
}
.orb-blue {
    bottom: -10%; right: -10%;
    width: 60vw; height: 60vw;
    background: var(--brand-blue);
    animation-delay: -10s;
}

@keyframes orb-float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

/* New Bento Grid for Club */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 250px);
    gap: 1.5rem;
}
.bento-item {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.bento-item:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.bento-item.has-bg::after {
    content: ''; position: absolute; top:0; left:0; width:100%; height:100%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.8));
    z-index: 1; pointer-events:none;
}
.bento-content {
    position: relative; z-index: 2;
}
.bento-icon {
    position: absolute;
    top: 2rem; right: 2rem;
    font-size: 2.5rem;
    color: rgba(255,255,255,0.2);
    z-index: 2;
    transition: all 0.4s;
}
.bento-item:hover .bento-icon {
    color: var(--brand-red);
    transform: scale(1.2) rotate(-5deg);
}

.bento-span-2 { grid-column: span 2; }
.bento-row-2 { grid-row: span 2; }

/* Trendy Pills for Tools */
.pill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}
.tool-pill {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}
.tool-pill:hover {
    background: var(--brand-blue);
    color: white;
    transform: translateY(-3px);
    border-color: var(--brand-blue);
    box-shadow: 0 10px 20px rgba(30, 58, 138, 0.4);
}

/* Stunning Hero Overlay */
.hero-v2 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: var(--nav-height);
    text-align: center;
}
.hero-v2-bg {
    position: absolute;
    top:0; left:0; width:100%; height:100%;
    background-image: radial-gradient(circle at 50% 30%, rgba(230, 25, 43, 0.1) 0%, transparent 50%),
                      url('https://images.unsplash.com/photo-1596464528143-fd25f7c32087?auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
    opacity: 0.4;
    mix-blend-mode: luminosity;
}

@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .bento-span-2, .bento-row-2 {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 200px;
    }
}


/* ----- EXTREME GLASSMORPHISM UPGRADE ----- */
.glass-panel, .bento-item, .tool-pill {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(20px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    border-radius: 24px !important;
}

.bento-item:hover, .tool-pill:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 15px 40px 0 rgba(0, 0, 0, 0.5) !important;
}

/* Intense Ambient Colors for Refraction */
.ambient-orb {
    filter: blur(100px) !important;
    opacity: 0.45 !important;
    mix-blend-mode: screen;
}

html.light .ambient-orb {
    mix-blend-mode: multiply;
    opacity: 0.6 !important;
}

html.light .glass-panel, html.light .bento-item, html.light .tool-pill {
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1) !important;
}
html.light .bento-item:hover, html.light .tool-pill:hover {
    background: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 15px 40px 0 rgba(31, 38, 135, 0.15) !important;
}

/* Typography refinements to match UI */
.section-title, .hero-title {
    font-weight: 900 !important;
    letter-spacing: -1px !important;
}

/* Removing any solid backgrounds overriding glass */
.bento-item[style*="background"] {
    background-color: rgba(255,255,255,0.03) !important;
    background-blend-mode: overlay !important;
}


/* Light Mode Contrasts */
html.light .bento-item h3 { color: var(--text-main) !important; }
html.light .bento-item p { color: var(--text-muted) !important; }
html.light .bento-item div:not(.team-level):not(.bento-content) { color: var(--text-muted) !important; }
html.light .tool-pill { color: var(--text-main) !important; }
html.light .bento-item.has-bg h3, html.light .bento-item.has-bg p { color: white !important; } /* Exception for the Bureau image card */
html.light .hero-title span { color: var(--text-main) !important; }
html.light .hero-title .text-gradient {
    background: linear-gradient(135deg, #cc0000, #e6192b) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}
html.light .hero-v2-bg { opacity: 0.1 !important; mix-blend-mode: normal !important; }
html.light .bento-item[style*="background"] { background-color: rgba(255,255,255,0.4) !important; }


/* Button Colors Fix & Legibility */
/* ONLY for Light Mode (Fond blanc) as requested by the user */
html.light .bento-item div .tool-pill:nth-of-type(1) {
    background: rgba(37, 99, 235, 0.15) !important;
    color: #1d4ed8 !important;
    border: 1px solid rgba(37, 99, 235, 0.2) !important;
    box-shadow: none !important;
}
html.light .bento-item div .tool-pill:nth-of-type(2) {
    background: rgba(225, 29, 72, 0.1) !important;
    color: #be123c !important;
    border: 1px solid rgba(225, 29, 72, 0.2) !important;
    box-shadow: none !important;
}

/* Make Team Badges more legible in light mode */
html.light .division-regionale {
    color: #1d4ed8 !important;
    background: rgba(37, 99, 235, 0.2) !important;
}

/* Ensure the hover effect remains visible but subtle on these colored buttons */
html.light .bento-item div .tool-pill:nth-of-type(1):hover {
    background: rgba(37, 99, 235, 0.25) !important;
    transform: translateY(-2px) !important;
}
html.light .bento-item div .tool-pill:nth-of-type(2):hover {
    background: rgba(225, 29, 72, 0.2) !important;
    transform: translateY(-2px) !important;
}
