/* --- GLOBAL STYLES --- */
body {
    font-family: 'Lexend', sans-serif;
    background-color: #151515;
    color: #e0e0e0;
    margin: 0;
    overflow-x: hidden;
}

/* --- 1. SPLASH SCREEN V2 (VIBRANT ORANGE) --- */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.shutter-top,
.shutter-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(90deg, #FF3D00, #FFB800);
    transition: transform 0.8s cubic-bezier(0.86, 0, 0.07, 1);
    z-index: 10000;
}

.shutter-top {
    top: 0;
}

.shutter-bottom {
    bottom: 0;
}


.center-line {
    display: none;
    /* Masqué comme demandé */
    position: absolute;
    width: 100%;
    /* Fixe à 100% dès le départ */
    height: 6px;
    background-color: #151515;
    z-index: 10001;
    /* Plus de transition de largeur */
}

/* L'animation CSS est supprimée car gérée par JS maintenant */

.loader-content {
    z-index: 10002;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.3s ease-out;
}

.shuriken-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 40px;
}

.shuriken-blade {
    width: 100%;
    /* Prend toute la place du wrapper (100px) */
    height: 100%;
    background-color: white;
    clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
    animation: spin-shuriken 0.5s linear infinite;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
    /* Ombre plus diffuse vu la taille */
    /* Creation du trou au milieu */
    -webkit-mask: radial-gradient(transparent 10%, black 11%);
    mask: radial-gradient(transparent 10%, black 11%);
}

@keyframes spin-shuriken {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-weight: 800;
    font-size: 24px;
    letter-spacing: 5px;
    color: white;
    display: flex;
    gap: 5px;
}

.loading-text span {
    animation: bounce 1.5s infinite;
    opacity: 0.8;
}

.loading-text span:nth-child(2) {
    animation-delay: 0.1s;
}

.loading-text span:nth-child(3) {
    animation-delay: 0.2s;
}

.loading-text span:nth-child(4) {
    animation-delay: 0.3s;
}

.loading-text span:nth-child(5) {
    animation-delay: 0.4s;
}

.loading-text span:nth-child(6) {
    animation-delay: 0.5s;
}

.loading-text span:nth-child(7) {
    animation-delay: 0.6s;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

/* Splash Loaded State */
#splash-screen.loaded .shutter-top {
    transform: translateY(-100%);
}

#splash-screen.loaded .shutter-bottom {
    transform: translateY(100%);
}

#splash-screen.loaded .center-line {
    opacity: 0;
    transition: 0.3s;
}

#splash-screen.loaded .loader-content {
    opacity: 0;
    transition: 0.3s;
}

#splash-screen.hidden {
    display: none;
}


/* --- 2. LANDING PAGE --- */
#landing-page {
    width: 100%;
    transition: opacity 0.5s ease;
    background-color: #151515;
}

#landing-page.hidden {
    display: none;
}

.hero {
    height: 100vh;
    display: flex;
    justify-content: flex-start;
    /* ALIGNE À GAUCHE */
    align-items: center;
    text-align: left;
    /* TEXTE À GAUCHE */
    padding: 0 10%;
    /* Marge de gauche */
    position: relative;
    overflow: hidden;
}

/* SLIDER */
.slider-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* On retire le display flex ici pour gérer le positionnement absolu des slides */
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    /* --- EFFET SLIDER (Translate) --- */
    transform: translateX(100%);
    /* Par défaut à droite, cachée */
    transition: transform 1s ease-in-out;
    z-index: 1;
}

.slide.active {
    transform: translateX(0);
    /* Visible au centre */
    z-index: 2;
}

.slide.prev {
    transform: translateX(-100%);
    /* Partie à gauche */
    z-index: 1;
}

/* OVERLAY (Ombre pour lire le texte à GAUCHE maintenant) */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dégradé noir fort à gauche -> transparent à droite */
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0) 100%);
    z-index: 3;
    /* Au-dessus du slider */
    pointer-events: none;
    /* Laisse passer les clics si besoin */
}

.hero-content {
    position: relative;
    z-index: 4;
    /* Au-dessus de tout */
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-title .highlight {
    color: #FF640A;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #e0e0e0;
    margin-bottom: 40px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.cta-group {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    /* BOUTONS À GAUCHE */
}

.btn-primary {
    background-color: #FF640A;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Lexend', sans-serif;
    font-weight: bold;
    font-size: 1.1rem;
    transition: 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 100, 10, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 15px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Lexend', sans-serif;
    transition: 0.3s;
    font-weight: bold;
}

.btn-secondary:hover {
    background: white;
    color: black;
}

/* SCROLL INDICATOR */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    opacity: 0.8;
    transition: 0.3s;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(45deg);
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0% {
        transform: rotate(45deg) translate(0, 0);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: rotate(45deg) translate(10px, 10px);
        opacity: 0;
    }
}

/* ABOUT SECTION */
.about {
    padding: 100px 20px;
    background-color: #1a1a1a;
}

.about-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
}

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

.about-card {
    background: #222;
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #333;
}

.about-card h3 {
    color: #FF640A;
    margin-bottom: 20px;
}

.about-card p {
    line-height: 1.6;
    color: #ccc;
}


/* --- 3. APP SECTION --- */
.hidden-section {
    display: none;
    opacity: 0;
}

#app-section.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    opacity: 1;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* NAV RETOUR */
.app-nav {
    position: absolute;
    top: 40px;
    /* Plus loin du haut */
    left: 40px;
    /* Plus loin du bord gauche */
    z-index: 20;
}

.btn-back {
    background: rgba(255, 255, 255, 0.05);
    /* Fond subtil */
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Bordure fine */
    color: #e0e0e0;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Lexend', sans-serif;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    /* Plus de confort au clic */
    border-radius: 30px;
    /* Pilule */
    backdrop-filter: blur(5px);
    /* Effet verre dépoli */
}

.btn-back:hover {
    color: white;
    background: rgba(255, 100, 10, 0.8);
    /* Orange au survol */
    border-color: #FF640A;
    transform: translateX(-3px);
    /* Petit recul dynamique */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.container {
    background-color: #272727;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 400px;
    margin-top: 50px;
}

h1 {
    color: #FF640A;
    margin-bottom: 20px;
}

select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: none;
    background-color: #441;
    background-color: #414141;
    color: #e0e0e0;
    font-family: 'Lexend';
    font-size: 1rem;
}

.btn-find {
    background-color: #FF640A;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    font-family: 'Lexend';
    font-weight: bold;
    transition: 0.3s;
}

.btn-find:hover {
    background-color: #e55a09;
}

#resultats {
    margin-top: 30px;
    text-align: left;
}

.card {
    background-color: #333;
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
    border-left: 4px solid #FF640A;
}

.score {
    float: right;
    color: #FF640A;
    font-weight: bold;
}

.btn-reset {
    margin-top: 20px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    text-decoration: underline;
}

.btn-reset:hover {
    color: #888;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {

    /* 1. Background Mobile Specific */
    .slider-container {
        display: none !important;
        /* Disable slider images */
    }

    .hero {
        background: url('assets/mobile.png') no-repeat center center;
        background-size: cover;
        padding: 0 20px;
        /* Reduce padding */
        justify-content: center;
        /* Center content vertically if needed */
        text-align: center;
    }

    .hero-overlay {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
        /* Vertical gradient for mobile */
    }

    /* 2. Typography & Layout */
    .hero-content {
        width: 100%;
        max-width: 100%;
        margin-top: -50px;
        /* Re-center visually */
    }

    .hero-title {
        font-size: 2.5rem;
        /* Smaller title */
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    /* 3. CTA Adjustments (Smaller & Stacked or tailored) */
    .cta-group {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 80%;
        /* Fullish width */
        max-width: 300px;
        font-size: 1rem;
        /* Smaller text */
        padding: 12px 20px;
        /* Reduced padding */
    }

    /* 4. App Section Adaptation */
    .container {
        width: 90%;
        max-width: 100%;
        padding: 25px;
        margin-top: 60px;
        /* Avoid nav overlap */
    }

    .app-nav {
        top: 20px;
        left: 20px;
    }

    .about h2 {
        font-size: 2rem;
    }
}