/* =========================================
   VARIABLES & BASE
========================================= */
:root {
    --bg-color: #0a0a0c;
    --text-color: #ffffff;
    --accent-color: #ff2a2a;
    --accent-hover: #cc1b1b;
    --card-bg: rgba(22, 22, 26, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   ANIMATIONS GLOBALES
========================================= */
.page-transition {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: var(--bg-color);
    z-index: 9999;
    animation: fadeOut 1s ease forwards;
    pointer-events: none;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

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

.reveal-on-scroll { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: all 0.8s ease-out; 
}

.reveal-on-scroll.is-visible { 
    opacity: 1; 
    transform: translateY(0); 
}

/* =========================================
   NAVIGATION (HEADER)
========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(10, 10, 12, 0.4);
    backdrop-filter: blur(15px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo { 
    font-size: 1.5rem; 
    font-weight: 900; 
    letter-spacing: 2px; 
}

nav a, .nav-btn {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 700;
    background: none; 
    border: none; 
    font-size: 1rem; 
    cursor: pointer;
    transition: color 0.3s;
}

nav a:hover, .nav-btn:hover { 
    color: var(--accent-color); 
}

/* =========================================
   BOUTONS STANDARDS
========================================= */
button { cursor: pointer; }

.btn-primary, .btn-secondary, .btn-outline {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary { 
    background: var(--accent-color); 
    color: white; 
    box-shadow: 0 4px 15px rgba(255, 42, 42, 0.4); 
}

.btn-primary:hover { 
    background: var(--accent-hover); 
    transform: translateY(-2px); 
}

.btn-secondary { 
    background: rgba(255,255,255,0.1); 
    color: white; 
    border: 1px solid rgba(255, 255, 255, 0.3); 
    backdrop-filter: blur(5px); 
}

.btn-secondary:hover { 
    background: rgba(255,255,255,0.2); 
}

.btn-outline { 
    border: 1px solid var(--accent-color); 
    color: var(--accent-color); 
    background: transparent; 
    margin-left: 2rem; 
}

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

/* =========================================
   SECTION HERO (ACCUEIL & VIDÉO)
========================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%; min-height: 100%;
    width: auto; height: auto;
    z-index: -2;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(0deg, var(--bg-color) 0%, rgba(10,10,12,0.6) 100%);
    z-index: -1;
}

.hero-content { 
    z-index: 1; 
    padding: 0 20px; 
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    color: #ddd;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.hero-buttons { 
    display: flex; 
    gap: 1rem; 
    justify-content: center; 
}

/* =========================================
   SECTION FONCTIONNALITÉS
========================================= */
.features-section { 
    padding: 5rem 5%; 
}

.features-section h2 { 
    text-align: center; 
    font-size: 2.5rem; 
    margin-bottom: 3rem; 
}

.features-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 2rem; 
}

.feature-card { 
    background: var(--card-bg); 
    padding: 2rem; 
    border-radius: 8px; 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    transition: transform 0.3s; 
}

.feature-card:hover { 
    transform: translateY(-5px); 
    border-color: var(--accent-color); 
}

.feature-card h3 { 
    margin-bottom: 1rem; 
    color: var(--accent-color); 
}

/* =========================================
   FOOTER
========================================= */
footer {
    text-align: center;
    padding: 2rem;
    background: #050505;
    color: #666;
}

/* =========================================
   MODALES (POP-UPS) - BASE
========================================= */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    opacity: 0; 
    transition: opacity 0.3s ease;
    align-items: center; 
    justify-content: center;
}

.modal.show { 
    display: flex; 
    opacity: 1; 
}

.modal-content {
    background: #111;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 2.5rem; 
    width: 90%; 
    max-width: 600px;
    position: relative; 
    text-align: center;
    transform: scale(0.9); 
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.modal.show .modal-content { 
    transform: scale(1); 
}

.modal-content.large { 
    max-width: 900px; 
}

.close-btn {
    position: absolute; 
    top: 15px; 
    right: 20px;
    color: #888; 
    font-size: 28px; 
    font-weight: bold; 
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover { 
    color: white; 
}

/* =========================================
   MODALE : SÉLECTION DE L'OS
========================================= */
.os-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 1rem; 
    margin-top: 2rem; 
}

.os-card {
    background: rgba(255,255,255,0.05); 
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; 
    padding: 1.5rem 1rem; 
    text-decoration: none; 
    color: white;
    transition: all 0.3s ease; 
    display: flex; 
    flex-direction: column; 
    align-items: center;
}

.os-card:hover:not(.disabled) { 
    background: rgba(255,255,255,0.1); 
    border-color: var(--accent-color); 
    transform: translateY(-5px); 
}

.os-card.disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

.os-icon { 
    font-size: 2.5rem; 
    margin-bottom: 0.5rem; 
}

.os-card span { 
    font-size: 0.8rem; 
    color: #888; 
    margin-top: 0.5rem; 
}

/* =========================================
   MODALE : SOUTIEN AU PROJET (CAGNOTTE)
========================================= */
.project-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(255, 42, 42, 0.5));
}

.donation-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    align-items: center;
}

/* Bouton Premium Wolf (Le Pot Commun) - Taille Réduite */
.btn-project-fund {
    background: linear-gradient(135deg, #a00000 0%, var(--accent-color) 100%);
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 12px rgba(255, 42, 42, 0.15), inset 0 0 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 320px;
    position: relative;
    overflow: hidden;
}

.btn-project-fund:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff4d4d 100%);
    box-shadow: 0 0 25px rgba(255, 42, 42, 0.4), 0 8px 15px -5px rgba(0,0,0,0.5);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

/* =========================================
   MODALE : TÉLÉCHARGEMENT EN COURS
========================================= */
.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 42, 42, 0.2);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    margin: 0 auto 2rem auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fallback-download {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.fallback-download p {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
}

.fallback-download .btn-outline {
    margin-left: 0;
}

/* =========================================
   MODALE : LORE & TRAILER
========================================= */
.lore-container { 
    display: flex; 
    flex-direction: column; 
    gap: 1.5rem; 
    margin-top: 1.5rem; 
    text-align: left; 
}

.video-container { 
    position: relative; 
    padding-bottom: 56.25%; 
    height: 0; 
    overflow: hidden; 
    border-radius: 8px; 
    border: 1px solid rgba(255,255,255,0.1); 
}

.video-container iframe { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
}

.lore-text p { 
    margin-bottom: 1rem; 
    color: #ccc; 
}


/* =========================================
   AJOUT : RESPONSIVE / MODE PORTABLE (768px et moins)
========================================= */
@media (max-width: 768px) {
    /* Menu du haut verticalisé et centré */
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    nav a, .nav-btn {
        margin-left: 0;
        margin: 0 0.5rem;
        font-size: 0.9rem;
    }
    
    .btn-outline {
        margin-left: 0;
        margin-top: 0.5rem;
        padding: 0.4rem 1rem;
    }

    /* Ajustement de l'accueil (Hero) */
    .hero-content h1 {
        font-size: 2.5rem; /* Réduction drastique pour ne pas déborder */
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column; /* Boutons empilés verticalement */
        gap: 0.8rem;
        align-items: center;
    }

    .hero-buttons .btn-primary, 
    .hero-buttons .btn-secondary {
        width: 100%;
        max-width: 280px; /* Taille uniforme et adaptée aux doigts */
        text-align: center;
    }

    /* Modales adaptées aux petits écrans */
    .modal-content {
        padding: 1.5rem 1rem;
        width: 95%; /* Prend presque toute la largeur disponible */
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
    }

    /* Grille des OS : Empilée sur 1 colonne au lieu de 3 */
    .os-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .os-card {
        flex-direction: row; /* Icône à gauche, texte à droite */
        justify-content: flex-start;
        gap: 15px;
        padding: 0.8rem 1.5rem;
    }

    .os-icon {
        font-size: 2rem;
        margin-bottom: 0;
    }

    .os-card h3 {
        font-size: 1.1rem;
    }
    
    /* Bouton cagnotte responsive */
    .btn-project-fund {
        font-size: 1rem;
        padding: 0.8rem 1.2rem;
        max-width: 100%;
    }
}