/* ============================================================
   1. GLOBAL & FOND
============================================================ */
body {
    margin: 0; padding: 0;
    background: linear-gradient(135deg, #8900C9 0%, #0E002D 50%, #0025CE 100%);
    font-family: "Poppins", sans-serif; color: white; min-height: 100vh; overflow-x: hidden;
}
.experience-wrapper { position: relative; width: 100%; min-height: 100vh; overflow-x: hidden; }
.hidden { display: none !important; }
.z-index-content { position: relative; z-index: 5; }

/* BULLES */
.bubbles-container { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.bubble { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.7; animation: rise infinite ease-in-out; }
.bubble:nth-child(1){width:300px;height:300px;background:linear-gradient(135deg,#667eea,#764ba2);left:10%;bottom:-150px;animation-duration:15s;}
.bubble:nth-child(2){width:250px;height:250px;background:linear-gradient(135deg,#f093fb,#f5576c);left:60%;bottom:-125px;animation-duration:18s;animation-delay:2s;}
.bubble:nth-child(3){width:350px;height:350px;background:linear-gradient(135deg,#4facfe,#00f2fe);left:80%;bottom:-175px;animation-duration:20s;animation-delay:4s;}
.bubble:nth-child(4){width:200px;height:200px;background:linear-gradient(135deg,#fa709a,#fee140);left:30%;bottom:-100px;animation-duration:16s;animation-delay:6s;}
@keyframes rise { 0% { bottom: -150px; transform: scale(1); } 50% { transform: scale(1.1); } 100% { bottom: 110%; transform: scale(0.9); } }

/* ============================================================
   2. HERO NAME SCREEN (RESPONSIVE FIX)
============================================================ */
.hero-name-screen { width: 100%; min-height: 100vh; display: flex; align-items: center; padding: 50px 0; }
.hero-title-big { font-size: 4rem; font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.highlight-hero { background: linear-gradient(90deg, #00f2fe, #d946ef); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtext { font-size: 18px; opacity: 0.9; max-width: 480px; margin-bottom: 30px; }

/* Input */
.hero-input-group { display: flex; flex-wrap: wrap; gap: 15px; }
.hero-input {
    flex: 1; min-width: 250px; padding: 18px 25px; border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.1); 
    backdrop-filter: blur(15px); color: white; font-size: 18px; outline: none; transition: 0.3s;
}
.hero-input:focus { background: rgba(255,255,255,0.2); border-color: #fff; box-shadow: 0 0 30px rgba(0, 242, 254, 0.3); }

.cta-btn {
    padding: 18px 45px; border-radius: 50px; border: none; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px;
    background: linear-gradient(135deg, #ffffff, #e0e0e0); color: #220a42; cursor: pointer; transition: 0.3s;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}
.cta-btn:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(137, 0, 201, 0.4); }

/* Erreur */
.error-message { color: #ff6b6b; font-size: 14px; font-weight: 600; margin-top: 15px; margin-left: 10px; display: block; animation: fadeIn 0.3s; }
.shake-animation { animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }

/* Carte Image Responsive */
.hero-image-card {
    width: 100%; max-width: 450px; aspect-ratio: 3/4; border-radius: 35px; overflow: hidden;
    background: rgba(255,255,255,0.05); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); animation: fadeInRight 0.8s ease-out;
}
.hero-image-card img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   3. QUIZ COSMIC GLASS
============================================================ */
.full-screen-section {
    min-height: 100vh; width: 100%; padding: 20px;
    animation: fadeIn 0.8s ease; display: flex; flex-direction: column; justify-content: center; align-items: center;
}

.question-card {
    width: 100%; max-width: 950px;
    background: rgba(20, 10, 40, 0.6); backdrop-filter: blur(60px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1); border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 40px; padding: 60px 70px;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    margin-top: auto; margin-bottom: 8vh; overflow: hidden; position: relative; transition: transform 0.3s ease;
}

/* Header */
.card-header-custom { margin-bottom: 40px; }
.header-top-row { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; margin-bottom: 20px; }

/* BOUTON RETOUR SANS FOND (GHOST) */
.back-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 20px; border-radius: 50px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 8px;
}
.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white; color: white; transform: translateX(-5px);
}

.question-indicator { width: 100%; font-size: 12px; font-weight: 800; letter-spacing: 2px; color: rgba(255, 255, 255, 0.5); margin-top: 10px; }
.quiz-progress-track { width: 100%; height: 4px; background: rgba(255,255,255,0.1); border-radius: 10px; overflow: hidden; }
.quiz-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #00f2fe, #d946ef); transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1); box-shadow: 0 0 15px rgba(217, 70, 239, 0.6); }

/* Textes */
#question-title {
    font-size: 42px; font-weight: 800; color: white; margin-bottom: 10px; letter-spacing: -0.5px;
    background: linear-gradient(180deg, #ffffff 0%, #e0e0e0 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
#question-desc { font-size: 18px; color: rgba(255, 255, 255, 0.7); margin-bottom: 50px; font-weight: 400; }

/* Animation Container */
.question-anim-container { transition: opacity 0.3s ease, transform 0.3s ease; }
.fade-out-left { opacity: 0; transform: translateX(-30px); }
.fade-in-right { animation: slideInRight 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }

/* Options Couleurs */
.color-options-container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.color-card {
    aspect-ratio: 1/1; border-radius: 28px; background: rgba(255, 255, 255, 0.03); 
    border: 1px solid rgba(255, 255, 255, 0.08); cursor: pointer; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center; transition: all 0.4s;
}
.color-card::after {
    content: ''; width: 45%; height: 45%; border-radius: 18px; background: var(--grad); 
    transition: all 0.4s ease; filter: brightness(1.1);
}
.color-card::before {
    content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, var(--glow-color), transparent 70%);
    opacity: 0; transition: opacity 0.4s ease;
}
.color-card.color-bleu { --grad: linear-gradient(135deg, #00C6FF, #0072FF); --glow-color: rgba(0, 198, 255, 0.3); }
.color-card.color-violetrose { --grad: linear-gradient(135deg, #be93c5, #7bc6cc); --glow-color: rgba(190, 147, 197, 0.3); }
.color-card.color-jaune { --grad: linear-gradient(135deg, #fce38a, #f38181); --glow-color: rgba(252, 227, 138, 0.3); }
.color-card.color-vert { --grad: linear-gradient(135deg, #11998e, #38ef7d); --glow-color: rgba(56, 239, 125, 0.3); }
.color-card.color-rouge { --grad: linear-gradient(135deg, #FF416C, #FF4B2B); --glow-color: rgba(255, 65, 108, 0.3); }
.color-card.color-orange { --grad: linear-gradient(135deg, #f12711, #f5af19); --glow-color: rgba(245, 175, 25, 0.3); }
.color-card.color-rose { --grad: linear-gradient(135deg, #FF0099, #493240); --glow-color: rgba(255, 0, 153, 0.3); }
.color-card.color-turquoise { --grad: linear-gradient(135deg, #00F260, #0575E6); --glow-color: rgba(5, 117, 230, 0.3); }

.color-card:hover { transform: translateY(-8px) scale(1.05); background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.4); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.color-card:hover::before { opacity: 1; }
.color-card:hover::after { transform: scale(1.2); box-shadow: 0 0 30px var(--glow-color); filter: brightness(1.3); }

/* Options Phrases */
.options-container { display: flex; flex-direction: column; gap: 15px; }
.option-card {
    display: flex; align-items: center; padding: 22px 30px; border-radius: 20px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden;
}
.option-card:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); transform: scale(1.02) translateX(5px); }
.option-number {
    width: 36px; height: 36px; border-radius: 12px; background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center; font-weight: 700; margin-right: 20px; transition: 0.3s;
}
.option-card:hover .option-number { background: white; color: #333; }

/* ============================================================
   4. LOADER VORTEX ANIMÉ
============================================================ */
.final-loader {
    position: fixed; inset: 0; z-index: 999; background: #0a001a; 
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.6s ease; overflow: hidden; 
}
.final-loader.active { opacity: 1; pointer-events: all; }

.final-loader::before, .final-loader::after {
    content: ''; position: absolute; top: -50%; left: -50%; right: -50%; bottom: -50%;
    z-index: -1; filter: blur(60px); opacity: 0.7;
}
.final-loader::before {
    background: conic-gradient(from 0deg, #8900C9, #00f2fe, #0E002D, #d946ef, #8900C9);
    animation: spin-vortex 12s linear infinite;
}
.final-loader::after {
    background: conic-gradient(from 180deg, rgba(0, 242, 254, 0.5), rgba(137, 0, 201, 0.8), rgba(0, 0, 50, 0.9), rgba(0, 242, 254, 0.5));
    animation: spin-vortex-reverse 7s linear infinite; mix-blend-mode: overlay;
}

@keyframes spin-vortex { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes spin-vortex-reverse { from { transform: rotate(360deg) scale(1.2); } to { transform: rotate(0deg) scale(1); } }

.loader-modal-extended { 
    text-align: center; width: 450px; position: relative; z-index: 10;
    background: rgba(20, 10, 40, 0.4); backdrop-filter: blur(20px);
    padding: 40px; border-radius: 30px; border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.loader-title { font-size: 32px; font-weight: 800; margin-bottom: 10px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.loader-subtitle { font-size: 18px; opacity: 0.9; margin-bottom: 40px; font-weight: 400; }
.loader-track { width: 100%; height: 8px; background: rgba(255,255,255,0.15); border-radius: 10px; margin-bottom: 20px; overflow: hidden; }
.loader-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #00f2fe, #d946ef); transition: width 0.1s linear; box-shadow: 0 0 20px rgba(0, 242, 254, 0.8); }
.progress-text { font-weight: 700; font-size: 18px; letter-spacing: 1px; }

/* RESPONSIVE – VERSION COMPACTE */
@media (max-width: 992px) {

    /* HERO */
    .hero-name-screen {
        padding: 40px 16px;
        text-align: center;
    }

    .hero-title-big {
        font-size: 2.2rem;
        line-height: 1.15;
        margin-bottom: 14px;
    }

    .hero-subtext {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .hero-input {
        padding: 14px 18px;
        font-size: 15px;
    }

    .cta-btn {
        padding: 14px 18px;
        font-size: 13px;
        letter-spacing: 1px;
    }

    /* QUIZ CARD */
    .question-card {
        padding: 24px 18px;      /* TRÈS IMPORTANT */
        border-radius: 24px;
        margin-bottom: 3vh;
    }

    .header-top-row {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    /* TEXTE QUESTION */
    #question-title {
        font-size: 24px;
        margin-bottom: 6px;
        text-align: center;
    }

    #question-desc {
        font-size: 14px;
        margin-bottom: 22px;
        text-align: center;
    }

    /* COULEURS */
    .color-options-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;               /* plus serré */
    }

    .color-card {
        border-radius: 18px;
    }
}

@media (max-width: 380px) {

    .hero-title-big {
        font-size: 2rem;
    }

    #question-title {
        font-size: 22px;
    }

    .question-card {
        padding: 20px 14px;
    }

    .color-options-container {
        gap: 8px;
    }
}

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

html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
}

.full-screen-section {
    min-height: 100svh; /* FIX mobile moderne */
    padding: 16px;
}

@media (max-width: 768px) {

    .color-options-container {
        grid-template-columns: repeat(3, 1fr); /* 3 par ligne */
        gap: 8px;
    }

    .color-card {
        min-height: 60px;
        aspect-ratio: 1 / 1;
        border-radius: 12px;
    }

    .color-card::after {
        width: 30%;
        height: 30%;
        border-radius: 8px;
    }
}

@media (max-width: 380px) {

    .color-options-container {
        grid-template-columns: repeat(4, 1fr); /* tout visible */
        gap: 6px;
    }

    .color-card {
        min-height: 52px;
        border-radius: 10px;
    }

    .color-card::after {
        width: 28%;
        height: 28%;
        border-radius: 6px;
    }
}
@media (max-width: 768px) {

    .option-card {
        padding: 16px;
        font-size: 14px;
    }

    .option-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
        margin-right: 12px;
    }
}
@media (max-width: 768px) {

    #question-title {
        font-size: 22px;
        line-height: 1.2;
        text-align: center;
    }

    #question-desc {
        font-size: 14px;
        margin-bottom: 20px;
        text-align: center;
    }
}
@media (max-width: 768px) {

    .hero-name-screen {
        min-height: auto;
        padding: 60px 16px 40px;
    }

    .hero-left {
        text-align: center;
    }

    .hero-image-card {
        max-width: 260px;
        margin: 0 auto;
        aspect-ratio: 3/4;
    }

    .hero-title-big {
        font-size: 2rem;
    }

    .hero-subtext {
        font-size: 14px;
    }

    .hero-input-group {
        flex-direction: column;
    }

    .cta-btn {
        width: 100%;
    }
}
