/* ================= STYLES GÉNÉRAUX ================= */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f5f7f6;
    color: #222;
}

/* ================= HEADER AVEC LOGO GAUCHE ET NOM CENTRÉ ================= */
header {
    background: #0a7f3f;
    color: white;
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}

.header-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.header-center {
    flex: 2;
    text-align: center;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 8px;
}

.header-corner-auth {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1;
    margin-bottom: 2px;
}

.header-corner-auth a {
    color: #e8fff1;
    text-decoration: none;
    font-weight: 600;
    opacity: 0.95;
}

.header-corner-auth a:hover {
    text-decoration: underline;
    opacity: 1;
}

.header-corner-auth span {
    color: rgba(255, 255, 255, 0.85);
}

.logo {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    display: block;
    overflow: hidden;
    object-fit: cover;
}

.logo-link {
    display: inline-flex;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.logo-link:hover {
    transform: scale(1.08);
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
}

/* Navigation */
nav {
    margin-top: 12px;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

nav a {
    margin: 0;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    padding: 8px 14px;
    border-radius: 999px;
    transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
}

nav a:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

nav a.active {
    background: #ffffff;
    color: #0a7f3f;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.header-auth-btn {
    margin: 0;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: #ffffff;
    color: #0a7f3f;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.header-auth-btn:hover {
    background: #f3fff8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-auth-btn.secondary {
    background: transparent;
    color: #ffffff;
}

.header-auth-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ================= LOGIN BOX ================= */
.login-box {
    background: white;
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.login-box input {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.login-box button {
    margin: 5px;
}

/* ================= ACCÈS PLATEFORME ================= */
.access-box {
    background: #e8f5e9;
    margin: 20px;
    border-radius: 10px;
    text-align: center;
}

/* ================= HERO ================= */
.hero {
    padding: 50px 20px;
    text-align: center;
    background: linear-gradient(135deg, #0a7f3f 0%, #0d5c2e 100%);
    color: white;
    margin-bottom: 30px;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero-intro-home {
    max-width: 920px;
    margin: 20px auto 8px;
    font-size: 1.18rem;
    line-height: 1.92;
    letter-spacing: 0.2px;
    text-align: left;
    text-wrap: pretty;
}

.hero-home .hero-intro-home {
    max-width: 920px;
    margin: 20px auto 8px;
    font-size: 1.18rem;
    line-height: 1.92;
    letter-spacing: 0.2px;
    text-align: left;
    text-wrap: pretty;
}

.intro-highlight {
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ================= OFFRES ================= */
.offres {
    display: flex;
    gap: 20px;
    padding: 24px 30px 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.offres h2 {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    color: #0a7f3f;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    width: 280px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: relative;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card.recommended {
    border: 2px solid #ff9800;
    background: #fff8e1;
}

.badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff9800;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
    font-weight: bold;
}

.prix {
    font-weight: bold;
    color: #0a7f3f;
    font-size: 24px;
    margin: 15px 0;
}

.card a {
    display: block;
    background: #0a7f3f;
    color: white;
    padding: 12px;
    text-decoration: none;
    margin-top: 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.card a:hover {
    background: #086c35;
}

.offer-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.offer-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 6px;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.offer-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
}

.offer-btn-primary {
    background: #0a7f3f;
    color: #ffffff;
}

.offer-btn-primary:hover {
    background: #086c35;
}

.offer-btn-secondary {
    background: #f0f6f3;
    color: #0a7f3f;
    border: 1px solid #0a7f3f;
}

.offer-btn-secondary:hover {
    background: #e7f3ec;
}

/* ================= STATS ================= */
.stats {
    text-align: center;
    padding: 40px;
    background: #e8f5e9;
    margin: 30px 0;
}

.stats h2 {
    color: #0a7f3f;
}

.stats p {
    font-size: 1.2rem;
}

/* ================= TEMOIGNAGES ================= */
.temoignages {
    background: white;
    padding: 30px;
    text-align: center;
    margin: 30px 0;
}

.temoignages h2 {
    color: #0a7f3f;
}

.carousel {
    overflow: hidden;
    height: 80px;
    position: relative;
}

.carousel p {
    position: absolute;
    width: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    font-style: italic;
    color: #555;
}

/* ================= FOOTER ================= */
footer {
    background: #111;
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 40px;
}

footer p {
    margin: 5px 0;
}

.site-footer {
    background: #101614;
    color: #eef4f1;
    text-align: center;
    padding: 20px 16px;
    margin-top: 42px;
    border-top: 3px solid #0a7f3f;
}

.site-footer p {
    margin: 4px 0;
    line-height: 1.4;
}

.footer-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.footer-links a {
    color: #8ff0c3;
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-copy {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #2a3a34;
    color: #b8c7c0;
    font-size: 13px;
}

/* ================= BOUTONS GÉNÉRAUX ================= */
button {
    background: #0a7f3f;
    color: white;
    border: none;
    padding: 12px 24px;
    margin: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 16px;
}

button:hover {
    background: #086c35;
}

/* ================= SECTION FORMATION ================= */
.formation-section {
    text-align: center;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ================= STYLES DES QUIZ ================= */

/* Grille des thématiques */
.thematiques-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

/* Grille des rubriques principales */
.rubriques-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin: 25px 0;
}

.rubriques-header {
    margin-bottom: 18px;
}

.rubriques-header h3 {
    margin: 0 0 6px 0;
    color: #0a7f3f;
    font-size: 1.35rem;
}

.rubriques-header p {
    margin: 0;
    color: #5a6a62;
    font-size: 0.95rem;
}

.rubrique-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(10, 127, 63, 0.14), transparent 42%),
        linear-gradient(160deg, #ffffff 0%, #f4fbf7 100%);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border: 1px solid #d4e7d8;
    text-align: left;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.rubrique-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(10, 127, 63, 0.18);
    border-color: #0a7f3f;
}

.rubrique-card::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(10, 127, 63, 0.08);
}

.rubrique-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.rubrique-badge {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    padding: 4px 10px;
    letter-spacing: 0.2px;
}

.rubrique-badge.ready {
    background: #e7f6ec;
    color: #0a7f3f;
    border: 1px solid #b7e2c6;
}

.rubrique-badge.soon {
    background: #fff3e0;
    color: #b06200;
    border: 1px solid #ffd3a1;
}

.rubrique-card h4 {
    margin: 0 0 8px 0;
    color: #0a7f3f;
    font-size: 1.08rem;
    position: relative;
    z-index: 1;
}

.rubrique-card p {
    margin: 0;
    color: #4f5b55;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.rubrique-meta {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #0d5c2e;
    background: rgba(10, 127, 63, 0.1);
    border: 1px solid rgba(10, 127, 63, 0.2);
    border-radius: 8px;
    padding: 6px 9px;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.rubrique-card.disabled {
    cursor: not-allowed;
    opacity: 0.86;
    background:
        radial-gradient(circle at 100% 0%, rgba(126, 126, 126, 0.14), transparent 42%),
        linear-gradient(160deg, #f7f7f7 0%, #f1f1f1 100%);
    border-color: #d8d8d8;
}

.rubrique-card.disabled:hover {
    transform: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border-color: #d4d4d4;
}

.rubrique-card.disabled h4 {
    color: #616161;
}

.rubrique-card.disabled p {
    color: #6f6f6f;
}

.rubrique-card.disabled .rubrique-meta {
    color: #6a6a6a;
    background: rgba(120, 120, 120, 0.12);
    border-color: rgba(120, 120, 120, 0.2);
}

/* Carte de thématique */
.theme-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.theme-card:hover {
    background: #e8f5e9;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: #0a7f3f;
}

.theme-card h4 {
    margin: 0 0 10px 0;
    color: #0a7f3f;
    font-size: 1.2rem;
}

.theme-card p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* En-tête du quiz */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0a7f3f;
    flex-wrap: wrap;
    gap: 10px;
}

.quiz-header h3 {
    margin: 0;
    color: #0a7f3f;
}

.quiz-progress {
    background: #0a7f3f;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

/* Question du quiz */
.quiz-question {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.quiz-question p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Options des réponses */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f9f9f9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e0e0e0;
}

.quiz-option:hover {
    background: #e8f5e9;
    border-color: #0a7f3f;
}

.quiz-option input {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.quiz-option label {
    cursor: pointer;
    flex: 1;
    font-size: 1rem;
}

/* Navigation du quiz */
.quiz-nav {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.quiz-nav-btn {
    padding: 10px 25px;
    background: #666;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.quiz-nav-btn:hover {
    background: #555;
    transform: translateY(-2px);
}

.quiz-nav-btn.primary {
    background: #0a7f3f;
}

.quiz-nav-btn.primary:hover {
    background: #086c35;
}

.quiz-nav-btn.warning {
    background: #ff9800;
}

.quiz-nav-btn.warning:hover {
    background: #e68900;
}

/* Cartes de correction */
.correction-card {
    background: white;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 12px;
    border-left: 5px solid;
    transition: all 0.2s;
}

.correction-card.correct {
    border-left-color: #4caf50;
    background: #e8f5e9;
}

.correction-card.incorrect {
    border-left-color: #f44336;
    background: #ffebee;
}

.correction-question {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1rem;
}

.correction-answer, .correction-correct {
    margin: 8px 0;
    font-size: 14px;
}

.correction-answer {
    color: #555;
}

.correction-correct {
    color: #2e7d32;
    font-weight: 500;
}

/* Score du quiz */
.quiz-score {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 10px;
}

.quiz-score h3 {
    margin: 0 0 15px 0;
    color: #0a7f3f;
}

.score-bar {
    background: #e0e0e0;
    height: 25px;
    border-radius: 12px;
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
}

.score-fill {
    background: #0a7f3f;
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Messages de succès/échec */
.success-message, .warning-message {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.success-message {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    color: #2e7d32;
}

.warning-message {
    background: #fff3e0;
    border: 1px solid #ff9800;
    color: #e65100;
}

@media print {
    body.protected-mode * {
        display: none !important;
    }

    body.protected-mode::before {
        content: 'Impression desactivee pour ce contenu protege.';
        display: block;
        padding: 30px;
        font-size: 20px;
        text-align: center;
        color: #b71c1c;
    }
}

.success-message button, .warning-message button {
    margin-top: 15px;
}

/* Status d'accès */
#accessStatus {
    max-width: 600px;
    margin: 10px auto;
}

/* ================= LECTEUR PDF PAGE PAR PAGE (NOUVEAU) ================= */

/* Lecteur principal */
.pdf-reader {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 12px;
    font-family: 'Segoe UI', Arial, sans-serif;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.pdf-btn:hover {
    background: #086c35;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(10,127,63,0.3);
}

.pdf-btn:active {
    transform: translateY(0);
}

/* Informations de page */
.page-info {
    margin: 0 8px;
    font-weight: bold;
    color: #333;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 14px;
    font-size: 12px;
}

/* Nom du fichier */
.pdf-filename {
    margin-left: 8px;
    font-size: 11px;
    color: #888;
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 10px;
}

/* Conteneur du canvas PDF */
#pdfCanvasContainer {
    text-align: center;
    overflow: auto;
    max-height: 70vh;
    background: #e0e0e0;
    border-radius: 8px;
    padding: 10px;
}

/* Canvas PDF */
#pdfCanvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-radius: 8px;
    background: white;
}

/* Message de protection du PDF */
.pdf-footer {
    text-align: center;
    font-size: 11px;
    color: #999;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

/* Scrollbar personnalisée pour le conteneur PDF */
#pdfCanvasContainer::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#pdfCanvasContainer::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#pdfCanvasContainer::-webkit-scrollbar-thumb {
    background: #0a7f3f;
    border-radius: 4px;
}

#pdfCanvasContainer::-webkit-scrollbar-thumb:hover {
    background: #086c35;
}

/* Conteneur PDF original (gardé pour compatibilité) */
#pdfContainer {
    margin-top: 20px;
    text-align: center;
}

#pdfContainer canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-radius: 8px;
}

/* ================= RESPONSIVE ================= */

/* Tablettes */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    
    .header-left, .header-center, .header-right {
        flex: auto;
        width: 100%;
    }
    
    .header-left {
        justify-content: center;
        margin-bottom: 10px;
    }

    .header-right {
        justify-content: center;
        margin-top: 10px;
        gap: 10px;
        align-items: center;
    }

    .header-corner-auth {
        font-size: 12px;
        margin-bottom: 0;
    }

    .header-auth-btn {
        padding: 7px 12px;
        font-size: 12px;
    }
    
    .logo {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: block;
        overflow: hidden;
        object-fit: cover;
    }
    
    header h1 {
        font-size: 1.4rem;
    }
    
    nav a {
        display: inline-block;
        margin: 0;
        font-size: 13px;
        padding: 7px 10px;
    }

    nav {
        margin-top: 10px;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }

    .hero-home .hero-intro-home {
        max-width: 100%;
        margin-top: 16px;
        font-size: 1.06rem;
        line-height: 1.82;
        text-align: left;
    }
    
    .offres {
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }
    
    .card {
        width: 90%;
        max-width: 320px;
    }
    
    .thematiques-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .rubriques-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .quiz-header {
        flex-direction: column;
        text-align: center;
    }
    
    .quiz-question p {
        font-size: 1rem;
    }
    
    .quiz-option label {
        font-size: 14px;
    }
    
    .quiz-nav-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .formation-section {
        padding: 20px;
    }

    .site-footer {
        padding: 18px 14px;
    }
    
    button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* PDF responsive */
    .pdf-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .pdf-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .page-info {
        margin: 5px 0;
        font-size: 12px;
    }
    
    .pdf-filename {
        margin-left: 0;
        font-size: 10px;
    }
    
    .pdf-reader {
        padding: 10px;
    }
    
    #pdfCanvasContainer {
        max-height: 60vh;
    }
}

/* Mobiles */
@media (max-width: 480px) {
    .hero {
        padding: 30px 15px;
    }
    
    .hero h2 {
        font-size: 1.2rem;
    }

    .hero-home .hero-intro-home {
        font-size: 1rem;
        line-height: 1.75;
    }
    
    .card {
        width: 95%;
    }
    
    .prix {
        font-size: 20px;
    }
    
    .theme-card h4 {
        font-size: 1rem;
    }
    
    .quiz-question {
        padding: 15px;
    }
    
    .quiz-option {
        padding: 10px;
    }
    
    .correction-card {
        padding: 12px;
    }
    
    .correction-question {
        font-size: 14px;
    }
    
    .login-box {
        margin: 15px;
        width: auto;
    }
    
    /* PDF mobile */
    .pdf-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .page-info {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* Grands écrans */
@media (min-width: 1200px) {
    .container, .formation-section, .quiz-section {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .thematiques-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ================= UTILITAIRES ================= */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

/* Animation pour les cartes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-card, .card, .correction-card, .pdf-reader {
    animation: fadeIn 0.3s ease-out;
}

/* ================= MODAL PLEIN ÉCRAN POUR PDF ================= */

.pdf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 9999;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pdf-modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    margin: 2% auto;
    background: #2d2d2d;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}

.pdf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: #1a1a1a;
    border-bottom: 1px solid #444;
    border-radius: 10px 10px 0 0;
}

.pdf-modal-title {
    color: white;
    font-size: 15px;
    font-weight: bold;
}

.pdf-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.pdf-modal-close:hover {
    color: #ff9800;
    transform: scale(1.1);
}

.pdf-modal-body {
    flex: 1;
    padding: 10px;
    background: #f5f5f5;
    overflow: auto;
}

/* Lecteur PDF en mode modal */
#pdfModalContainer .pdf-reader {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#pdfModalContainer .pdf-controls {
    flex-shrink: 0;
}

#pdfModalContainer #pdfCanvasContainer {
    flex: 1;
    overflow: auto;
    max-height: none;
    min-height: 500px;
}

#pdfModalContainer #pdfCanvas {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* Responsive modal */
@media (max-width: 768px) {
    .pdf-modal-content {
        width: 98%;
        height: 96%;
        margin: 2% auto;
    }
    
    .pdf-modal-header {
        padding: 8px 15px;
    }
    
    .pdf-modal-title {
        font-size: 14px;
    }
    
    .pdf-modal-close {
        font-size: 24px;
    }
    
    .pdf-modal-body {
        padding: 10px;
    }
}

/* Bouton Plein écran */
.fullscreen-btn {
    background: #0a7f3f;
    transition: all 0.2s ease;
}

.fullscreen-btn:hover {
    background: #086c35;
    transform: translateY(-2px);
}

/* Style pour le mode plein écran */
:-webkit-full-screen .pdf-modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

:-moz-full-screen .pdf-modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

:fullscreen .pdf-modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

:-webkit-full-screen .pdf-reader {
    background: #1a1a1a;
}

:-moz-full-screen .pdf-reader {
    background: #1a1a1a;
}

:fullscreen .pdf-reader {
    background: #1a1a1a;
}

:-webkit-full-screen #pdfCanvasContainerModal {
    background: #000;
}

:-moz-full-screen #pdfCanvasContainerModal {
    background: #000;
}

:fullscreen #pdfCanvasContainerModal {
    background: #000;
}

/* ================= CONTROLES DE ZOOM ================= */

.zoom-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.05);
    padding: 0 6px;
    border-radius: 18px;
    margin: 0 5px;
}

.zoom-btn {
    background: #0a7f3f;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: bold;
}

.zoom-btn:hover {
    background: #086c35;
}

.zoom-level {
    min-width: 40px;
    text-align: center;
    font-weight: bold;
    color: #333;
    background: white;
    padding: 3px 6px;
    border-radius: 14px;
    font-size: 11px;
}

/* Conteneur du canvas avec défilement */
.pdf-canvas-container {
    flex: 1;
    overflow: auto;
    text-align: center;
    background: #e0e0e0;
    padding: 8px;
    border-radius: 6px;
    min-height: 340px;
    cursor: grab;
}

.pdf-canvas-container:active {
    cursor: grabbing;
}

/* Canvas avec zoom */
.pdf-canvas {
    max-width: none;
    height: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-radius: 8px;
    transition: width 0.1s ease;
}

/* Barre de défilement personnalisée */
.pdf-canvas-container::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.pdf-canvas-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.pdf-canvas-container::-webkit-scrollbar-thumb {
    background: #0a7f3f;
    border-radius: 5px;
}

.pdf-canvas-container::-webkit-scrollbar-thumb:hover {
    background: #086c35;
}

/* Responsive pour les contrôles de zoom */
@media (max-width: 768px) {
    .zoom-controls {
        margin-top: 5px;
        padding: 0 5px;
    }
    
    .zoom-btn {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .zoom-level {
        font-size: 11px;
        min-width: 40px;
    }
    
    .pdf-controls {
        gap: 5px;
    }
}