/* ============================================================
   Le Monde en Action — Brutalist Editorial Design System
   ============================================================ */

/* ---- Scrollbar Hide ---- */
.scrollbar-hide { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* ---- Ticker Animation ---- */
@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-ticker {
    animation: ticker-scroll 45s linear infinite;
}

.animate-ticker:hover {
    animation-play-state: paused;
}

/* ---- Brutalist Borders & Cards ---- */
.card-brutal {
    border: 3px solid #1a1a1a;
    background: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dark .card-brutal {
    border-color: #374151;
    background: #111827;
}

.card-brutal:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #1a1a1a;
}

.dark .card-brutal:hover {
    box-shadow: 4px 4px 0 #374151;
}

/* ---- Hero / Featured Overlay — Miroir Brut Style ---- */
.hero-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.7) 35%,
        rgba(0, 0, 0, 0.25) 65%,
        rgba(0, 0, 0, 0.05) 100%
    );
}

.card-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.55) 40%,
        rgba(0, 0, 0, 0.15) 70%,
        transparent 100%
    );
}

.hero-card {
    position: relative;
    overflow: hidden;
    border: 3px solid #1a1a1a;
}

.dark .hero-card {
    border-color: #374151;
}

.hero-card:hover .hero-img,
.article-card:hover .card-img {
    transform: scale(1.05);
}

/* ---- Category Badge ---- */
.badge-cat {
    display: inline-block;
    padding: 2px 10px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 2px solid currentColor;
}

/* ---- Breaking News Pulse ---- */
@keyframes pulse-border {
    0%, 100% { border-color: #2563eb; }
    50%      { border-color: #ef4444; }
}

.breaking-pulse {
    animation: pulse-border 2s ease-in-out infinite;
}

/* ---- Asymmetric Grid (Desktop) ---- */
.grid-editorial {
    display: grid;
    gap: 0;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-editorial {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-editorial {
        grid-template-columns: repeat(12, 1fr);
    }
    .grid-editorial .gi-hero   { grid-column: span 7; grid-row: span 2; }
    .grid-editorial .gi-side   { grid-column: span 5; }
    .grid-editorial .gi-wide   { grid-column: span 8; }
    .grid-editorial .gi-narrow { grid-column: span 4; }
    .grid-editorial .gi-third  { grid-column: span 4; }
    .grid-editorial .gi-half   { grid-column: span 6; }
    .grid-editorial .gi-full   { grid-column: span 12; }
}

/* ---- Article Card Styles ---- */
.article-card {
    display: block;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid #1a1a1a;
    border-right: 3px solid #1a1a1a;
}

.dark .article-card {
    border-color: #374151;
}

.article-card:first-child {
    border-left: 3px solid #1a1a1a;
}

.dark .article-card:first-child {
    border-left-color: #374151;
}

.article-card .card-img {
    transition: transform 0.4s ease;
}

.article-card .card-content {
    transition: background 0.3s ease;
}

.article-card:hover .card-content {
    background: #f0f0ec;
}

.dark .article-card:hover .card-content {
    background: #1e293b;
}

/* ---- Match Score Card ---- */
.match-card {
    border: 2px solid #e5e7eb;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    background: white;
}

.dark .match-card {
    border-color: #374151;
    background: #111827;
}

.match-card:hover {
    border-color: #2563eb;
}

.match-card.is-live {
    border-color: #2563eb;
    border-width: 2px;
}

.match-card.is-live .match-minute {
    color: #2563eb;
    font-weight: 700;
}

/* ---- Score Ticker Item ---- */
.ticker-match {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 16px;
    border-right: 1px solid rgba(255,255,255,0.15);
    font-size: 0.8125rem;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ticker-match:hover {
    background: rgba(255,255,255,0.08);
}

.ticker-match .score {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #60a5fa;
    font-size: 0.875rem;
    min-width: 32px;
    text-align: center;
}

.ticker-match.is-live .score {
    color: #fbbf24;
}

/* ---- Section Dividers ---- */
.section-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #2563eb;
}

.section-title .icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* ---- Type Badges ---- */
.type-rumor     { background: #f59e0b; color: #1a1a1a; }
.type-official  { background: #10b981; color: white; }
.type-video     { background: #ef4444; color: white; }
.type-analysis  { background: #6366f1; color: white; }
.type-article   { background: #2563eb; color: white; }

/* ---- Safe area for iOS ---- */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ---- Dark mode transitions ---- */
* {
    transition-property: color, background-color, border-color;
    transition-timing-function: ease;
    transition-duration: 0.15s;
}

.no-transition * {
    transition: none !important;
}

/* ---- Lazy load fade-in ---- */
img[loading="lazy"] {
    opacity: 1;
}

/* ---- Scrollbar styling ---- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f0ec;
}

::-webkit-scrollbar-thumb {
    background: #a0a0a0;
    border: 2px solid #f0f0ec;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

.dark ::-webkit-scrollbar-track {
    background: #0f172a;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-color: #0f172a;
}

/* ---- Loading skeleton ---- */
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 2px;
}

.dark .skeleton {
    background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%);
    background-size: 200% 100%;
}

/* ---- Article Body Prose ---- */
.prose-article {
    font-size: 1.125rem;
    line-height: 1.85;
    color: #1a1a1a;
}

.dark .prose-article {
    color: #d1d5db;
}

.prose-article h2,
.prose-article h3,
.prose-article h4 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-top: 2em;
    margin-bottom: 0.75em;
    color: #1a1a1a;
}

.dark .prose-article h2,
.dark .prose-article h3,
.dark .prose-article h4 {
    color: #f3f4f6;
}

.prose-article p {
    margin-bottom: 1.25em;
}

.prose-article blockquote {
    border-left: 4px solid #2563eb;
    padding: 0.75em 1.25em;
    margin: 1.5em 0;
    background: #f8fafc;
    font-style: italic;
}

.dark .prose-article blockquote {
    background: #1e293b;
}

.prose-article a { color: #2563eb; text-decoration: none; }
.prose-article a:hover { text-decoration: underline; }

.prose-article ul, .prose-article ol { margin: 1em 0; padding-left: 1.5em; }
.prose-article li { margin-bottom: 0.5em; }

.prose-article img {
    border: 3px solid #1a1a1a;
    margin: 1.5em 0;
    max-width: 100%;
}

.dark .prose-article img {
    border-color: #374151;
}

/* ---- Comments Section ---- */
.comment-item {
    position: relative;
    padding: 16px 0;
}

.comment-item + .comment-item {
    border-top: 1px solid #e5e7eb;
}

.dark .comment-item + .comment-item {
    border-top-color: #374151;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    color: white;
}

.comment-reply {
    margin-left: 52px;
    padding-left: 16px;
    border-left: 2px solid #e5e7eb;
}

.dark .comment-reply {
    border-left-color: #374151;
}

/* ---- Newsletter Widget ---- */
.newsletter-widget {
    background: #2563eb;
    padding: 24px;
    color: white;
}

.newsletter-widget input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.875rem;
    outline: none;
    margin-bottom: 10px;
}

.newsletter-widget input::placeholder {
    color: rgba(255,255,255,0.6);
}

.newsletter-widget input:focus {
    border-color: white;
    background: rgba(255,255,255,0.2);
}

.newsletter-widget button {
    width: 100%;
    padding: 10px;
    background: white;
    color: #2563eb;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.newsletter-widget button:hover {
    background: #f0f0ec;
}

/* ---- Responsive Embeds (Facebook, YouTube, Twitter, etc.) ---- */
.prose-article iframe {
    max-width: 100% !important;
    width: 100% !important;
    height: auto;
    min-height: 300px;
    max-height: 550px;
    border: none;
    border-radius: 8px;
    margin: 1.5rem auto;
    display: block;
}

.prose-article iframe[src*="youtube"],
.prose-article iframe[src*="youtu.be"] {
    aspect-ratio: 16/9;
    min-height: unset;
    max-height: unset;
}

.prose-article iframe[src*="facebook"],
.prose-article iframe[src*="fb.com"] {
    min-height: 400px;
    max-height: 600px;
}

.prose-article iframe[src*="twitter"],
.prose-article iframe[src*="x.com"] {
    min-height: 300px;
    max-height: 500px;
}

/* ---- Article Prose Typography ---- */
.prose-article {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #374151;
}

.dark .prose-article {
    color: #d1d5db;
}

.prose-article p { margin-bottom: 1.25rem; }
.prose-article h2, .prose-article h3, .prose-article h4 {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 2rem 0 0.75rem;
}
.prose-article h2 { font-size: 1.5rem; }
.prose-article h3 { font-size: 1.25rem; }
.prose-article h4 { font-size: 1.1rem; }
.prose-article ul, .prose-article ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose-article li { margin-bottom: 0.4rem; }
.prose-article a { color: #2563eb; text-decoration: underline; }
.prose-article a:hover { color: #1d4ed8; }
.prose-article blockquote {
    border-left: 4px solid #2563eb;
    padding: 0.75rem 1rem;
    margin: 1.5rem 0;
    background: #f9fafb;
    font-style: italic;
}
.dark .prose-article blockquote { background: #1f2937; }
.prose-article img { max-width: 100%; height: auto; border-radius: 4px; margin: 1rem 0; }
.prose-article strong { font-weight: 700; }

/* ---- Print styles ---- */
@media print {
    #live-ticker, footer nav, #mobile-menu, .safe-area-bottom + div { display: none !important; }
    body { background: white !important; color: black !important; }
}
