/* ===================== MEDILEARN — STYLES v7 ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f0f4f8; color: #1a202c; min-height: 100vh; overflow-x: hidden; }
/* Empêche iOS d'agrandir le texte tout seul (rendu cohérent) + anti-débordement */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, table { max-width: 100%; }

/* ── NAVBAR ─────────────────────────────────────────────────────── */
            .info-bar { height: 38px; }
            .navbar { display: flex; align-items: center; justify-content: space-between; background: #fff; padding: .85rem 2rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); position: sticky; top: 38px; z-index: 100; gap: 1rem; flex-wrap: wrap; margin-top: 38px; }
            body { padding-top: 0; }
            .page.active { padding-top: .5rem; }


.navbar-brand { display: flex; align-items: center; gap: .5rem; }
.logo-icon { font-size: 1.4rem; }
.logo-text { font-size: 1.25rem; font-weight: 800; color: #2563eb; }
.navbar-links { display: flex; gap: .2rem; flex: 1; justify-content: center; flex-wrap: wrap; }
.nav-link { text-decoration: none; color: #4a5568; font-weight: 600; padding: .45rem .9rem; border-radius: 8px; font-size: .92rem; transition: all .15s; cursor: pointer; }
.nav-link:hover { background: #eff6ff; color: #2563eb; }
.navbar-actions { display: flex; align-items: center; gap: .6rem; }

/* ── BUTTONS ──────────────────────────────────────────────────────*/
.btn-primary { background: #2563eb; color: #fff; border: none; padding: .65rem 1.4rem; border-radius: 8px; font-size: .95rem; font-weight: 700; cursor: pointer; transition: background .15s; }
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }
.btn-secondary { background: #fff; color: #2563eb; border: 2px solid #2563eb; padding: .6rem 1.3rem; border-radius: 8px; font-size: .95rem; font-weight: 700; cursor: pointer; transition: all .15s; }
.btn-secondary:hover { background: #eff6ff; }
/*button essayer gratuitement Medbyjes*/
.btn-outline { background: transparent; color: #2563eb; border: 2px solid #2563eb; padding: .45rem 1rem; border-radius: 8px; font-size: .88rem; font-weight: 700; cursor: pointer; transition: all .15s; }

#btn-free-trial {
    font-size: 1rem;
    padding: .75rem 1.8rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 2px solid #2563eb;
    color: #2563eb;
    animation: freeTrialPulse 2s infinite;
}

@keyframes freeTrialPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,.3); }
    50% { box-shadow: 0 0 0 8px rgba(37,99,235,0); }
}

.btn-outline:hover { background: #2563eb; color: #fff; }
.lang-switcher { display: flex; gap: 2px; background: #e2e8f0; border-radius: 8px; padding: 2px; }
.btn-lang { background: transparent; color: #4a5568; border: none; padding: .3rem .65rem; border-radius: 6px; font-weight: 700; cursor: pointer; font-size: .85rem; transition: all .15s; }
.btn-lang.active { background: #2563eb; color: #fff; box-shadow: 0 1px 4px rgba(37,99,235,.3); }
.btn-back { background: none; border: none; color: #2563eb; font-size: .9rem; font-weight: 600; cursor: pointer; padding: .4rem 0; margin: 1rem 2rem 0; display: inline-flex; align-items: center; gap: .3rem; }
.btn-back:hover { text-decoration: underline; }
.btn-full { width: 100%; margin-top: .5rem; }

/* ── PAGES ───────────────────────────────────────────────────────*/
.page { display: none; animation: fadeIn .2s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ── HERO ────────────────────────────────────────────────────────*/
.hero { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 4rem 2rem 2.5rem; max-width: 1100px; margin: 0 auto; flex-wrap: wrap; }
.hero-content { flex: 1; min-width: 260px; }
.hero-title { font-size: 2.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.hero-subtitle { font-size: 1.05rem; color: #4a5568; margin-bottom: 1.5rem; line-height: 1.6; }
.hero-buttons { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.stat-card { background: #fff; border-radius: 14px; padding: 1.3rem 1.5rem; text-align: center; min-width: 100px; box-shadow: 0 2px 10px rgba(0,0,0,.07); }
.stat-number { display: block; font-size: 1.9rem; font-weight: 800; color: #2563eb; }
.stat-label { font-size: .8rem; color: #718096; }
.features { display: flex; gap: 1.2rem; padding: 1.5rem 2rem 3rem; max-width: 1100px; margin: 0 auto; flex-wrap: wrap; }
.feature-card { flex: 1; min-width: 200px; background: #fff; border-radius: 14px; padding: 1.6rem 1.4rem; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.feature-card-nav { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.feature-card-nav:hover { transform: translateY(-5px); box-shadow: 0 10px 28px rgba(0,0,0,.13); background: #f8faff; }
.feature-icon { font-size: 2.2rem; margin-bottom: .7rem; }
.feature-card h3 { margin-bottom: .4rem; font-size: 1rem; color: #2d3748; }
.feature-card p { color: #718096; font-size: .88rem; }

/* ── AUTH ────────────────────────────────────────────────────────*/
.auth-container { max-width: 420px; margin: 3rem auto; background: #fff; border-radius: 16px; padding: 2rem; box-shadow: 0 4px 20px rgba(0,0,0,.1); }
.auth-tabs { display: flex; margin-bottom: 1.5rem; border-bottom: 2px solid #e2e8f0; }
.auth-tab { flex: 1; padding: .65rem; background: none; border: none; font-size: .95rem; font-weight: 600; cursor: pointer; color: #718096; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.auth-tab.active { color: #2563eb; border-bottom-color: #2563eb; }
.auth-container h2 { margin-bottom: 1.2rem; font-size: 1.35rem; }

/* ── AUTH MODAL ─────────────────────────────────────────────────*/
.auth-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.48); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 1rem; }
.auth-modal-box { background: #fff; border-radius: 18px; padding: 2rem 2rem 1.5rem; width: 100%; max-width: 430px; position: relative; box-shadow: 0 24px 64px rgba(0,0,0,.22); max-height: 90vh; overflow-y: auto; }
.auth-modal-close { position: absolute; top: .9rem; right: 1rem; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: #718096; line-height: 1; }
.auth-modal-close:hover { color: #2d3748; }
.auth-required-msg { background: #fffbeb; border: 1px solid #f6e05e; color: #92400e; padding: .6rem 1rem; border-radius: 8px; font-size: .88rem; margin-bottom: 1.1rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.input-eye-wrap { position: relative; display: flex; align-items: center; }
.input-eye-wrap input { flex: 1; padding-right: 2.6rem !important; }
.btn-eye { position: absolute; right: .5rem; background: none; border: none; cursor: pointer; font-size: 1.1rem; color: #718096; padding: .2rem; line-height: 1; }
.forgot-pw-row { text-align: right; margin: -.2rem 0 .8rem; }
.forgot-pw-row a { font-size: .83rem; color: #2563eb; }
.auth-switch { font-size: .85rem; color: #718096; text-align: center; margin-top: .8rem; }
.auth-switch a { color: #2563eb; font-weight: 600; }

/* ── NAV GREETING ───────────────────────────────────────────────*/
.nav-greeting { font-size: .85rem; font-weight: 600; color: #2d3748; white-space: nowrap; padding: .3rem .6rem; background: #f0fdf4; border-radius: 20px; }

/* ── PREMIUM SYSTEM ─────────────────────────────────────────────*/
.partie-card-premium { opacity: .72; cursor: default; position: relative; overflow: hidden; }
.premium-lock-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .4rem; background: rgba(255,255,255,.6); backdrop-filter: blur(2px); font-weight: 700; font-size: .85rem; color: #4a5568; border-radius: inherit; }
.stats-premium-lock { text-align: center; padding: 3rem 2rem; color: #4a5568; }
.stats-premium-lock .lock-icon { font-size: 2.5rem; display: block; margin-bottom: .8rem; }
.stats-premium-lock p { font-size: 1rem; font-weight: 600; color: #2d3748; max-width: 340px; margin: 0 auto; }

/* ── CONVERSION CARD ─────────────────────────────────────────────*/
.conversion-card { background: linear-gradient(145deg, #fffbf0, #fff7ed); border: 2px solid #fed7aa; border-radius: 18px; padding: 2rem; max-width: 520px; margin: 2rem auto; text-align: center; }
.conversion-msg { font-size: .97rem; color: #4a5568; line-height: 1.6; margin: 1rem 0 1.5rem; }
.early-bird-badge { display: inline-block; background: #fef3c7; border: 1.5px solid #f59e0b; color: #92400e; border-radius: 20px; padding: .4rem 1.1rem; font-size: .88rem; font-weight: 700; margin-bottom: 1.2rem; }
.cta-convert { font-size: 1.05rem; padding: .8rem 1.8rem; width: 100%; margin-bottom: .8rem; background: linear-gradient(135deg, #2563eb, #7c3aed); }
.conversion-free-link { display: block; text-align: center; color: #718096; font-size: .83rem; margin-top: .4rem; text-decoration: underline; cursor: pointer; }

/* ── ABOUT PAGE ─────────────────────────────────────────────────*/
.about-hero { text-align: center; padding: 2.5rem 1rem 1.5rem; }
.about-avatar { font-size: 4rem; line-height: 1; margin-bottom: .8rem; }
.about-hero h2 { font-size: 1.7rem; font-weight: 800; color: #1a202c; margin-bottom: .4rem; }
.about-tagline { color: #718096; font-size: .95rem; }
.about-avatar img { width: min(260px, 72vw); height: auto; border-radius: 18px; display: inline-block; box-shadow: 0 8px 28px rgba(0,0,0,.18); }
.about-socials { display: flex; gap: .9rem; justify-content: center; margin-top: 1.1rem; }
.about-social { width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,.18); transition: transform .15s; text-decoration: none; }
.about-social:hover { transform: translateY(-3px) scale(1.05); }
.about-contact { text-align: center; margin-top: 1.2rem; font-size: .95rem; }
.about-contact a { color: #2563eb; font-weight: 700; text-decoration: none; }
.about-contact a:hover { text-decoration: underline; }
.about-body { max-width: 560px; margin: 0 auto 2rem; padding: 0 1.5rem; font-size: .97rem; color: #4a5568; line-height: 1.8; }
.about-back { text-align: center; margin-bottom: 2rem; }

/* ── PAIEMENT PAGE ───────────────────────────────────────────────*/
.paiement-card { background: #fff; border: 2px solid #e2e8f0; border-radius: 18px; padding: 2rem; max-width: 540px; margin: 1.5rem auto; box-shadow: 0 4px 20px rgba(0,0,0,.07); }
.paiement-card h2 { font-size: 1.4rem; font-weight: 800; text-align: center; color: #1a202c; margin-bottom: 1rem; }
.paiement-features { list-style: none; padding: 0; margin: 1.2rem 0; }
.paiement-features li { padding: .45rem 0; font-size: .95rem; color: #2d3748; border-bottom: 1px solid #f7fafc; }
.paiement-price { font-size: 2.8rem; font-weight: 900; text-align: center; color: #2563eb; margin: 1.2rem 0; }
.paiement-loading { text-align: center; padding: 3rem; color: #718096; }

/* ── CONFIRMATION PAGE ──────────────────────────────────────────*/
.confirmation-card { background: linear-gradient(145deg, #f0fdf4, #fffbf0); border: 2px solid #86efac; border-radius: 18px; padding: 2.5rem; max-width: 500px; margin: 2rem auto; text-align: center; }
.confirmation-icon { font-size: 3.5rem; margin-bottom: .8rem; }
.confirmation-card h2 { font-size: 1.5rem; font-weight: 800; color: #15803d; margin-bottom: .8rem; }
.confirmation-card p { color: #4a5568; font-size: .97rem; line-height: 1.7; margin-bottom: 1.5rem; }

/* ── RESET PASSWORD ──────────────────────────────────────────────*/
.reset-pw-form { max-width: 420px; margin: 0 auto; }
.reset-pw-form p { color: #4a5568; margin-bottom: 1.2rem; }
.text-error { color: #c53030; font-weight: 600; text-align: center; padding: 1rem; }

/* ── PROFIL PAGE ────────────────────────────────────────────────*/
.profil-container { max-width: 560px; margin: 0 auto; padding: 0 2rem 3rem; }
.profil-field-row { background: #fff; border-radius: 12px; padding: 1.1rem 1.3rem; margin-bottom: .85rem; box-shadow: 0 1px 6px rgba(0,0,0,.07); display: flex; align-items: flex-start; gap: .8rem; }
.profil-field-body { flex: 1; min-width: 0; }
.profil-field-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #718096; margin-bottom: .25rem; }
.profil-field-value { font-size: .97rem; font-weight: 600; color: #2d3748; overflow-wrap: break-word; word-break: break-word; }
.profil-edit-btn { background: none; border: 2px solid #e2e8f0; color: #4a5568; border-radius: 8px; padding: .3rem .55rem; cursor: pointer; font-size: .85rem; flex-shrink: 0; transition: all .15s; }
.profil-edit-btn:hover { border-color: #2563eb; color: #2563eb; }
.profil-input { width: 100%; padding: .55rem .75rem; border: 1.5px solid #e2e8f0; border-radius: 8px; font-size: .93rem; margin-bottom: .5rem; box-sizing: border-box; }
.profil-input:focus { outline: none; border-color: #2563eb; }
.profil-edit-actions { display: flex; gap: .5rem; margin-top: .2rem; }
.profil-role-badge { display: inline-block; background: #eff6ff; color: #2563eb; border-radius: 20px; padding: .2rem .8rem; font-size: .78rem; font-weight: 800; letter-spacing: .06em; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .3rem; font-weight: 500; font-size: .88rem; color: #4a5568; }
.form-group input { width: 100%; padding: .6rem .85rem; border: 1.5px solid #e2e8f0; border-radius: 8px; font-size: .95rem; }
.form-group input:focus { outline: none; border-color: #2563eb; }

/* ── SECTION HEADER ──────────────────────────────────────────────*/
.section-header { text-align: center; padding: 2.2rem 1rem 1.2rem; }
.section-header h2 { font-size: 1.75rem; font-weight: 800; color: #1a202c; }
.section-header h3 { font-size: 1.3rem; font-weight: 700; color: #2d3748; }
.section-header p { color: #718096; margin-top: .4rem; font-size: .95rem; }

/* ── CHAPITRES LIST ───────────────────────────────────────────────*/
.chapitres-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px,1fr)); gap: 1.1rem; padding: 0 2rem 3rem; max-width: 1200px; margin: 0 auto; }
.chapitre-card { background: #fff; border-radius: 14px; padding: 1.4rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.chapitre-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.11); }
.chapitre-num { font-size: .76rem; font-weight: 700; color: #2563eb; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .3rem; }
.chapitre-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; color: #1a202c; }
.chapitre-desc { font-size: .82rem; color: #718096; margin-bottom: .65rem; line-height: 1.4; }
.chapitre-prog-row { display: flex; gap: .4rem; margin-bottom: .55rem; }
.mini-prog-bar { flex: 1; background: #e2e8f0; border-radius: 3px; height: 4px; overflow: hidden; }
.mini-prog-fill { height: 100%; border-radius: 3px; }
.mini-prog-cours { background: #16a34a; }
.mini-prog-qcm   { background: #d97706; }
.chapitre-pills { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.pill { font-size: .7rem; font-weight: 700; padding: .2rem .55rem; border-radius: 20px; }
.pill-cours { background: #eff6ff; color: #2563eb; }
.pill-qcm   { background: #fef3c7; color: #92400e; }
.pill-read  { background: #dcfce7; color: #15803d; }
.qcm-done-badge { font-size: .7rem; font-weight: 700; padding: .2rem .55rem; border-radius: 20px; background: #bbf7d0; color: #166534; }
.chapitre-progress { background: #e2e8f0; border-radius: 4px; height: 5px; margin-top: .5rem; overflow: hidden; }
.chapitre-progress-bar { background: #2563eb; height: 100%; border-radius: 4px; }
.chapitre-score { font-size: .78rem; color: #718096; margin-top: .3rem; }

/* ── LEVEL 2 : LANDING ───────────────────────────────────────────*/
#landing-content { max-width: 760px; margin: 0 auto; padding: .5rem 2rem 3rem; }
.landing-header { text-align: center; padding: 1.2rem 0 2rem; }
.landing-icon { font-size: 3.2rem; margin-bottom: .7rem; }
.landing-header h2 { font-size: 1.55rem; font-weight: 800; margin-bottom: .5rem; }
.landing-desc { color: #718096; font-size: .95rem; line-height: 1.6; }
.landing-modes { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; align-items: flex-start; }
.mode-card { flex: 1; min-width: 260px; max-width: 340px; background: #fff; border-radius: 16px; padding: 1.6rem 1.5rem; text-align: center; box-shadow: 0 3px 14px rgba(0,0,0,.08); border: 2px solid transparent; transition: box-shadow .15s, transform .15s; }
.mode-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.12); transform: translateY(-2px); }
.mode-card-icon { font-size: 2.4rem; margin-bottom: .5rem; }
.mode-card-title { font-size: 1.3rem; font-weight: 800; color: #1a202c; margin-bottom: .2rem; }
.mode-card-sub { font-size: .85rem; color: #718096; margin-bottom: .6rem; }
.landing-score-badge { font-size: .82rem; font-weight: 700; color: #16a34a; margin-bottom: .9rem; }
.landing-score-badge.muted { color: #a0aec0; font-weight: 500; }
.read-prog-wrap { background: #e2e8f0; border-radius: 6px; height: 7px; margin: .6rem 0 .3rem; overflow: hidden; }
.read-prog-fill { background: #16a34a; height: 100%; border-radius: 6px; transition: width .4s; }
.read-prog-label { font-size: .78rem; color: #4a5568; margin-bottom: .9rem; font-weight: 600; }
.btn-mode-start { width: 100%; padding: .72rem; background: #2563eb; color: #fff; border: none; border-radius: 10px; font-size: .93rem; font-weight: 700; cursor: pointer; transition: background .15s; margin-top: .5rem; }
.btn-mode-start:hover { background: #1d4ed8; }
.btn-mode-start:disabled { background: #93c5fd; cursor: not-allowed; }
.btn-mode-qcm { background: #d97706; }
.btn-mode-qcm:hover { background: #b45309; }

/* QCM Timer input on landing */
.qcm-cfg-row { margin: 1rem 0 0; text-align: left; }
.qcm-cfg-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #718096; margin-bottom: .5rem; }
.qcm-cfg-btn { padding: .38rem .8rem; border: 2px solid #e2e8f0; border-radius: 7px; background: #fff; color: #4a5568; font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.qcm-cfg-btn:hover { border-color: #d97706; color: #92400e; }
.qcm-cfg-btn.active { border-color: #d97706; background: #d97706; color: #fff; }
.qcm-timer-row { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.qcm-timer-or { font-size: .8rem; color: #a0aec0; font-style: italic; }
.qcm-num-input { width: 64px; padding: .38rem .55rem; border: 2px solid #e2e8f0; border-radius: 7px; font-size: .88rem; font-weight: 600; text-align: center; color: #1a202c; transition: border-color .15s; }
.qcm-num-input:focus { outline: none; border-color: #2563eb; }
.qcm-timer-unit { font-size: .82rem; color: #4a5568; font-weight: 600; }
.qcm-timer-reco { font-size: .72rem; color: #718096; margin-top: .5rem; background: #f8fafc; border-radius: 6px; padding: .3rem .6rem; line-height: 1.4; text-align: left; }

/* ── LEVEL 3 : PARTIES ───────────────────────────────────────────*/
.parties-scroll-wrap { overflow-x: auto; padding: 0 2rem 3rem; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #cbd5e0 transparent; }
.parties-scroll-wrap::-webkit-scrollbar { height: 5px; }
.parties-scroll-wrap::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 3px; }
.parties-grid-inner { display: flex; gap: 1.2rem; min-width: max-content; }
.partie-card { width: 240px; flex-shrink: 0; background: #fff; border-radius: 14px; padding: 1.5rem 1.3rem 1.3rem; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.07); transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; gap: .5rem; }
.partie-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.partie-card-badge { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; padding: .22rem .65rem; border-radius: 20px; align-self: flex-start; }
.partie-card-name { font-size: .97rem; font-weight: 700; line-height: 1.38; }
.partie-card-count { font-size: .84rem; font-weight: 600; }
.partie-card-progress { font-size: .78rem; font-weight: 600; display: flex; flex-direction: column; gap: .3rem; margin-top: .2rem; }
.partie-prog-bar { background: rgba(0,0,0,.1); border-radius: 3px; height: 5px; overflow: hidden; }
.partie-prog-fill { height: 100%; border-radius: 3px; transition: width .4s; }

/* ── LEVEL 4 : FICHES PAR PARTIE ────────────────────────────────*/
/* En-tête de progression */
.cartes-prog-header { display: flex; align-items: center; gap: 1rem; max-width: 1200px; margin: 0 auto .9rem; padding: .7rem 1.5rem; background: #fff; border-radius: 12px; box-shadow: 0 1px 5px rgba(0,0,0,.06); flex-wrap: wrap; }
.cartes-prog-text { font-size: .9rem; color: #4a5568; font-weight: 600; }
.cartes-prog-num { font-size: 1.3rem; font-weight: 800; }
.cartes-prog-bar-wrap { flex: 1; min-width: 100px; background: #e2e8f0; border-radius: 6px; height: 8px; overflow: hidden; }
.cartes-prog-fill { height: 100%; border-radius: 6px; transition: width .4s; }

/* Grille des cartes */
.cartes-v2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; padding: 0 2rem 3rem; max-width: 1200px; margin: 0 auto; }
.carte-card-v2 { background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.07); cursor: pointer; overflow: hidden; transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.carte-card-v2:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.carte-header-band { display: flex; align-items: center; justify-content: space-between; padding: .55rem .8rem; }
.carte-partie-badge { font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: #fff; padding: .18rem .5rem; border-radius: 20px; }
.btn-carte-lu { background: rgba(255,255,255,.25); border: 2px solid rgba(255,255,255,.7); color: #fff; width: 26px; height: 26px; border-radius: 50%; font-size: .85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; font-weight: 700; flex-shrink: 0; }
.btn-carte-lu:hover { background: rgba(255,255,255,.5); transform: scale(1.1); }
.btn-carte-lu.lu { background: rgba(255,255,255,.9); color: #15803d; border-color: #fff; }
.carte-body { padding: .9rem 1rem .95rem; flex: 1; display: flex; flex-direction: column; gap: .25rem; }
.carte-num { font-size: .72rem; font-weight: 700; color: #a0aec0; }
.carte-card-v2 h4 { font-size: .92rem; font-weight: 700; color: #1a202c; line-height: 1.35; }
.carte-desc { font-size: .8rem; color: #718096; line-height: 1.35; }

/* ── LEVEL 5 : COURS ─────────────────────────────────────────────*/
#cours-content { max-width: 800px; margin: .5rem auto 1rem; padding: 0 2rem 1.5rem; background: #fff; border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.07); line-height: 1.75; overflow: hidden; }
.cours-partie-banner { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem 1.2rem; margin: 0 -2rem 1.3rem; border-left: 5px solid; flex-wrap: wrap; }
.cours-partie-name { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.btn-mark-lu { border: 2px solid #16a34a; background: #fff; color: #16a34a; padding: .3rem .9rem; border-radius: 20px; font-size: .78rem; font-weight: 700; cursor: pointer; transition: all .15s; white-space: nowrap; }
.btn-mark-lu:hover { background: #16a34a; color: #fff; }
.btn-mark-lu.lu { background: #16a34a; color: #fff; }
.btn-mark-lu.lu:hover { background: #15803d; border-color: #15803d; }
#cours-content h2 { font-size: 1.45rem; font-weight: 800; margin-bottom: 1.1rem; color: #1a202c; border-bottom: 2px solid #f0f4f8; padding-bottom: .6rem; padding-top: .3rem; }
#cours-content h3 { font-size: 1.1rem; font-weight: 700; margin: 1.3rem 0 .5rem; color: #2563eb; }
#cours-content h4 { font-size: .95rem; font-weight: 700; margin: .9rem 0 .35rem; color: #2d3748; }
#cours-content p { margin-bottom: .65rem; color: #2d3748; }
#cours-content ul, #cours-content ol { margin: .4rem 0 .5rem 1.4rem; }
#cours-content li { margin-bottom: .25rem; color: #2d3748; }
#cours-content table { width: 100%; border-collapse: collapse; margin: .9rem 0; font-size: .88rem; }
#cours-content th, #cours-content td { border: 1px solid #e2e8f0; padding: .45rem .7rem; text-align: left; }
#cours-content th { background: #f8fafc; font-weight: 700; }
.cours-actions { display: flex; justify-content: center; gap: .8rem; padding: .8rem 2rem 2rem; max-width: 800px; margin: 0 auto; flex-wrap: wrap; }

/* ── QCM & EXAMEN PARTAGÉ ────────────────────────────────────────*/
#qcm-content, #examen-content { max-width: 700px; margin: 1rem auto 3rem; padding: 0 1rem; }
.qcm-top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: .45rem; flex-wrap: wrap; gap: .4rem; }
.qcm-partie-tag { font-size: .72rem; font-weight: 700; color: #2563eb; background: #eff6ff; padding: .25rem .65rem; border-radius: 20px; text-transform: uppercase; letter-spacing: .04em; max-width: 60%; }
.qcm-progress-text { font-size: .82rem; color: #718096; font-weight: 600; white-space: nowrap; }
.qcm-progress-bar-wrap { background: #e2e8f0; border-radius: 4px; height: 5px; margin-bottom: .9rem; overflow: hidden; }
.qcm-progress-fill { background: #2563eb; height: 100%; border-radius: 4px; transition: width .3s; }
.question-card { background: #fff; border-radius: 14px; padding: 1.4rem; box-shadow: 0 2px 10px rgba(0,0,0,.07); }
.qcm-sous-titre { font-size: .74rem; font-weight: 700; color: #718096; margin-bottom: .55rem; text-transform: uppercase; letter-spacing: .04em; }
.question-text { font-size: 1.02rem; font-weight: 600; margin-bottom: .45rem; line-height: 1.5; color: #1a202c; }
.qcm-instruction { font-size: .78rem; color: #a0aec0; margin-bottom: 1.1rem; font-style: italic; }
.options-list { display: flex; flex-direction: column; gap: .45rem; }
.qcm-opt { display: flex; align-items: center; gap: .75rem; padding: .72rem 1rem; border: 2px solid #e2e8f0; border-radius: 10px; background: #fff; cursor: pointer; font-size: .92rem; text-align: left; transition: all .15s; width: 100%; }
.qcm-opt:hover:not(:disabled) { border-color: #2563eb; background: #eff6ff; }
.qcm-opt.selected { border-color: #2563eb; background: #eff6ff; }
.qcm-opt.selected .option-letter { background: #2563eb; color: #fff; }
.qcm-opt.correct { border-color: #16a34a; background: #f0fdf4; }
.qcm-opt.correct .option-letter { background: #bbf7d0; color: #166534; }
.qcm-opt.wrong { border-color: #dc2626; background: #fff5f5; }
.qcm-opt.wrong .option-letter { background: #fecaca; color: #b91c1c; }
.qcm-opt.missed { border-color: #d97706; background: #fffbeb; }
.qcm-opt.missed .option-letter { background: #fde68a; color: #92400e; }
.qcm-opt:disabled { cursor: default; }
.option-letter { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #f0f4f8; font-weight: 700; font-size: .82rem; flex-shrink: 0; transition: all .15s; }
.opt-text { flex: 1; line-height: 1.4; }
.explication { margin-top: 1.1rem; padding: .85rem 1rem; background: #eff6ff; border-left: 4px solid #2563eb; border-radius: 0 8px 8px 0; font-size: .88rem; color: #1e3a5f; line-height: 1.6; }
.correct-answer-line { font-weight: 700; color: #15803d; margin-bottom: .35rem; }
.qcm-nav { text-align: center; margin-top: 1.1rem; display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }

/* ── QCM QUICK NAV GRID ─────────────────────────────────────────*/
.qcm-nav-grid { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; padding: 1rem 0 .5rem; max-width: 580px; margin: 0 auto; }
.qcm-nav-badge { width: 32px; height: 32px; border-radius: 7px; border: 2px solid #e2e8f0; background: #f8fafc; color: #4a5568; font-size: .78rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.qcm-nav-badge:hover { border-color: #2563eb; color: #2563eb; background: #eff6ff; }
.qcm-nav-badge.done { border-color: #16a34a; background: #dcfce7; color: #15803d; }
.qcm-nav-badge.current { border-color: #2563eb; background: #2563eb; color: #fff; }
.qcm-nav-badge.done.current { border-color: #16a34a; background: #16a34a; color: #fff; }
.qcm-nav-badge.nav-answered { background-color: #7C3AED; border-color: #6D28D9; color: #fff; }
.qcm-nav-badge.nav-correct  { background-color: #16A34A; border-color: #15803d; color: #fff; }
.qcm-nav-badge.nav-wrong    { background-color: #DC2626; border-color: #B91C1C; color: #fff; }
.qcm-nav-badge.current.nav-answered { background-color: #7C3AED; border-color: #5B21B6; }
.qcm-nav-badge.current.nav-correct  { background-color: #16A34A; border-color: #14532D; }
.qcm-nav-badge.current.nav-wrong    { background-color: #DC2626; border-color: #991B1B; }

/* ── TIMER ───────────────────────────────────────────────────────*/
.exam-timer-display { font-size: .88rem; font-weight: 700; color: #2563eb; background: #eff6ff; padding: .28rem .75rem; border-radius: 20px; white-space: nowrap; }
.exam-timer-display.timer-urgent { background: #fff1f2; color: #dc2626; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* ── EXAMEN CONFIG ───────────────────────────────────────────────*/
#examen-setup { max-width: 720px; margin: 0 auto; padding: 0 1.5rem 3rem; }
.examen-config-card { background: #fff; border-radius: 16px; padding: 1.8rem 2rem; box-shadow: 0 2px 12px rgba(0,0,0,.07); margin-bottom: 1.5rem; }
.config-row { margin-bottom: 1.4rem; }
.config-label { font-size: .78rem; font-weight: 700; color: #4a5568; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .55rem; }
.config-btns { display: flex; gap: .45rem; flex-wrap: wrap; }
.config-btn { padding: .5rem 1rem; border: 2px solid #e2e8f0; border-radius: 8px; background: #fff; color: #4a5568; font-size: .88rem; font-weight: 700; cursor: pointer; transition: all .15s; display: flex; flex-direction: column; align-items: center; gap: .1rem; min-width: 52px; }
.config-btn:hover { border-color: #2563eb; color: #2563eb; }
.config-btn.active { border-color: #2563eb; background: #2563eb; color: #fff; }
.config-btn-sub { font-size: .62rem; opacity: .8; }
.config-info { font-size: .82rem; color: #718096; margin: .5rem 0 1.3rem; padding: .65rem .9rem; background: #f8fafc; border-radius: 8px; }
.btn-start-exam { width: 100%; padding: .88rem; background: #2563eb; color: #fff; border: none; border-radius: 10px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: background .15s; }
.btn-start-exam:hover { background: #1d4ed8; }
.btn-start-exam:disabled { background: #93c5fd; cursor: not-allowed; }

/* ── HISTORIQUE EXAMENS ──────────────────────────────────────────*/
.examen-history, .examen-repertoire { background: #fff; border-radius: 16px; padding: 1.4rem 1.8rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); margin-bottom: 1.2rem; }
.history-title { font-size: .95rem; font-weight: 700; color: #2d3748; margin-bottom: .9rem; }
.no-history { color: #a0aec0; font-size: .88rem; text-align: center; padding: .9rem 0; }
.exam-history-item { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid #f0f4f8; flex-wrap: wrap; }
.exam-history-item:last-child { border-bottom: none; }
.exam-hist-num { font-size: .72rem; font-weight: 700; color: #a0aec0; min-width: 26px; }
.exam-hist-date { font-size: .82rem; color: #718096; flex: 1; }
.exam-hist-score { font-size: .88rem; font-weight: 700; }
.exam-hist-time { font-size: .78rem; color: #718096; }

/* ── RÉPERTOIRE CHAPITRES ────────────────────────────────────────*/
.rep-item { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid #f0f4f8; }
.rep-item:last-child { border-bottom: none; }
.rep-icone { font-size: 1.2rem; flex-shrink: 0; }
.rep-info { flex: 1; min-width: 0; }
.rep-titre { font-size: .82rem; font-weight: 600; color: #2d3748; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: .3rem; }
.rep-prog-bar { background: #e2e8f0; border-radius: 3px; height: 5px; overflow: hidden; }
.rep-prog-fill { background: #2563eb; height: 100%; border-radius: 3px; transition: width .4s; }
.rep-count { font-size: .82rem; font-weight: 800; color: #2563eb; white-space: nowrap; min-width: 40px; text-align: right; }

/* ── RÉSULTATS ───────────────────────────────────────────────────*/
.result-card { text-align: center; background: #fff; border-radius: 16px; padding: 2.2rem; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.result-card-header { font-size: 1rem; font-weight: 700; color: #4a5568; margin-bottom: 1rem; }
.result-card h2 { font-size: 1.5rem; margin-bottom: .9rem; color: #1a202c; }
.result-score { font-size: 4rem; font-weight: 800; line-height: 1; margin-bottom: .25rem; }
.result-label { font-size: .95rem; color: #718096; margin-bottom: .7rem; }
.result-pills { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-bottom: .9rem; }
.result-pill { font-size: .82rem; font-weight: 600; background: #f0f4f8; color: #4a5568; padding: .28rem .8rem; border-radius: 20px; }
.result-msg { font-size: 1.05rem; margin-bottom: 1.4rem; color: #2d3748; }
.result-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

/* ── STATISTIQUES ────────────────────────────────────────────────*/
.dashboard-stats { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; padding: 0 2rem; margin-bottom: 1rem; }
.dashboard-stat-card { background: #fff; border-radius: 14px; padding: 1.4rem 1.8rem; text-align: center; min-width: 130px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.dashboard-chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: 1rem; padding: 0 2rem 3rem; max-width: 1200px; margin: 0 auto; }

/* ── TOAST ───────────────────────────────────────────────────────*/
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); background: #2d3748; color: #fff; padding: .75rem 1.4rem; border-radius: 10px; font-size: .88rem; z-index: 9999; box-shadow: 0 4px 12px rgba(0,0,0,.2); animation: fadeIn .2s ease; }
.toast.success { background: #16a34a; }
.toast.error   { background: #dc2626; }

/* ── RESPONSIVE ──────────────────────────────────────────────────*/
@media (max-width: 600px) {
    .navbar { padding: .7rem 1rem; }
    .hero { padding: 2rem 1rem 1.5rem; }
    .hero-title { font-size: 1.75rem; }
    .chapitres-grid { padding: 0 1rem 2rem; }
    #cours-content { margin: .5rem; padding: 0 1rem 1.2rem; }
    .cours-partie-banner { margin: 0 -1rem 1rem; }
    #landing-content { padding: 0 1rem 2rem; }
    .landing-modes { flex-direction: column; align-items: center; }
    .mode-card { max-width: 100%; min-width: 0; }
    #examen-setup { padding: 0 1rem 2rem; }
    .config-btns { gap: .3rem; }
    .config-btn { padding: .4rem .75rem; font-size: .8rem; }
    .parties-grid-inner { grid-template-columns: 1fr 1fr; padding: 0 1rem 2rem; gap: .9rem; }
    .cartes-v2-grid { padding: 0 1rem 2rem; grid-template-columns: 1fr 1fr; }
    .cartes-prog-header { margin: 0 1rem .7rem; }
    .qcm-nav-grid { gap: .3rem; }
    .qcm-nav-badge { width: 28px; height: 28px; font-size: .72rem; }
}
/* ── RESPONSIVE — très petits téléphones (≤ 400px) ───────────────── */
@media (max-width: 400px) {
    .parties-grid-inner, .cartes-v2-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 1.5rem; }
    .navbar { padding: .6rem .7rem; }
    .nav-link { padding: .4rem .6rem; font-size: .85rem; }
    .btn-primary, .btn-secondary { padding: .6rem 1rem; }
}
/* ── HISTORY HEADER ──────────────────────────────────────────────*/
.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .9rem;
    flex-wrap: wrap;
    gap: .5rem;
}
.history-header .history-title {
    margin-bottom: 0;
}
.btn-reset-history {
    background: #fff;
    color: #dc2626;
    border: 2px solid #fecaca;
    padding: .38rem .9rem;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.btn-reset-history:hover {
    background: #fff5f5;
    border-color: #dc2626;
}
/* ── LANDING SCORE HEADER ────────────────────────────────────────*/
.landing-score-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    flex-wrap: wrap;
    margin-bottom: .9rem;
}
.landing-score-header .landing-score-badge {
    margin-bottom: 0;
}



/* ── FREE NUDGE BOX ──────────────────────────────────────────────*/
.free-nudge-box {
    background: linear-gradient(145deg, #fffbf0, #fff7ed);
    border: 2px solid #fed7aa;
    border-radius: 14px;
    padding: 1.2rem 1.4rem;
    margin-top: 1.2rem;
    font-size: .92rem;
    color: #4a5568;
    line-height: 1.6;
    text-align: center;
}
.free-nudge-actions {
    display: flex;
    gap: .7rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: .9rem;
}
/* ── PREMIUM PITCH LIST ──────────────────────────────────────────*/
.premium-pitch-list {
    list-style: none;
    padding: .8rem 0;
    margin: .5rem 0;
    text-align: left;
    display: inline-block;
}
.premium-pitch-list li {
    padding: .3rem 0;
    font-size: .92rem;
    color: #2d3748;
    font-weight: 600;
}
.premium-pitch-footer {
    margin-top: .8rem;
    font-size: .88rem;
    color: #718096;
    font-style: italic;
}
/* ── CONFIG BTN LOCKED ───────────────────────────────────────────*/
.config-btn-locked {
    opacity: .4;
    cursor: not-allowed;
    border-color: #e2e8f0;
    color: #a0aec0;
    background: #f8fafc;
}
.config-btn-locked:hover {
    border-color: #e2e8f0;
    color: #a0aec0;
    background: #f8fafc;
}
/* ── CHAPITRES LOCKED & FEATURED ─────────────────────────────────*/
.chapitre-card-locked {
    opacity: .5;
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
}
.chapitre-card-featured {
    border: 2px solid #2563eb;
    animation: featuredPulse 2s infinite;
}
@keyframes featuredPulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(37,99,235,.15); }
    50% { box-shadow: 0 6px 24px rgba(37,99,235,.4); }
}
/* ── CHAPITRE START BADGE ────────────────────────────────────────*/
.chapitre-start-badge {
    display: inline-block;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
    padding: .25rem .75rem;
    border-radius: 20px;
    margin-bottom: .5rem;
    animation: badgeBounce 1.2s infinite;
}
@keyframes badgeBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
/* ── INFO BAR ────────────────────────────────────────────────────*/
.info-bar {
    position: fixed;
    top: 0;
    order:-1;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    padding: .55rem 1rem;
    z-index: 200;
    font-size: .85rem;
    font-weight: 600;
}
.info-bar-arrow {
    background: rgba(255,255,255,.2);
    border: none;
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}
.info-bar-arrow:hover { background: rgba(255,255,255,.35); }

/* ── FOOTER ──────────────────────────────────────────────────────*/
.site-footer {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 1.2rem 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
}
.footer-links {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: .5rem;
}
.footer-links a {
    color: #4a5568;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}
.footer-links a:hover { color: #2563eb; }
.footer-copy {
    font-size: .78rem;
    color: #a0aec0;
}
/* ── BOUTON PREMIUM ──────────────────────────────────────────────*/
.btn-premium {
    background: linear-gradient(135deg, #f59e0b, #d97706, #b45309);
    color: #fff;
    border: none;
    padding: .45rem 1rem;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .04em;
    box-shadow: 0 2px 10px rgba(245,158,11,.4);
    transition: all .15s;
}
.btn-premium:hover {
    box-shadow: 0 4px 18px rgba(250,158,11,.8);
    transform: translateY(-1px);
}

/* ── ANTI-PIRATAGE : filigrane + dissuasion copie ────────────────── */
/* Filigrane répété de l'email utilisateur, superposé au contenu. Géré par
   updateWatermark() (app.js). pointer-events:none → n'intercepte aucun clic. */
#content-watermark {
    display: none;
    position: fixed;
    top: -20vh;
    left: -20vw;
    width: 140vw;
    height: 140vh;
    z-index: 40;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.06;
    transform: rotate(-30deg);
    transform-origin: center center;
    -webkit-user-select: none;
    user-select: none;
}
#content-watermark span {
    display: inline-block;
    padding: 26px 38px;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    white-space: nowrap;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Sélection de texte désactivée sur les pages de contenu (dissuasion casual).
   Les champs de saisie restent sélectionnables pour ne pas casser les formulaires. */
#page-cours,
#page-qcm,
#page-cartes,
#page-examen-session {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
#page-cours input,
#page-cours textarea,
#page-qcm input,
#page-qcm textarea,
#page-cartes input,
#page-cartes textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* ── RECHERCHE DE COURS (autocomplétion) ─────────────────────────── */
.course-search-wrap {
    position: relative;
    max-width: 560px;
    margin: 0 auto 1.4rem;
}
.course-search-input {
    width: 100%;
    padding: .75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.course-search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.course-search-results {
    display: none;
    position: absolute;
    z-index: 50;
    left: 0;
    right: 0;
    margin-top: .35rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,.14);
    max-height: 340px;
    overflow-y: auto;
}
.search-result {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .7rem .9rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: #eff6ff; }
.search-result-ch {
    flex: 0 0 auto;
    margin-top: .1rem;
    font-size: .75rem;
    font-weight: 700;
    color: #2563eb;
    background: #dbeafe;
    padding: .15rem .5rem;
    border-radius: 6px;
    white-space: nowrap;
}
.search-result-main {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
}
.search-result-titre {
    font-size: .92rem;
    color: #1a202c;
    font-weight: 600;
}
.search-result-sub {
    font-size: .75rem;
    color: #64748b;
}
.search-result-sub mark {
    background: #fef08a;
    color: #1a202c;
    padding: 0 .15rem;
    border-radius: 3px;
}
/* Surlignage du terme recherché dans le contenu du cours (via la recherche) */
mark.search-hl {
    background: #fde68a;
    color: #1a202c;
    padding: 0 .12em;
    border-radius: 3px;
}

/* Indicateur de force / critères du mot de passe (inscription) */
.pwd-hints {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem .8rem;
    margin-top: .45rem;
}
.pwd-hint {
    font-size: .76rem;
    color: #94a3b8;
    transition: color .15s;
}
.pwd-hint.ok {
    color: #16a34a;
    font-weight: 600;
}

/* Bandeau de consentement cookies (RGPD) */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4000;
    background: #1a202c;
    color: #f1f5f9;
    padding: 1rem 1.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .8rem 1.4rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,.25);
}
.cookie-banner-text {
    font-size: .85rem;
    line-height: 1.5;
    max-width: 640px;
}
.cookie-banner-text a {
    color: #93c5fd;
    text-decoration: underline;
}
.cookie-banner-actions {
    display: flex;
    gap: .6rem;
    flex: 0 0 auto;
}
.cookie-banner-actions button {
    white-space: nowrap;
}
.search-empty {
    padding: .9rem;
    text-align: center;
    color: #94a3b8;
    font-size: .9rem;
}

/* ── PARTIES : compteur + toggle « fait » (manuel) ───────────────── */
/* Le toggle est volontairement distinct de la barre de lecture (.partie-card-progress)
   pour qu'on ne confonde pas « lu » et « marqué fait ». */
.parties-done-counter {
    text-align: center;
    font-size: .9rem;
    color: #475569;
    margin: 0 auto 1rem;
}
.parties-done-counter strong { color: #16a34a; }
.partie-done-toggle {
    display: block;
    width: 100%;
    margin-top: .6rem;
    padding: .4rem .6rem;
    font-size: .8rem;
    font-weight: 700;
    color: #475569;
    background: #fff;
    border: 1.5px dashed #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s;
}
.partie-done-toggle:hover { border-color: #16a34a; color: #16a34a; }
.partie-done-toggle.done {
    color: #fff;
    background: #16a34a;
    border-style: solid;
    border-color: #16a34a;
}





