/* ============================================
   VERSANT AVALANCHE - Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

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

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border-color: white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--secondary);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 20px;
}

.logo-icon {
    font-size: 28px;
}

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

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--secondary) 0%, #1e3a5f 50%, var(--primary) 100%);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

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

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--secondary);
    margin-bottom: 16px;
}

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

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    background: var(--bg-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    text-align: center;
    padding: 30px 20px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   CHALLENGE SECTION
   ============================================ */
.challenge {
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

.challenge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.challenge-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.challenge-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.challenge-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.challenge-card h3 {
    color: var(--secondary);
    margin-bottom: 12px;
}

.challenge-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.challenge-levels {
    background: var(--secondary);
    padding: 40px;
    border-radius: var(--radius-lg);
    color: white;
    margin-bottom: 40px;
}

.challenge-levels h3 {
    text-align: center;
    margin-bottom: 30px;
}

.levels-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.level-item {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius);
}

.level-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.level-1 { background: #22c55e; color: white; }
.level-2 { background: #3b82f6; color: white; }
.level-3 { background: #f59e0b; color: white; }
.level-4 { background: #ef4444; color: white; }

.level-name {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.level-desc {
    font-size: 0.85rem;
    opacity: 0.8;
}

.challenge-cta {
    text-align: center;
}

/* ============================================
   INFO SECTION
   ============================================ */
.info {
    background: var(--primary);
    color: white;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.info-card {
    text-align: center;
    padding: 20px;
}

.info-card h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    opacity: 0.9;
}

.info-value {
    font-size: 1.25rem;
    font-weight: 600;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    background: var(--bg-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.contact-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--secondary);
}

.contact-item a {
    color: var(--primary);
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ============================================
   RGPD SECTION
   ============================================ */
.rgpd {
    background: var(--bg-light);
    padding: 60px 0;
}

.rgpd-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.rgpd-content h3 {
    margin-bottom: 20px;
    color: var(--secondary);
}

.rgpd-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.rgpd-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 24px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--secondary);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo {
    color: white;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.875rem;
    opacity: 0.7;
}

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

.footer-links a {
    color: white;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.6;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

.modal-content h2 {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.modal-body {
    padding: 24px;
}

.modal-body h3 {
    margin: 24px 0 12px;
    color: var(--secondary);
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    background: var(--secondary);
    color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 3000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .challenge-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .levels-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: white;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero {
        padding: 100px 20px 60px;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .challenge-grid {
        grid-template-columns: 1fr;
    }
    
    .levels-list {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-links {
        flex-wrap: wrap;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .rgpd-links {
        flex-direction: column;
        gap: 12px;
    }
}

/* ============================================
   CHALLENGE INSCRIPTION PAGE
   ============================================ */
.inscription-page {
    min-height: 100vh;
    padding: 120px 20px 60px;
    background: linear-gradient(135deg, var(--secondary) 0%, #1e3a5f 100%);
}

.inscription-container {
    max-width: 700px;
    margin: 0 auto;
}

.inscription-header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.inscription-header h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.inscription-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.inscription-result {
    display: none;
    text-align: center;
    padding: 40px;
}

.inscription-result.show {
    display: block;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.result-zone {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
}

.result-zone.zone-1 { background: #22c55e; }
.result-zone.zone-2 { background: #3b82f6; }
.result-zone.zone-3 { background: #f59e0b; }
.result-zone.zone-4 { background: #ef4444; }
.result-zone.waitlist { background: var(--text-secondary); }

.result-time {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 16px;
}

.result-details {
    color: var(--text-secondary);
}

.back-link {
    display: inline-block;
    margin-top: 24px;
    color: var(--primary);
}

/* ============================================
   INLINE EDITING STYLES
   ============================================ */
[data-editable] {
    cursor: text;
    transition: var(--transition);
}

[data-editable]:hover {
    background: rgba(37, 99, 235, 0.1);
    border-radius: 4px;
}

[data-editable].editing {
    outline: 2px solid var(--primary);
    background: rgba(37, 99, 235, 0.05);
    border-radius: 4px;
}

.edit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--secondary);
    padding: 12px 20px;
    display: none;
    align-items: center;
    gap: 16px;
    z-index: 1500;
    box-shadow: var(--shadow-lg);
}

.edit-overlay.active {
    display: flex;
}

.edit-overlay input,
.edit-overlay textarea,
.edit-overlay select {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
}

.edit-overlay button {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-edit-save {
    background: var(--success);
    color: white;
}

.btn-edit-cancel {
    background: var(--danger);
    color: white;
}
