/* =========================================
   VARIABLES DU QUIZ
   ========================================= */
   :root {
    --quiz-bg-light: #59168B; /* Violet clair (fond arrière) */
    --quiz-bg-dark: #3F156B;  /* Violet sombre (carte quiz) */
    --quiz-correct: #61D084;  /* Vert validation */
    --quiz-incorrect: #F56B6B; /* Rouge erreur */
}

body {
    background-color: var(--purple-light); /* Reste blanc en bas */
}

/* =========================================
   HEADER & WRAPPER HAUT DE PAGE SURCHARGE NAVBAR
   ========================================= */
.quiz-top-wrapper {
    background-color: var(--quiz-bg-light);
    border-radius: 0 0 60px 60px;
}

.btn-outline {
    border: 2px solid var(--quiz-bg-dark);
    color: var(--quiz-bg-dark);
    background: transparent;
}
.btn-outline:hover {
    background-color: var(--quiz-bg-dark);
    color: white;
}
.btn-filled {
    background-color: var(--quiz-bg-dark);
    color: white;
    border: 2px solid transparent;
}
.btn-filled:hover {
    background-color: var(--purple-text); 
}

.main-header {
    background-color: var(--bg-color, #ffffff);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}
.nav-link-main:hover,
.nav-item-dropdown:hover .nav-link-main {
    background-color: var(--purple-light, #F8F2FB);
    color: var(--purple-text, #8A4BAF);
}

.search-wrapper:hover .search-input,
.search-input:focus {
    width: 200px;
    opacity: 1;
    padding: 8px 18px; 
    margin-right: 10px;
    background-color: var(--purple-light); 
}

/* =========================================
   HERO SECTION (Bloc violet)
   ========================================= */

/* Titre "Les Quiz" avec effet Néon */
.neon-title {
    font-family: "Neonderthaw", cursive;
    font-weight: 400;
    font-size: 100px;
    font-style: normal;
    color: #ffffff; 
    
    text-shadow: 
        0 0 4px #ffffff,       
        0 0 10px #ffffff,     
        0 0 20px var(--purple-light), 
        0 0 40px var(--purple-mid),  
        0 0 70px var(--purple-text), 
        0 0 100px var(--purple-text); 
}

/* Forme personnalisée pour l'image de la TV */
.hero-tv-img {
    width: 100%;
    max-width: 450px;
    height: 300px;
    object-fit: cover;
    /* Arrondi asymétrique (Haut-Gauche, Haut-Droite, Bas-Droite, Bas-Gauche) */
    border-radius: 120px 20px 120px 120px;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.quiz-hero {
    position: relative;
}

.quiz-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #f5d9ac;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.quiz-hero-kicker i {
    color: #fff;
    font-size: 13px;
}

.quiz-hero-copy {
    max-width: 430px;
    margin: 0 auto 22px 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.55;
}

.quiz-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quiz-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 700;
}

.quiz-hero-meta i {
    color: #f5d9ac;
}

.quiz-hero-visual {
    position: relative;
    width: min(100%, 500px);
    min-height: 320px;
    margin-left: auto;
}

.quiz-hero > [class*="col-lg-6"]:last-child {
    display: flex;
    align-items: center;
}

.quiz-hero-visual .hero-tv-img {
    display: block;
    width: 88%;
    max-width: none;
    height: 320px;
    margin-left: auto;
    border-radius: 26px 100px 26px 100px;
    border: 8px solid rgba(255, 255, 255, 0.14);
    box-shadow: 14px 18px 0 rgba(38, 7, 68, 0.22);
}

.quiz-hero-sticker,
.quiz-hero-number {
    position: absolute;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 25px rgba(30, 5, 54, 0.2);
}

.quiz-hero-sticker {
    right: 0;
    bottom: 22px;
    min-width: 135px;
    padding: 13px 16px;
    background: #f5d9ac;
    border-radius: 18px 18px 5px 18px;
    color: #3f156b;
    transform: rotate(3deg);
}

.quiz-hero-sticker strong {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
}

.quiz-hero-sticker span,
.quiz-hero-number span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.quiz-hero-number {
    left: 0;
    top: 22px;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: rgba(63, 21, 107, 0.72);
    color: #fff;
    transform: rotate(-8deg);
}

.quiz-hero-number strong {
    font-family: 'Playfair Display', serif;
    font-size: 25px;
    line-height: 1;
}

.highlight-brown::after {
    background-color: #E2CFBE !important;
}

/* =========================================
   TITRES DE SECTIONS
   ========================================= */

/* Forme de fond blanche pour la section Intermédiaire */
.rounded-section {
    border-radius: 60px;
}

/* =========================================
   SURCHARGES DES CARTES CATÉGORIES (QUIZ)
   ========================================= */

/* On utilise une classe supplémentaire .quiz-card pour ne modifier 
   que les category-card présentes sur la page des quiz */
.category-card.quiz-card:hover {
    border-color: var(--quiz-bg-light); /* Reprend le violet spécifique du quiz */
    box-shadow: 0 15px 30px rgba(89, 22, 139, 0.15); 
}

.category-card.quiz-card:hover .btn-category {
    background-color: var(--quiz-bg-light);
    color: white;
}

/* Style pour l'indicateur de difficulté (Facile, Moyen, Difficile) */
.quiz-level-indicator {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    position: relative;
    z-index: 2; /* Maintient le texte cliquable/lisible au-dessus de l'effet du bouton */
}

/* Cartes uniformes : la largeur fixe conserve les mêmes proportions sur tous les écrans. */
.row.quiz-card-row {
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.row.quiz-card-row > [class*="col-"] {
    flex: 0 0 auto;     /* Laisse la carte respirer selon la taille de l'écran */
    width: 100%;        /* Permet à la carte de s'adapter aux colonnes Bootstrap */
    max-width: 380px;   /* Élargit la carte pour qu'elle soit parfaitement disposée sur ordinateur */
}

.category-card.quiz-card {
    height: 100% !important;
    min-height: 270px;
    padding: 8px;
    overflow: hidden;
}

.category-card.quiz-card > .ratio {
    flex: 0 0 160px;
    height: 160px;
    aspect-ratio: auto;
    overflow: hidden;
}

.category-card.quiz-card > .ratio > img {
    width: 100%;
    height: 160px !important;
    margin: 0;
    border-radius: 20px;
    object-fit: cover;
}

.category-card.quiz-card h4 {
    display: -webkit-box;
    line-height: 1.3;
    margin: 8px 0 14px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    -webkit-line-clamp: 2;
}

.category-card.quiz-card > div:not(.ratio) {
    min-height: 0;
    padding: 0 8px 12px !important;
}

.category-card.quiz-card > div:not(.ratio) .mt-auto {
    margin-top: 0 !important;
}

/* Organisation compacte sur tablette et mobile, sans modifier la version ordinateur. */
@media (max-width: 991.98px) {
    .quiz-hero-copy {
        margin-left: auto;
        margin-right: auto;
    }

    .quiz-hero-visual {
        margin: 0 auto;
    }

    .quiz-top-wrapper {
        padding-bottom: 1.5rem !important;
    }

    .quiz-hero {
        padding-bottom: 1.5rem !important;
    }

    .quiz-hub-page > .container.custom-container {
        margin-top: 0.75rem !important;
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .quiz-hub-page .section-title {
        margin-bottom: 0.75rem !important;
        padding-left: 0.35rem;
    }

    .quiz-hub-page .quiz-card-row {
        --bs-gutter-x: 0.85rem;
        --bs-gutter-y: 0.85rem;
        padding-bottom: 0.75rem !important;
    }

    .quiz-hub-page .rounded-section {
        padding-top: 1.75rem !important;
        padding-bottom: 1.75rem !important;
        margin-bottom: 1.75rem !important;
    }

    .quiz-hub-page .category-card.quiz-card h4,
    .quiz-hub-page .category-card.quiz-card h4.my-auto {
        margin: 8px 0 10px !important;
    }
}

@media (max-width: 575.98px) {
    .quiz-hero {
        padding-bottom: 1rem !important;
    }

    .quiz-hero-kicker {
        margin-bottom: 12px;
        font-size: 9px;
        letter-spacing: 1px;
    }

    .neon-title {
        font-size: clamp(68px, 22vw, 92px);
        line-height: 0.95;
    }

    .quiz-hero-copy {
        max-width: 300px;
        margin-bottom: 16px;
        font-size: 15px;
        text-align: center;
    }

    .quiz-hero-meta {
        gap: 6px;
    }

    .quiz-hero-meta span {
        padding: 7px 9px;
        font-size: 10px;
    }

    .quiz-hero-visual {
        min-height: 225px;
        margin-top: 6px;
    }

    .quiz-hero-visual .hero-tv-img {
        width: 88%;
        height: 225px;
        border-width: 5px;
        border-radius: 20px 65px 20px 65px;
        box-shadow: 8px 10px 0 rgba(38, 7, 68, 0.22);
    }

    .quiz-hero-sticker {
        right: -2px;
        bottom: 12px;
        min-width: 112px;
        padding: 10px 12px;
    }

    .quiz-hero-sticker strong {
        font-size: 14px;
    }

    .quiz-hero-number {
        top: 10px;
        left: 2px;
        width: 58px;
        height: 58px;
    }

    .quiz-hero-number strong {
        font-size: 20px;
    }

    .quiz-hub-page > .container.custom-container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .quiz-hub-page .quiz-top-wrapper {
        border-radius: 0 0 35px 35px;
    }

    .quiz-hub-page .category-card.quiz-card {
        min-height: 250px;
    }

    .quiz-hub-page .rounded-section {
        border-radius: 35px;
        padding-top: 1.35rem !important;
        padding-bottom: 1.35rem !important;
        margin-bottom: 1.35rem !important;
    }
}
