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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    color: #37352f;
    line-height: 1.6;
}

/* Navigation - Style Notion */
.navbar {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    color: #37352f;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(55, 53, 47, 0.09);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    width: 24px;
    height: 24px;
    color: #37352f;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-title {
    font-size: 20px;
    font-weight: 600;
    color: #37352f;
    letter-spacing: -0.3px;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-btn {
    background-color: transparent;
    color: #37352f;
    border: none;
    padding: 6px 14px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.15s ease;
    border-radius: 4px;
    color: rgba(55, 53, 47, 0.65);
}

.nav-btn:hover {
    background-color: rgba(55, 53, 47, 0.06);
    color: #37352f;
}

.nav-btn.active {
    background-color: rgba(55, 53, 47, 0.08);
    color: #37352f;
    font-weight: 500;
}

/* Navigation auth info avec tooltip personnalisé */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-auth-info {
    position: relative;
    cursor: help;
    font-size: 13px;
    color: rgba(55, 53, 47, 0.65);
}

.nav-auth-info[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #37352f;
    color: #ffffff;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    pointer-events: none;
    opacity: 1;
    animation: tooltipFadeIn 0.1s ease;
}

.nav-auth-info[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 2px;
    border: 5px solid transparent;
    border-bottom-color: #37352f;
    z-index: 1001;
    pointer-events: none;
    animation: tooltipFadeIn 0.1s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Pages */
.page {
    display: block;
    min-height: calc(100vh - 60px);
    padding: 40px 24px;
    background-color: #ffffff;
}

.page.hidden {
    display: none !important;
}

/* Page Jouer */
#pageJouer {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #ffffff;
    padding: 40px 24px;
}

#pageJouer.hidden {
    display: none !important;
}

.game-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    justify-content: center;
}

.container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 75%;
    width: 75%;
    max-width: 75%;
    margin-top: -20px;
}

/* Panneau de sélection des QCMs */
.qcm-selection-panel {
    background-color: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.16);
    border-radius: 8px;
    padding: 24px;
    flex: 0 0 25%;
    width: 25%;
    max-width: 25%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-left: -40px;
}

.qcm-selection-panel h3 {
    font-size: 18px;
    color: #37352f;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.panel-description {
    font-size: 13px;
    color: rgba(55, 53, 47, 0.65);
    margin-bottom: 20px;
    line-height: 1.5;
}

.qcm-selection-list {
    max-height: 500px;
    overflow-y: auto;
}

.empty-qcm-selection {
    color: rgba(55, 53, 47, 0.5);
    font-size: 14px;
    text-align: center;
    padding: 20px;
    line-height: 1.6;
}

.link-to-qcms-btn {
    background: none;
    border: none;
    color: #2eaadc;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin: 0 2px;
    text-decoration: underline;
    text-decoration-color: rgba(46, 170, 220, 0.3);
    text-underline-offset: 2px;
    transition: all 0.15s ease;
    font-family: inherit;
}

.link-to-qcms-btn:hover {
    color: #1e8fc4;
    text-decoration-color: rgba(30, 143, 196, 0.5);
}

.link-to-qcms-btn:active {
    color: #1a7ba8;
}

/* Styles pour l'onboarding */
.qcm-onboarding-message {
    font-size: 14px;
    color: rgba(55, 53, 47, 0.65);
    margin-bottom: 16px;
    padding: 12px 16px;
    background-color: rgba(46, 170, 220, 0.08);
    border-left: 3px solid #2eaadc;
    border-radius: 4px;
    font-style: italic;
}

.qcm-onboarding-actions {
    margin-top: 32px;
    padding: 24px;
    background-color: rgba(46, 170, 220, 0.06);
    border: 2px solid rgba(46, 170, 220, 0.2);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.onboarding-question {
    font-size: 18px;
    font-weight: 600;
    color: #37352f;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: -0.2px;
}

.onboarding-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.onboarding-btn {
    background-color: #2eaadc;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 2px 4px rgba(46, 170, 220, 0.2);
    min-width: 180px;
}

.onboarding-btn:hover {
    background-color: #1e8fc4;
    box-shadow: 0 4px 8px rgba(46, 170, 220, 0.3);
    transform: translateY(-1px);
}

.onboarding-btn:active {
    background-color: #1a7ba8;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(46, 170, 220, 0.2);
}

.qcm-selection-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    border: 1px solid rgba(55, 53, 47, 0.09);
    transition: all 0.15s ease;
    cursor: pointer;
}

.qcm-selection-item:hover {
    background-color: rgba(55, 53, 47, 0.03);
    border-color: rgba(55, 53, 47, 0.16);
}

.qcm-selection-item input[type="checkbox"] {
    margin-top: 2px;
    cursor: pointer;
    accent-color: #37352f;
}

.qcm-selection-item-label {
    flex: 1;
    font-size: 14px;
    color: #37352f;
    line-height: 1.5;
    cursor: pointer;
}

.qcm-selection-item.selected {
    background-color: rgba(55, 53, 47, 0.06);
    border-color: rgba(55, 53, 47, 0.2);
}

#gameCanvas {
    border: 1px solid rgba(55, 53, 47, 0.16);
    background-color: #00BFFF;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.start-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    pointer-events: none;
}

.start-screen h1 {
    font-size: 42px;
    color: #37352f;
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.start-screen p {
    font-size: 16px;
    color: rgba(55, 53, 47, 0.65);
    font-weight: 400;
}

.countdown-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
}

.countdown-screen.hidden {
    display: none;
}

.countdown-content {
    text-align: center;
}

.countdown-content h2 {
    font-size: 32px;
    color: #37352f;
    margin-bottom: 24px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.countdown-number {
    font-size: 72px;
    color: #37352f;
    font-weight: 700;
    margin: 20px 0;
    line-height: 1;
    letter-spacing: -2px;
    animation: pulse 1s ease-in-out infinite;
}

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

@keyframes pulse-gentle {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.pulse-animation {
    animation: pulse-gentle 2s ease-in-out infinite;
}

.countdown-content p {
    font-size: 18px;
    color: rgba(55, 53, 47, 0.65);
    font-weight: 400;
    margin-top: 16px;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    background-color: #ffffff;
    padding: 48px;
    border: 1px solid rgba(55, 53, 47, 0.16);
    min-width: 320px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.game-over h2 {
    font-size: 32px;
    color: #37352f;
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.game-over p {
    font-size: 20px;
    color: rgba(55, 53, 47, 0.8);
    margin-bottom: 32px;
    font-weight: 400;
}

.game-over-hint {
    font-size: 14px !important;
    color: rgba(55, 53, 47, 0.6) !important;
    margin-top: 16px !important;
    margin-bottom: 0 !important;
    font-style: italic;
}

#restartBtn {
    background-color: #37352f;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.15s ease;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#restartBtn:hover {
    background-color: #2e2c26;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

/* Page Mes QCMs - Style Notion */
#pageQCMs.hidden {
    display: none !important;
}

.qcms-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

.qcms-container h2 {
    font-size: 40px;
    color: #37352f;
    margin-bottom: 0;
    font-weight: 700;
    letter-spacing: -0.6px;
    line-height: 1.2;
}

/* Page Stats */
#pageStats {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #ffffff;
    padding: 40px 24px;
}

#pageStats.hidden {
    display: none !important;
}

.stats-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.stats-container h2 {
    font-size: 40px;
    color: #37352f;
    margin-bottom: 48px;
    font-weight: 700;
    letter-spacing: -0.6px;
    line-height: 1.2;
}

.stats-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.stat-card {
    background-color: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.16);
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease;
}

.stat-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-color: rgba(55, 53, 47, 0.2);
}

.stat-label {
    font-size: 16px;
    color: rgba(55, 53, 47, 0.65);
    margin-bottom: 12px;
    font-weight: 500;
    letter-spacing: -0.2px;
}

.stat-value {
    font-size: 64px;
    color: #37352f;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
}

.stat-subtitle {
    font-size: 14px;
    color: rgba(55, 53, 47, 0.5);
    margin-top: 8px;
    font-weight: 400;
}

/* Page Calendrier */
#pageCalendrier {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #ffffff;
    padding: 0 24px 24px 24px;
}

#pageCalendrier.hidden {
    display: none !important;
}

.calendar-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.calendar-container h2 {
    font-size: 40px;
    color: #37352f;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.6px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(55, 53, 47, 0.1);
    color: rgba(55, 53, 47, 0.6);
    font-size: 14px;
    font-weight: 600;
    cursor: help;
    position: relative;
    transition: all 0.15s ease;
    flex-shrink: 0;
    margin-left: 4px;
}

.calendar-info-icon:hover {
    background-color: rgba(55, 53, 47, 0.15);
    color: #37352f;
}

.calendar-info-icon[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    padding: 10px 14px;
    background-color: #37352f;
    color: #ffffff;
    font-size: 13px;
    white-space: normal;
    width: 280px;
    max-width: 90vw;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    pointer-events: none;
    opacity: 1;
    animation: tooltipFadeIn 0.1s ease;
    line-height: 1.5;
    text-align: left;
    font-weight: 400;
}

.calendar-info-icon[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 2px;
    border: 5px solid transparent;
    border-bottom-color: #37352f;
    z-index: 1001;
    pointer-events: none;
    animation: tooltipFadeIn 0.1s ease;
}

.calendar-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* Panneau gauche : Matières et cours */
.calendar-panel {
    flex: 0 0 400px;
    background-color: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.16);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.calendar-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(55, 53, 47, 0.16);
}

.calendar-panel-header h3 {
    font-size: 20px;
    color: #37352f;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.add-matiere-btn {
    background-color: #37352f;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 400;
    border-radius: 4px;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.add-matiere-btn:hover {
    background-color: #2e2c26;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.matieres-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.matiere-item {
    background-color: rgba(55, 53, 47, 0.02);
    border: 1px solid rgba(55, 53, 47, 0.09);
    border-radius: 6px;
    padding: 16px;
    transition: all 0.15s ease;
}

.matiere-item:hover {
    border-color: rgba(55, 53, 47, 0.16);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.matiere-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.matiere-header h4 {
    font-size: 18px;
    color: #37352f;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.matiere-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
    padding-left: 16px;
}

.add-cours-btn,
.edit-matiere-btn,
.delete-matiere-btn,
.edit-cours-btn,
.delete-cours-btn {
    background-color: transparent;
    color: rgba(55, 53, 47, 0.6);
    border: 1px solid rgba(55, 53, 47, 0.16);
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-weight: 400;
}

.add-cours-btn:hover,
.edit-matiere-btn:hover,
.edit-cours-btn:hover {
    background-color: rgba(55, 53, 47, 0.06);
    border-color: rgba(55, 53, 47, 0.2);
    color: #37352f;
}

.delete-matiere-btn:hover,
.delete-cours-btn:hover {
    background-color: rgba(235, 87, 87, 0.08);
    border-color: rgba(235, 87, 87, 0.3);
    color: #eb5757;
}

.cours-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cours-item {
    background-color: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.09);
    border-radius: 4px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.15s ease;
}

.cours-item:hover {
    border-color: rgba(55, 53, 47, 0.16);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cours-info {
    flex: 1;
}

.cours-name {
    font-size: 14px;
    color: #37352f;
    font-weight: 500;
    margin-bottom: 4px;
}

.cours-date {
    font-size: 12px;
    color: rgba(55, 53, 47, 0.5);
}

.cours-actions {
    display: flex;
    gap: 8px;
}

.empty-cours {
    font-size: 13px;
    color: rgba(55, 53, 47, 0.4);
    text-align: center;
    padding: 16px;
    font-style: italic;
}

/* Panneau droit : Calendrier */
.calendar-view {
    flex: 1;
    background-color: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.16);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(55, 53, 47, 0.16);
}

.calendar-header h3 {
    font-size: 20px;
    color: #37352f;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.calendar-nav-btn {
    background-color: transparent;
    color: rgba(55, 53, 47, 0.6);
    border: 1px solid rgba(55, 53, 47, 0.16);
    padding: 6px 12px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.calendar-nav-btn:hover {
    background-color: rgba(55, 53, 47, 0.06);
    border-color: rgba(55, 53, 47, 0.2);
    color: #37352f;
}

.calendar-grid {
    display: flex;
    flex-direction: column;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: rgba(55, 53, 47, 0.5);
    padding: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    min-height: 100px;
    background-color: rgba(55, 53, 47, 0.02);
    border: 1px solid rgba(55, 53, 47, 0.09);
    border-radius: 4px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    transition: all 0.15s ease;
}

.calendar-day:hover {
    border-color: rgba(55, 53, 47, 0.16);
    background-color: rgba(55, 53, 47, 0.04);
}

.calendar-day.drag-over {
    background-color: rgba(46, 170, 220, 0.1);
    border-color: rgba(46, 170, 220, 0.4);
    border-style: dashed;
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day.today {
    background-color: rgba(46, 170, 220, 0.08);
    border-color: rgba(46, 170, 220, 0.3);
}

.calendar-day-number {
    font-size: 14px;
    font-weight: 600;
    color: #37352f;
    margin-bottom: 6px;
}

.calendar-revisions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
}

.calendar-revision {
    color: #ffffff;
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 3px;
    cursor: move;
    transition: all 0.15s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.calendar-revision:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.calendar-revision:active {
    cursor: grabbing;
}

.calendar-revision.custom-revision {
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.revision-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delete-revision-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: rgba(235, 87, 87, 0.9);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s ease;
    padding: 0;
    font-weight: 700;
    z-index: 10;
}

.calendar-revision:hover .delete-revision-btn {
    opacity: 1;
}

.delete-revision-btn:hover {
    background-color: #eb5757;
    transform: scale(1.1);
}

.delete-revision-btn:active {
    transform: scale(0.95);
}

.reset-stats-btn {
    background-color: transparent;
    color: rgba(235, 87, 87, 0.8);
    border: 1px solid rgba(235, 87, 87, 0.3);
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 400;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-family: inherit;
}

.reset-stats-btn:hover {
    background-color: rgba(235, 87, 87, 0.08);
    border-color: rgba(235, 87, 87, 0.4);
    color: #eb5757;
}

.reset-stats-btn:active {
    background-color: rgba(235, 87, 87, 0.12);
}

.add-qcm-btn {
    background-color: #37352f;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 400;
    border-radius: 4px;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.add-qcm-btn:hover {
    background-color: #2e2c26;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

/* Bouton centré pour état vide */
.empty-state-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 24px;
    margin-top: 20px;
}

.empty-state-button-container.hidden {
    display: none;
}

.add-qcm-btn-large {
    background-color: #37352f;
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    font-size: 18px;
    cursor: pointer;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    letter-spacing: -0.2px;
}

.add-qcm-btn-large:hover {
    background-color: #2e2c26;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.generate-qcm-btn {
    background-color: transparent;
    color: #37352f;
    border: 1px solid rgba(55, 53, 47, 0.16);
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 400;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.generate-qcm-btn:hover {
    background-color: rgba(55, 53, 47, 0.06);
    border-color: rgba(55, 53, 47, 0.2);
}

.generate-qcm-btn-large {
    background-color: transparent;
    color: #37352f;
    border: 2px solid rgba(55, 53, 47, 0.16);
    padding: 16px 32px;
    font-size: 18px;
    cursor: pointer;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    letter-spacing: -0.2px;
}

.generate-qcm-btn-large:hover {
    background-color: rgba(55, 53, 47, 0.06);
    border-color: rgba(55, 53, 47, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.file-upload-label {
    display: inline-block;
    padding: 10px 16px;
    background-color: transparent;
    border: 1px solid rgba(55, 53, 47, 0.16);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    color: #37352f;
}

.file-upload-label:hover {
    background-color: rgba(55, 53, 47, 0.06);
    border-color: rgba(55, 53, 47, 0.2);
}

.file-preview {
    font-size: 14px;
}

.generate-status {
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
}

.generate-status.loading {
    background-color: rgba(46, 170, 220, 0.1);
    color: #2eaadc;
    border: 1px solid rgba(46, 170, 220, 0.3);
}

.generate-status.success {
    background-color: rgba(46, 170, 220, 0.1);
    color: #2eaadc;
    border: 1px solid rgba(46, 170, 220, 0.3);
}

.generate-status.error {
    background-color: rgba(235, 87, 87, 0.1);
    color: #eb5757;
    border: 1px solid rgba(235, 87, 87, 0.3);
}

/* Modale */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none !important;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 2001;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(55, 53, 47, 0.09);
}

.modal-header h3 {
    font-size: 24px;
    color: #37352f;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin: 0;
}

.modal-close-btn {
    background-color: transparent;
    border: none;
    font-size: 28px;
    color: rgba(55, 53, 47, 0.6);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s ease;
    line-height: 1;
    padding: 0;
}

.modal-close-btn:hover {
    background-color: rgba(55, 53, 47, 0.06);
    color: #37352f;
}

.modal-body {
    padding: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: rgba(55, 53, 47, 0.8);
    font-weight: 500;
    font-size: 14px;
}

.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(55, 53, 47, 0.16);
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.15s ease;
    background-color: #ffffff;
    color: #37352f;
    line-height: 1.6;
}

.form-group textarea:focus {
    outline: none;
    border-color: rgba(55, 53, 47, 0.3);
    box-shadow: 0 0 0 1px rgba(55, 53, 47, 0.1);
}

/* Slider pour le nombre de QCMs */
.slider-container {
    margin-top: 12px;
    position: relative;
}

.qcm-count-value {
    color: #37352f;
    font-weight: 600;
    font-size: 16px;
    margin-left: 8px;
}

.qcm-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(55, 53, 47, 0.16);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.qcm-slider:hover {
    background: rgba(55, 53, 47, 0.24);
}

/* Style du thumb (rond) pour WebKit (Chrome, Safari, Edge) */
.qcm-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #37352f;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.15s ease;
}

.qcm-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.qcm-slider::-webkit-slider-thumb:active {
    transform: scale(0.95);
}

/* Style du thumb pour Firefox */
.qcm-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #37352f;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.15s ease;
}

.qcm-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.qcm-slider::-moz-range-thumb:active {
    transform: scale(0.95);
}

/* Style de la piste pour Firefox */
.qcm-slider::-moz-range-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(55, 53, 47, 0.16);
    border: none;
}

.qcm-slider::-moz-range-track:hover {
    background: rgba(55, 53, 47, 0.24);
}

/* Labels min/max sous le slider */
.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: rgba(55, 53, 47, 0.5);
}

.propositions-container {
    margin-bottom: 24px;
}

.propositions-container > label {
    display: block;
    margin-bottom: 10px;
    color: rgba(55, 53, 47, 0.8);
    font-weight: 500;
    font-size: 14px;
}

.proposition-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.proposition-item:hover {
    background-color: rgba(55, 53, 47, 0.03);
}

.proposition-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid rgba(55, 53, 47, 0.16);
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.15s ease;
    background-color: #ffffff;
    color: #37352f;
}

.proposition-input:focus {
    outline: none;
    border-color: rgba(55, 53, 47, 0.3);
    box-shadow: 0 0 0 1px rgba(55, 53, 47, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 400;
    font-size: 14px;
    color: rgba(55, 53, 47, 0.8);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border-radius: 3px;
    accent-color: #37352f;
}

.remove-prop-btn {
    background-color: transparent;
    color: rgba(55, 53, 47, 0.5);
    border: 1px solid rgba(55, 53, 47, 0.16);
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-weight: 300;
}

.remove-prop-btn:hover {
    background-color: rgba(55, 53, 47, 0.06);
    color: #37352f;
    border-color: rgba(55, 53, 47, 0.2);
}

.add-prop-btn {
    background-color: transparent;
    color: rgba(55, 53, 47, 0.8);
    border: 1px solid rgba(55, 53, 47, 0.16);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.15s ease;
}

.add-prop-btn:hover {
    background-color: rgba(55, 53, 47, 0.06);
    border-color: rgba(55, 53, 47, 0.2);
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}

.submit-btn {
    background-color: #37352f;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 400;
    border-radius: 4px;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover {
    background-color: #2e2c26;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.reset-btn {
    background-color: transparent;
    color: rgba(55, 53, 47, 0.8);
    border: 1px solid rgba(55, 53, 47, 0.16);
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 400;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.reset-btn:hover {
    background-color: rgba(55, 53, 47, 0.06);
    border-color: rgba(55, 53, 47, 0.2);
}

.qcms-list-container {
    margin-top: 48px;
}

.qcms-list-container h3 {
    font-size: 24px;
    color: #37352f;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(55, 53, 47, 0.09);
}

.qcms-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qcm-item {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 6px;
    border: 1px solid rgba(55, 53, 47, 0.16);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease;
}

.qcm-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-color: rgba(55, 53, 47, 0.2);
}

.qcm-question {
    font-size: 18px;
    color: #37352f;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.5;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(55, 53, 47, 0.09);
    letter-spacing: -0.2px;
}

.qcm-propositions {
    list-style: none;
    margin-left: 0;
}

.qcm-proposition {
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 4px;
    border-left: 2px solid rgba(55, 53, 47, 0.16);
    background-color: rgba(55, 53, 47, 0.02);
    transition: all 0.15s ease;
    font-size: 14px;
    color: rgba(55, 53, 47, 0.8);
}

.qcm-proposition.correct {
    background-color: rgba(46, 170, 220, 0.08);
    border-left-color: #2eaadc;
    color: #37352f;
    font-weight: 500;
}

.qcm-proposition.incorrect {
    background-color: rgba(55, 53, 47, 0.02);
}

/* Bouton dropdown pour les séries */
.series-dropdown-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(55, 53, 47, 0.6);
    border-radius: 4px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.series-dropdown-btn:hover {
    background-color: rgba(55, 53, 47, 0.06);
    color: #37352f;
}

.dropdown-icon {
    transition: transform 0.2s ease;
    color: currentColor;
}

.series-item h3 {
    user-select: none;
}

.series-qcms-container {
    transition: opacity 0.2s ease;
}

.qcm-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}

.edit-qcm-btn {
    background-color: transparent;
    color: rgba(55, 53, 47, 0.6);
    border: 1px solid rgba(55, 53, 47, 0.16);
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-weight: 400;
}

.edit-qcm-btn:hover {
    background-color: rgba(55, 53, 47, 0.06);
    border-color: rgba(55, 53, 47, 0.2);
    color: #37352f;
}

/* Boutons pour les QCMs individuels */
.qcm-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.edit-qcm-item-btn {
    background-color: transparent;
    color: rgba(55, 53, 47, 0.6);
    border: 1px solid rgba(55, 53, 47, 0.16);
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-weight: 400;
}

.edit-qcm-item-btn:hover {
    background-color: rgba(55, 53, 47, 0.06);
    border-color: rgba(55, 53, 47, 0.2);
    color: #37352f;
}

.delete-qcm-item-btn {
    background-color: transparent;
    color: rgba(235, 87, 87, 0.8);
    border: 1px solid rgba(235, 87, 87, 0.3);
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-weight: 400;
}

.delete-qcm-item-btn:hover {
    background-color: rgba(235, 87, 87, 0.08);
    border-color: rgba(235, 87, 87, 0.4);
    color: #eb5757;
}

.delete-qcm-btn {
    background-color: transparent;
    color: rgba(55, 53, 47, 0.6);
    border: 1px solid rgba(55, 53, 47, 0.16);
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-weight: 400;
}

.delete-qcm-btn:hover {
    background-color: rgba(235, 87, 87, 0.1);
    border-color: rgba(235, 87, 87, 0.3);
    color: #eb5757;
}

.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: rgba(55, 53, 47, 0.5);
    font-size: 15px;
}

.hidden {
    display: none;
}

/* Modale QCM dans le jeu */
.qcm-game-modal {
    max-width: 700px;
}

.qcm-game-question {
    font-size: 20px;
    color: #37352f;
    margin-bottom: 24px;
    font-weight: 600;
    line-height: 1.6;
    padding: 16px;
    background-color: rgba(55, 53, 47, 0.03);
    border-radius: 6px;
    border-left: 3px solid #37352f;
}

.qcm-game-propositions {
    margin-bottom: 24px;
}

.qcm-game-proposition {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    border: 1px solid rgba(55, 53, 47, 0.16);
    border-radius: 6px;
    background-color: #ffffff;
    transition: all 0.15s ease;
    cursor: pointer;
}

.qcm-game-proposition:hover {
    background-color: rgba(55, 53, 47, 0.03);
    border-color: rgba(55, 53, 47, 0.2);
}

.qcm-game-proposition input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #37352f;
}

.qcm-game-proposition-label {
    flex: 1;
    font-size: 15px;
    color: #37352f;
    cursor: pointer;
    line-height: 1.5;
}

.qcm-game-result {
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 500;
}

.qcm-game-result.correct {
    background-color: rgba(46, 170, 220, 0.1);
    color: #2eaadc;
    border: 1px solid rgba(46, 170, 220, 0.3);
}

.qcm-game-result.incorrect {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(235, 87, 87, 0.2);
    box-shadow: 0 2px 8px rgba(235, 87, 87, 0.08);
}

/* Comparaison des réponses */
.result-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    padding: 16px;
    background-color: rgba(235, 87, 87, 0.08);
    border-radius: 6px;
    color: #eb5757;
    letter-spacing: -0.2px;
}

.result-message::before {
    content: "✗";
    font-size: 24px;
    font-weight: 700;
}

.result-comparison {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.comparison-column {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    padding: 16px;
    border: 1px solid rgba(55, 53, 47, 0.09);
    transition: all 0.15s ease;
}

.comparison-column:first-child {
    background-color: rgba(235, 87, 87, 0.04);
    border-color: rgba(235, 87, 87, 0.15);
}

.comparison-column:last-child {
    background-color: rgba(16, 185, 129, 0.04);
    border-color: rgba(16, 185, 129, 0.15);
}

.comparison-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    color: rgba(55, 53, 47, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(55, 53, 47, 0.09);
}

.comparison-column:first-child .comparison-title {
    color: #eb5757;
}

.comparison-column:last-child .comparison-title {
    color: #10b981;
}

.comparison-title::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
}

.comparison-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comparison-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 6px;
    background-color: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.12);
    font-size: 14px;
    color: #37352f;
    line-height: 1.5;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.comparison-item:hover {
    border-color: rgba(55, 53, 47, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.comparison-item::before {
    content: "•";
    font-size: 20px;
    color: rgba(55, 53, 47, 0.4);
    line-height: 1;
}

.comparison-item.correct {
    background-color: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
    color: #10b981;
    font-weight: 500;
}

.comparison-item.correct::before {
    content: "✓";
    color: #10b981;
    font-size: 16px;
    font-weight: 700;
}

.comparison-item.empty {
    color: rgba(55, 53, 47, 0.5);
    font-style: italic;
    background-color: rgba(55, 53, 47, 0.02);
    border-color: rgba(55, 53, 47, 0.08);
}

.comparison-item.empty::before {
    content: "○";
    color: rgba(55, 53, 47, 0.3);
}

.comparison-item.user-correct {
    background-color: rgba(46, 170, 220, 0.08);
    border-color: rgba(46, 170, 220, 0.25);
    color: #2eaadc;
    font-weight: 500;
}

.comparison-item.user-correct::before {
    content: "✓";
    color: #2eaadc;
    font-size: 16px;
    font-weight: 700;
}

.comparison-item.user-incorrect {
    background-color: rgba(235, 87, 87, 0.08);
    border-color: rgba(235, 87, 87, 0.25);
    color: #eb5757;
    font-weight: 500;
}

.comparison-item.user-incorrect::before {
    content: "✗";
    color: #eb5757;
    font-size: 16px;
    font-weight: 700;
}

.comparison-item.missing {
    background-color: rgba(255, 193, 7, 0.08);
    border-color: rgba(255, 193, 7, 0.25);
    color: #ff9800;
    font-weight: 500;
    opacity: 0.8;
}

.comparison-item.missing::before {
    content: "○";
    color: #ff9800;
    font-size: 16px;
    font-weight: 700;
}

.qcm-game-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.qcm-game-actions button {
    padding: 10px 20px;
    font-size: 14px;
}

/* Animations pour la notification */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============================================
   STYLES MOBILE - Version mobile uniquement
   ============================================ */

/* Bouton de contrôle tactile pour mobile */
.mobile-jump-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(55, 53, 47, 0.9);
    color: #ffffff;
    border: none;
    font-size: 36px;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.15s ease;
    display: none;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-jump-btn:active {
    transform: translateX(-50%) scale(0.95);
    background-color: rgba(55, 53, 47, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.mobile-jump-btn.hidden {
    display: none !important;
}

/* Media queries pour mobile */
@media screen and (max-width: 768px) {
    /* Navigation mobile */
    .nav-container {
        padding: 0 16px;
        flex-wrap: wrap;
    }

    .nav-title {
        font-size: 18px;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 8px;
        gap: 4px;
    }

    .nav-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .nav-auth {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }

    .nav-auth-info {
        font-size: 11px;
    }

    .nav-auth-btn {
        font-size: 12px;
        padding: 4px 10px;
    }

    /* Page Jouer mobile */
    #pageJouer {
        padding: 20px 12px;
    }

    .game-layout {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .container {
        flex: 1;
        width: 100%;
        max-width: 100%;
        position: relative;
        padding-bottom: 100px; /* Espace pour le bouton de saut */
    }

    /* Canvas responsive sur mobile */
    #gameCanvas {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 750 / 675; /* Conserver les proportions originales */
        border-radius: 8px;
    }

    /* Panneau de sélection des QCMs mobile */
    .qcm-selection-panel {
        flex: 1;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        padding: 16px;
        order: 2;
    }

    .qcm-selection-panel h3 {
        font-size: 16px;
    }

    .panel-description {
        font-size: 12px;
    }

    .qcm-selection-list {
        max-height: 300px;
    }

    .qcm-selection-item {
        padding: 10px;
    }

    .qcm-selection-item-label {
        font-size: 13px;
    }

    /* Écran de démarrage mobile */
    .start-screen h1 {
        font-size: 32px;
    }

    .start-screen p {
        font-size: 14px;
    }

    .start-instruction {
        display: none;
    }

    .start-instruction-mobile {
        display: block !important;
    }

    .game-over-hint {
        display: none;
    }

    .game-over-hint-mobile {
        display: block !important;
        font-size: 12px !important;
        color: rgba(55, 53, 47, 0.6) !important;
        margin-top: 8px !important;
        margin-bottom: 0 !important;
        font-style: italic;
    }

    /* Écran de compte à rebours mobile */
    .countdown-content h2 {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .countdown-number {
        font-size: 56px;
    }

    .countdown-content p {
        font-size: 16px;
    }

    /* Game Over mobile */
    .game-over {
        padding: 32px 24px;
        min-width: auto;
        width: 90%;
        max-width: 320px;
    }

    .game-over h2 {
        font-size: 24px;
    }

    .game-over p {
        font-size: 18px;
    }

    .game-over-hint {
        font-size: 12px !important;
    }

    #restartBtn {
        padding: 12px 24px;
        font-size: 15px;
    }

    /* Afficher le bouton de saut sur mobile */
    .mobile-jump-btn {
        display: flex;
    }

    /* Modales mobile */
    .modal-content {
        width: 95%;
        max-width: 95%;
        max-height: 85vh;
    }

    .modal-header {
        padding: 20px 20px;
    }

    .modal-header h3 {
        font-size: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    /* Modale QCM dans le jeu mobile */
    .qcm-game-modal {
        max-width: 95%;
    }

    .qcm-game-question {
        font-size: 18px;
        padding: 12px;
    }

    .qcm-game-proposition {
        padding: 12px;
        margin-bottom: 8px;
    }

    .qcm-game-proposition-label {
        font-size: 14px;
    }

    .result-comparison {
        flex-direction: column;
        gap: 12px;
    }

    .comparison-column {
        width: 100%;
    }

    /* Page Mes QCMs mobile */
    #pageQCMs {
        padding: 20px 12px;
    }

    #headerWithButton {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    #headerWithButton h2 {
        font-size: 28px;
    }

    #headerWithButton > div {
        flex-direction: column;
        gap: 8px;
    }

    .add-qcm-btn,
    .generate-qcm-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 14px;
    }

    .qcms-container h2 {
        font-size: 32px;
    }

    .qcm-item {
        padding: 16px;
    }

    .qcm-question {
        font-size: 16px;
    }

    .qcm-proposition {
        font-size: 13px;
        padding: 8px 10px;
    }

    /* Page Stats mobile */
    #pageStats {
        padding: 20px 12px;
    }

    .stats-container h2 {
        font-size: 32px;
        margin-bottom: 0;
    }

    .stats-container > div:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 32px;
    }

    .reset-stats-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 14px;
    }

    .stat-card {
        padding: 24px;
    }

    .stat-label {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .stat-value {
        font-size: 48px;
    }

    .stat-subtitle {
        font-size: 12px;
        margin-top: 6px;
    }

    /* Formulaires mobile */
    .form-group label {
        font-size: 13px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 14px;
        padding: 10px;
    }

    .submit-btn,
    .reset-btn {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .form-actions {
        flex-direction: column;
    }

    /* Page Calendrier mobile */
    #pageCalendrier {
        padding: 20px 12px;
    }

    .calendar-container h2 {
        font-size: 32px;
        margin-bottom: 16px;
    }


    .calendar-layout {
        flex-direction: column;
        gap: 16px;
    }

    .calendar-panel {
        flex: 1;
        max-height: none;
    }

    .calendar-panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .add-matiere-btn {
        width: 100%;
    }

    .matiere-actions {
        flex-direction: column;
        width: 100%;
    }

    .add-cours-btn,
    .edit-matiere-btn,
    .delete-matiere-btn {
        width: 100%;
    }

    .cours-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .cours-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .calendar-view {
        flex: 1;
    }

    .calendar-day {
        min-height: 80px;
    }

    .calendar-revision {
        font-size: 10px;
        padding: 3px 5px;
    }
}

/* Media queries pour très petits écrans */
@media screen and (max-width: 480px) {
    .nav-container {
        padding: 0 12px;
    }

    .nav-title {
        font-size: 16px;
    }

    #pageJouer {
        padding: 16px 8px;
    }

    .qcm-selection-panel {
        padding: 12px;
    }

    .start-screen h1 {
        font-size: 28px;
    }

    .countdown-number {
        font-size: 48px;
    }

    .game-over {
        padding: 24px 16px;
        width: 95%;
    }

    .game-over h2 {
        font-size: 20px;
    }

    .mobile-jump-btn {
        width: 70px;
        height: 70px;
        font-size: 32px;
        bottom: 15px;
    }

    .modal-content {
        width: 98%;
        max-width: 98%;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .qcm-game-question {
        font-size: 16px;
    }
}

/* Page Pricing */
#pagePricing {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 32px 24px 40px;
    background-color: #f7f6f3;
}

.pricing-container {
    max-width: 1200px;
    width: 100%;
}

.pricing-header {
    text-align: center;
    margin-bottom: 32px;
}

.pricing-header h2 {
    font-size: 32px;
    font-weight: 600;
    color: #37352f;
    margin-bottom: 8px;
}

.pricing-subtitle {
    font-size: 16px;
    color: rgba(55, 53, 47, 0.65);
}

.pricing-usage-info {
    background-color: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.16);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.usage-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.usage-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.usage-label {
    font-size: 13px;
    color: rgba(55, 53, 47, 0.65);
}

.usage-value {
    font-size: 18px;
    font-weight: 600;
    color: #37352f;
}

.pricing-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.pricing-plan {
    background-color: #ffffff;
    border: 2px solid rgba(55, 53, 47, 0.16);
    border-radius: 12px;
    padding: 24px 20px;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.pricing-plan:hover {
    border-color: rgba(55, 53, 47, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.pricing-plan-featured {
    border-color: #FFEB3B;
    border-width: 3px;
    box-shadow: 0 4px 16px rgba(255, 235, 59, 0.2);
}

.pricing-plan.current-plan {
    border-color: #4caf50;
    background-color: #f1f8f4;
}

.plan-header {
    position: relative;
    margin-bottom: 16px;
    text-align: center;
    overflow: visible;
}

.popular-badge {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #FFEB3B;
    color: #37352f;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.current-plan-badge {
    position: absolute;
    top: -18px;
    right: 0;
    background-color: #4caf50;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    display: block;
}

.plan-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #37352f;
    margin-bottom: 8px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
}

.price-amount {
    font-size: 32px;
    font-weight: 700;
    color: #37352f;
}

.price-period {
    font-size: 16px;
    color: rgba(55, 53, 47, 0.65);
}

.plan-features {
    list-style: none;
    margin: 16px 0;
    flex-grow: 1;
}

.plan-features li {
    padding: 6px 0;
    font-size: 14px;
    color: #37352f;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li:before {
    content: '';
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.plan-features li:has-text("✓") {
    color: #37352f;
}

.choose-plan-btn {
    width: 100%;
    padding: 10px 20px;
    background-color: #37352f;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto;
}

.choose-plan-btn:hover:not(:disabled) {
    background-color: #2e2d29;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.choose-plan-btn:disabled {
    background-color: rgba(55, 53, 47, 0.3);
    cursor: not-allowed;
    opacity: 0.6;
}

.choose-plan-btn.disabled {
    background-color: #4caf50;
    color: #ffffff;
}

.pricing-footer {
    text-align: center;
    margin-top: 24px;
}

.pricing-note {
    font-size: 13px;
    color: rgba(55, 53, 47, 0.65);
    line-height: 1.5;
}

/* Responsive pour Pricing */
@media (max-width: 768px) {
    .pricing-plans {
        grid-template-columns: 1fr;
    }

    .pricing-header h2 {
        font-size: 28px;
    }

    .usage-stats {
        flex-direction: column;
        gap: 16px;
    }
}
