/* ARTICLE HERO */
:root {
    --ink: #05181e;
    --cream: #ffffff;
    --light-bg: #f4fbfe;
    --accent: #199dcc;
    --accent-light: #4db8dd;
    --muted: #4a6570;
    --border: rgba(0, 0, 0, 0.08);
    --code-bg: #0d2b35;
}

.article-hero {
    padding: 8rem 4rem 4rem;
    background: var(--ink);
    color: var(--cream);
    position: relative;
    overflow: hidden;
}

.article-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(45deg, rgba(25, 157, 204, 0.07) 0, rgba(25, 157, 204, 0.07) 1px, transparent 0, transparent 50%);
    background-size: 32px 32px;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    font-size: .75rem;
    color: rgba(255, 255, 255, .4);
    text-decoration: none;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: color .2s;
}

.breadcrumb a:hover {
    color: var(--accent-light);
}

.breadcrumb span {
    color: rgba(255, 255, 255, .2);
    font-size: .75rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: .8rem;
    flex-wrap: wrap;
    margin-bottom: 1.4rem;
}

.meta-tag {
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: rgba(25, 157, 204, .2);
    color: var(--accent-light);
    padding: .3rem .8rem;
    border-radius: 2px;
}

.meta-type {
    font-size: .7rem;
    color: rgba(255, 255, 255, .4);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.meta-date {
    font-size: .7rem;
    color: rgba(255, 255, 255, .35);
    margin-left: auto;
}

.level-dots {
    display: flex;
    align-items: center;
    gap: 4px;
}

.level-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
}

.level-dots.lvl1 span:nth-child(1) {
    background: var(--accent-light);
}

.level-dots.lvl2 span:nth-child(1),
.level-dots.lvl2 span:nth-child(2) {
    background: var(--accent-light);
}

.level-dots.lvl3 span:nth-child(1),
.level-dots.lvl3 span:nth-child(2),
.level-dots.lvl3 span:nth-child(3) {
    background: var(--accent-light);
}

.article-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -.03em;
    margin-bottom: 1.2rem;
}

.article-hero h1 em {
    font-style: italic;
    color: var(--accent-light);
}

.article-hero .lead {
    font-size: 1.05rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, .6);
    font-weight: 300;
    max-width: 620px;
}

.hero-deco {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

/* LAYOUT */
.article-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
}

/* SIDEBAR — TABLE OF CONTENTS */
.toc-sidebar {
    padding: 0 2.5rem 0 0;
    position: sticky;
    top: 100px;
    align-self: start;
}

.toc-label {
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.toc-label::before {
    content: '';
    width: 16px;
    height: 1px;
    background: var(--accent);
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    border-left: 1px solid var(--border);
}

.toc-list a {
    display: block;
    padding: .5rem 0 .5rem 1rem;
    font-size: .85rem;
    color: var(--muted);
    text-decoration: none;
    font-weight: 400;
    border-left: 2px solid transparent;
    margin-left: -1px;
    transition: color .2s, border-color .2s;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 500;
}

.toc-sharing {
    margin-top: 3rem;
}

.toc-sharing-label {
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .8rem;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: 100%;
    padding: .65rem .9rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    margin-bottom: .5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: .8rem;
    font-weight: 500;
    color: var(--muted);
    background: var(--cream);
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
}

.share-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.share-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.share-btn.linkedin svg {
    stroke: #0077b5;
}

.share-btn.youtube svg {
    stroke: #ff0000;
}

.share-btn:hover.linkedin {
    border-color: #0077b5;
    color: #0077b5;
}

.share-btn:hover.youtube {
    border-color: #ff0000;
    color: #ff0000;
}

/* ARTICLE CONTENT */
.article-content {
    min-width: 0;
}

/* Section headers */
.article-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 3rem 0 1.2rem;
    padding-top: 1rem;
    color: var(--ink);
    line-height: 1.2;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2rem 0 .8rem;
    color: var(--ink);
}

/* Paragraphs */
.article-content p {
    font-size: .97rem;
    line-height: 1.85;
    color: #2a4048;
    font-weight: 300;
    margin-bottom: 1.2rem;
}

.article-content strong {
    font-weight: 600;
    color: var(--ink);
}

/* Images */
.article-content img {
    max-width: 100%;
}

/* Lists */
.article-content ul,
.article-content ol {
    margin: .8rem 0 1.2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.article-content li {
    font-size: .97rem;
    line-height: 1.75;
    color: #2a4048;
    font-weight: 300;
}

/* Ordered list custom */
.article-content ol {
    list-style: none;
    margin-left: 0;
    counter-reset: ol-counter;
}

.article-content ol li {
    counter-increment: ol-counter;
    padding-left: 2.5rem;
    position: relative;
}

.article-content ol li::before {
    content: counter(ol-counter);
    position: absolute;
    left: 0;
    top: .1rem;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--accent);
    color: var(--cream);
    font-size: .72rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Code blocks */
.code-block {
    background: var(--code-bg);
    border-radius: 4px;
    margin: 1.5rem 0;
    overflow: hidden;
    border: 1px solid rgba(25, 157, 204, .2);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .7rem 1.2rem;
    background: rgba(255, 255, 255, .04);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.code-lang {
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent-light);
}

.code-copy {
    font-size: .7rem;
    color: rgba(255, 255, 255, .35);
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
    transition: color .2s;
    padding: 0;
}

.code-copy:hover {
    color: var(--accent-light);
}

.code-block pre {
    /* padding: 1.4rem 1.5rem; */
    overflow-x: auto;
}

.code-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: .85rem;
    color: #a8d8ea;
    line-height: 1.8;
    white-space: pre;
}

.code-block code .tag {
    color: #6dd5f0;
}

.code-block code .attr {
    color: #ffd580;
}

.code-block code .val {
    color: #99e699;
}

/* Info box */
.info-box {
    background: #e8f6fc;
    border-left: 3px solid var(--accent);
    padding: 1.2rem 1.4rem;
    border-radius: 0 4px 4px 0;
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-box-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: .1rem;
}

.info-box p {
    margin: 0;
    font-size: .88rem;
    line-height: 1.7;
    color: var(--ink);
}

/* Figures / illustrations */
.article-figure {
    margin: 2rem 0;
}

.article-figure img {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 4px;
    display: block;
}

.article-figure figcaption {
    font-size: .78rem;
    color: var(--muted);
    margin-top: .6rem;
    text-align: center;
    font-style: italic;
}

/* DIVIDER */
.article-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

/* CTA SHARE */
.article-cta {
    background: var(--light-bg);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-top: 3px solid var(--accent);
    margin: 3rem 0;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.article-cta-text h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .4rem;
}

.article-cta-text p {
    font-size: .88rem;
    color: var(--muted);
    font-weight: 300;
    margin: 0;
    line-height: 1.6;
}

.article-cta-btns {
    display: flex;
    gap: .8rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cta-social-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.3rem;
    border-radius: 2px;
    text-decoration: none;
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    transition: all .2s;
}

.cta-social-btn svg {
    width: 16px;
    height: 16px;
}

.cta-social-btn.li {
    background: #0077b5;
    color: white;
}

.cta-social-btn.li:hover {
    background: #005885;
}

.cta-social-btn.yt {
    background: #ff0000;
    color: white;
}

.cta-social-btn.yt:hover {
    background: #cc0000;
}

/* RELATED RESOURCES */
.related {
    padding: 4rem;
    background: var(--light-bg);
    border-top: 1px solid var(--border);
}

.related-label {
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
}

.related-label::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--accent);
}

.related-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
}

.related-card {
    background: var(--cream);
    padding: 1.6rem;
    text-decoration: none;
    color: var(--ink);
    position: relative;
    transition: background .2s;
}

.related-card:hover {
    background: #e8f6fc;
}

.related-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s;
}

.related-card:hover::after {
    transform: scaleX(1);
}

.rel-tag {
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .6rem;
}

.rel-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .5rem;
    line-height: 1.3;
}

.rel-desc {
    font-size: .8rem;
    line-height: 1.6;
    color: var(--muted);
    font-weight: 300;
}



.suivant{
  float: right;
}


/* ANIMATIONS */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-inner>* {
    animation: fadeUp .6s ease both;
}

.hero-inner>*:nth-child(1) {
    animation-delay: .05s;
}

.hero-inner>*:nth-child(2) {
    animation-delay: .15s;
}

.hero-inner>*:nth-child(3) {
    animation-delay: .25s;
}

.hero-inner>*:nth-child(4) {
    animation-delay: .35s;
}

/* VIDEO BLOCK */
.video-container {
    position: relative;
    margin: 0 0 3rem;
    border-radius: 4px;
    overflow: hidden;
    background: var(--ink);
    border: 1px solid rgba(25, 157, 204, .2);
}

.video-container video {
    width: 100%;
    display: block;
    max-height: 520px;
    object-fit: contain;
    background: #000;
}

/* Fallback player custom */
.video-fallback {
    position: relative;
    background: var(--ink);
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

.video-fallback::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(25, 157, 204, .15) 0%, transparent 70%);
}

.video-thumb-text {
    text-align: center;
    color: var(--cream);
    position: relative;
    z-index: 1;
}

.play-btn {
    width: 72px;
    height: 72px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    transition: transform .2s, background .2s;
    cursor: pointer;
    border: none;
}

.play-btn:hover {
    transform: scale(1.08);
    background: var(--accent-light);
}

.play-btn svg {
    width: 28px;
    height: 28px;
    fill: white;
    margin-left: 4px;
}

.video-label {
    font-size: .9rem;
    color: rgba(255, 255, 255, .7);
    font-weight: 300;
}

.video-caption {
    padding: .9rem 1.2rem;
    background: rgba(255, 255, 255, .03);
    border-top: 1px solid rgba(255, 255, 255, .06);
    font-size: .78rem;
    color: rgba(255, 255, 255, .4);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.video-caption svg {
    width: 14px;
    height: 14px;
    stroke: var(--accent-light);
    fill: none;
    stroke-width: 1.5;
    flex-shrink: 0;
}


/************************

        COURS

************************/
.exercice{
    /* background: red; */
    font-style: italic;
    line-height: 1.4em;
}
.corrige{
    position: relative;
}
.corrige > div{
    filter: blur(2px);
    transition: .2s;
}
.corrige button{
    position:absolute;
    top: 50%;
    left: 45%;
    z-index: 10;
    color: var(--light-bg);
    background: none;
    border: none;
    text-align: center;
    line-height: 2em;
    opacity: .8;
}
.corrige button img{
    display: block;
    margin: auto;
    height : 2.5em;
}
.corrige button:hover{
    cursor: pointer;
}
b{
    font-weight: bold;
}

/* RESPONSIVE */
@media (max-width: 1024px) {

    .article-layout {
        grid-template-columns: 1fr;
        padding: 3rem 2rem;
    }

    .toc-sidebar {
        position: static;
        padding: 0 0 2rem;
        border-bottom: 1px solid var(--border);
        margin-bottom: 2rem;
    }

    .toc-list {
        flex-direction: row;
        flex-wrap: wrap;
        border-left: none;
    }

    .toc-list a {
        border-left: none;
        border-bottom: 2px solid transparent;
        padding: .3rem .6rem;
    }

    .toc-list a:hover,
    .toc-list a.active {
        border-bottom-color: var(--accent);
    }

    .related {
        padding: 3rem 2rem;
    }

    .related-grid {
        grid-template-columns: 1fr 1fr;
    }


    .article-hero {
        padding: 7rem 2rem 3rem;
    }
}

@media (max-width: 600px) {

    .related-grid {
        grid-template-columns: 1fr;
    }

    .article-cta {
        flex-direction: column;
    }

    .meta-date {
        margin-left: 0;
    }
}