/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    background: #000;
    color: #fff;
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== TYPOGRAPHY ===== */
h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 8px;
}

h2 {
    font-size: 28px;
    font-weight: 600;
}

h3 {
    font-size: 20px;
    font-weight: 600;
}

.subtitle {
    font-size: 18px;
    color: #86868b;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 120px;
}

header {
    margin-bottom: 40px;
}

/* ===== LOGIN & AUTH ===== */
.login-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 60px 20px;
}

.login-header {
    text-align: center;
    margin-bottom: 60px;
}

.login-header h1 {
    font-size: 48px;
    background: linear-gradient(135deg, #FF6B6B, #EE5A6F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 40px;
}

.error {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff3b30;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* ===== INPUT FIELDS ===== */
.input-container {
    margin-bottom: 24px;
}

.input-wrapper {
    position: relative;
    background: #fff;
    border: 1.5px solid #d1d1d1;
    border-radius: 12px;
    padding: 20px 65px 20px 20px;
    transition: all 0.3s;
}

.input-wrapper.focused {
    border-color: #0071e3;
    border-width: 2px;
    padding: 19px 64px 19px 19px;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.input-wrapper input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 17px;
    color: #000;
    background: transparent;
    padding-top: 8px;
}

.input-wrapper input::placeholder {
    color: transparent;
}

.input-wrapper label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #86868b;
    font-size: 17px;
    pointer-events: none;
    transition: all 0.3s;
    background: #fff;
    padding: 0 4px;
}

.input-wrapper.focused label,
.input-wrapper.has-value label {
    top: 14px;
    font-size: 13px;
    font-weight: 500;
}

.submit-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 2px solid #d1d1d1;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.submit-btn:hover {
    background: #f5f5f7;
}

.arrow::before {
    content: '→';
    font-size: 20px;
    color: #666;
    font-weight: bold;
}

.helper-text {
    margin-top: 16px;
    font-size: 14px;
    color: #86868b;
    text-align: center;
}

.helper-text a {
    color: #0071e3;
}

/* ===== STATS CARDS ===== */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
}

.stat-icon {
    font-size: 40px;
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 14px;
    color: #86868b;
}

/* ===== MOTIVATION CARD ===== */
.motivation {
    margin: 40px 0;
}

.motivation-card {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(68, 160, 141, 0.1));
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 16px;
    padding: 24px;
}

.motivation-card h3 {
    margin-bottom: 12px;
}

.quote {
    font-size: 20px;
    font-style: italic;
    margin: 16px 0;
}

.author {
    color: #86868b;
    font-size: 14px;
}

/* ===== SUBJECTS GRID ===== */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.subject-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 28px;
    transition: all 0.3s;
    cursor: pointer;
}

.subject-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    border-color: var(--color);
}

.subject-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.subject-header .icon {
    font-size: 32px;
}

/* ===== PROGRESS BARS ===== */
.progress {
    margin: 16px 0;
}

.progress span {
    font-size: 14px;
    color: #86868b;
}

.progress .bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.progress .bar div {
    height: 100%;
    background: linear-gradient(90deg, #FF6B6B, #EE5A6F);
    transition: width 0.3s;
}

.progress-large {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-large div {
    height: 100%;
    background: linear-gradient(90deg, #FF6B6B, #EE5A6F);
    transition: width 0.3s;
}

.progress-label {
    color: #86868b;
    font-size: 14px;
}

/* ===== EXERCISES LIST ===== */
.exercises-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.exercise-link {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s;
}

.exercise-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.exercises-list-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.exercise-card-detail {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s;
    cursor: pointer;
}

.exercise-card-detail:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

/* ===== EXERCISE PAGE ===== */
.exercise-page {
    padding-bottom: 20px;
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.back {
    color: #fff;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.2s;
}

.back:hover {
    background: rgba(255, 255, 255, 0.05);
}

.timer {
    font-size: 18px;
    font-weight: 600;
}

.ex-title {
    margin-bottom: 32px;
}

.tags {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.tag {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 13px;
}

.completed-banner {
    background: rgba(0, 208, 132, 0.1);
    border: 1px solid rgba(0, 208, 132, 0.3);
    color: #00D084;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 24px;
}

/* ===== ÉNONCÉ COMMUN ===== */
.exercise-statement {
    background: rgba(78, 205, 196, 0.05);
    border: 2px solid rgba(78, 205, 196, 0.3);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 32px;
}

.exercise-statement h2 {
    color: #4ECDC4;
    font-size: 22px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.exercise-statement h2::before {
    content: '📋';
    font-size: 28px;
}

.exercise-statement p {
    font-size: 17px;
    line-height: 1.8;
    color: #ffffff;
    margin-bottom: 0;
}

/* ===== QUESTIONS ===== */
.questions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.question {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
}

.q-num {
    background: linear-gradient(90deg, #FF6B6B, #EE5A6F);
    color: #fff;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 12px;
}

.q-text {
    font-size: 16px;
    margin-bottom: 16px;
}

.show-answer {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.show-answer:hover {
    background: rgba(255, 255, 255, 0.05);
}

.answer {
    margin-top: 16px;
    padding: 16px;
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 8px;
}

.answer-section {
    margin-top: 16px;
}

/* ===== IMAGES ===== */
.question-img,
.answer-img {
    width: 300px;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.question-img:hover,
.answer-img:hover {
    border-color: #FF6B6B;
    transform: scale(1.02);
}

/* ===== IMAGE POPUP ===== */
.image-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.popup-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
}

.popup-controls {
    display: flex;
    gap: 10px;
}

.popup-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.2s;
}

.popup-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.popup-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
}

.popup-close:hover {
    color: #ff6b6b;
    transform: scale(1.1);
}

.popup-content {
    max-width: 90%;
    max-height: 80%;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

#popupImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s;
    cursor: grab;
}

#popupImage:active {
    cursor: grabbing;
}

/* ===== COMPLETION ===== */
.completion {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.completion label {
    font-weight: 500;
}

.completion input {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    width: 100px;
}

.btn-complete {
    padding: 12px 24px;
    background: linear-gradient(90deg, #FF6B6B, #EE5A6F);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-complete:hover {
    transform: scale(1.05);
}

/* ===== STATS PAGE ===== */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-big {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-big .icon {
    font-size: 48px;
}

.stat-big h2 {
    font-size: 36px;
    margin-bottom: 4px;
}

.stat-big p {
    color: #86868b;
    font-size: 14px;
}

.week-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 40px;
}

.week-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.week-stats div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.week-stats span {
    color: #86868b;
    font-size: 14px;
}

.week-stats strong {
    font-size: 28px;
    font-weight: 700;
}

.subject-stats h2 {
    margin-bottom: 24px;
}

.subjects-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.subject-stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--color);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.stat-circle {
    width: 80px;
    height: 80px;
    margin: 16px auto;
}

.stat-circle svg {
    width: 100%;
    height: 100%;
}

/* ===== PROFILE PAGE ===== */
.profile-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B6B, #EE5A6F);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.profile-info {
    flex-grow: 1;
}

.profile-info h2 {
    margin-bottom: 4px;
}

.profile-info p {
    color: #86868b;
    font-size: 14px;
}

.member {
    font-size: 13px;
}

.btn-logout {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(255, 59, 48, 0.1);
    border-color: #ff3b30;
    color: #ff3b30;
}

.btn-admin {
    padding: 10px 20px;
    background: linear-gradient(135deg, #FFB020, #FF6B6B);
    border: 1px solid rgba(255, 176, 32, 0.5);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    margin-left: 12px;
}

/* ===== BADGES ===== */
.badges {
    margin-bottom: 40px;
}

.badges h2,
.preferences h2 {
    margin-bottom: 20px;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    opacity: 0.4;
    transition: all 0.3s;
}

.badge.unlocked {
    opacity: 1;
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(255, 215, 0, 0.05);
}

.badge-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.badge h3 {
    font-size: 14px;
    margin-bottom: 4px;
}

.badge p {
    font-size: 12px;
    color: #86868b;
}

.badge-done {
    background: rgba(0, 208, 132, 0.2);
    color: #00D084;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ===== PREFERENCES ===== */
.pref-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

.pref-card h3 {
    margin-bottom: 16px;
}

.theme-btns {
    display: flex;
    gap: 12px;
}

.theme-btns button {
    flex: 1;
    padding: 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-btns button:hover {
    background: rgba(255, 255, 255, 0.05);
}

.theme-btns button.active {
    border-color: #0071e3;
    background: rgba(0, 113, 227, 0.1);
}

input[type="range"] {
    width: calc(100% - 60px);
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B6B, #EE5A6F);
    cursor: pointer;
}

.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 32px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    border-radius: 32px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background: #fff;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, #FF6B6B, #EE5A6F);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.btn-save {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FF6B6B, #EE5A6F);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
}

.btn-save:hover {
    transform: scale(1.02);
}

/* ===== ADMIN PANEL ===== */
.admin-form {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    margin: 24px 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 15px;
    color: #ffffff;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: #FF6B6B;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.form-group input[type="file"] {
    padding: 12px;
    cursor: pointer;
}

.form-group input[type="file"]::file-selector-button {
    padding: 8px 16px;
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.5);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    margin-right: 12px;
    transition: all 0.2s;
}

.form-group input[type="file"]::file-selector-button:hover {
    background: rgba(255, 107, 107, 0.3);
}

.question-block {
    background: rgba(78, 205, 196, 0.05);
    border: 2px solid rgba(78, 205, 196, 0.2);
    border-radius: 16px;
    padding: 28px;
    margin: 24px 0;
    position: relative;
}

.question-block h3 {
    color: #4ECDC4;
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.question-block h3::before {
    content: '❓';
    font-size: 24px;
}

.btn-primary {
    padding: 14px 28px;
    background: linear-gradient(90deg, #FF6B6B, #EE5A6F);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    margin: 8px 8px 8px 0;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    padding: 14px 28px;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    margin: 8px 8px 8px 0;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.exercises-admin {
    margin-top: 40px;
}

.exercise-admin-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.ex-info h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.ex-info p {
    color: #86868b;
    font-size: 14px;
}

.ex-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-edit {
    padding: 10px 20px;
    background: rgba(0, 113, 227, 0.2);
    border: 1px solid rgba(0, 113, 227, 0.5);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit:hover {
    background: rgba(0, 113, 227, 0.3);
}

.btn-delete {
    padding: 10px 20px;
    background: rgba(255, 59, 48, 0.2);
    border: 1px solid rgba(255, 59, 48, 0.5);
    border-radius: 8px;
    color: #ff3b30;
    cursor: pointer;
    border: 1px solid rgba(255, 59, 48, 0.5);
    transition: all 0.2s;
}

.btn-delete:hover {
    background: rgba(255, 59, 48, 0.3);
}

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

.ex-header h3 {
    font-size: 18px;
}

.ex-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #86868b;
}

.difficulty-facile {
    color: #00D084;
}

.difficulty-moyen {
    color: #FFB020;
}

.difficulty-difficile {
    color: #FF6B6B;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin-top: 40px;
}

.empty-state p {
    color: #86868b;
    margin: 12px 0;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 600px;
    height: 80px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #86868b;
    transition: all 0.3s;
    padding: 10px 16px;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    font-size: 12px;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
    color: #fff;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, #FF6B6B, #EE5A6F);
    border-radius: 2px;
}

.nav-icon {
    width: 26px;
    height: 26px;
}

.icon-routine {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ff6b6b" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>') center/contain no-repeat;
}

.icon-exercices {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ff6b6b" stroke-width="2"><path d="M6.5 6.5h11"/><path d="M6.5 17.5h11"/><path d="M6.5 12h11"/><circle cx="3.5" cy="6.5" r="1"/><circle cx="3.5" cy="12" r="1"/><circle cx="3.5" cy="17.5" r="1"/></svg>') center/contain no-repeat;
}

.icon-stats {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ff6b6b" stroke-width="2"><path d="M3 3v18h18"/><path d="M18 17V9"/><path d="M13 17V5"/><path d="M8 17v-3"/></svg>') center/contain no-repeat;
}

.icon-profil {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ff6b6b" stroke-width="2"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>') center/contain no-repeat;
}

.icon-sessions {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ff6b6b" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/><path d="M9 16l2 2 4-4"/></svg>') center/contain no-repeat;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    h1 {
        font-size: 32px;
    }

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

    .bottom-nav {
        width: calc(100% - 32px);
        padding: 0 12px;
    }

    .nav-item {
        padding: 10px 10px;
        font-size: 11px;
    }

    .profile-card {
        flex-direction: column;
        text-align: center;
    }

    .exercise-admin-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .ex-actions {
        width: 100%;
    }
}
.statement-text {
    white-space: pre-wrap; 
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 20px;
}
/* Préserver le formatage pour tous les textes */
.statement-text,
.q-text,
.answer-text,
.explanation-text {
    white-space: pre-wrap; /* Préserve les retours à la ligne et espaces */
    line-height: 1.8;
    font-size: 1rem;
}

/* Espacement pour les sections de réponse */
.answer-content,
.explanation-content {
    margin-bottom: 1em;
}

.answer-content strong,
.explanation-content strong {
    display: block;
    margin-bottom: 0.5em;
    color: var(--primary-color);
}

/* Style pour les formules MathJax dans les réponses */
.answer-text .MJX-TEX,
.explanation-text .MJX-TEX,
.statement-text .MJX-TEX,
.q-text .MJX-TEX {
    font-size: 1.1em;
}

/* ===== LIGHT THEME ===== */
body.light-theme {
    background: #f5f5f7;
    color: #1d1d1f;
}

.light-theme .subtitle {
    color: #6e6e73;
}

.light-theme .stat-card,
.light-theme .subject-card,
.light-theme .exercise-card-detail,
.light-theme .question,
.light-theme .completion,
.light-theme .profile-card,
.light-theme .badge,
.light-theme .pref-card,
.light-theme .admin-form,
.light-theme .exercise-admin-card,
.light-theme .empty-state,
.light-theme .stat-big,
.light-theme .week-section,
.light-theme .subject-stat,
.light-theme .exercise-header {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .stat-card:hover,
.light-theme .subject-card:hover,
.light-theme .exercise-card-detail:hover {
    background: rgba(0, 0, 0, 0.06);
}

.light-theme .bottom-nav {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.light-theme .nav-item {
    color: #6e6e73;
}

.light-theme .nav-item:hover {
    color: #1d1d1f;
    background: rgba(0, 0, 0, 0.05);
}

.light-theme .nav-item.active {
    color: #1d1d1f;
}

.light-theme .back {
    color: #1d1d1f;
    border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .back:hover {
    background: rgba(0, 0, 0, 0.05);
}

.light-theme .tag {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .show-answer {
    border-color: rgba(0, 0, 0, 0.1);
    color: #1d1d1f;
}

.light-theme .show-answer:hover {
    background: rgba(0, 0, 0, 0.05);
}

.light-theme .answer {
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.3);
}

.light-theme .completion input {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1d1d1f;
}

.light-theme .btn-logout {
    color: #1d1d1f;
    border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .progress .bar,
.light-theme .progress-large {
    background: rgba(0, 0, 0, 0.1);
}

.light-theme .theme-btns button {
    border-color: rgba(0, 0, 0, 0.1);
    color: #1d1d1f;
}

.light-theme .theme-btns button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.light-theme input[type="range"] {
    background: rgba(0, 0, 0, 0.1);
}

.light-theme .form-group input,
.light-theme .form-group select,
.light-theme .form-group textarea {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1d1d1f;
}

.light-theme .form-group label {
    color: #1d1d1f;
}

.light-theme .motivation-card {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), rgba(68, 160, 141, 0.15));
}

.light-theme .exercise-statement {
    background: rgba(78, 205, 196, 0.08);
}

.light-theme .exercise-statement p {
    color: #1d1d1f;
}

.light-theme .stat-info p,
.light-theme .progress span,
.light-theme .member,
.light-theme .ex-meta,
.light-theme .badge p,
.light-theme .author {
    color: #6e6e73;
}

/* ===== ADMIN NAV ===== */
.admin-nav {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.admin-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    transition: all 0.3s;
}

.admin-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.light-theme .admin-nav-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1d1d1f;
}

.light-theme .admin-nav-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.admin-nav-icon {
    font-size: 24px;
}
