/* ============================================================
   EPREUVE.CSS — Pages d'épreuve (Index)
   ============================================================ */

/* ── HERO ──────────────────────────────────────────────────── */
.ep-hero {
    background: #eef2fb;
    padding: 70px 0 60px;
    color: #0f172a;
    position: relative;
    overflow: hidden;
}
.ep-hero::before {
    content: '';
    position: absolute;
    top: -40%; right: -15%;
    width: 520px; height: 520px;
    border-radius: 50%;
    background: rgba(30,64,175,.06);
    pointer-events: none;
}
.ep-hero::after {
    content: '';
    position: absolute;
    bottom: -35%; left: -8%;
    width: 380px; height: 380px;
    border-radius: 50%;
    background: rgba(30,64,175,.04);
    pointer-events: none;
}
.ep-hero h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -.5px;
    color: #0f172a;
}
.ep-hero p {
    font-size: 17px;
    opacity: .85;
    line-height: 1.75;
    max-width: 640px;
    margin-bottom: 36px;
    color: #1e3a8a;
}

/* Badge compteur */
.ep-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(30,64,175,.12);
    border: 1px solid rgba(30,64,175,.35);
    color: #1e3a8a;
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 22px;
    backdrop-filter: blur(4px);
}

/* Boutons hero */
.ep-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.ep-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all .25s;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}
.ep-btn-primary {
    background: white;
    color: #1e3a8a;
    box-shadow: 0 4px 18px rgba(0,0,0,.18);
}
.ep-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0,0,0,.22);
    color: #1e3a8a;
}
.ep-btn-outline {
    background: rgba(30,64,175,.1);
    color: #1e3a8a;
    border: 1.5px solid rgba(30,64,175,.45);
}
.ep-btn-outline:hover {
    background: rgba(30,64,175,.2);
    color: #1e3a8a;
    transform: translateY(-1px);
}
.ep-btn-ghost {
    background: rgba(30,64,175,.06);
    color: #1e3a8a;
    border: 1.5px solid rgba(30,64,175,.25);
}
.ep-btn-ghost:hover {
    background: rgba(30,64,175,.14);
    color: #1e3a8a;
    transform: translateY(-1px);
}

/* ── SÉRIES RÉCENTES ───────────────────────────────────────── */
.ep-series-section {
    padding: 72px 0;
    background: #f4f8ff;
}

.ep-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}
.ep-section-head h2 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ep-section-head h2 .dot { color: #1e40af; font-size: 24px; }

.ep-voir-tout {
    color: #1e40af;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap .2s;
}
.ep-voir-tout:hover { text-decoration: underline; gap: 8px; }

/* Carousel */
.ep-carousel-wrap { position: relative; }
.ep-carousel {
    display: flex;
    gap: 22px;
    overflow: hidden;
    transition: transform .35s ease;
}
.ep-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px; height: 42px;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(0,0,0,.1);
    font-size: 14px;
    color: #475569;
    transition: all .2s;
    z-index: 5;
}
.ep-carousel-btn:hover {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
    box-shadow: 0 4px 16px rgba(30,64,175,.3);
}
.ep-carousel-btn.prev { left: -20px; }
.ep-carousel-btn.next { right: -20px; }

/* Carte série */
.ep-serie-card {
    min-width: calc(33.33% - 16px);
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1.5px solid #e8edf5;
    box-shadow: 0 3px 12px rgba(0,0,0,.05);
    transition: all .3s;
    flex-shrink: 0;
}
@media (max-width: 900px)  { .ep-serie-card { min-width: calc(50% - 12px); } }
@media (max-width: 640px)  { .ep-serie-card { min-width: 100%; } }

.ep-serie-card:hover {
    border-color: #4169E1;
    box-shadow: 0 10px 30px rgba(65,105,225,.28);
    transform: translateY(-5px);
}
.ep-card-top {
    background: #eef2fb;
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ep-card-icon {
    width: 46px; height: 46px;
    background: rgba(30,64,175,.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e3a8a;
    font-size: 20px;
}
.ep-dispo-badge {
    background: rgba(22,163,74,.15);
    border: 1.5px solid #16a34a;
    color: #15803d;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: .4px;
}
.ep-dispo-badge::before {
    content: '';
    width: 7px; height: 7px;
    background: #16a34a;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: .4; }
}

.ep-card-body { padding: 20px 22px; }
.ep-card-body h4 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}
.ep-card-date {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 14px;
}
.ep-card-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 18px;
}
.ep-card-meta i { color: #1e40af; }

.ep-btn-start {
    display: block;
    width: 100%;
    padding: 12px;
    background: #1e3a8a;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all .3s;
    box-shadow: 0 3px 10px rgba(30,64,175,.25);
}
.ep-btn-start:hover {
    opacity: .9;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(30,64,175,.35);
    color: white;
}

/* ── CE QUE VOUS APPRENDREZ ────────────────────────────────── */
.ep-learn-section {
    padding: 72px 0;
    background: white;
}
.ep-learn-section h2 {
    text-align: center;
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 44px;
}
.ep-learn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 16px;
}
.ep-learn-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: #f4f8ff;
    border-radius: 14px;
    border-left: 4px solid #4169E1;
    transition: transform .2s, box-shadow .2s;
}
.ep-learn-item:hover {
    transform: translateX(5px);
    box-shadow: 4px 0 16px rgba(65,105,225,.2);
}
.ep-learn-item i {
    color: #1e40af;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}
.ep-learn-item span {
    font-size: 14px;
    color: #334155;
    line-height: 1.55;
    font-weight: 500;
}

/* ── CTA ───────────────────────────────────────────────────── */
.ep-cta {
    background: #eef2fb;
    padding: 80px 0;
    text-align: center;
    color: #0f172a;
    position: relative;
    overflow: hidden;
}
.ep-cta::before {
    content: '';
    position: absolute;
    top: -60%; right: -20%;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: rgba(30,64,175,.06);
    pointer-events: none;
}
.ep-cta h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 14px;
    color: #0f172a;
    position: relative;
}
.ep-cta p {
    font-size: 17px;
    color: #1e3a8a;
    margin-bottom: 34px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}
.ep-cta-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* État vide */
.ep-no-series {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    grid-column: 1 / -1;
}
.ep-no-series i {
    font-size: 52px;
    display: block;
    margin-bottom: 16px;
    color: #cbd5e1;
}
.ep-no-series p { font-size: 15px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ep-hero        { padding: 50px 0 44px; }
    .ep-hero h1     { font-size: 30px; }
    .ep-hero p      { font-size: 15px; }
    .ep-actions     { flex-direction: column; }
    .ep-btn         { justify-content: center; }
    .ep-series-section,
    .ep-learn-section { padding: 50px 0; }
    .ep-cta         { padding: 56px 0; }
    .ep-cta h2      { font-size: 24px; }
}

/* ===================== GRILLE DE NUMÉROS (Sujets Récents) ===================== */
.ep-num-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.ep-num-block {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all .2s ease;
    user-select: none;
}

/* Verrouillé : non connecté ou sans forfait */
.ep-num-block.locked {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
    cursor: not-allowed;
}
.ep-num-block.locked:hover { border-color: #cbd5e1; }

/* Non visité : gris, cliquable */
.ep-num-block.unvisited {
    background: #f8fafc;
    color: #475569;
    border-color: #cbd5e1;
}
.ep-num-block.unvisited:hover {
    border-color: #1e3a8a;
    color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30,58,138,.15);
}

/* Visité : vert */
.ep-num-block.visited {
    background: #16a34a;
    color: #fff;
    border-color: #15803d;
    box-shadow: 0 4px 10px rgba(22,163,74,.25);
}
.ep-num-block.visited:hover {
    background: #15803d;
    transform: translateY(-2px);
}

/* Petit cadenas en haut à droite (visible seulement si verrouillé) */
.ep-num-lock {
    display: none;
    position: absolute;
    top: -7px;
    right: -7px;
    width: 21px;
    height: 21px;
    background: #64748b;
    color: #fff;
    font-size: 10px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.ep-num-block.locked .ep-num-lock { display: flex; }

/* Légende */
.ep-num-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 18px;
    font-size: 13px;
    color: #64748b;
}
.ep-num-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.ep-legend-dot {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}
.ep-legend-visited   { background: #16a34a; }
.ep-legend-unvisited { background: #f8fafc; border: 2px solid #cbd5e1; }
.ep-legend-locked    { background: #f1f5f9; border: 2px solid #e2e8f0; color: #94a3b8; }

@media (max-width: 640px) {
    .ep-num-block { width: 54px; height: 54px; font-size: 18px; }
}
