/* ═══════════════════════════════════════════
   DragonsMag — accueil.css
   Page d'accueil — dépend de base.css
═══════════════════════════════════════════ */

/* ── Variables spécifiques accueil ── */
:root {
    --cat-anime:   #e8c040;
    --cat-bd:      #e84070;
    --cat-cinema:  #40b8e8;
    --cat-japon:   #e87840;
    --cat-jv:      #40e878;
    --cat-musique: #a040e8;
    --cat-sport:   #4088e8;
    --cat-tv:      #e84040;
    --cat-livre: #e8a040;
}

/* ════════════════════════════════════════════
   SECTION UNE — 3 articles hero
════════════════════════════════════════════ */
.une-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    margin-bottom: 20px;
}

.une-card {
    position: relative;
    height: 300px;
    overflow: hidden;
    cursor: pointer;
    display: block;
    text-decoration: none;
}

/* Image de fond */
.une-card-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform .5s ease;
}
.une-card:hover .une-card-img {
    transform: scale(1.04);
}

/* Dégradé titre */
.une-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(26,7,15,.92) 0%,
        rgba(26,7,15,.55) 40%,
        transparent 75%
    );
    transition: opacity .3s;
}
.une-card:hover .une-card-overlay {
    opacity: .85;
}

/* Trait coloré en haut au survol */
.une-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 ease;
}
.une-card:hover::after {
    transform: scaleX(1);
}

.une-card-title {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 16px 18px;
    z-index: 2;
}

.une-card-title h1 {
    font-family: var(--fh);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin: 0;
    text-shadow: 0 1px 6px rgba(0,0,0,.6);
    transition: color .2s;
}
.une-card:hover .une-card-title h1 {
    color: var(--accent3);
}

/* ════════════════════════════════════════════
   BLOC PUBLICATIONS
════════════════════════════════════════════ */
.bloc-publications {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
}

/* En-tête bordeaux */
.bloc-header {
    background: var(--accent);
    padding: 9px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bloc-header-title {
    font-family: var(--fh);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .5px;
}

/* Filtres catégories */
.cat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg3);
}

.cat-btn {
    padding: 5px 12px;
    border: none;
    background: transparent;
    color: var(--text2);
    font-family: var(--fb);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: color .15s, background .15s;
    text-decoration: none;
    display: inline-block;
}
.cat-btn:hover { color: var(--text); background: var(--bg4); }
.cat-btn.active { color: var(--accent3); font-weight: 700; }

/* Liste articles */
.articles-list { padding: 0; }

.article-row {
    display: grid;
    grid-template-columns: 180px 160px 120px 1fr;
    align-items: center;
    gap: 0;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    transition: background .12s;
    text-decoration: none;
}
.article-row:last-child { border-bottom: none; }
.article-row:hover { background: var(--bg3); }

.article-date {
    font-family: var(--fb);
    font-size: 12px;
    color: var(--text3);
    flex-shrink: 0;
    line-height: 1.3;
}

.article-cat {
    font-family: var(--fb);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    flex-shrink: 0;
}

/* Couleurs par catégorie */
.article-cat.anime    { color: var(--cat-anime); }
.article-cat.bd       { color: var(--cat-bd); }
.article-cat.cinema   { color: var(--cat-cinema); }
.article-cat.japon    { color: var(--cat-japon); }
.article-cat.jv       { color: var(--cat-jv); }
.article-cat.musique  { color: var(--cat-musique); }
.article-cat.sport    { color: var(--cat-sport); }
.article-cat.tv       { color: var(--cat-tv); }
.article-cat.interview  { color: var(--cat-interview); }
.article-cat.livereport { color: var(--cat-livereport); }

.article-thumb {
    width: 110px;
    height: 40px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--bg4);
    flex-shrink: 0;
}
.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.article-row:hover .article-thumb img { transform: scale(1.05); }

.article-title {
    font-family: var(--fb);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    padding-left: 14px;
    transition: color .15s;
}
.article-row:hover .article-title { color: var(--accent3); }

/* Pagination */
.pagination-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg3);
}

.pagination-info {
    font-size: 12px;
    color: var(--text3);
    text-align: center;
    flex: 1;
    font-weight: 600;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: var(--r);
    border: 1px solid var(--border2);
    background: var(--bg4);
    color: var(--text2);
    font-family: var(--fb);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
    cursor: pointer;
}
.page-btn:hover {
    border-color: var(--accent2);
    color: var(--accent3);
    background: var(--accent-bg);
}

/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .article-row { grid-template-columns: 150px 130px 100px 1fr; }
}

@media (max-width: 900px) {
    .une-grid { grid-template-columns: 1fr; }
    .une-card  { height: 220px; }
}

@media (max-width: 640px) {
    .article-row { grid-template-columns: 1fr; gap: 6px; }
    .article-date { font-size: 11px; }
    .article-thumb { width: 80px; height: 54px; }
    .cat-filters { gap: 2px; }
    .cat-btn { font-size: 12px; padding: 4px 8px; }
}
