/* ================================================
   FRONT PAGE — HERO SECTION
   ================================================ */

.habari-hero {
    position: relative;
    min-height: 580px;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: var(--habari-secondary-navy);
    -webkit-user-select: none;
    user-select: none;
}

.habari-hero__inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    /* gap: 20px; */
    gap: 140px;
    min-height: 580px;
    padding: 5rem 0;
}

/* ---- Encadré gauche ---- */

.habari-hero__intro {
    background: rgba(3, 34, 77, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2.5rem 2rem;
    width: 28%;
    flex-shrink: 0;
}

.habari-hero__title {
    font-family: var(--habari-font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
    margin: 0 0 1rem 0;
}

.habari-hero__desc {
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--habari-dark-off);
    margin: 0;
}

/* ---- Trending droite ---- */

.habari-hero__trending {
    background: rgba(233, 233, 233, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem;
    width: 30%;
    flex-shrink: 0;
}

.habari-hero__trending-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(38, 38, 38, 0.15);
}

.habari-hero__flame {
    font-size: 1.4rem;
    line-height: 1;
}

.habari-hero__trending-title {
    font-family: var(--habari-font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--habari-dark-shark);
    margin: 0;
}

/* ---- Items ---- */

.habari-trending-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(38, 38, 38, 0.12);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.habari-trending-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.habari-trending-item:hover {
    opacity: 0.75;
}

.habari-trending-item__thumb {
    position: relative;
    flex-shrink: 0;
    width: 95px;
    height: 72px;
    overflow: hidden;
}

.habari-trending-item__img {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--habari-dark-pale);
}

.habari-trending-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.habari-trending-item__rank {
    position: absolute;
    bottom: 0;
    left: 0;
    background: var(--habari-primary-brand);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.habari-trending-item__meta {
    flex: 1;
    min-width: 0;
}

.habari-trending-item__cat {
    display: block;
    font-size: 0.63rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--habari-primary-brand);
    margin-bottom: 0.3rem;
}

.habari-trending-item__title {
    font-family: var(--habari-font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--habari-dark-shark);
    margin: 0 0 0.3rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.habari-trending-item__date {
    font-size: 0.7rem;
    color: var(--habari-dark-pale);
}

/* ================================================
   FRONT PAGE — SECTION EXPLORER
   ================================================ */

.habari-explore {
    padding: 2rem 0;
    background: #ffffff;
}

/* ---- Header ---- */

.habari-explore__header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.habari-explore__title {
    font-family: var(--habari-font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--habari-secondary-navy);
    margin: 0 0 0.6rem 0;
}

.habari-explore__title-bar {
    width: 48px;
    height: 3px;
    background: var(--habari-primary-brand);
    margin: 0 auto 1.2rem auto;
}

.habari-explore__subtitle {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--habari-dark-pale);
    margin: 0;
    max-width: 600px;
    margin-inline: auto;
}

/* ---- Grille masonry CSS Grid ---- */

.habari-explore__grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    height: 560px;
    max-width: 1200px;
    margin-inline: auto;
}

/* Card 1 : grande carte gauche — pleine hauteur */
.habari-explore__card:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / 3;
}

/* Card 2 : large carte haut-droite */
.habari-explore__card:nth-child(2) {
    grid-column: 2 / 4;
    grid-row: 1;
}

/* Card 3 : petite carte bas-gauche-droite */
.habari-explore__card:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

/* Card 4 : petite carte bas-droite */
.habari-explore__card:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
}

/* ---- Card base ---- */

.habari-explore__card {
    position: relative;
    display: block;
    overflow: hidden;
    text-decoration: none;
    background-color: var(--habari-secondary-navy);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.habari-explore__card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(3, 34, 77, 0.80) 0%,
        rgba(3, 34, 77, 0.20) 55%,
        transparent 100%
    );
    transition: background 0.35s ease;
}

.habari-explore__card:hover .habari-explore__card-overlay {
    background: linear-gradient(
        to top,
        rgba(158, 46, 46, 0.75) 0%,
        rgba(3, 34, 77, 0.30) 60%,
        transparent 100%
    );
}

.habari-explore__card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.habari-explore__card-name {
    font-family: var(--habari-font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
}

.habari-explore__card:nth-child(1) .habari-explore__card-name {
    font-size: 1.5rem;
}

.habari-explore__card-btn {
    display: inline-block;
    align-self: flex-start;
    padding: 0.45rem 1.2rem;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    border-radius: 0;
    font-family: var(--habari-font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #ffffff;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.habari-explore__card:hover .habari-explore__card-btn {
    background: var(--habari-primary-brand);
    border-color: var(--habari-primary-brand);
}

/* ---- Excerpt (visible au hover) ---- */

.habari-explore__card-excerpt {
    font-size: 0.82rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(6px);
    transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.3s ease;
}

.habari-explore__card:hover .habari-explore__card-excerpt {
    max-height: 5rem;
    opacity: 1;
    transform: translateY(0);
}

.habari-explore__divider {
    width: 30%;
    margin: 0 auto;
    border: none;
    border-top: 1px solid var(--habari-dark-off);
}

/* ================================================
   FRONT PAGE — SECTION SPOTLIGHT (Catégories phare)
   ================================================ */

.habari-spotlight__divider {
    width: 30%;
    margin: 0 auto;
    border: none;
    border-top: 1px solid var(--habari-dark-off);
}

.habari-spotlight {
    padding: 2.5rem 0;
}

.habari-spotlight__inner {}

/* ---- Header ---- */

.habari-spotlight__header {
    margin-bottom: 2rem;
}

.habari-spotlight__title {
    font-family: var(--habari-font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--habari-secondary-navy);
    margin: 0 0 0.5rem 0;
}

.habari-spotlight__title-bar {
    width: 40px;
    height: 3px;
    background: var(--habari-primary-brand);
}

/* ---- Layout : vedette gauche + liste droite ---- */

.habari-spotlight__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* ---- Article vedette ---- */

.habari-spotlight__featured {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.habari-spotlight__featured:hover {
    opacity: 0.88;
    text-decoration: none;
}

.habari-spotlight__featured-img {
    width: 100%;
    height: 320px;
    overflow: hidden;
    background-color: var(--habari-dark-off);
}

.habari-spotlight__featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.habari-spotlight__featured-body {
    padding: 1.25rem 0 0;
}

.habari-spotlight__cat {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--habari-primary-brand);
    margin-bottom: 0.5rem;
}

.habari-spotlight__featured-title {
    font-family: var(--habari-font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--habari-secondary-navy);
    margin: 0 0 0.75rem 0;
}

.habari-spotlight__featured-excerpt {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--habari-dark-pale);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Liste des 3 articles ---- */

.habari-spotlight__aside {
    display: flex;
    flex-direction: column;
}

.habari-spotlight__list {
    list-style: none;
    margin: 0 0 1.5rem 0;
    padding: 0;
}

.habari-spotlight__item {
    border-bottom: 1px solid var(--habari-dark-off);
}

.habari-spotlight__item:first-child {
    border-top: 1px solid var(--habari-dark-off);
}

.habari-spotlight__item-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.habari-spotlight__item-link:hover {
    opacity: 0.75;
    text-decoration: none;
}

.habari-spotlight__item-body {
    flex: 1;
    min-width: 0;
}

.habari-spotlight__item-title {
    font-family: var(--habari-font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--habari-secondary-navy);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.habari-spotlight__item-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 72px;
    overflow: hidden;
    background-color: var(--habari-dark-off);
}

.habari-spotlight__item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ---- Bouton "Voir plus" ---- */

.habari-spotlight__more {
    align-self: center;
}

/* ================================================
   FRONT PAGE — SECTION APPRENDRE
   ================================================ */

.habari-home-apprendre {
    padding: 2.5rem 0;
    background: #ffffff;
}

/* ---- Header ---- */

.habari-home-apprendre__header {
    text-align: left;
    margin-bottom: 2.5rem;
    max-width: 760px;
    margin-inline-start: 0;
    margin-inline-end: auto;
}

.habari-home-apprendre__title {
    font-family: var(--habari-font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--habari-secondary-navy);
    margin: 0 0 0.6rem 0;
}

.habari-home-apprendre__title-bar {
    width: 48px;
    height: 3px;
    background: var(--habari-primary-brand);
    margin: 0 0 1.2rem 0;
}

.habari-home-apprendre__subtitle {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--habari-dark-pale);
    margin: 0;
    max-width: 640px;
}

/* ---- Grille 3 colonnes, flex-wrap ---- */

.habari-home-apprendre__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1.5rem;
    max-width: 1200px;
    margin-inline: auto;
}

.habari-home-apprendre__card {
    width: calc((100% - 3rem) / 3);
    min-width: 0;
    flex: 0 0 calc((100% - 3rem) / 3);
    box-sizing: border-box;
}

.habari-home-apprendre__card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    height: 100%;
}

/* ---- Card ---- */

.habari-home-apprendre__card {
    background: #fff;
    border: 1px solid var(--habari-dark-off);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.habari-home-apprendre__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(3, 34, 77, 0.10);
}

.habari-home-apprendre__card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    height: 100%;
}

.habari-home-apprendre__card-thumb {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: var(--habari-secondary-navy);
    flex-shrink: 0;
}

.habari-home-apprendre__card-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.35s ease;
}

.habari-home-apprendre__card:hover .habari-home-apprendre__card-thumb img {
    transform: scale(1.04);
}

.habari-home-apprendre__card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(3, 34, 77, 0.55) 0%,
        transparent 60%
    );
    transition: background 0.35s ease;
}

.habari-home-apprendre__card:hover .habari-home-apprendre__card-overlay {
    background: linear-gradient(
        to top,
        rgba(158, 46, 46, 0.45) 0%,
        transparent 60%
    );
}

.habari-home-apprendre__card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.habari-home-apprendre__card-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.habari-home-apprendre__card-title {
    font-family: var(--habari-font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--habari-secondary-navy);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.habari-home-apprendre__card-extrait {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--habari-dark-pale);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Footer ---- */

.habari-home-apprendre__footer {
    text-align: center;
    margin-top: 2.5rem;
}

.habari-home-apprendre__divider {
    width: 30%;
    margin: 0 auto;
    border: none;
    border-top: 1px solid var(--habari-dark-off);
}

/* ================================================
   FRONT PAGE — SUBSCRIBE CTA
   ================================================ */

.habari-subscribe-cta {
    background-color: var(--habari-info-pale);
    box-sizing: border-box;
    padding: 3rem 0;
}

.habari-subscribe-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.habari-subscribe-cta__content {
    flex: 1;
}

.habari-subscribe-cta__title {
    font-family: var(--habari-font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--habari-secondary-navy);
    margin: 0 0 0.6rem 0;
    line-height: 1.25;
}

.habari-subscribe-cta__desc {
    font-size: 1rem;
    color: var(--habari-secondary-navy);
    margin: 0;
    line-height: 1.6;
}

.habari-subscribe-cta__free {
    font-weight: 700;
    color: var(--habari-secondary-navy);
}

.habari-subscribe-cta__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.habari-subscribe-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--habari-dark-off);
    border-radius: 0;
    background: #ffffff;
    color: var(--habari-secondary-navy);
    font-family: var(--habari-font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.habari-subscribe-cta__btn:hover {
    background-color: var(--habari-primary-brand-off);
    border-color: var(--habari-primary-brand);
    color: var(--habari-primary-brand);
    text-decoration: none;
}

.habari-subscribe-cta__login {
    font-size: 0.85rem;
    color: var(--habari-secondary-navy);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.habari-subscribe-cta__login:hover {
    color: var(--habari-primary-brand);
}

.habari-subscribe-cta__social {
    flex-shrink: 0;
    border-left: 1px solid var(--habari-secondary-navy-pale);
    padding-left: 2rem;
}

.habari-subscribe-cta__social-label {
    font-family: var(--habari-font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--habari-secondary-navy);
    margin: 0 0 0.75rem 0;
}

.habari-subscribe-cta__social-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

