@font-face {
    font-family: 'Bubble Sans';
    src: url('../fonts/Bubble Sans.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Game Bubble';
    src: url('../fonts/Game Bubble.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --mud-palette-primary: #facc15;
    --mud-palette-secondary: #38bdf8;
    --mud-palette-background: #1e3a8a;
    --mud-palette-surface: #1e40af;
    --mud-default-borderradius: 20px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    font-family: 'Bubble Sans', 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1e3a8a;
    color: #ffffff;
    letter-spacing: 0.02em;
}

/* ── Typographie ludique Quizz ── */
.quiz-title {
    font-family: 'Game Bubble', 'Bubble Sans', cursive, sans-serif !important;
    color: #facc15 !important;
    text-shadow: 0 4px 0 #ca8a04, 0 6px 12px rgba(0,0,0,0.4);
    letter-spacing: 0.05em;
}

.quiz-heading {
    font-family: 'Bubble Sans', sans-serif !important;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ── Cartes et panneaux bombés / ronds style Quizz ── */
.mud-paper {
    border-radius: 20px !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), 0 3px 0 rgba(255, 255, 255, 0.15) inset !important;
}

.quiz-card {
    background: #1e40af !important;
    border: 3px solid #60a5fa !important;
    border-radius: 22px !important;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.35), 0 3px 0 rgba(255, 255, 255, 0.2) inset !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.quiz-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.45), 0 3px 0 rgba(255, 255, 255, 0.25) inset !important;
}

/* ── Boutons cartoon / bubble avec relief 3D ── */
.mud-button-filled {
    border-radius: 9999px !important;
    font-family: 'Bubble Sans', sans-serif !important;
    font-weight: 700 !important;
    text-transform: none !important;
    font-size: 1rem !important;
    padding: 8px 22px !important;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25) !important;
    transition: transform 0.1s ease, box-shadow 0.1s ease !important;
}

.mud-button-filled:active {
    transform: translateY(2px) !important;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25) !important;
}

.mud-button-filled.mud-button-filled-primary {
    background: #facc15 !important;
    color: #422006 !important;
    border: 2px solid #fef08a !important;
    box-shadow: 0 4px 0 #ca8a04 !important;
}

.mud-button-filled.mud-button-filled-secondary {
    background: #38bdf8 !important;
    color: #0c4a6e !important;
    border: 2px solid #bae6fd !important;
    box-shadow: 0 4px 0 #0284c7 !important;
}

.mud-button-outlined {
    border-radius: 9999px !important;
    font-family: 'Bubble Sans', sans-serif !important;
    font-weight: 700 !important;
    text-transform: none !important;
    border-width: 2px !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* ── Chips / Badges style capsule ── */
.mud-chip {
    border-radius: 9999px !important;
    font-family: 'Bubble Sans', sans-serif !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}

/* ── Tableaux avec lignes arrondies ── */
.mud-table {
    border-radius: 20px !important;
    overflow: hidden;
    background: #1e3a8a !important;
    border: 3px solid #60a5fa !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
}

.mud-table-head {
    background: #172554 !important;
}

.mud-table-head .mud-table-cell {
    color: #93c5fd !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid #3b82f6 !important;
}

.mud-table-cell {
    white-space: nowrap;
    border-bottom: 1px solid rgba(96, 165, 250, 0.2) !important;
    color: #f1f5f9;
}

.mud-table-row:hover {
    background-color: rgba(96, 165, 250, 0.15) !important;
}

/* ── Dialogs arrondis ── */
.mud-dialog {
    border-radius: 24px !important;
    background: #1e40af !important;
    border: 4px solid #60a5fa !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5) !important;
}

.mud-dialog-title {
    background: #172554 !important;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-bottom: 2px solid #3b82f6;
    color: #facc15 !important;
    font-family: 'Bubble Sans', sans-serif !important;
    font-weight: 700;
}

/* ── Inputs arrondis ── */
.mud-input-outlined {
    border-radius: 14px !important;
}

.mud-input-outlined fieldset {
    border-color: #60a5fa !important;
    border-width: 2px !important;
    border-radius: 14px !important;
}

.mud-input-outlined:hover fieldset {
    border-color: #facc15 !important;
}

.color-badge {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    vertical-align: middle;
    margin-right: 6px;
}

#blazor-error-ui {
    background: #7f1d1d;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    color: #fecaca;
    display: none;
    left: 0;
    padding: 0.75rem 3rem 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 99999;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
