/* news/style.css — thème accueil (abyss) */

:root {
    --abyss-0: #050810;
    --abyss-1: #0a0f1c;
    --abyss-2: #0f1626;
    --teal: #49e8d8;
    --teal-dim: #49e8d84d;
    --violet: #8f83f2;
    --cream: #eceef4;
    --slate: #7c88a3;
    --line: rgba(140,160,200,0.14);
    --danger: #ff1744;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--abyss-0);
    color: var(--cream);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    position: relative;
}

/* empecher le scroll du body quand un modal est ouvert */
body.modal-open {
    overflow: hidden;
}

::selection { background: var(--teal-dim); color: var(--cream); }

h1, h2, h3 { font-family: 'Fraunces', serif; font-weight: 500; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }

/* ---------- Depth backdrop ---------- */
.depth-bg {
    position: fixed; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse 120% 60% at 50% -10%, #101d33 0%, transparent 55%),
        linear-gradient(to bottom, var(--abyss-0) 0%, var(--abyss-1) 40%, #060910 100%);
    pointer-events: none;
}

/* ---------- Layout ---------- */
.app-container {
    position: relative; z-index: 2;
    max-width: 1120px; margin: 0 auto; padding: 0 32px;
}

/* ---------- Header ---------- */
.news-header {
    padding: 100px 0 50px;
}
.news-eyebrow {
    font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--teal);
    letter-spacing: .14em; text-transform: uppercase;
    display: flex; align-items: center; gap: 10px; margin-bottom: 22px;
}
.news-eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--teal); }
.news-header h1 {
    font-size: clamp(32px, 5vw, 54px); line-height: 1.1; font-weight: 500;
}
.news-header .subtitle {
    margin-top: 16px; font-size: 16px; line-height: 1.65; color: var(--slate); max-width: 560px;
}

/* ---------- Filter tabs ---------- */
.news-filters {
    padding: 30px 0; display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
    border-bottom: 1px solid var(--line);
}
.news-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.news-tab {
    font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .04em;
    padding: 8px 16px; border-radius: 2px;
    border: 1px solid var(--line); background: transparent; color: var(--slate);
    cursor: pointer; transition: all .2s ease;
}
.news-tab:hover { border-color: var(--teal-dim); color: var(--cream); }
.news-tab.active {
    background: var(--teal); color: #04140f; border-color: var(--teal);
}
.news-tab .tab-count {
    font-size: 10px; opacity: .7; margin-left: 4px;
}
.news-tab.active .tab-count { opacity: .6; }

.news-count {
    font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--slate);
}
.news-count strong { color: var(--teal); }

/* ---------- News grid ---------- */
.news-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px;
    padding: 40px 0;
}

.news-card {
    display: flex; flex-direction: column;
    border: 1px solid var(--line); border-radius: 4px;
    background: linear-gradient(160deg, rgba(255,255,255,0.025), rgba(255,255,255,0) 60%);
    overflow: hidden; cursor: pointer;
    transition: border-color .25s ease, transform .25s ease;
    text-align: left; padding: 0; font-family: inherit;
}
.news-card:hover { border-color: var(--teal-dim); transform: translateY(-3px); }

.news-card-media {
    position: relative; width: 100%; aspect-ratio: 16/9;
    background: var(--abyss-2); overflow: hidden; flex-shrink: 0;
}
.news-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card-media .media-fallback {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: var(--slate); opacity: .4;
}

.news-card-game {
    position: absolute; top: 10px; left: 10px;
    font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--teal);
    background: rgba(5,8,16,0.8); backdrop-filter: blur(4px);
    padding: 4px 10px; border-radius: 2px;
    border: 1px solid var(--teal-dim);
}

.news-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card-title {
    font-family: 'Fraunces', serif; font-weight: 500; font-size: 17px;
    color: var(--cream); line-height: 1.35;
}
.news-card-foot {
    margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 11px; color: var(--slate);
}
.news-chip {
    display: inline-flex; align-items: center; gap: 4px;
    font-family: 'JetBrains Mono', monospace; font-size: 11px;
}
.news-chip.lang-en { color: #ffd166; }
.news-chip.external { color: var(--violet); }

/* ---------- "Voir plus" ---------- */
.news-more-wrap { display: flex; justify-content: center; padding-bottom: 40px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 2px;
    font-size: 14px; font-weight: 500; border: 1px solid var(--line);
    background: transparent; color: var(--cream);
    cursor: pointer; transition: all .2s ease; font-family: 'Inter', sans-serif;
}
.btn:hover { border-color: var(--teal); color: var(--teal); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-secondary { background: transparent; color: var(--cream); }
.btn-secondary:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- Refresh button ---------- */
.header-actions .btn {
    background: transparent; border: 1px solid var(--line); color: var(--slate);
    padding: 8px 12px; border-radius: 2px;
}
.header-actions .btn:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- Empty / loading ---------- */
.hidden { display: none !important; }
.empty-state {
    text-align: center; color: var(--slate); padding: 3rem 1rem;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-state i { font-size: 24px; color: var(--violet); }

/* ---------- Article modal ---------- */
.modal {
    position: fixed; inset: 0;
    background: rgba(5,8,16,0.88); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000; padding: 1rem;
    animation: fadeIn .2s ease-out;
}
.modal-content {
    background: var(--abyss-1); border: 1px solid var(--line);
    border-radius: 4px; padding: 36px;
    max-width: 860px; width: 100%; max-height: 88vh;
    display: flex; flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,.6);
    animation: modalUp .25s ease-out forwards;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes modalUp { from { transform: translateY(12px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }

.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal-header h3 {
    font-family: 'Fraunces', serif; font-size: 22px; font-weight: 500;
    color: var(--cream); line-height: 1.3;
}
.modal-close {
    background: transparent; border: none; color: var(--slate);
    font-size: 16px; cursor: pointer; padding: 4px 8px; flex-shrink: 0; transition: color .2s;
}
.modal-close:hover { color: var(--danger); }

.modal-meta {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin: 12px 0 20px;
}
.modal-meta .news-chip {
    color: var(--slate); font-size: 11px;
    background: rgba(255,255,255,0.04); padding: 4px 10px; border-radius: 2px;
}
.modal-body { overflow-y: auto; scrollbar-width: thin; }
.modal-footer { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Article content ---------- */
.news-article { color: var(--cream); font-size: 15px; line-height: 1.7; }
.news-article p { margin: 0 0 14px; }
.news-article h3, .news-article h4 {
    font-family: 'Fraunces', serif; color: var(--teal);
    margin: 22px 0 10px; font-size: 18px; font-weight: 500;
}
.news-article ul, .news-article ol { margin: 0 0 16px 20px; }
.news-article li { margin-bottom: 6px; }
.news-article a { color: var(--teal); text-decoration: underline; }
.news-article img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 12px 0;
    background: var(--abyss-2);
    min-height: 120px;
}
.news-article hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }
.news-article blockquote {
    border-left: 2px solid var(--teal-dim); padding-left: 16px;
    margin: 0 0 16px; color: var(--slate);
}
.news-article .news-video a, .news-article .news-link a { font-weight: 600; }

/* ---------- Carousel ---------- */
.news-carousel {
    position: relative; border-radius: 6px; overflow: hidden;
    margin: 12px 0; background: var(--abyss-2);
}
.news-carousel img {
    display: none; width: 100%; height: auto; border-radius: 0; margin: 0;
}
.news-carousel img.active { display: block; }
.carousel-nav {
    position: absolute; bottom: 0; left: 0; right: 0;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 10px; background: linear-gradient(transparent, rgba(5,8,16,0.8));
}
.carousel-btn {
    background: rgba(255,255,255,0.12); border: none; color: var(--cream);
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; transition: background .2s;
}
.carousel-btn:hover { background: rgba(255,255,255,0.24); }
.carousel-counter { font-size: 13px; color: var(--cream); font-variant-numeric: tabular-nums; }

/* ---------- Toast ---------- */
.toast-container {
    position: fixed; bottom: 2rem; right: 2rem;
    display: flex; flex-direction: column; gap: 12px; z-index: 9999;
}
.toast {
    background: var(--abyss-1); backdrop-filter: blur(16px);
    border-left: 3px solid var(--teal);
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 14px 20px; border-radius: 4px; color: var(--cream);
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
    display: flex; align-items: center; gap: 10px;
    animation: slideIn .3s ease forwards;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
.toast.success { border-left-color: #00e676; }
.toast.info    { border-left-color: var(--violet); }
.toast.danger  { border-left-color: var(--danger); }

/* ---------- Footer ---------- */
footer {
    text-align: center; padding: 40px 0 48px; color: var(--slate);
    font-size: 13px; border-top: 1px solid var(--line);
}

@media (max-width: 600px) {
    .app-container { padding: 0 20px; }
    .news-grid { grid-template-columns: 1fr; }
    .modal-content { padding: 20px; }
    .news-header { padding: 80px 0 36px; }
}
