/* ============================================================
   SyntaxLab Academy — styles propres a la page « Livre » (vente.html)
   ------------------------------------------------------------
   Charge APRES tokens.css, qui fournit tous les jetons --sl-* / --wa-*.
   Ne pas redefinir de :root ici : les couleurs vivent dans tokens.css.
   ============================================================ */


/* =============================================
       RESET & BASE
    ============================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--sl-white);
    color: var(--sl-navy);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
}

/* =============================================
       NAVIGATION
    ============================================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--sl-border);
    padding: 0 2rem;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sl-navy);
}

.nav-logo-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.nav-logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--sl-navy);
}

.nav-logo-text span {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--sl-gray);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: -2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sl-gray);
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
    color: var(--sl-navy);
}

.nav-links a[aria-current='page'],
.footer-nav a[aria-current='page'] {
    font-weight: 700;
}

.footer-nav a[aria-current='page'] {
    color: #fff;
}

.btn-nav {
    background: var(--sl-blue) !important;
    color: white !important;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 700;
    transition: background 0.2s, transform 0.15s !important;
}

.btn-nav:hover {
    background: var(--sl-navy) !important;
    transform: translateY(-1px);
}

/* HAMBURGER (mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--sl-navy);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--sl-border);
    padding: 1.5rem 2rem;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--sl-navy);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--sl-border);
}

/* =============================================
       HERO
    ============================================= */
.hero {
    padding: 90px 2rem 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(74, 127, 229, 0.07) 0%, transparent 70%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(74, 127, 229, 0.05) 0%, transparent 65%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--sl-blue-pale);
    color: var(--sl-blue);
    border: 1px solid var(--sl-border-strong);
    padding: 7px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.75rem;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 1;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sl-blue);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.85);
    }
}

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.1rem, 5.5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    color: var(--sl-navy);
    max-width: 720px;
    margin: 0 auto 1.25rem;
    letter-spacing: -0.035em;
    position: relative;
    z-index: 1;
}

.hero h1 .accent {
    color: var(--sl-blue);
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--sl-gray);
    max-width: 560px;
    margin: 0 auto 2.25rem;
    line-height: 1.75;
    position: relative;
    z-index: 1;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--sl-blue);
    color: white;
    padding: 13px 30px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    position: relative;
    z-index: 1;
}

.hero-cta:hover {
    background: var(--sl-navy);
    transform: translateY(-2px);
    box-shadow: var(--sl-shadow-md);
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--sl-border);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.stat {
    text-align: center;
}

.stat-num {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--sl-navy);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--sl-gray);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.stat-divider {
    width: 1px;
    height: 44px;
    background: var(--sl-border-md);
}

/* =============================================
       SECTIONS COMMUNES
    ============================================= */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 80px 0;
}

.section-header {
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sl-blue);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: var(--sl-navy);
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--sl-gray);
    max-width: 500px;
    line-height: 1.7;
}

/* =============================================
       EBOOKS CATALOGUE
    ============================================= */
.ebooks-section {
    background: var(--sl-white);
}

.ebooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.ebook-card {
    background: var(--sl-white);
    border: 1px solid var(--sl-border-md);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.ebook-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--sl-shadow-lg);
    border-color: var(--sl-blue-light);
}

.ebook-card.featured {
    border: 2px solid var(--sl-blue);
}

/* COUVERTURE */
.ebook-cover {
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.cover-python {
    background: linear-gradient(140deg, #0F1A3D 0%, #1E40AF 60%, #2563EB 100%);
}

.cover-algo {
    background: linear-gradient(140deg, #1E3A5F 0%, #1D6FA4 60%, #60A5FA 100%);
}

.cover-windows {
    background: linear-gradient(140deg, #0078D7 0%, #00A4EF 60%, #3FA9F5 100%);
}

.cover-excel {
    background: linear-gradient(140deg, #107C41 0%, #1F9A55 60%, #34B069 100%);
}

.cover-word {
    background: linear-gradient(140deg, #185ABD 0%, #2B78E4 60%, #4D92F2 100%);
}

.cover-powerpoint {
    background: linear-gradient(140deg, #C43E1C 0%, #D8522E 60%, #E86B49 100%);
}

.cover-flask {
    background: linear-gradient(140deg, #1A2B6B 0%, #243B8A 60%, #3A55B3 100%);
}

.cover-git {
    background: linear-gradient(140deg, #F05032 0%, #F1654C 60%, #F5816C 100%);
}

.cover-pattern {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0.04) 1px, transparent 0, transparent 50%),
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0.04) 1px, transparent 0, transparent 50%);
    background-size: 18px 18px;
}

.cover-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    bottom: -30px;
    right: -20px;
}

.cover-svg-icon {
    width: 64px;
    height: 64px;
    position: relative;
    z-index: 1;
    color: var(--sl-white);
    fill: currentColor;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
    transition: transform 0.3s ease;
}

.ebook-card:hover .cover-svg-icon {
    transform: scale(1.15) rotate(2deg);
}

.cover-label {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(15, 26, 61, 0.68);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    backdrop-filter: blur(6px);
    z-index: 2;
}

/* Pastille sombre : le blanc reste lisible meme sur les couvertures claires */
.cover-pages {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: rgba(15, 26, 61, 0.68);
    color: white;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    z-index: 2;
}

/* FEATURED BANNER */
.featured-banner {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--sl-blue);
    color: white;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 5px 18px;
    border-radius: 0 0 10px 10px;
    white-space: nowrap;
    z-index: 10;
}

/* CORPS CARTE */
.ebook-body {
    padding: 1.25rem 1.25rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ebook-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.ebook-tag {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sl-blue);
    background: var(--sl-blue-pale);
    padding: 3px 9px;
    border-radius: 5px;
}

.ebook-level {
    font-size: 0.72rem;
    color: var(--sl-gray);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Pastille de niveau : point de couleur (remplace les anciennes pastilles emoji) */
.ebook-level::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sl-gray);
    flex: none;
}

.ebook-level.level-debutant::before {
    background: var(--sl-success-ink);
}

.ebook-level.level-intermediaire::before {
    background: var(--sl-amber-ink);
}

.ebook-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--sl-navy);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.ebook-desc {
    font-size: 0.82rem;
    color: var(--sl-gray);
    line-height: 1.65;
    margin-bottom: 1.1rem;
}

.ebook-features {
    list-style: none;
    margin-bottom: 1.25rem;
    flex: 1;
}

.ebook-features li {
    font-size: 0.79rem;
    color: var(--sl-navy);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 3px 0;
    line-height: 1.5;
}

.ebook-features li::before {
    content: '✓';
    color: var(--sl-blue);
    font-weight: 800;
    font-size: 0.72rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.ebook-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 1rem;
    border-top: 1px solid var(--sl-border);
}

.price-block .old-price {
    font-size: 0.72rem;
    color: var(--sl-gray);
    text-decoration: line-through;
    display: block;
    line-height: 1;
    margin-bottom: 2px;
}

.price-block .new-price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--sl-navy);
    line-height: 1;
}

.btn-buy {
    background: var(--sl-blue);
    color: white;
    border: none;
    cursor: pointer;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
}

.btn-buy:hover {
    background: var(--sl-navy);
    transform: scale(1.03);
}

/* =============================================
       SECTION AVIS
    ============================================= */
.avis-section {
    background: var(--sl-gray-light);
}

.avis-metrics {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.metric-card {
    background: white;
    border: 1px solid var(--sl-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.metric-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--sl-navy);
    display: block;
    line-height: 1;
    margin-bottom: 4px;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--sl-gray);
    font-weight: 500;
}

.avis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.avis-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.4rem;
    border: 1px solid var(--sl-border);
    transition: box-shadow 0.25s;
}

.avis-card:hover {
    box-shadow: var(--sl-shadow-sm);
}

.avis-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--sl-navy);
    line-height: 1.3;
    margin-bottom: 0.6rem;
}

.avis-text {
    font-size: 0.875rem;
    color: var(--sl-gray);
    line-height: 1.7;
}

/* =============================================
       FAQ
    ============================================= */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0;
}

.faq-item {
    border: 1px solid var(--sl-border-md);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.25s;
}

.faq-item[open] {
    border-color: var(--sl-blue);
}

/* <details>/<summary> : le repli fonctionne sans JavaScript et reste
   annonce correctement par les lecteurs d'ecran. */
.faq-question {
    cursor: pointer;
    list-style: none;
    padding: 1.1rem 1.25rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--sl-navy);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: background 0.2s;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    background: var(--sl-blue-pale);
}

.faq-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--sl-blue-pale);
    color: var(--sl-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.35s ease, background 0.25s;
}

.faq-item[open] .faq-icon {
    transform: rotate(180deg);
    background: var(--sl-blue);
    color: white;
}

.faq-answer {
    font-size: 0.875rem;
    color: var(--sl-gray);
    line-height: 1.75;
    padding: 0.9rem 1.25rem 1.1rem;
    border-top: 1px solid var(--sl-border);
}

/* =============================================
       CTA FINAL
    ============================================= */
.cta-section {
    background: linear-gradient(140deg, var(--sl-navy-dark) 0%, var(--sl-navy) 50%, #1d3480 100%);
    padding: 90px 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(74, 127, 229, 0.12);
    pointer-events: none;
}

.cta-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 800;
    color: white;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    max-width: 480px;
    margin: 0 auto 2.25rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.cta-secondary {
    margin: 1.5rem auto 0 !important;
    font-size: 0.85rem;
}

.cta-secondary a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--sl-blue);
    color: white;
    padding: 14px 34px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    position: relative;
    z-index: 1;
}

.btn-cta:hover {
    background: var(--sl-navy);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 26, 61, 0.35);
}

/* =============================================
       FOOTER
    ============================================= */
.footer {
    background: var(--sl-navy-dark);
    padding: 2rem;
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
}

.footer-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

.footer-logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
}

.footer p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
}

.footer a {
    color: var(--sl-blue-light);
    transition: color 0.2s;
}

.footer a:hover {
    color: white;
}

/* =============================================
       ANIMATIONS
    ============================================= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    opacity: 0;
    animation: fadeUp 0.65s ease forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}



/* =============================================
       RESPONSIVE
    ============================================= */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        padding: 60px 1.25rem 50px;
    }

    .hero-stats {
        gap: 1.25rem;
    }

    .stat-divider {
        display: none;
    }

    .section {
        padding: 55px 0;
    }

    .container {
        padding: 0 1.25rem;
    }

    .ebooks-grid {
        grid-template-columns: 1fr;
    }

    .avis-grid {
        grid-template-columns: 1fr;
    }

    .avis-metrics {
        flex-direction: row;
    }

    .cta-section {
        padding: 60px 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.85rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .metric-card {
        padding: 0.75rem 1rem;
    }

    .avis-metrics {
        flex-wrap: wrap;
    }
}
    

/* =============================================
       PIED DE PAGE ET MENU MOBILE — complements
    ============================================= */

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin: 1rem 0;
}

.footer-nav a {
    font-size: 0.82rem;
    font-weight: 600;
}

.footer-a11y {
    max-width: 460px;
    margin: 0.6rem auto 0;
}

/* Appel a l'action du menu mobile : pleine largeur, centre */
.mobile-menu .btn-nav {
    display: block;
    text-align: center;
    border-radius: var(--radius-sm);
}

/* Menu mobile : lien vers les ebooks en pleine largeur */
.mobile-menu a {
    text-align: left;
}
