﻿/* =============================
   NEWS DETAILS PAGE – GinToLove
   ============================= */

:root {
    --gin-primary: #BC70A4;
    --gin-secondary: #BFD641;
    --gin-primary-rgb: 188,112,164;
    --gin-secondary-rgb: 191,214,65;
    --text-strong: #202125;
    --text-normal: #25272c;
    --text-dim: #595e66;
    --text-faint: #8a919a;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --shadow-elev: 0 18px 60px -32px rgba(15, 17, 23, 0.75);
    --ease: cubic-bezier(.16,.8,.3,1);
    --font-sans: 'Inter','Source Sans 3','Segoe UI',system-ui,-apple-system,BlinkMacSystemFont,'Helvetica Neue',Arial,sans-serif;
}

/* =============================
   Wrapper principal
   ============================= */
.news-details-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 min(2vw, 18px);
    background: transparent; /* fond géré par le canvas JS */
    min-height: 80vh;
}

/* =============================
   Carte article – panneau rose clair (light & dark)
   ============================= */
.news-details {
    font-family: var(--font-sans);
    max-width: 900px;
    width: 100%;
    margin: 44px auto 40px;
    background: linear-gradient( 145deg, rgba(248,230,244,0.97) 0%, rgba(255,244,231,0.97) 48%, rgba(244,232,255,0.97) 100% );
    color: var(--text-normal);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: var(--shadow-elev);
    padding: 26px 34px 28px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

    /* Pas de filet gauche */
    .news-details::before {
        content: none !important;
    }

/* =============================
   Hero / overlay (facultatifs)
   ============================= */
.news-details__hero,
.news-details__heroOverlay {
    display: none;
}

/* =============================
   Header / meta / titre
   ============================= */
.news-details__header {
    position: relative;
    z-index: 1;
    text-align: left;
    padding: 0;
    background: transparent;
}

/* Meta bar moderne */
.news-details__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .9rem;
    align-items: center;
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.news-details__meta-item {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.news-details__meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: rgba(0,0,0,0.22);
}

.news-details__date {
    font-weight: 700;
    color: var(--text-strong);
}

.news-details__type {
    padding: .22rem .7rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 2px 6px -4px rgba(0,0,0,0.16);
    font-weight: 650;
    color: var(--text-normal);
    font-size: .72em;
}

.news-details__featured {
    color: var(--gin-primary);
    font-size: .9em;
    font-weight: 700;
}

/* Titre principal (SEO: h1) */
.news-details__title {
    font-size: clamp(1.8rem, 3.2vw, 2.4rem);
    font-weight: 860;
    color: var(--text-strong);
    margin: 4px 0 12px 0;
    line-height: 1.18;
    letter-spacing: .015em;
}

/* Chapo */
.news-details__summary {
    font-size: 1.12rem;
    line-height: 1.6;
    color: #272833;
    margin: 8px 0 22px 0;
    max-width: 62ch;
    font-weight: 520;
}

/* =============================
   Image de couverture
   ============================= */
.news-details__figure {
    margin: 14px auto 10px;
    text-align: center;
}

.news-details__cover {
    display: block;
    width: 82%;
    max-width: 540px;
    margin: 0 auto 8px;
    box-shadow: 0 18px 46px -28px rgba(0,0,0,0.75);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

    .news-details__cover img {
        width: 100%;
        height: auto;
        border-radius: 20px;
        display: block;
        object-fit: cover;
        background: #e4e7ec;
        filter: saturate(1.05) contrast(1.05) brightness(1.02);
        transition: transform .5s ease, filter .45s;
    }

        .news-details__cover img:hover {
            transform: scale(1.03);
            filter: saturate(1.18) contrast(1.08) brightness(1.03);
        }

/* =============================
   Contenu texte
   ============================= */
.news-details__content {
    font-size: 1.02rem;
    line-height: 1.72;
    color: var(--text-normal);
    padding: .8rem .1rem .4rem .1rem;
    word-break: break-word;
    background: transparent;
}

    .news-details__content p {
        margin: 0 0 .8rem 0;
    }

    .news-details__content p,
    .news-details__content li,
    .news-details__content strong,
    .news-details__content em {
        color: var(--text-normal);
    }

    /* Sous-titres dans le corps (h2/h3 générés par le contenu) */
    .news-details__content h2 {
        margin: 1.9rem 0 .6rem;
        font-size: 1.28rem;
        font-weight: 720;
        letter-spacing: .02em;
        color: var(--text-strong);
    }

    .news-details__content h3 {
        margin: 1.6rem 0 .5rem;
        font-size: 1.08rem;
        font-weight: 680;
        color: var(--text-strong);
    }

    .news-details__content img {
        max-width: 97%;
        border-radius: 13px;
        margin: .9rem 0 1.3rem;
        box-shadow: 0 3px 9px -5px rgba(0,0,0,.09);
    }

/* =============================
   Footer - boutons
   ============================= */
.news-details__footer {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-details__footer-main {
    display: flex;
    gap: 1.4rem;
    justify-content: flex-start;
    align-items: center;
}

.news-details__back {
    background: linear-gradient(120deg,var(--gin-secondary), var(--gin-primary));
    color: var(--text-strong);
    border: none;
    font-size: .88rem;
    font-weight: 690;
    padding: .4rem 1.1rem .36rem;
    border-radius: 999px;
    box-shadow: 0 4px 12px -7px rgba(var(--gin-primary-rgb),0.3);
    cursor: pointer;
    letter-spacing: .06em;
    text-decoration: none;
    transition: background .32s var(--ease), color .28s var(--ease), transform .3s;
}

    .news-details__back:hover {
        background: linear-gradient(120deg,var(--gin-primary), var(--gin-secondary));
        color: #fff;
        transform: translateY(-2px) scale(1.04);
    }

.news-details__share {
    background: linear-gradient(120deg,var(--gin-primary), var(--gin-secondary));
    color: #fff;
    border: none;
    font-size: .85rem;
    font-weight: 760;
    padding: .38rem 0.94rem .34rem;
    border-radius: 999px;
    box-shadow: 0 3px 9px -7px rgba(var(--gin-primary-rgb),0.25);
    cursor: pointer;
    letter-spacing: .08em;
    transition: background .32s var(--ease), color .22s var(--ease), transform .25s;
}

    .news-details__share:hover {
        background: linear-gradient(120deg,var(--gin-secondary), var(--gin-primary));
        color: #232429;
        transform: translateY(-2.5px) scale(1.04);
    }

.news-details__copied {
    font-size: .91rem;
    font-weight: 500;
    color: var(--gin-primary);
    margin-left: 8px;
}

/* =============================
   States / erreurs
   ============================= */
.news-details__state,
.news-details__error {
    padding: 1.7rem 1.2rem;
    text-align: center;
    font-size: 1.01rem;
    color: var(--text-normal);
    font-weight: 590;
    margin: 24px auto;
    max-width: 430px;
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0,0,0,0.06);
}

.news-details__error {
    background: linear-gradient(125deg, rgba(255,90,140,0.11), rgba(var(--gin-primary-rgb),0.06));
    border-color: rgba(255,90,140,0.11);
    color: #C32761;
}

/* =============================
   Responsive
   ============================= */
@media (max-width: 820px) {
    .news-details {
        max-width: 96vw;
        margin: 32px auto 32px;
        padding: 20px 20px 22px;
    }

    .news-details__cover {
        width: 88%;
    }
}

@media (max-width: 520px) {
    .news-details {
        margin: 18px 0 18px;
        border-radius: 18px;
        padding: 16px 14px 18px;
    }

    .news-details__title {
        font-size: 1.4rem;
    }

    .news-details__summary {
        font-size: .99rem;
    }

    .news-details__content {
        font-size: .95rem;
    }

    .news-details__cover {
        width: 100%;
        margin: 14px auto 16px;
    }

    .news-details__footer-main {
        flex-wrap: wrap;
    }
}
