/*-------------------------------- HERO SECTION --------------------------------*/
.hero-section {
    min-height: 70vh;
    padding-top: 0px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(var(--rgb-underline-color), 0.1);
    border: 1px solid rgba(var(--rgb-underline-color), 0.2);
    color: var(--underline-color);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 999px;
    letter-spacing: 0;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    letter-spacing: 0;
    color: var(--title-color);
}

.hero-accent {
    color: var(--underline-color);
    position: relative;
    display: inline-block;
}

.hero-accent::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--underline-color);
    border-radius: 3px;
    opacity: 0.35;
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--title-color);
    opacity: 0.9;
}

.hero-trust {
    font-size: 0.82rem;
    color: var(--title-color);
    opacity: 0.5;
    white-space: nowrap;
}

.hero-img {
    filter: drop-shadow(0 24px 48px rgba(var(--rgb-title-color), 0.1));
    transition: transform 0.5s ease;
}

.hero-img:hover {
    transform: translateY(-8px);
}

/*-------------------------------- FEATURES SECTION --------------------------------*/
.features-section {
    background-color: transparent;
    padding-bottom: 48px;
}

.cards-overlap {
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.feature-card-hover {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card-hover:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-card-hover) !important;
}

.feature-card-number {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 2rem;
    font-weight: 800;
    color: rgba(var(--rgb-title-color), 0.06);
    line-height: 1;
    letter-spacing: 0;
    user-select: none;
}

.feature-icon i {
    font-size: 2.5rem;
    color: var(--underline-color);
    background: var(--bg-body);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card-hover:hover .feature-icon i {
    transform: scale(1.12);
    box-shadow: 0 8px 24px rgba(var(--rgb-underline-color), 0.25);
}

.feature-card h3 {
    color: var(--title-color);
}

/*-------------------------------- SHARED SECTION TYPOGRAPHY --------------------------------*/
.section-eyebrow {
    display: inline-block;
    background-color: rgba(var(--rgb-underline-color), 0.1);
    border: 1px solid rgba(var(--rgb-underline-color), 0.2);
    color: var(--underline-color);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 999px;
    letter-spacing: 0;
}

.section-title {
    font-size: 2.2rem;
    line-height: 1.25;
    color: var(--title-color);
    letter-spacing: 0;
    margin-top: 0.75rem;
}

/*-------------------------------- SCROLL REVEAL --------------------------------*/
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(.22,.68,0,1.1), transform 0.6s cubic-bezier(.22,.68,0,1.1);
}
.reveal.in-view {
    opacity: 1;
    transform: none;
}
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .18s; }
.reveal-d3 { transition-delay: .28s; }

/*-------------------------------- HOW IT WORKS --------------------------------*/
.how-section {
    padding: 60px 0 60px;
}

.how-step {
    position: relative;
    padding: 30px 20px 20px;
}

.how-step-watermark {
    font-size: 7rem;
    font-weight: 900;
    color: rgba(var(--rgb-title-color), 0.04);
    line-height: 1;
    letter-spacing: 0;
    user-select: none;
    margin-bottom: -20px;
}

.how-step-icon i {
    font-size: 2rem;
    color: var(--underline-color);
    background: var(--bg-body);
    width: 72px;
    height: 72px;
    line-height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(var(--rgb-underline-color), 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.how-step:hover .how-step-icon i {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(var(--rgb-underline-color), 0.2);
}

/*-------------------------------- STATS SECTION --------------------------------*/
.stats-section {
    padding: 0 0 56px;
}

.stats-band {
    padding: 0;
    overflow: hidden;
}

.stat-item {
    padding: 36px 20px;
    position: relative;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background-color: rgba(var(--rgb-title-color), 0.08);
}

@media (max-width: 991.98px) {
    .stat-item:nth-child(2)::after {
        display: none;
    }
    .stat-item:nth-child(1),
    .stat-item:nth-child(2) {
        border-bottom: 1px solid rgba(var(--rgb-title-color), 0.08);
    }
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--title-color);
    line-height: 1;
    letter-spacing: 0;
}

.stat-plus {
    font-size: 1.8rem;
    color: var(--underline-color);
}

.stat-label {
    font-size: 0.88rem;
    color: var(--title-color);
    opacity: 0.55;
    margin-top: 10px;
    font-weight: 500;
}

/*-------------------------------- CTA FINAL --------------------------------*/
.cta-section {
    padding: 0 0 72px;
}

.cta-card {
    background: linear-gradient(135deg, var(--title-color) 0%, #6b4535 100%);
    border-radius: var(--radius-card);
    padding: 90px 40px;
}

.cta-deco-icon i {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.cta-title {
    font-size: 2.5rem;
    color: white;
    letter-spacing: 0;
    line-height: 1.2;
}

.cta-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-note {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0;
}

.cta-card .btn-primary-custom {
    background-color: white !important;
    color: var(--title-color) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.cta-card .btn-primary-custom:hover {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: var(--title-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

/*-------------------------------- SHARED COMPONENTS --------------------------------*/
.ue-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background-color: rgba(var(--rgb-underline-color), 0.12);
    color: var(--underline-color);
    padding: 4px 12px;
    border-radius: 999px;
    letter-spacing: 0;
}

.btn-see-all {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--underline-color);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.btn-see-all:hover {
    opacity: 0.7;
    color: var(--underline-color);
}

.section-subtitle {
    font-size: 1rem;
    color: var(--title-color);
    opacity: 0.6;
    line-height: 1.6;
}

/*-------------------------------- FICHES DE RÉVISION --------------------------------*/
.fiches-section {
    padding: 56px 0 0;
}

.fiche-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fiche-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover) !important;
}

.fiche-date {
    font-size: 0.76rem;
    color: var(--title-color);
    opacity: 0.4;
}

.fiche-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--title-color);
    line-height: 1.45;
    margin: 0;
}

.fiche-excerpt {
    font-size: 0.87rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fiche-card-footer {
    border-top: 1px solid rgba(var(--rgb-title-color), 0.07);
}

.fiche-author {
    font-size: 0.8rem;
    color: var(--title-color);
    opacity: 0.5;
    font-weight: 500;
}

.fiche-read-link {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--underline-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.fiche-read-link:hover {
    opacity: 0.7;
}

/*-------------------------------- RESPONSIVE --------------------------------*/

@media (max-width: 767.98px) {
    /* Hero */
    .hero-section {
        min-height: auto;
        padding: 48px 0 24px;
    }
    .hero-title {
        font-size: 2.3rem;
        letter-spacing: 0;
        line-height: 1.2;
    }
    .hero-subtitle {
        font-size: 1rem;
    }

    /* Feature cards: remove negative overlap on mobile (cards are stacked) */
    .cards-overlap {
        margin-top: 0;
    }

    /* How it works */
    .how-section {
        padding: 40px 0 36px;
    }
    .how-step-watermark {
        font-size: 4.5rem;
        letter-spacing: 0;
        margin-bottom: -14px;
    }

    /* Section titles */
    .section-title {
        font-size: 1.75rem;
    }

    /* Stats */
    .stat-item {
        padding: 36px 20px;
    }
    .stat-item:not(:last-child)::after {
        display: none;
    }
    .stat-number {
        font-size: 2.4rem;
        letter-spacing: 0;
    }
    .stat-plus {
        font-size: 1.5rem;
    }
    .stats-section {
        padding: 0 0 36px;
    }

    /* CTA */
    .cta-section {
        padding: 0 0 48px;
    }
    .cta-card {
        padding: 52px 24px;
        border-radius: var(--radius-card);
    }
    .cta-title {
        font-size: 1.85rem;
        letter-spacing: 0;
    }
    .cta-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.9rem;
    }
    .hero-trust {
        white-space: normal;
    }
    .cta-title {
        font-size: 1.55rem;
    }
    .stat-number {
        font-size: 2rem;
    }
    .section-title {
        font-size: 1.55rem;
    }
}

/*-------------------------------- HERO: CHIPS FLOTTANTS + GLOW --------------------------------*/
.hero-try-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--underline-color);
    font-weight: 700;
    font-size: .92rem;
    text-decoration: none;
    transition: opacity .2s;
}
.hero-try-btn:hover { opacity: .72; color: var(--underline-color); }

.hero-img-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 520px;
}

.hero-img-wrap .hero-img {
    position: relative;
    z-index: 1;
}

.hero-glow {
    position: absolute;
    width: 56%;
    height: 56%;
    top: 22%;
    left: 22%;
    background: radial-gradient(ellipse at center, rgba(var(--rgb-underline-color), .24) 0%, transparent 70%);
    filter: blur(46px);
    border-radius: 50%;
    z-index: 0;
    animation: hero-glow-pulse 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hero-glow-pulse {
    0%, 100% { transform: scale(1);    opacity: 1; }
    50%       { transform: scale(1.18); opacity: .6; }
}

.hero-float-chip {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    padding: 8px 14px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--title-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.hero-chip-1 { top: 8%;    right: -6%;  animation: float-bob 4.2s ease-in-out infinite; }
.hero-chip-2 { bottom: 28%; left: -8%;  animation: float-bob 5.1s ease-in-out infinite 1.5s; }
.hero-chip-3 { bottom: 8%;  right: 2%;  animation: float-bob 4.6s ease-in-out infinite .8s; }
.hero-chip-4 { top: 36%;   left: -5%;  animation: float-bob 5.5s ease-in-out infinite 2.3s; }

@keyframes float-bob {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

/*-------------------------------- CAROUSEL TYPES DE QUESTIONS --------------------------------*/
.qtype-section {
    padding: 60px 0 56px;
}

.qtype-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 32px;
}

.qtype-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border: 1.5px solid var(--border-color);
    border-radius: 99px;
    background: transparent;
    color: var(--text-muted-input);
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .18s, color .18s, background .18s, transform .15s;
}

.qtype-tab:hover {
    border-color: var(--underline-color);
    color: var(--underline-color);
    transform: translateY(-1px);
}

.qtype-tab.active {
    border-color: var(--underline-color);
    background: rgba(var(--rgb-underline-color), .1);
    color: var(--underline-color);
}

.qtype-carousel-wrap {
    max-width: 720px;
    margin: 0 auto 48px;
}

.qtype-slide { display: none; }
.qtype-slide.active {
    display: block;
    animation: qtype-fadein .28s ease;
}

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

.qtype-cta { padding-top: 8px; }

.demo-unavailable {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted-input);
    font-size: .9rem;
    font-weight: 500;
}

@media (max-width: 991.98px) {
    .hero-chip-1, .hero-chip-4 { display: none; }
    .hero-float-chip { font-size: .72rem; padding: 6px 10px; gap: 5px; }
}

@media (max-width: 767.98px) {
    .qtype-section { padding: 40px 0 36px; }
    .hero-img-wrap { max-width: 360px; }
    .hero-chip-2 { left: -2%; }
    .hero-chip-3 { right: 2%; }
}

/*-------------------------------- QUIZ SANS INSCRIPTION --------------------------------*/
.free-quiz-section {
    padding: 56px 0 48px;
}

.quiz-free-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quiz-free-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover) !important;
}

.quiz-free-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--title-color);
    line-height: 1.4;
    margin: 0;
}

.quiz-free-meta {
    font-size: 0.82rem;
    color: var(--title-color);
    opacity: 0.5;
}

.quiz-difficulty {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
}

.diff-easy {
    background-color: rgba(168, 213, 171, 0.3);
    color: #3a7a40;
}

.diff-medium {
    background-color: rgba(255, 180, 128, 0.3);
    color: #b06020;
}

.diff-hard {
    background-color: rgba(222, 133, 103, 0.3);
    color: #a03010;
}

.btn-quiz-free {
    background-color: transparent;
    border: 2px solid rgba(var(--rgb-underline-color), 0.3);
    color: var(--underline-color);
    font-size: 0.9rem;
    padding: 10px 24px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
}

.btn-quiz-free:hover {
    background-color: var(--underline-color);
    border-color: var(--underline-color);
    color: white;
    transform: translateY(-2px);
}

.free-quiz-cta-text {
    font-size: 1rem;
    color: var(--title-color);
    opacity: 0.6;
    margin-bottom: 1rem;
}

/*-------------------------------- PLATFORM STRIP --------------------------------*/
.home-platform-strip {
    padding: 0 0 32px;
}
.home-platform-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 20px 28px;
    flex-wrap: wrap;
    gap: 16px;
}
.home-platform-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 120px;
    gap: 4px;
}
.home-platform-num {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--title-color);
    letter-spacing: -.04em;
    line-height: 1;
}
.home-platform-lbl {
    font-size: .74rem;
    font-weight: 600;
    color: var(--text-muted-input);
    text-align: center;
}
.home-platform-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
    flex-shrink: 0;
}
.home-platform-cta-cell {
    align-items: center;
    justify-content: center;
}

/*-------------------------------- LOGGED HOME --------------------------------*/
.home-logged-hero {
    padding: 60px 0 40px;
}

.home-logged-avatar,
.home-logged-avatar-init {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
}

.home-logged-avatar {
    object-fit: cover;
}

.home-logged-avatar-init {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--underline-color), var(--state-purple));
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
}

.home-logged-greeting {
    color: var(--title-color);
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.2;
}

.home-logged-sub {
    color: var(--text-muted-input);
    font-size: .95rem;
    margin-top: 6px;
}

.home-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: var(--ui-border-width) solid var(--border-color);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--title-color);
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.home-quick-btn:hover {
    border-color: var(--underline-color);
    background: rgba(var(--rgb-underline-color), .06);
    color: var(--underline-color);
    transform: translateY(-1px);
}

.home-quick-btn.primary {
    border-color: var(--underline-color);
    background: var(--underline-color);
    color: #fff;
}

.home-quick-btn.primary:hover {
    color: #fff;
    opacity: .88;
}

.home-quick-btn-sm {
    padding: 8px 16px;
    font-size: .8rem;
}

.home-stat-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    border: var(--ui-border-width) solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--card-color);
    color: var(--text-color);
    transition: border-color var(--transition-fast), box-shadow var(--transition-base), transform var(--transition-fast);
}

a.home-stat-card:hover,
.home-group-card:hover {
    border-color: var(--underline-color);
    box-shadow: var(--shadow-card);
    color: var(--text-color);
    transform: translateY(-1px);
}

.home-stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    font-size: 1.15rem;
}

.home-stat-icon-questions {
    background: rgba(99, 102, 241, .12);
    color: var(--state-info);
}

.home-stat-icon-fiches {
    background: rgba(245, 158, 11, .12);
    color: var(--state-warning);
}

.home-stat-icon-playlists {
    background: rgba(34, 197, 94, .12);
    color: var(--state-success);
}

.home-stat-icon-groups,
.home-empty-group-icon {
    background: rgba(139, 92, 246, .12);
    color: var(--state-purple);
}

.home-stat-num {
    color: var(--title-color);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.home-stat-lbl {
    color: var(--text-muted-input);
    font-size: .75rem;
    font-weight: 600;
    margin-top: 3px;
}

.home-section-tight {
    padding-bottom: 0;
}

.home-group-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    height: 100%;
    padding: 18px;
}

.home-group-avatar,
.home-group-avatar-fallback {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.home-group-avatar {
    object-fit: cover;
}

.home-group-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--underline-color), var(--state-purple));
    color: #fff;
    font-size: .95rem;
    font-weight: 800;
}

.home-group-title {
    color: var(--title-color);
    font-size: .88rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: var(--radius-pill);
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.home-role-owner {
    background: rgba(124, 58, 237, .1);
    color: #7c3aed;
}

.home-role-admin {
    background: rgba(217, 119, 6, .1);
    color: #d97706;
}

.home-role-member {
    background: rgba(var(--rgb-title-color), .06);
    color: var(--text-muted-input);
}

.home-group-meta {
    color: var(--text-muted-input);
    font-size: .73rem;
}

.home-more-card {
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-style: dashed;
}

.home-more-icon {
    color: var(--text-muted-input);
    font-size: 1.3rem;
}

.home-more-text {
    color: var(--text-muted-input);
    font-size: .82rem;
    font-weight: 700;
}

.home-empty-group-panel {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 28px 24px;
    border: var(--ui-border-width) dashed var(--border-color);
    border-radius: var(--radius-lg);
}

.home-empty-group-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    font-size: 1.2rem;
}

.home-empty-group-title {
    color: var(--title-color);
    font-weight: 700;
    margin-bottom: 3px;
}

.home-empty-group-text {
    color: var(--text-muted-input);
    font-size: .82rem;
}

.home-empty-icon {
    opacity: .3;
}

.home-inline-link {
    color: var(--underline-color);
    text-decoration: none;
}

.home-inline-link:hover {
    color: var(--underline-color);
    text-decoration: underline;
}

@media (max-width: 767.98px) {
    .home-logged-hero {
        padding: 40px 0 28px;
    }

    .home-logged-greeting {
        font-size: 1.45rem;
    }

    .home-stat-card {
        gap: 12px;
        padding: 16px;
    }

    .home-stat-icon {
        width: 42px;
        height: 42px;
    }

    .home-empty-group-panel {
        align-items: flex-start;
    }
}
