/* =========================================================
   LEARNIVIA — BLOG
   Utilisé par blog.html et blog-1.html … blog-13.html

   À charger APRÈS style.css :
   <link rel="stylesheet" href="style.css">
   <link rel="stylesheet" href="blog.css">

   La barre de navigation, le menu déroulant et le footer viennent
   de style.css (comme sur index.html). Ce fichier ne contient que
   ce qui est propre au blog, avec des noms de classes qui n'entrent
   pas en conflit avec style.css.
========================================================= */


/* =========================================================
   PAGE DU BLOG
========================================================= */

.blog {
    width: min(1380px, 92%);
    margin: 0 auto;
    padding: 125px 0 120px;
}


/* =========================
   ARTICLE EN VEDETTE
========================= */

.featured {
    width: 100%;
    margin-bottom: 100px;
}

.featured-visual {
    position: relative;
    width: 100%;
    height: 610px;
    border-radius: 30px;
    overflow: hidden;
    background: linear-gradient(145deg, #0f4c42, var(--navy));
    color: #FFF9F2;
}

.featured-visual::before,
.featured-visual::after {
    content: "";
    position: absolute;
    width: 990px;
    height: 1090px;
    border-radius: 50%;
    border: 1px solid rgba(47, 202, 163, .2);
}

.featured-visual::before {
    top: -780px;
    left: -390px;
}

.featured-visual::after {
    bottom: -820px;
    right: -350px;
}

.featured-title {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: min(700px, 90%);
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
}

.featured-title span {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    opacity: .8;
}

.featured-title h1 {
    margin: 15px 0;
    font-size: clamp(45px, 5vw, 72px);
    line-height: .98;
    letter-spacing: -3px;
    font-weight: 700;
}

.featured-title p {
    font-size: 17px;
    line-height: 1.5;
    opacity: .85;
}

.article-button {
    position: absolute;
    right: 30px;
    bottom: 30px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 35px;
    background: #fff;
    color: #111;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: transform .25s ease, box-shadow .25s ease;
}

.article-button span {
    font-size: 17px;
}

.article-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .15);
}

.featured-tags {
    position: absolute;
    left: 30px;
    bottom: 30px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.featured-tags span,
.post-tags span {
    padding: 8px 12px;
    border-radius: 6px;
    background: #05090a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .6px;
}

.featured-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    padding: 50px 35px 0;
}

.featured-heading h2 {
    max-width: 650px;
    font-size: 39px;
    line-height: 1.18;
    letter-spacing: -1.5px;
    color: var(--navy);
}

.featured-description {
    max-width: 500px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--muted);
}

.author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 25px;
}

.featured-avatar {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: #e6f0e9;
}

.featured-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author strong {
    display: block;
    font-size: 14px;
    color: var(--navy);
}

.author small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #8996A0;
}


/* =========================
   GRILLE D'ARTICLES
========================= */

.articles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 35px;
    row-gap: 65px;
}

.card-link {
    display: flex;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.card-link:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 6px;
    border-radius: 18px;
}

.card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    cursor: pointer;
    transition: transform .3s ease;
}

.card:hover {
    transform: translateY(-6px);
}

.card-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 100%;
    height: 185px;
    border-radius: 18px;
    overflow: hidden;
    transition: box-shadow .3s ease;
}

.card:hover .card-image {
    box-shadow: 0 15px 35px rgba(0, 0, 0, .10);
}

.card-image.green {
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .12), transparent 30%),
        linear-gradient(135deg, #155d4e, #073c3b);
}

.card-image.teal         { background: linear-gradient(135deg, #1F7F7C, #0f4c42); }
.card-image.blue         { background: #4cc7e6; }
.card-image.sky          { background: #7fd3f0; }
.card-image.purple       { background: #6d45cc; }
.card-image.yellow       { background: #f3cf37; }
.card-image.earth        { background: #2778dc; }
.card-image.galaxy       { background: #4b22a3; }
.card-image.orange       { background: #f4b632; }
.card-image.conversation { background: #c64c32; }
.card-image.science      { background: #42c3e0; }
.card-image.raspberry    { background: #AD0062; }


/* ---------- Illustrations des cartes (toutes limitées à .card-image
   pour ne jamais entrer en conflit avec style.css) ---------- */

.card-image .mini-logo {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -1px;
}

.card-image .cloud {
    position: absolute;
    width: 75px;
    height: 28px;
    border-radius: 30px;
    background: #fff;
    opacity: .85;
}

.card-image .cloud-one { top: 25px; left: 25px; }
.card-image .cloud-two { top: 40px; right: 30px; }

.card-image .sun {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 35px;
    color: #F4C95D;
}

.card-image .plant {
    position: absolute;
    bottom: 10px;
    font-size: 75px;
}

.card-image .search-icon {
    position: absolute;
    left: 35px;
    font-size: 60px;
    transform: rotate(-15deg);
}

.card-image .paper {
    position: absolute;
    right: 50px;
    font-size: 65px;
    transform: rotate(10deg);
}

.card-image .stars {
    position: absolute;
    top: 20px;
    right: 25px;
    margin: 0;
    font-size: 25px;
    letter-spacing: 12px;
    color: rgba(255, 255, 255, .5);
}

.card-image .brain {
    position: relative;
    z-index: 2;
    font-size: 90px;
}

.card-image .thinking {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 35px;
}

.card-image .earth-icon {
    font-size: 85px;
}

.card-image .sparkle {
    position: absolute;
    top: 25px;
    right: 45px;
    font-size: 40px;
    color: #fff;
}

.card-image .moon {
    position: absolute;
    left: 45px;
    bottom: 15px;
    font-size: 80px;
}

.card-image .planet {
    position: absolute;
    top: 35px;
    right: 45px;
    font-size: 75px;
}

.card-image .star {
    position: absolute;
    font-size: 30px;
    color: #fff;
}

.card-image .star-one { top: 20px; left: 35px; }
.card-image .star-two { bottom: 25px; right: 25px; }

.card-image .motivation {
    z-index: 2;
    font-size: 80px;
}

.card-image .bars {
    position: absolute;
    right: 35px;
    bottom: 25px;
    display: flex;
    gap: 8px;
}

.card-image .bars i {
    display: block;
    width: 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .6);
}

.card-image .bars i:nth-child(1) { height: 40px; }
.card-image .bars i:nth-child(2) { height: 65px; }
.card-image .bars i:nth-child(3) { height: 85px; }
.card-image .bars i:nth-child(4) { height: 105px; }

.card-image .talk {
    font-size: 75px;
}

.card-image .people {
    position: absolute;
    bottom: 20px;
    font-size: 45px;
    letter-spacing: 8px;
}

.card-image .flasks {
    font-size: 65px;
    letter-spacing: 15px;
}

.card-image .question {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 55px;
    font-weight: 700;
    color: #fff;
}


/* ---------- Texte des cartes (mêmes couleurs que le bloc blog de l'index) ---------- */

.card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px 12px 0;
}

.meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.meta span:first-child {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--teal);
}

.meta span:last-child {
    font-size: 10px;
    font-weight: 600;
    color: #8996A0;
}

.card h3 {
    margin-bottom: 12px;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: -.3px;
    font-weight: 700;
    color: var(--navy);
}

.card p {
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    color: #566672;
}

.card-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 17px;
}

.small-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 37px;
    height: 37px;
    border-radius: 50%;
    background: #e6f0e9;
    font-size: 19px;
}

.card-author strong {
    display: block;
    font-size: 12px;
    color: var(--navy);
}

.card-author small {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: #8996A0;
}


/* =========================
   RESPONSIVE (page du blog)
========================= */

@media (max-width: 1000px) {

    .featured-visual {
        height: 450px;
    }

    .featured-info {
        gap: 40px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .featured-heading h2 {
        font-size: 31px;
    }

    .articles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 50px 25px;
    }
}

@media (max-width: 700px) {

    .blog {
        width: 92%;
        padding-top: 95px;
    }

    .featured {
        margin-bottom: 60px;
    }

    .featured-visual {
        height: 430px;
        border-radius: 22px;
    }

    .featured-title h1 {
        font-size: 43px;
        letter-spacing: -2px;
    }

    .featured-title p {
        font-size: 14px;
    }

    .featured-tags {
        left: 18px;
        bottom: 18px;
    }

    .featured-tags span {
        padding: 7px 9px;
        font-size: 8px;
    }

    .article-button {
        right: 18px;
        bottom: 18px;
        padding: 12px 15px;
        font-size: 11px;
    }

    .featured-info {
        display: block;
        padding: 30px 5px 0;
    }

    .featured-heading h2 {
        margin-bottom: 25px;
        font-size: 29px;
    }

    .featured-description {
        font-size: 13px;
    }

    .articles {
        grid-template-columns: 1fr;
        row-gap: 45px;
    }

    .card-image {
        height: 200px;
    }

    .card h3 {
        font-size: 21px;
    }
}

@media (max-width: 430px) {

    .featured-visual {
        height: 390px;
    }

    .featured-title h1 {
        font-size: 36px;
    }

    .featured-title p {
        font-size: 12px;
    }

    .featured-info {
        padding-top: 25px;
    }

    .featured-heading h2 {
        font-size: 26px;
    }
}


/* =========================================================
   PAGES D'ARTICLES (blog-1.html … blog-13.html)
========================================================= */

/* ---------- En-tête coloré ---------- */

.post-hero {
    --a: #0f4c42;
    --b: #17324D;
    position: relative;
    min-height: 400px;
    padding: 105px 24px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(145deg, var(--a), var(--b));
}

.post-hero::before,
.post-hero::after {
    content: "";
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .14);
}

.post-hero::before {
    top: -430px;
    left: -200px;
}

.post-hero::after {
    bottom: -480px;
    right: -160px;
}

.post-hero-title {
    position: relative;
    z-index: 2;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -2px;
    font-weight: 700;
}

.post-hero-brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    font-size: 22px;
    font-weight: 600;
}

.post-hero-brand img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.post-tags {
    position: absolute;
    left: max(24px, calc((100% - 1100px) / 2));
    bottom: 28px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.post-avatar {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .25);
    background: #f3cf37;
    font-size: 30px;
}

.post-avatar-left {
    top: 105px;
    left: 20px;
}

.post-avatar-right {
    right: 40px;
    bottom: 95px;
    background: #ec6bb0;
}

.hero-green        { --a: #0f4c42; }
.hero-teal         { --a: #1F7F7C; }
.hero-blue         { --a: #1f86a8; }
.hero-sky          { --a: #2b8fb5; }
.hero-purple       { --a: #5a37b3; }
.hero-yellow       { --a: #9a7608; }
.hero-earth        { --a: #2778dc; }
.hero-galaxy       { --a: #4b22a3; }
.hero-orange       { --a: #b36a0a; }
.hero-conversation { --a: #a63c27; }
.hero-science      { --a: #1c819c; }
.hero-raspberry    { --a: #AD0062; }


/* ---------- Article ---------- */

.post {
    width: min(780px, 90%);
    margin: 0 auto;
    padding: 50px 0 90px;
}

.post-back {
    display: inline-block;
    margin-bottom: 28px;
    color: var(--teal);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .25s ease;
}

.post-back:hover {
    transform: translateX(-4px);
}

.post-title {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -2px;
    font-weight: 700;
    color: var(--navy);
}

.post-by {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 32px 0 50px;
}

.post-by-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: #e6f0e9;
    font-size: 26px;
}

.post-by-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-by small {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.post-by strong {
    display: block;
    font-size: 16px;
    color: var(--navy);
}

.post-by em {
    display: block;
    font-size: 12px;
    font-style: normal;
    color: var(--muted);
}

.post-body p {
    margin: 0 0 20px;
    font-size: 17px;
    line-height: 1.75;
    font-weight: 500;
    color: #2b3a47;
}

.post-body > p:first-child {
    font-size: 20px;
    line-height: 1.65;
    font-weight: 600;
    color: var(--navy);
}

.post-body h2 {
    margin: 48px 0 16px;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.15;
    letter-spacing: -1px;
    font-weight: 700;
    color: var(--navy);
}

.post-body ul {
    margin: 0 0 24px;
    padding-left: 22px;
}

.post-body li {
    margin-bottom: 10px;
    font-size: 17px;
    line-height: 1.7;
    font-weight: 500;
    color: #2b3a47;
}

.post-body li::marker {
    color: var(--teal);
}


/* ---------- Appel à l'action ---------- */

.post-cta {
    margin-top: 55px;
    padding: 32px;
    border-radius: 20px;
    background: var(--navy);
    color: #FFF9F2;
}

.post-cta h3 {
    margin-bottom: 8px;
    font-size: 24px;
}

.post-cta p {
    margin-bottom: 20px;
    color: rgba(255, 249, 242, .85);
}

.post-cta a {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    background: #FFF9F2;
    color: var(--navy);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: transform .25s ease, background .25s ease;
}

.post-cta a:hover {
    transform: translateY(-3px);
    background: #fff;
}


/* ---------- Autres articles ---------- */

.post-more {
    margin-top: 80px;
}

.post-more h2 {
    margin-bottom: 20px;
    font-size: 28px;
    letter-spacing: -1px;
    color: var(--navy);
}

.post-more-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.post-more-item {
    display: block;
    padding: 20px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(23, 50, 77, .1);
    color: var(--navy);
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease;
}

.post-more-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(23, 50, 77, .1);
}

.post-more-item span {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--teal);
}

.post-more-item strong {
    font-size: 16px;
    line-height: 1.3;
}

.post-back:focus-visible,
.post-more-item:focus-visible,
.post-cta a:focus-visible,
.article-button:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 4px;
}

@media (max-width: 800px) {

    .post-hero {
        min-height: 360px;
    }

    .post-avatar {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }

    .post-more-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {

    .post-avatar {
        display: none;
    }

    .post-tags {
        left: 18px;
        bottom: 18px;
    }

    .post-tags span {
        padding: 7px 9px;
        font-size: 8px;
    }

    .post-cta {
        padding: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .card,
    .card-image,
    .article-button,
    .post-back,
    .post-cta a,
    .post-more-item {
        transition: none;
    }
}