/* Adults Theme - Professional and Clean */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* Headings */
h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1e3c72;
    font-size: 2em;
}

/* Navigation */
.nav {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav a {
    text-decoration: none;
    font-size: medium;
    font-weight: bold;
    padding: 10px 20px;
    background: white;
    border-radius: 25px;
    transition: transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 2px solid #2a5298;
    color: #2a5298;
}

.nav a:hover {
    transform: translateY(-3px);
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
}

.flash {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.flash.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Home Page - Welcome Section */
.welcome {
    text-align: center;
    margin-bottom: 30px;
}

.welcome h2 {
    margin-bottom: 10px;
    color: #1e3c72;
    font-size: 1.8em;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 2px solid #2a5298;
    color: #2a5298;
}

.stat-number {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Rules Accordion */
.rules-accordion {
    margin: 30px 0;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #2a5298;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.accordion-toggle {
    width: 100%;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: none;
    font-size: 1.3em;
    font-weight: bold;
    color: #1e3c72;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.accordion-toggle:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
}

.accordion-icon {
    font-size: 0.8em;
    transition: transform 0.3s ease;
    color: #2a5298;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.rules-list {
    padding: 25px;
    background: white;
    border-top: 2px solid #e0e0e0;
}

.rule-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #2a5298;
    transition: all 0.3s ease;
}

.rule-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(42, 82, 152, 0.15);
    background: #e6f0ff;
}

.rule-item:last-child {
    margin-bottom: 0;
}

.rule-icon {
    font-size: 2em;
    min-width: 40px;
    text-align: center;
}

.rule-item div {
    flex: 1;
    line-height: 1.6;
}

.rule-item strong {
    color: #1e3c72;
}

/* Home Page - Current Week Section */
.current-week-section {
    max-width: 500px;
    margin: 50px auto;
    text-align: center;
}

.week-status {
    padding: 40px;
    border-radius: 20px;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 2px solid #2a5298;
    color: #2a5298;
}

.week-number {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 20px;
}

.week-status p {
    font-size: 1.2em;
    margin-bottom: 25px;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    padding: 18px 40px;
    text-decoration: none;
    border-radius: 30px;
    font-size: 1.3em;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.completed-badge {
    display: inline-block;
    padding: 15px 30px;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 1.2em;
    margin-top: 10px;
}

.coming-soon {
    padding: 60px 40px;
    background: white;
    border: 2px solid #2a5298;
    border-radius: 20px;
    text-align: center;
    color: #666;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.coming-soon .icon {
    font-size: 5em;
    margin-bottom: 20px;
}

.coming-soon h3 {
    font-size: 2em;
    margin-bottom: 15px;
    color: #1e3c72;
}

.coming-soon p {
    font-size: 1.2em;
    line-height: 1.6;
}

/* Login Page */
.login-form {
    max-width: 400px;
    margin: 50px auto;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #2a5298;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
}

.welcome-text {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
}

/* Quiz Page */
.quiz-header {
    text-align: center;
    margin-bottom: 40px;
}

.quiz-header h2 {
    color: #1e3c72;
    font-size: 1.8em;
}

.question-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #2a5298;
}

.question-number {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 15px;
    font-weight: bold;
}

.question-text {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.5;
}

.category-badge {
    display: inline-block;
    padding: 5px 15px;
    background: #e0e0e0;
    border-radius: 15px;
    font-size: 0.9em;
    margin-bottom: 15px;
    color: #666;
}

.options {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.option-btn {
    padding: 15px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 10px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1em;
}

.option-btn:hover {
    border-color: #2a5298;
    background: #e6f0ff;
    transform: translateX(5px);
}

.option-btn input[type="radio"] {
    margin-right: 10px;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
}

.answered {
    opacity: 0.6;
    position: relative;
}

.answered::after {
    content: '✓ Répondu';
    position: absolute;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-weight: bold;
}

.no-questions {
    text-align: center;
    padding: 50px;
    color: #666;
}

/* Leaderboard Page */
.leaderboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.leaderboard-header h2 {
    color: #1e3c72;
    font-size: 2em;
}

.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.podium-place {
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    min-width: 150px;
}

.podium-place.first {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    order: 2;
    padding: 30px 20px;
}

.podium-place.second {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    order: 1;
}

.podium-place.third {
    background: linear-gradient(135deg, #CD7F32, #B87333);
    order: 3;
}

.podium-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.podium-name {
    font-size: 1.3em;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
}

.podium-score {
    font-size: 2em;
    font-weight: bold;
    color: white;
}

.rankings {
    max-width: 600px;
    margin: 0 auto;
}

.rank-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 5px solid #2a5298;
}

.rank-position {
    font-size: 2em;
    font-weight: bold;
    color: #2a5298;
    min-width: 60px;
}

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

.rank-name {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 5px;
}

.rank-stats {
    color: #666;
    font-size: 0.9em;
}

.rank-points {
    font-size: 1.5em;
    font-weight: bold;
    color: #2a5298;
}

.empty-state {
    text-align: center;
    padding: 50px;
    color: #666;
}

/* Quiz Timer and Start Screen */
.quiz-start-screen {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border: 2px solid #2a5298;
    border-radius: 20px;
    margin: 30px 0;
}

.start-message h3 {
    font-size: 2em;
    color: #1e3c72;
    margin-bottom: 20px;
}

.start-message p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 15px;
}

.start-quiz-btn {
    padding: 20px 50px;
    font-size: 1.5em;
    font-weight: bold;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(42, 82, 152, 0.3);
    margin-top: 20px;
}

.start-quiz-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(42, 82, 152, 0.4);
}

/* Timer Display */
.timer-display {
    position: sticky;
    top: 20px;
    z-index: 100;
    margin-bottom: 30px;
}

.timer-container {
    background: white;
    border: 2px solid #2a5298;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.timer-label {
    font-size: 1em;
    color: #666;
    margin-bottom: 10px;
    font-weight: bold;
}

.timer-value {
    font-size: 3em;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 15px;
}

.timer-bar-container {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.timer-bar {
    height: 100%;
    background: #28a745;
    transition: width 1s linear, background 0.3s;
    border-radius: 10px;
}

/* Question Header */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Quiz Results */
.quiz-results {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border: 2px solid #2a5298;
    border-radius: 20px;
    margin: 30px 0;
}

.results-content h3 {
    font-size: 2.5em;
    color: #1e3c72;
    margin-bottom: 30px;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.result-item {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #2a5298;
}

.result-label {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 10px;
}

.result-value {
    font-size: 3em;
    font-weight: bold;
    color: #2a5298;
}

.back-home-btn {
    display: inline-block;
    padding: 18px 40px;
    text-decoration: none;
    border-radius: 15px;
    font-size: 1.3em;
    font-weight: bold;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(42, 82, 152, 0.3);
    margin-top: 30px;
}

.back-home-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(42, 82, 152, 0.4);
}

/* Answer Feedback */
.answer-feedback {
    animation: fadeIn 0.3s ease-in;
}

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

/* Question Images */
.question-image {
    margin: 20px 0;
    text-align: center;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #2a5298;
}

.question-image img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

/* True/False Options */
.true-false-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.true-false-options .option-btn {
    font-size: 1.2em;
    padding: 20px;
    text-align: center;
}

/* Admin Panel */
.admin-header {
    text-align: center;
    margin-bottom: 40px;
}

.admin-header h2 {
    color: #1e3c72;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.admin-section {
    background: white;
    border: 2px solid #2a5298;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.admin-section h3 {
    color: #1e3c72;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2a5298;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
}

.btn-primary {
    padding: 15px 30px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-danger {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #c82333;
}

.filter-controls {
    margin-bottom: 20px;
}

.filter-controls label {
    font-weight: bold;
    color: #333;
}

.filter-controls select {
    margin-left: 10px;
    padding: 8px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

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

.question-item {
    background: #f8f9fa;
    border: 2px solid #2a5298;
    border-radius: 10px;
    padding: 20px;
}

.question-header-admin {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.badge-week,
.badge-type,
.badge-category {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.badge-week {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.badge-type {
    background: #e0e0e0;
    color: #666;
}

.badge-category {
    background: #2a5298;
    color: white;
}

.question-content {
    margin: 15px 0;
}

.question-content p {
    margin: 10px 0;
    line-height: 1.6;
}

.question-options {
    margin: 15px 0;
    padding-left: 20px;
}

.question-options p {
    margin: 5px 0;
}

.correct-option {
    color: #28a745;
    font-weight: bold;
}

.question-image-preview {
    margin: 15px 0;
    text-align: center;
}

.question-image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    border: 2px solid #2a5298;
}

.question-actions {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.2em;
}

.explanation {
    background: #fff3cd;
    padding: 10px;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
    margin: 10px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .nav {
        flex-direction: column;
        gap: 10px;
    }

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

    .true-false-options {
        grid-template-columns: 1fr;
    }

    .timer-value {
        font-size: 2.5em;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Fix podium order on mobile - display in natural order */
    .podium-place.first,
    .podium-place.second,
    .podium-place.third {
        order: 0;
    }
}
