* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f8ef7;
    --secondary-color: #9b5de5;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #0b0f1a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --dark-text: #f1f5f9;
    --light-text: #94a3b8;
    --glow-blue: rgba(79, 142, 247, 0.3);
    --glow-violet: rgba(155, 93, 229, 0.3);
}

html {
    background: #0b0f1a;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background: #0b0f1a;
    min-height: 100vh;
}

/* Stars effect */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    /* Couche unique rasterisee par le GPU : aucun repaint pendant le scroll */
    transform: translateZ(0);
    background-image:
        radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 25% 40%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 40% 10%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 55% 70%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 25%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 85% 55%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 10%, rgba(255,255,255,0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 90%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 35% 60%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 80%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 5% 50%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 45% 30%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 95% 45%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 20% 95%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(ellipse at 20% 20%, rgba(79, 142, 247, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(155, 93, 229, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 0%, rgba(79, 142, 247, 0.05) 0%, transparent 40%),
        linear-gradient(160deg, #0b0f1a 0%, #13102a 50%, #0d1b2a 100%);
    pointer-events: none;
    z-index: -1;
}

/* Navigation */
.navbar {
    background: rgba(11, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 8px 32px rgba(0, 0, 0, 0.4);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(79, 142, 247, 0.15);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(90deg, #4f8ef7 0%, #9b5de5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(79, 142, 247, 0.5));
    cursor: pointer;
    transition: transform 0.3s, filter 0.3s;
    letter-spacing: -0.5px;
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 14px rgba(79, 142, 247, 0.8));
}

.nav-menu {
    display: flex;
    align-items: center;      /* tout est centre sur une meme ligne */
    list-style: none;
    gap: 2.1rem;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    display: flex;
    align-items: center;
}

/* Le bouton de soutien est un appel a l'action isole : il lui faut plus d'air
   que les autres, car une pastille pleine "pese" visuellement plus lourd
   qu'un simple lien texte a espacement egal. */
.nav-menu li:last-child {
    margin-left: 0.7rem;
    margin-right: 0.2rem;
}

/* Hauteur commune a TOUS les elements du menu : c'est ce qui garantit
   l'alignement entre les liens texte et les pastilles. */
.nav-menu a {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 0.2rem;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    position: relative;
    transition: color 0.25s;
}

.nav-menu a:hover { color: #fff; }

/* Soulignement anime : uniquement sur les liens texte, jamais sur les pastilles */
.nav-menu a:not(.report-button):not(.nav-support)::after {
    content: '';
    position: absolute;
    left: 0.15rem;
    right: 0.15rem;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-menu a:not(.report-button):not(.nav-support):hover::after,
.nav-menu a.active:not(.report-button):not(.nav-support)::after {
    transform: scaleX(1);
}

/* ---- Pastille "Signaler" ---- */
.report-button {
    gap: 0.4rem;
    padding: 0 0.95rem !important;
    border-radius: 18px;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.42);
    color: #ffb4b4 !important;
    font-size: 0.86rem !important;
    font-weight: 600;
    transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s !important;
}

.report-button:hover {
    background: rgba(239, 68, 68, 0.26) !important;
    border-color: rgba(239, 68, 68, 0.7);
    color: #fff !important;
    transform: translateY(-1px);
}

/* ---- Pastille "Soutenir" ---- */
/* Scope sur .nav-menu a : sinon la regle generique .nav-menu a (plus specifique)
   ecrase le padding de ce bouton. */
.nav-menu a.nav-support {
    gap: 0.5rem;
    padding: 0 1.2rem;          /* juste ce qu'il faut : ni etrique, ni enorme */
    border-radius: 18px;
    background: linear-gradient(135deg, #9b5de5, #ec4899);
    color: #fff !important;
    font-size: 0.86rem;
    font-weight: 700;
    box-shadow: 0 3px 14px rgba(236, 72, 153, 0.32);
    transition: box-shadow 0.25s, transform 0.25s, filter 0.25s;
}

.nav-menu a.nav-support:hover {
    color: #fff !important;
    filter: brightness(1.08);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
    transform: translateY(-1px);
}

/* ---- Responsive de la barre ---- */
@media (max-width: 900px) {
    .navbar-container { padding: 0 1.1rem; }
    .nav-menu { gap: 1.4rem; }
}

@media (max-width: 700px) {
    .nav-long { display: none; }            /* "Proposer un theme" -> "Proposer" */
    .navbar-container { padding: 0 0.9rem; }
    .nav-menu { gap: 0.85rem; }
    .nav-menu li:last-child { margin-left: 0.4rem; margin-right: 0; }
    .nav-menu a { height: 34px; font-size: 0.86rem; }
    .report-button { padding: 0 0.9rem !important; font-size: 0.78rem !important; }
    .nav-menu a.nav-support { padding: 0 1.4rem; font-size: 0.78rem; }
    .logo { font-size: 1.15rem; }
}

@media (max-width: 430px) {
    .nav-menu { gap: 0.6rem; }
    .nav-menu li:last-child { margin-left: 0.25rem; }
    .nav-menu a { height: 32px; font-size: 0.8rem; }
    .nav-menu a.report-button, .nav-menu a.nav-support { font-size: 0.73rem; padding: 0 0.9rem; }
    .logo { font-size: 1rem; }
}

/* Report Modal */
.report-modal-content {
    max-width: 520px;
}

.report-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}

.report-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-text);
}

.report-type-buttons {
    display: flex;
    gap: 0.6rem;
}

.report-type-btn {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    color: var(--dark-text);
}

.report-type-btn.active {
    border-color: var(--primary-color);
    background: rgba(79, 142, 247, 0.15);
    color: var(--primary-color);
    font-weight: 600;
}

.report-select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    background: rgba(255,255,255,0.07);
    color: var(--dark-text);
}

.report-select:focus {
    border-color: var(--primary-color);
}

.report-textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    background: rgba(255,255,255,0.07);
    color: var(--dark-text);
}

.report-textarea:focus {
    border-color: var(--primary-color);
}

.report-history {
    margin-top: 1.5rem;
}

.report-history h3 {
    font-size: 0.95rem;
    color: var(--light-text);
    margin-bottom: 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
}

.report-card {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    border: 1px solid rgba(255,255,255,0.08);
}

.report-tag {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

.report-tag-bug {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.report-tag-suggestion {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.report-quiz-tag {
    font-size: 0.78rem;
    color: var(--light-text);
    font-style: italic;
}

.report-card p {
    margin: 0;
    color: var(--dark-text);
}

.report-card small {
    color: var(--light-text);
    font-size: 0.75rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Bouton Mode Aléatoire */
.btn-random {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-top: 2rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, rgba(79,142,247,0.15), rgba(155,93,229,0.15));
    border: 2px solid transparent;
    border-radius: 50px;
    background-clip: padding-box;
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    position: relative;
    transition: transform 0.35s cubic-bezier(0.175,0.885,0.32,1.275), box-shadow 0.35s;
    cursor: pointer;
    overflow: hidden;
}

.btn-random::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    padding: 2px;
    background: linear-gradient(135deg, #4f8ef7, #9b5de5);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.btn-random::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79,142,247,0.2), rgba(155,93,229,0.2));
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 50px;
}

.btn-random:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 12px 35px rgba(79,142,247,0.35), 0 0 30px rgba(155,93,229,0.2);
}

.btn-random:hover::after {
    opacity: 1;
}

.btn-random-sub {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.7;
    letter-spacing: 0.01em;
}

/* ── QuizzlySpeed Button (homepage) ── */
.btn-speed {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, rgba(255,140,0,0.15), rgba(255,69,0,0.12));
    border: 2px solid transparent;
    border-radius: 50px;
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    position: relative;
    transition: transform 0.35s cubic-bezier(0.175,0.885,0.32,1.275), box-shadow 0.35s;
    cursor: pointer;
    overflow: hidden;
}
.btn-speed::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    padding: 2px;
    background: linear-gradient(135deg, #ff8c00, #ff4500, #ffd700);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.btn-speed::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,140,0,0.2), rgba(255,69,0,0.15));
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 50px;
}
.btn-speed:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 12px 35px rgba(255,140,0,0.4), 0 0 30px rgba(255,69,0,0.2);
}
.btn-speed:hover::after { opacity: 1; }
.btn-speed-sub {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.7;
    letter-spacing: 0.01em;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    margin-bottom: 3rem;
    box-shadow: 0 0 0 1px rgba(79, 142, 247, 0.15), 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.06);
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(79, 142, 247, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 100%, rgba(155, 93, 229, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #4f8ef7 0%, #9b5de5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInDown 0.8s ease-out;
    filter: drop-shadow(0 0 20px rgba(79, 142, 247, 0.3));
}

@keyframes slideInDown {
    from { transform: translateY(-30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.hero p {
    font-size: 1.3rem;
    color: var(--light-text);
    margin-bottom: 0.5rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero .subtitle {
    font-size: 1.1rem;
    background: linear-gradient(90deg, var(--warning-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.4s forwards;
}

/* Search Bar */
.search-wrapper {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    position: relative;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(79, 142, 247, 0.3);
    border-radius: 50px;
    padding: 0.6rem 1.2rem;
    gap: 0.75rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 0 0 rgba(79, 142, 247, 0);
}

.search-bar:focus-within {
    border-color: rgba(79, 142, 247, 0.7);
    background: rgba(79, 142, 247, 0.07);
    box-shadow: 0 0 20px rgba(79, 142, 247, 0.15);
}

.search-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    opacity: 0.7;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 1rem;
    font-family: inherit;
}

.search-input::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

.search-clear {
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.search-clear:hover {
    background: rgba(239,68,68,0.3);
    color: white;
}

.search-clear.hidden {
    display: none;
}

/* Search Results */
.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #13102a;
    border: 1px solid rgba(79, 142, 247, 0.25);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
    z-index: 50;
    animation: fadeInUp 0.2s ease;
}

.search-results.hidden {
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.3rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-decoration: none;
    color: inherit;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(79, 142, 247, 0.1);
}

.search-result-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 700;
    color: white;
    font-size: 1rem;
}

.search-result-title mark {
    background: transparent;
    color: var(--primary-color);
}

.search-result-desc {
    font-size: 0.85rem;
    color: var(--light-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-category {
    font-size: 0.75rem;
    color: rgba(79,142,247,0.8);
    background: rgba(79,142,247,0.1);
    border: 1px solid rgba(79,142,247,0.2);
    border-radius: 10px;
    padding: 0.15rem 0.6rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.search-no-result {
    padding: 1.5rem;
    text-align: center;
    color: var(--light-text);
    font-size: 0.95rem;
}

/* Theme Section */
.themes h2,
.info h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: white;
    text-align: center;
    text-shadow: 0 0 20px rgba(79, 142, 247, 0.4);
    animation: fadeInUp 0.8s ease-out;
}

.theme-grid {
    /* Flex plutot que grid : une ligne incomplete (page 2 avec 2 cartes, ou une
       categorie a 1 seul quiz) reste centree au lieu d'etirer les cartes sur
       toute la largeur ou de les coller a gauche. */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.theme-grid > * {
    flex: 0 1 340px;     /* pas de grow : la carte garde sa taille meme seule */
    max-width: 100%;     /* mais ne deborde jamais sur petit ecran */
}

.theme-card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    padding: 2.5rem;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175,0.885,0.32,1.275), box-shadow 0.4s, border-color 0.4s;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.07), 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255,255,255,0.07);
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.theme-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(79, 142, 247, 0.06) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.theme-card:hover::before {
    opacity: 1;
}

.theme-card:nth-child(1)  { animation-delay: 0.05s; }
.theme-card:nth-child(2)  { animation-delay: 0.10s; }
.theme-card:nth-child(3)  { animation-delay: 0.15s; }
.theme-card:nth-child(4)  { animation-delay: 0.20s; }
.theme-card:nth-child(5)  { animation-delay: 0.25s; }
.theme-card:nth-child(6)  { animation-delay: 0.30s; }
.theme-card:nth-child(7)  { animation-delay: 0.35s; }
.theme-card:nth-child(8)  { animation-delay: 0.40s; }
.theme-card:nth-child(9)  { animation-delay: 0.45s; }
.theme-card:nth-child(10) { animation-delay: 0.50s; }
.theme-card:nth-child(11) { animation-delay: 0.55s; }
.theme-card:nth-child(12) { animation-delay: 0.60s; }

/* Badges sous-thèmes */
.sub-count {
    display: inline-block;
    background: linear-gradient(135deg, rgba(79,142,247,0.3), rgba(155,93,229,0.3));
    border: 1px solid rgba(79,142,247,0.4);
    color: #a5c8ff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    margin: 0.5rem 0 1.2rem;
    letter-spacing: 0.03em;
}

/* Bouton retour */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(79, 142, 247, 0.4);
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 1.4rem;
    border-radius: 30px;
    cursor: pointer;
    margin-bottom: 2rem;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.back-btn:hover {
    background: rgba(79,142,247,0.15);
    border-color: rgba(79,142,247,0.7);
    transform: translateX(-4px);
    color: white;
}

/* Vue sous-thèmes */
.subthemes-view {
    animation: fadeInUp 0.4s ease both;
}

.subthemes-view.hidden,
#categories-view.hidden {
    display: none;
}

.theme-card:not(.disabled):hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 0 0 1px rgba(79,142,247,0.3), 0 25px 50px rgba(0,0,0,0.5), 0 0 30px rgba(79,142,247,0.1);
    border-color: rgba(79,142,247,0.3);
}

.theme-card.disabled {
    opacity: 0.4;
}

.theme-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
    will-change: transform;
    text-shadow: 0 0 8px rgba(79,142,247,0.3);
}

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

.theme-card:nth-child(5n+1) .theme-icon { animation-delay: 0s; }
.theme-card:nth-child(5n+2) .theme-icon { animation-delay: 0.2s; }
.theme-card:nth-child(5n+3) .theme-icon { animation-delay: 0.4s; }
.theme-card:nth-child(5n+4) .theme-icon { animation-delay: 0.6s; }
.theme-card:nth-child(5n+5) .theme-icon { animation-delay: 0.8s; }

.theme-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #4f8ef7, #9b5de5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s;
}

.theme-card:hover h3 {
    transform: scale(1.08);
}

.theme-card p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    min-height: 60px;
    font-size: 1.05rem;
}

/* Buttons */
.btn {
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175,0.885,0.32,1.275), box-shadow 0.4s, background 0.4s;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(79, 142, 247, 0.35), 0 0 0 1px rgba(79,142,247,0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 142, 247, 0.5), 0 0 20px rgba(155,93,229,0.3);
}

.btn-secondary {
    background: rgba(255,255,255,0.07);
    color: var(--dark-text);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* Info Section */
.info {
    background: rgba(255, 255, 255, 0.03);
    padding: 3rem;
    border-radius: 20px;
    margin-top: 3rem;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.07), 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.5s both;
    border: 1px solid rgba(255,255,255,0.07);
}

.info-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.info-content p {
    font-size: 1.1rem;
    color: var(--light-text);
    line-height: 1.8;
}

.info-content ul {
    list-style: none;
}

.info-content li {
    padding: 0.8rem 0;
    font-size: 1.05rem;
    color: var(--dark-text);
    animation: slideInRight 0.6s ease-out;
    animation-fill-mode: both;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

@keyframes slideInRight {
    from { transform: translateX(-30px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

.info-content li:nth-child(1) { animation-delay: 0.1s; }
.info-content li:nth-child(2) { animation-delay: 0.2s; }
.info-content li:nth-child(3) { animation-delay: 0.3s; }
.info-content li:nth-child(4) { animation-delay: 0.4s; }

/* Suggestion Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.modal.hidden {
    display: none;
}

.modal-content {
    position: relative;
    width: min(720px, 100%);
    background: #13102a;
    border: 1px solid rgba(79,142,247,0.2);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    z-index: 100000;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--light-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.suggestion-modal-content h2 {
    margin-bottom: 0.75rem;
    font-size: 2rem;
    background: linear-gradient(135deg, #4f8ef7, #9b5de5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.suggestion-modal-content p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
}

.modal-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-form input {
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    width: 100%;
    background: rgba(255,255,255,0.05);
    color: var(--dark-text);
    outline: none;
    transition: border-color 0.2s;
}

.modal-form input:focus {
    border-color: var(--primary-color);
}

.suggestion-list h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--dark-text);
}

.suggestion-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.9rem;
}

.suggestion-details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--dark-text);
}

.suggestion-details strong {
    font-size: 1rem;
}

.suggestion-details span {
    color: var(--light-text);
    font-size: 0.95rem;
}

.suggestion-vote-button {
    min-width: 120px;
}

.suggestion-note {
    margin-top: 0.75rem;
    color: var(--light-text);
    font-size: 0.95rem;
}

/* Quiz Page */
.quiz-container {
    max-width: 800px;
    margin: 2rem auto;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    z-index: 1;
}

/* Difficulty Selection */
.difficulty-selection {
    animation: fadeInUp 0.8s ease-out;
}

.difficulty-header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
    animation: fadeInUp 0.8s ease-out;
}

.difficulty-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #4f8ef7, #9b5de5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.difficulty-header p {
    font-size: 1.2rem;
    opacity: 0.7;
    color: var(--light-text);
}

.difficulty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 700px) {
    .difficulty-grid {
        grid-template-columns: 1fr;
    }
}

.difficulty-card {
    background: rgba(255,255,255,0.04);
    border-radius: 18px;
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175,0.885,0.32,1.275), box-shadow 0.4s, border-color 0.4s;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.07), 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.07);
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.difficulty-card:nth-child(1) { animation-delay: 0.1s; }
.difficulty-card:nth-child(2) { animation-delay: 0.2s; }
.difficulty-card:nth-child(3) { animation-delay: 0.3s; }

.difficulty-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 0 0 1px rgba(79,142,247,0.3), 0 25px 50px rgba(0,0,0,0.5), 0 0 30px rgba(79,142,247,0.1);
    border-color: rgba(79,142,247,0.3);
}

.difficulty-card.active {
    border-color: rgba(79,142,247,0.5);
    box-shadow: 0 0 0 1px rgba(79,142,247,0.4), 0 15px 40px rgba(79,142,247,0.2), 0 0 30px rgba(79,142,247,0.15);
    transform: scale(1.03);
}

.difficulty-level {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

.difficulty-card:nth-child(1) .difficulty-level { animation-delay: 0s; }
.difficulty-card:nth-child(2) .difficulty-level { animation-delay: 0.2s; }
.difficulty-card:nth-child(3) .difficulty-level { animation-delay: 0.4s; }

.difficulty-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #4f8ef7, #9b5de5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s;
}

.difficulty-card:hover h3 {
    transform: scale(1.1);
}

.difficulty-card p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.difficulty-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(79,142,247,0.3), rgba(155,93,229,0.3));
    border: 1px solid rgba(79,142,247,0.4);
    color: #a5c8ff;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.3s;
}

.difficulty-card:hover .difficulty-badge {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
}

.quiz-header {
    background: linear-gradient(135deg, rgba(79,142,247,0.2), rgba(155,93,229,0.2));
    border: 1px solid rgba(79,142,247,0.25);
    color: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 40px rgba(79,142,247,0.1);
    animation: slideInDown 0.8s ease-out;
}

.quiz-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-header p {
    font-size: 1.1rem;
    opacity: 0.7;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 10px rgba(79,142,247,0.6);
}

/* Question Card */
.question-card,
.question-container {
    background: rgba(255,255,255,0.04);
    border-radius: 18px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.07), 0 10px 30px rgba(0,0,0,0.2);
    animation: fadeInUp 0.6s ease-out;
    border: 1px solid rgba(255,255,255,0.07);
}

.question-number {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.question-text {
    font-size: 1.55rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: white;
    animation: fadeInUp 0.6s ease-out 0.2s both;
    line-height: 1.5;
}

/* Vrai / Faux */
.vf-options {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease-out 0.3s both;
}

.vf-btn {
    flex: 1;
    padding: 1.6rem 1rem;
    font-size: 1.3rem;
    font-weight: 800;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    color: white;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, transform 0.25s;
    letter-spacing: 0.05em;
}

.vf-btn:hover:not(.disabled) {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.35);
    transform: translateY(-2px);
}

.vf-btn.correct {
    background: rgba(16,185,129,0.25);
    border-color: rgba(16,185,129,0.7);
    color: #6ee7b7;
}

.vf-btn.incorrect {
    background: rgba(239,68,68,0.2);
    border-color: rgba(239,68,68,0.6);
    color: #fca5a5;
}

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

/* Question image */
.question-image {
    margin-bottom: 1.8rem;
    border-radius: 12px;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.question-image img {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Options */
.options {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.option {
    padding: 1.3rem 1.4rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, transform 0.3s;
    font-size: 1.05rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    animation: slideInRight 0.6s ease-out;
    animation-fill-mode: both;
    color: var(--dark-text);
}

.option:nth-child(1) { animation-delay: 0.1s; }
.option:nth-child(2) { animation-delay: 0.2s; }
.option:nth-child(3) { animation-delay: 0.3s; }
.option:nth-child(4) { animation-delay: 0.4s; }

.option:hover:not(.disabled) {
    border-color: rgba(79,142,247,0.5);
    background: rgba(79,142,247,0.08);
    transform: translateX(8px);
    box-shadow: 0 0 15px rgba(79,142,247,0.1);
}

.option input[type="radio"] {
    display: none;
}

.option.correct {
    background: rgba(16, 185, 129, 0.12);
    border-color: var(--success-color);
    box-shadow: 0 0 15px rgba(16,185,129,0.15);
    animation: pulse 0.6s ease-out;
}

@keyframes pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.option.incorrect {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger-color);
    animation: shake 0.4s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-5px); }
    75%       { transform: translateX(5px); }
}

.option.disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Source */
.source {
    margin-top: 0.75rem;
    display: none;
}

.source.show {
    display: block;
}

.source-title {
    display: none;
}

.source-text {
    color: #64748b;
    font-size: 0.78rem;
    font-style: italic;
    font-weight: 400;
}

/* Explanation */
.explanation {
    margin-top: 2rem;
    padding: 1.8rem;
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 12px;
    display: none;
    animation: slideInUp 0.5s ease-out;
    box-shadow: 0 0 20px rgba(16,185,129,0.05);
}

.explanation.show {
    display: block;
}

.explanation-title {
    font-weight: 800;
    color: var(--success-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.explanation-text {
    color: rgba(255,255,255,0.85);
    font-size: 1.02rem;
    line-height: 1.8;
    font-weight: 500;
}

/* Navigation Buttons */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 2rem;
}

.quiz-navigation button {
    flex: 1;
    padding: 1.1rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Results */
.results-container {
    background: rgba(255,255,255,0.04);
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    display: none;
    box-shadow: 0 0 0 1px rgba(79,142,247,0.15), 0 20px 60px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.07);
    animation: zoomIn 0.6s ease-out;
}

@keyframes zoomIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.results-container.show {
    display: block;
}

.results-header h2 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #4f8ef7, #9b5de5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.results-header p {
    color: var(--light-text);
    margin-bottom: 2rem;
}

.results-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    animation: zoomIn 0.8s ease-out 0.2s both;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(79,142,247,0.2), rgba(155,93,229,0.2));
    border: 2px solid rgba(79,142,247,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(79,142,247,0.2);
}

#score-percentage {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #4f8ef7, #9b5de5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-details p {
    font-size: 1.2rem;
    color: var(--light-text);
}

.score-details strong {
    color: white;
    font-size: 1.4rem;
}

.results-message {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    color: var(--dark-text);
    font-weight: 600;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.results-details {
    background: rgba(255,255,255,0.03);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: left;
    max-height: 500px;
    overflow-y: auto;
    animation: fadeInUp 0.8s ease-out 0.6s both;
    border: 1px solid rgba(255,255,255,0.06);
}

.results-details h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.results-details p {
    margin: 0.5rem 0;
    color: var(--dark-text);
}

/* Review section (résumé des réponses) */
.review-section {
    text-align: left;
    margin: 2rem 0;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.review-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1rem;
}

.review-item.correct-item {
    border-color: rgba(16,185,129,0.3);
    background: rgba(16,185,129,0.05);
}

.review-item.incorrect-item {
    border-color: rgba(239,68,68,0.3);
    background: rgba(239,68,68,0.05);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255,255,255,0.5);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    animation: slideUp 0.8s ease-out;
    position: relative;
    z-index: 1;
}

footer p {
    background: linear-gradient(90deg, #4f8ef7, #9b5de5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
    font-size: 0.9rem;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.03);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary-color), var(--primary-color));
}

/* Button container */
.button-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1.5rem;
        font-size: 0.9rem;
    }

    .theme-grid {
        grid-template-columns: 1fr;
    }

    .info-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .themes h2,
    .info h2 {
        font-size: 1.8rem;
    }

    .quiz-navigation {
        flex-direction: column;
    }

    .results-score {
        flex-direction: column;
    }

    .quiz-header {
        padding: 2rem 1.5rem;
    }

    .quiz-header h1 {
        font-size: 1.8rem;
    }
}




/* ---- Pagination de la vue catégories ---- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0 0 3rem;
}

.page-btn {
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, transform 0.25s, color 0.25s;
}

.page-btn:hover:not(:disabled) {
    background: rgba(79, 142, 247, 0.16);
    border-color: rgba(79, 142, 247, 0.5);
    color: #fff;
    transform: translateY(-2px);
}

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

.page-dots {
    display: flex;
    gap: 0.45rem;
}

.page-dot {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s;
}

.page-dot:hover {
    background: rgba(79, 142, 247, 0.16);
    border-color: rgba(79, 142, 247, 0.5);
    color: #fff;
}

.page-dot.active {
    background: linear-gradient(135deg, #4f8ef7, #9b5de5);
    border-color: transparent;
    color: #fff;
    transform: scale(1.06);
}

@media (max-width: 520px) {
    .pagination { gap: 0.6rem; }
    .page-btn { padding: 0.6rem 1rem; font-size: 0.85rem; }
    .page-dot { width: 34px; height: 34px; font-size: 0.82rem; }
}






/* ---- Fenetre de soutien ---- */
.support-modal-content {
    max-width: 460px;
    text-align: center;
}

.support-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, #9b5de5, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.support-modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.support-intro {
    color: #94a3b8;
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 1.4rem;
}

.support-intro strong { color: #e2e8f0; }

.support-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.6rem;
    text-align: left;
    display: inline-block;
}

.support-list li {
    color: #cbd5e1;
    font-size: 0.92rem;
    padding: 0.45rem 0;
}

.btn-support-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.95rem 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #9b5de5, #ec4899);
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.32);
    transition: transform 0.25s cubic-bezier(0.175,0.885,0.32,1.275), box-shadow 0.25s, filter 0.25s;
}

.btn-support-cta:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 10px 28px rgba(236, 72, 153, 0.5);
}

.support-note {
    color: #64748b;
    font-size: 0.78rem;
    margin: 0.9rem 0 0;
}

.support-later {
    margin-top: 1.1rem;
    background: none;
    border: none;
    color: #64748b;
    font-family: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.25s;
}

.support-later:hover { color: #cbd5e1; }

@media (max-width: 520px) {
    .support-modal-content { max-width: 92vw; }
    .support-modal-content h2 { font-size: 1.25rem; }
    .support-intro { font-size: 0.88rem; }
}


/* Ripple des boutons (etait injecte en JS au runtime) */
@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    pointer-events: none;
    animation: ripple 0.6s ease-out;
}


/* ===========================================================
   Accessibilite : respecte le reglage systeme "reduire les animations".
   Coupe aussi les boucles infinies -> economie CPU/batterie.
   =========================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
