/* =============================================================
   News — styles partagés (news.php + news_article.php)
   Base rem : html { font-size: 62.5% } → 1rem = 10px
   ============================================================= */

/* ── Filtres catégorie ─────────────────────────────────────── */
.news-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 4rem 0 3rem;
}

.news-filter a {
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #ddd;
    color: #555;
    transition: background .2s, color .2s, border-color .2s;
}

.news-filter a.active,
.news-filter a:hover {
    background: #222;
    color: #fff;
    border-color: #222;
}

/* ── Cartes news (liste) ───────────────────────────────────── */
.news-card {
    display: flex;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    margin-bottom: 2.4rem;
    overflow: hidden;
    transition: box-shadow .2s;
}

.news-card:hover { box-shadow: 0 6px 24px rgba(0, 0, 0, .15); }

.news-card-body {
    flex: 1;
    padding: 2.8rem 3.2rem;
    display: flex;
    flex-direction: column;
}

.news-card-thumb {
    width: 450px;
    min-height: 180px;
    flex-shrink: 0;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.news-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-thumb .no-thumb {
    color: #adb5bd;
    font-size: 1.4rem;
}

/* ── Éléments d'une carte ─────────────────────────────────── */
.news-cat {
    display: inline-block;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 8px;
}

.news-card-body h2 {
    font-size: 2.6rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #111;
    line-height: 1.25;
}

.news-meta {
    font-size: 1.4rem;
    color: #888;
    margin-bottom: 12px;
}

.news-excerpt {
    color: #444;
    font-size: 1.7rem;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 2rem;
}

.news-read-more {
    color: #1f6feb;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.5rem;
}

.news-read-more:hover { text-decoration: underline; }

.news-empty {
    text-align: center;
    color: #888;
    padding: 6rem 0;
    font-size: 1.8rem;
}

/* ── Header article (remplace simulator_header sur news_article.php) ── */
.news-article-header {
    background: #fff;
    border-bottom: 4px solid var(--sdt, #63839D);
    padding: 7rem 0 5rem;
    color: var(--black, #354046);
}

.news-article-header .container {
    max-width: 900px;
}

.article-cat {
    display: inline-block;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 5px 16px;
    border-radius: 20px;
    margin-bottom: 2rem;
}

.news-article-header h1 {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1.5rem;
    color: var(--black, #354046);
}

.news-article-header .article-meta {
    font-size: 1.6rem;
    color: #888;
    margin: 0;
}

.article-thumb {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    display: block;
}

.article-thumb-placeholder {
    background: #e9ecef;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 1.6rem;
}

.article-body {
    max-width: 860px;
    margin: 0 auto;
    padding: 4rem 1.5rem 7rem;
    font-size: 1.9rem;
    line-height: 1.8;
    color: #333;
}

.article-back {
    display: inline-block;
    margin-bottom: 3rem;
    color: #1f6feb;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.6rem;
}

.article-back:hover { text-decoration: underline; }

/* ── Rendu HTML Quill dans l'article public ────────────────── */
.ql-content { line-height: 1.8; }
.ql-content h2 { font-size: 2.8rem; font-weight: 700; margin: 2.4rem 0 1rem; }
.ql-content h3 { font-size: 2.2rem; font-weight: 700; margin: 2rem 0 .8rem; }
.ql-content p  { margin: 0 0 1.4rem; }
.ql-content strong { font-weight: 700; }
.ql-content em     { font-style: italic; }
.ql-content u      { text-decoration: underline; }
.ql-content s      { text-decoration: line-through; }
.ql-content a      { color: #1f6feb; text-decoration: underline; }
.ql-content a:hover { color: #0d51b8; }
.ql-content ul, .ql-content ol { padding-left: 2.4rem; margin-bottom: 1.4rem; }
.ql-content li { margin-bottom: .5rem; }
.ql-content blockquote {
    border-left: 4px solid #ddd;
    margin: 1.6rem 0;
    padding: .8rem 1.6rem;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 0 6px 6px 0;
}
.ql-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.4rem 1.8rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.4rem;
}

/* ── Compteurs vues / likes dans le header article ─────────── */
.article-counters {
    display: inline-flex;
    gap: 1.6rem;
    margin-left: 2rem;
    font-size: 1.4rem;
    color: #aaa;
    vertical-align: middle;
}

.article-counters i { margin-right: 4px; }

/* ── Bouton like ───────────────────────────────────────────── */
.article-like-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 30px;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #555;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.like-btn:hover:not(:disabled) {
    border-color: #e74c6f;
    color: #e74c6f;
    background: #fff5f8;
}

.like-btn.liked,
.like-btn:disabled {
    border-color: #e74c6f;
    background: #e74c6f;
    color: #fff;
    cursor: default;
}

/* ── Compteurs sur les cartes de liste ─────────────────────── */
.news-card-counters {
    display: flex;
    gap: 1.4rem;
    font-size: 1.3rem;
    color: #aaa;
    margin-top: auto;
    padding-top: 1rem;
}

.news-card-counters i { margin-right: 3px; }

/* ── Homepage — slider news (index.php) ───────────────────── */
.news-slider-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0 2rem;
    padding: 0 1rem;
}

.news-slider-viewport {
    flex: 1;
    overflow: hidden;
}

.news-slider-track {
    display: flex;
    flex-direction: row !important;
    gap: 2rem;
    transition: transform .35s ease;
    will-change: transform;
}

/* Carte verticale du slider */
.news-slide {
    flex: 0 0 calc(33.333% - 1.4rem);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}

.news-slide:hover { box-shadow: 0 6px 24px rgba(0, 0, 0, .15); }

.news-slide-thumb {
    width: 100%;
    height: 160px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.news-slide-thumb img { width: 100%; height: 100%; object-fit: cover; }

.news-slide-thumb span { color: #adb5bd; font-size: 1.3rem; }

.news-slide-body {
    padding: 2rem 2.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-slide-body .news-cat { margin-bottom: 8px; }

.news-slide-body h3 {
    font-size: 1.9rem;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
    margin: 0 0 6px;
}

.news-slide-body .news-meta { font-size: 1.3rem; margin-bottom: 1rem; }

.news-slide-body p {
    font-size: 1.5rem;
    color: #555;
    line-height: 1.55;
    flex: 1;
    margin-bottom: 1.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-slide-body .news-read-more { font-size: 1.4rem; }

/* Flèches */
.news-slider-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: #fff;
    color: #333;
    font-size: 2.8rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s, color .2s;
    padding: 0;
}

.news-slider-btn:hover {
    background: var(--black, #354046);
    border-color: var(--black, #354046);
    color: #fff;
}

.news-slider-btn:disabled {
    opacity: .3;
    cursor: default;
}

/* Points de navigation */
.news-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 2.5rem;
}

.news-slider-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #ddd;
    cursor: pointer;
    padding: 0;
    transition: background .2s;
}

.news-slider-dots button.active { background: var(--sdt, #63839D); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .news-slide { flex: 0 0 calc(50% - 1rem); }
}

@media (max-width: 600px) {
    .news-card { flex-direction: column; }
    .news-card-thumb { width: 100%; height: 200px; }

    .news-slide { flex: 0 0 100%; }
    .news-slider-btn { display: none; }

    .article-body { font-size: 1.7rem; }
}
