:root {
--primary: #006233;
--primary-dark: #004d28;
--secondary: #D21034;
--accent: #1a73e8;
--bg: #f4f5f7;
--bg-white: #ffffff;
--text-dark: #1a1a2e;
--text-muted: #6b7280;
--text-light: #9ca3af;
--border: #e5e7eb;
--shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
--shadow-md: 0 4px 12px rgba(0,0,0,0.1);
--shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
--radius: 12px;
--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
--article-bg: #0f172a;
}

/* ══════════════════════════════════════════════
   iOS / IPHONE — OPTIMISATIONS GLOBALES
══════════════════════════════════════════════ */

/* 1. Supprime le flash bleu/gris au tap sur tous les éléments */
* { -webkit-tap-highlight-color: transparent; }

/* 2. Supprime le délai 300ms sur tous les éléments interactifs */
a, button, [onclick], input, select, textarea,
.logo, .tag-filter, .news-card, .hero-main,
.hero-side-card > div, .back-to-top, .admin-btn,
.tag-cloud-item, .mobile-menu-item, .revue-filter-btn {
    touch-action: manipulation;
}

/* 3. Safe-area : header dégagé sous le notch (iPhone X→15 Pro Max) */
.header {
    padding-left:  env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}
.header-content {
    padding-top: max(10px, env(safe-area-inset-top));
}

/* 4. Safe-area : boutons flottants dégagés de la barre home */
.back-to-top { bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px)); }
.admin-btn   { bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px)); }

/* 5. Inputs ≥ 16px — empêche l'auto-zoom iOS à la saisie */
@media (max-width: 768px) {
    input, select, textarea { font-size: 16px !important; }
}

/* 6. Hover uniquement sur appareils avec pointeur précis (pas tactile)
   Le logo est exclu : l'effet s'applique aussi au tap sur mobile */
@media (hover: none) {
    .hero-side-card > div:hover img    { transform: none; }
    .news-card:hover                   { transform: none; box-shadow: var(--shadow-sm); }
    .tag-filter:hover                  { background: var(--bg-white); color: inherit; border-color: var(--border); }
}

/* 7. Scroll fluide iOS sur les conteneurs horizontaux */
.tag-filters, .revue-filter-bar, .breaking-content {
    -webkit-overflow-scrolling: touch;
}
body.dark-mode {
--bg: #0f172a;
--bg-white: #1e293b;
--text-dark: #f1f5f9;
--text-muted: #94a3b8;
--text-light: #cbd5e1;
--border: #334155;
--shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
--shadow-md: 0 4px 12px rgba(0,0,0,0.35);
--shadow-lg: 0 10px 30px rgba(0,0,0,0.45);
}

/* ── Mode Nuit : forçage global accessibilité ──────────────────── */
body.dark-mode p,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6,
body.dark-mode li, body.dark-mode dt, body.dark-mode dd,
body.dark-mode td, body.dark-mode th, body.dark-mode caption,
body.dark-mode label, body.dark-mode blockquote,
body.dark-mode strong, body.dark-mode b,
body.dark-mode em, body.dark-mode i { color: var(--text-dark); }

/* Contenu article (marked.parse) : override inline styles externes */
body.dark-mode .article-text *:not(a[class]):not(.tag-filter):not(.category-tag) {
    color: #f1f5f9 !important;
    background-color: transparent !important;
}

/* Exceptions : garder les couleurs sémantiques sur les éléments dédiés */
body.dark-mode .article-text a { color: #60a5fa !important; }
body.dark-mode .article-text code,
body.dark-mode .article-text pre { background: #0f172a !important; color: #7dd3fc !important; border-color: #334155 !important; }
body.dark-mode .article-text blockquote { border-left-color: var(--primary) !important; background: rgba(255,255,255,0.04) !important; }

/* ── Photos insérées dans le corps de l'article (at-inline-images.js) ── */
.article-text::after { content: ""; display: block; clear: both; } /* contient les figures flottantes */
.at-photo { margin: 20px 0; max-width: 100%; }
.at-photo img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.14); display: block; }
.at-photo figcaption { font-size: .85rem; color: var(--text-muted, #64748b); text-align: center; margin-top: 7px; font-style: italic; }
body.dark-mode .at-photo figcaption { color: #94a3b8 !important; }
.at-photo--center { margin-left: auto; margin-right: auto; width: var(--w, 70%); }
.at-photo--full { width: 100%; }
.at-photo--left { float: left; width: var(--w, 45%); margin: 6px 24px 16px 0; }
.at-photo--right { float: right; width: var(--w, 45%); margin: 6px 0 16px 24px; }
@media (max-width: 640px) {
    .at-photo--left, .at-photo--right { float: none; width: 100% !important; margin: 18px 0; }
    .at-photo--center { width: 100% !important; }
}

/* Inputs, textarea, select */
body.dark-mode input:not([type="submit"]):not([type="button"]):not([type="checkbox"]),
body.dark-mode textarea,
body.dark-mode select { color: var(--text-dark); background: var(--bg-white); border-color: var(--border); }

/* Cartes & widgets */
body.dark-mode .article-card,
body.dark-mode .veille-card,
body.dark-mode .revue-card,
body.dark-mode .related-card { background: var(--bg-white); }

body.dark-mode .article-card h3,
body.dark-mode .related-card h4,
body.dark-mode .revue-card h3 { color: var(--text-dark); }

body.dark-mode .voice-select { background: var(--bg-white); color: var(--text-dark); border-color: var(--border); }
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: 'Inter', 'Cairo', sans-serif;
background: var(--bg);
color: var(--text-dark);
line-height: 1.6;
transition: background 0.3s, color 0.3s;
}
a { text-decoration: none; color: inherit; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.reading-progress {
position: fixed; top: 0; left: 0; height: 3px;
background: linear-gradient(90deg, var(--primary), var(--secondary));
z-index: 1001; width: 0%; transition: width 0.1s;
}
.top-bar { background: var(--text-dark); color: #fff; padding: 8px 0; font-size: 0.8rem; }
body.dark-mode .top-bar { background: #020617; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar-left { display: flex; align-items: center; gap: 15px; }
.top-bar-left i { color: var(--secondary); margin-right: 5px; }
.top-bar-right { display: flex; gap: 10px; }
.top-bar-right a { color: #fff; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,0.1); transition: var(--transition); }
.top-bar-right a:hover { background: var(--secondary); transform: translateY(-2px); }
header { display: contents; }
.header { background: var(--bg-white); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 1000; overflow: visible; }
.header-content { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; gap: 12px; flex-wrap: nowrap; overflow: visible; }
.logo { display: flex; align-items: center; gap: 10px; cursor: pointer; align-self: stretch; margin: -15px 0; overflow: visible; }
.logo-icon { width: 48px; height: 48px; background: linear-gradient(135deg, var(--primary), var(--secondary)); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 1.4rem; }
.logo-img { height: 78px; width: 78px; border-radius: 0; object-fit: cover; flex-shrink: 0; transition: transform 0.25s ease; transform-origin: left top; }
.logo-img:hover { transform: scale(2); z-index: 1001; position: relative; }
.logo-text h1, .logo-text .logo-name { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.logo-text h1 span, .logo-text .logo-name span { color: var(--secondary); }
.logo-text p { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.main-nav > ul { display: flex; list-style: none; gap: 5px; }
.main-nav a { padding: 8px 14px; border-radius: 6px; font-weight: 500; font-size: 0.85rem; transition: var(--transition); }
.main-nav a:hover, .main-nav a.active { background: var(--primary); color: #fff; }
/* Menu Explorer Dropdown */
.dropdown { position: relative; list-style: none; }
.dropdown-menu { position: absolute; top: 100%; left: 0; background: var(--bg-white); box-shadow: var(--shadow-md); border-radius: 8px; padding: 10px 0; min-width: 160px; display: none; z-index: 1001; border: 1px solid var(--border); }
.dropdown-menu li { display: block !important; margin: 0; }
.dropdown-menu a { display: block; padding: 10px 20px !important; border-radius: 0 !important; color: var(--text-dark) !important; font-size: 0.85rem; }
.dropdown-menu a:hover { background: var(--primary) !important; color: #fff !important; }
.dropdown:hover .dropdown-menu { display: block; }

.header-actions { display: flex; align-items: center; gap: 15px; }
.theme-toggle {
background: var(--bg); border: 1px solid var(--border); width: 36px; height: 36px;
border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
color: var(--text-muted); transition: var(--transition); font-size: 1rem;
}
.theme-toggle:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.search-box {
display: flex; align-items: center; background: var(--bg); border-radius: 50px;
padding: 0 15px; width: 100px; border: 1px solid var(--border); transition: var(--transition);
}
.search-box:focus-within { width: 160px; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0,98,51,0.1); }
.search-box input { border: none; background: transparent; padding: 10px 5px; width: 100%; outline: none; font-size: 0.9rem; color: var(--text-dark); }
.search-icon { color: var(--text-muted); font-size: 0.9rem; }
.breaking-news { background: linear-gradient(135deg, var(--secondary), #b00d2b); color: #fff; padding: 10px 0; overflow: hidden; }
.breaking-news .container { display: flex; align-items: center; gap: 15px; }
.breaking-label { background: #fff; color: var(--secondary); padding: 4px 12px; border-radius: 4px; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; white-space: nowrap; }
.breaking-label-group { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.breaking-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,0.5); animation: breakingLiveDot 1.6s ease-in-out infinite; }
@keyframes breakingLiveDot { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,255,255,0.5); } 50% { opacity: 0.45; box-shadow: 0 0 0 4px rgba(255,255,255,0); } }
.breaking-news .breaking-ticker { overflow: hidden; flex: 1; }
.ticker-track { display: flex; animation: ticker 40s linear infinite; white-space: nowrap; }
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-item { padding: 0 30px; font-size: 0.85rem; font-weight: 500; }
.ticker-item::before { content: '•'; margin-right: 8px; color: rgba(255,255,255,0.5); }
.hero-section { padding: 30px 0; transition: opacity 0.3s ease; }
.hero-section.hidden { display: none; }
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; height: 520px; overflow: hidden; }
.hero-main { position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; box-shadow: var(--shadow-md); height: 100%; }
.hero-main img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s ease-out; }
/* Balayage de lumière diagonal, en boucle, sur la Une (indépendant du survol) */
.hero-main::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 35%; height: 100%;
    background: linear-gradient(75deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
    transform: translateX(-220%) skewX(-20deg);
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: overlay;
    animation: heroLightSweep 5s ease-in-out infinite;
}
@keyframes heroLightSweep { 0%, 10% { transform: translateX(-220%) skewX(-20deg); } 45%, 100% { transform: translateX(320%) skewX(-20deg); } }
.hero-side-card { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; height: 100%; overflow: hidden; }
.hero-side-card > div { position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; box-shadow: var(--shadow-md); height: 100%; }
.hero-side-card > div img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 6s ease-out; }
.hero-side-card > div:hover img { transform: scale(1.05); }
.hero-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 25px 20px 20px; background: linear-gradient(transparent, rgba(0,0,0,0.9)); color: #fff; pointer-events: none; z-index: 2; transition: transform 0.2s ease-out; }
.hero-meta-wrapper { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.hero-meta-tag { background: rgba(0, 0, 0, 0.5); color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; display: inline-block; backdrop-filter: blur(4px); }
.category-tag { background: var(--secondary); color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; display: inline-block; }
/* Masque la pastille de catégorie superposée à l'image/vidéo (Une + cartes) — gardée dans la barre méta de l'article */
.hero-overlay .category-tag,
.news-card-img .category-tag { display: none !important; }
.tag-algerie { background: #1a73e8; }
.tag-telecoms { background: var(--primary); }
.tag-mobile { background: #f59e0b; }
.tag-startups { background: #8b5cf6; }
.tag-innovation { background: #10b981; }
.tag-video { background: #ec4899; }
.hero-overlay h2 { font-size: 1.8rem; font-weight: 800; line-height: 1.2; margin-bottom: 8px; }
.hero-side-card .hero-overlay h2 { font-size: 1.1rem; }
.hero-overlay p { font-size: 0.95rem; opacity: 0.9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.content-layout { display: grid; grid-template-columns: 1fr 320px; gap: 30px; padding: 30px 20px; }
.news-column { min-width: 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 2px solid var(--border); flex-wrap: wrap; gap: 15px; }
.section-title { font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ''; width: 4px; height: 28px; background: linear-gradient(to bottom, var(--primary), var(--secondary)); border-radius: 2px; }
.section-title .icon { width: 36px; height: 36px; background: var(--bg); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--primary); }
.tag-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-filter { padding: 6px 14px; background: var(--bg-white); border: 1px solid var(--border); border-radius: 20px; font-size: 0.8rem; cursor: pointer; transition: var(--transition); }
.tag-filter:hover, .tag-filter.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { background: var(--bg-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); cursor: pointer; opacity: 0; transform: translateY(20px); animation: fadeInUp 0.5s forwards; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.news-card-img { position: relative; height: 200px; overflow: hidden; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.news-card:hover .news-card-img img { transform: scale(1.08); }
.news-card-body { padding: 20px; }
.news-card-body h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.4; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-body p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; color: var(--text-light); padding-top: 12px; border-top: 1px solid var(--border); }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 30px 0; }
.pagination button { padding: 10px 16px; background: var(--bg-white); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; font-weight: 600; transition: var(--transition); color: var(--text-dark); }
.pagination button:hover, .pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.breves-pagination { margin: 12px 0 0; gap: 6px; }
.breves-pagination button { padding: 5px 10px; font-size: 0.8rem; }
.load-more-btn { display: block; margin: 0 auto 40px; padding: 12px 28px; background: var(--primary); color: #fff; border: none; border-radius: 30px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.load-more-btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.load-more-btn.hidden { display: none; }
.sidebar { display: flex; flex-direction: column; gap: 25px; }
.sidebar-widget { background: var(--bg-white); padding: 25px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.widget-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; color: var(--text-dark); }
.widget-title i { color: var(--secondary); }
.trending-list { list-style: none; }
.trending-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: var(--transition); }
.trending-item:last-child { border-bottom: none; }
.trending-item:hover { padding-left: 5px; }
.trending-number { font-size: 1.5rem; font-weight: 900; color: var(--border); line-height: 1; min-width: 30px; }
.trending-item:hover .trending-number { color: var(--secondary); }
.trending-content h4 { font-size: 0.85rem; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.trending-content span { font-size: 0.7rem; color: var(--text-light); }
.newsletter-widget { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.newsletter-widget .widget-title { color: #fff; }
.newsletter-widget .widget-title i { color: #fbbf24; }
.newsletter-widget p { font-size: 0.85rem; opacity: 0.9; margin-bottom: 15px; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input { padding: 12px; border: none; border-radius: 6px; font-size: 0.9rem; outline: none; }
.newsletter-form button { padding: 12px; background: var(--secondary); color: #fff; border: none; border-radius: 6px; font-weight: 700; cursor: pointer; transition: var(--transition); }
.newsletter-form button:hover { background: #fff; color: var(--secondary); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud-item { padding: 6px 12px; background: var(--bg); border-radius: 20px; font-size: 0.8rem; cursor: pointer; transition: var(--transition); border: 1px solid var(--border); }
.tag-cloud-item:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.stats-bar { padding: 40px 0; background: var(--bg-white); border-top: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-card { text-align: center; padding: 20px; border-radius: var(--radius); transition: var(--transition); }
.stat-card:hover { transform: translateY(-3px); }
.stat-icon { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px; font-size: 1.5rem; }
.stat-icon.green { background: rgba(0,98,51,0.1); color: var(--primary); }
.stat-icon.red { background: rgba(210,16,52,0.1); color: var(--secondary); }
.stat-icon.blue { background: rgba(26,115,232,0.1); color: var(--accent); }
.stat-icon.yellow { background: rgba(245,158,11,0.1); color: #f59e0b; }
.stat-number { font-size: 2.2rem; font-weight: 900; color: var(--text-dark); line-height: 1; margin-bottom: 5px; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.article-page { background: var(--article-bg); min-height: 100vh; padding: 60px 0 140px; }
.back-btn { background: var(--secondary); color: #fff; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; font-weight: 600; margin-bottom: 30px; display: inline-flex; align-items: center; gap: 8px; transition: var(--transition); }
.back-btn:hover { background: #b00d2b; transform: translateX(-5px); }
.article-wrapper { display: flex; gap: 30px; max-width: 950px; margin: 0 auto; position: relative; align-items: flex-start; }
.audio-sticky-bar { display: none; }
.article-content { background: var(--bg-white); flex: 1; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.article-content > img { width: 100%; max-height: 500px; object-fit: cover; }
.article-body { padding: 40px; }
.article-meta { display: flex; gap: 15px; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 2px solid var(--border); font-size: 0.9rem; color: var(--text-muted); flex-wrap: wrap; align-items: center; }
.article-meta span { display: flex; align-items: center; gap: 6px; }
.meta-audio-btn { background: var(--bg); color: var(--primary); border: 1px solid var(--primary); padding: 4px 12px; border-radius: 4px; font-size: 0.8rem; font-weight: 700; cursor: pointer; margin-left: auto; display: flex; align-items: center; gap: 6px; transition: var(--transition); }
.meta-audio-btn:hover { background: var(--primary); color: #fff; }
.meta-lite-btn { background: var(--bg); color: #0a7d3e; border: 1px solid #0a7d3e; padding: 4px 12px; border-radius: 4px; font-size: 0.8rem; font-weight: 700; text-decoration: none; display: flex; align-items: center; gap: 6px; transition: var(--transition); }
.meta-lite-btn:hover { background: #0a7d3e; color: #fff; }

/* ── Lecteur Audio : Highlighting (legacy compat) ──────────────── */
.article-text p.reading-active,
.article-text h2.reading-active,
.article-text h3.reading-active,
.article-text li.reading-active {
    background: linear-gradient(90deg, rgba(0,82,204,0.10) 0%, transparent 85%);
    border-left: 3px solid var(--primary);
    padding-left: 14px;
    margin-left: -17px;
    border-radius: 0 6px 6px 0;
    transition: background 0.18s ease;
}
.article-text p.reading-done,
.article-text h2.reading-done,
.article-text h3.reading-done,
.article-text li.reading-done {
    opacity: 0.42;
    transition: opacity 0.3s ease;
}

/* ══════════════════════════════════════════════════════════════════
   PREMIUM AUDIO PLAYER
   ══════════════════════════════════════════════════════════════════ */
.premium-reading-progress { position:fixed; top:0; left:0; height:3px; background:linear-gradient(90deg, var(--primary), var(--accent)); z-index:9999; width:0%; transition:width .15s linear; pointer-events:none; }
.premium-toast { position:fixed; top:20px; right:20px; background:var(--text-dark); color:var(--bg-white); padding:12px 20px; border-radius:8px; font-size:.85rem; font-weight:500; z-index:9999; transform:translateX(120%); transition:transform .4s cubic-bezier(.4,0,.2,1); box-shadow:0 4px 20px rgba(0,0,0,.15); }
.premium-toast.show { transform:translateX(0); }

/* Player bar */
.premium-player-bar { position:fixed; bottom:0; left:0; right:0; background:rgba(255,255,255,.97); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); border-top:1px solid var(--border); z-index:1000; transform:translateY(100%); transition:transform .5s cubic-bezier(.4,0,.2,1), background .6s ease; box-shadow:0 -4px 30px rgba(0,0,0,.08); }
.premium-player-bar.visible { transform:translateY(0); }
.premium-progress-bar { height:3px; background:var(--bg, #eee); cursor:pointer; position:relative; transition:height .2s ease; }
.premium-progress-bar:hover { height:6px; }
.premium-progress-fill { height:100%; background:linear-gradient(90deg, var(--primary), var(--accent)); width:0%; border-radius:0 3px 3px 0; transition:width .3s linear; position:relative; }
.premium-progress-fill::after { content:''; position:absolute; right:-5px; top:50%; transform:translateY(-50%); width:12px; height:12px; background:var(--primary); border-radius:50%; opacity:0; transition:opacity .2s ease; box-shadow:0 0 6px rgba(0,98,51,.5); }
.premium-progress-bar:hover .premium-progress-fill::after { opacity:1; }
.premium-player-main { display:flex; align-items:center; gap:.75rem; padding:.75rem 1.5rem; }
.premium-player-btn { background:none; border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; color:var(--text-dark); transition:all .2s ease; border-radius:50%; flex-shrink:0; width:36px; height:36px; font-size:1rem; }
.premium-player-btn:hover { color:var(--primary); transform:scale(1.1); }
.premium-play-btn { width:48px; height:48px; background:var(--primary)!important; color:#fff!important; border-radius:50%; box-shadow:0 2px 12px rgba(0,98,51,.4); font-size:1.1rem; }
.premium-play-btn:hover { background:var(--primary-dark, #004d28)!important; box-shadow:0 4px 20px rgba(0,98,51,.6); }
.premium-player-info { flex:1; min-width:0; }
.premium-player-title { font-weight:600; font-size:.85rem; color:var(--text-dark); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.premium-player-status { font-size:.75rem; color:var(--text-muted); display:flex; align-items:center; gap:6px; }
.premium-status-dot { width:6px; height:6px; border-radius:50%; background:#aaa; display:inline-block; }
.premium-status-dot.active { background:#4ade80; animation:premium-pulse-dot 2s infinite; }
@keyframes premium-pulse-dot { 0%,100%{opacity:1} 50%{opacity:.4} }
.premium-player-time { font-family:monospace; font-size:.78rem; color:var(--text-muted); min-width:90px; text-align:center; }

/* Visualizer */
.premium-visualizer { display:flex; align-items:center; gap:2px; height:20px; }
.premium-visualizer span { width:3px; background:var(--primary); border-radius:2px; height:4px; transition:height .1s ease; }
.premium-visualizer.active span { animation:premium-viz .8s infinite ease-in-out; }
.premium-visualizer.active span:nth-child(1){animation-delay:0s} .premium-visualizer.active span:nth-child(2){animation-delay:.15s} .premium-visualizer.active span:nth-child(3){animation-delay:.3s} .premium-visualizer.active span:nth-child(4){animation-delay:.45s} .premium-visualizer.active span:nth-child(5){animation-delay:.1s}
@keyframes premium-viz { 0%,100%{height:4px} 50%{height:18px} }

/* Expanded panel */
.premium-player-expanded { max-height:0; overflow:hidden; opacity:0; transition:all .4s cubic-bezier(.4,0,.2,1); padding:0 1.5rem; }
.premium-player-bar.expanded .premium-player-expanded { max-height:350px; opacity:1; padding:1rem 1.5rem; }
.premium-control-section { display:flex; align-items:center; gap:1rem; padding:.5rem 0; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.premium-control-section:last-child { border-bottom:none; }
.premium-control-label { font-size:.72rem; font-weight:600; text-transform:uppercase; letter-spacing:.1em; color:var(--text-muted); min-width:65px; }
.premium-speed-btns { display:flex; gap:6px; flex-wrap:wrap; }
.premium-speed-btn { font-family:monospace; font-size:.78rem; padding:4px 10px; border:1px solid var(--border); border-radius:4px; background:var(--bg, #f5f5f5); color:var(--text-dark); cursor:pointer; transition:all .2s ease; }
.premium-speed-btn:hover { border-color:var(--primary); color:var(--primary); }
.premium-speed-btn.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.premium-voice-select { font-size:.82rem; padding:6px 12px; border:1px solid var(--border); border-radius:6px; background:var(--bg, #f5f5f5); color:var(--text-dark); cursor:pointer; max-width:220px; outline:none; }
.premium-voice-select:focus { border-color:var(--primary); }
.premium-slider-row { flex:1; display:flex; align-items:center; gap:8px; }
.premium-slider-row input[type="range"] { -webkit-appearance:none; appearance:none; flex:1; height:4px; background:var(--border); border-radius:2px; outline:none; cursor:pointer; }
.premium-slider-row input[type="range"]::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:16px; height:16px; background:var(--primary); border-radius:50%; cursor:pointer; box-shadow:0 1px 4px rgba(0,0,0,.2); }
.premium-slider-row span { font-family:monospace; font-size:.75rem; min-width:35px; color:var(--text-muted); }

/* Toggle switch */
.premium-toggle { position:relative; width:42px; height:22px; background:var(--border); border-radius:11px; cursor:pointer; transition:background .3s ease; flex-shrink:0; }
.premium-toggle.active { background:var(--primary); }
.premium-toggle::after { content:''; position:absolute; top:2px; left:2px; width:18px; height:18px; background:#fff; border-radius:50%; transition:transform .3s ease; box-shadow:0 1px 3px rgba(0,0,0,.2); }
.premium-toggle.active::after { transform:translateX(20px); }
.premium-toggles-row { display:flex; gap:1.5rem; flex-wrap:wrap; align-items:center; }
.premium-toggle-label { display:flex; align-items:center; gap:8px; cursor:pointer; font-size:.82rem; color:var(--text-muted); }
.premium-shortcuts-hint { font-size:.7rem; color:var(--text-muted); gap:8px; }
.premium-shortcuts-hint kbd { font-family:monospace; font-size:.65rem; background:var(--bg, #f5f5f5); border:1px solid var(--border); padding:1px 5px; border-radius:3px; }

/* Floating controls */
.premium-floating-controls { position:fixed; right:1.5rem; top:50%; transform:translateY(-50%); display:flex; flex-direction:column; gap:8px; z-index:900; opacity:0; pointer-events:none; transition:opacity .3s ease; }
.premium-floating-controls.visible { opacity:1; pointer-events:all; }
.premium-float-btn { width:42px; height:42px; border-radius:50%; border:1px solid var(--border); background:rgba(255,255,255,.95); backdrop-filter:blur(10px); display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--text-muted); transition:all .2s ease; box-shadow:0 2px 10px rgba(0,0,0,.06); font-size:.9rem; }
.premium-float-btn:hover { color:var(--primary); border-color:var(--primary); transform:scale(1.1); }
.premium-float-btn.active { background:var(--primary); color:#fff; border-color:var(--primary); }

/* Word-level highlight */
.premium-word-highlight { background:rgba(0,98,51,.25)!important; border-radius:3px; padding:1px 2px; box-shadow:0 0 0 2px rgba(0,98,51,.12); transition:background .15s ease; }
.premium-sentence-highlight { background:rgba(0,98,51,.06)!important; border-radius:4px; }

/* Zen mode */
body.premium-zen-mode { background:#0d0d0d!important; color:#e8e4dc!important; }
body.premium-zen-mode .article-page { background:#0d0d0d; }
body.premium-zen-mode .article-content { background:#1a1a1a; box-shadow:none; }
body.premium-zen-mode .article-body { color:#e8e4dc; }
body.premium-zen-mode .article-body h1, body.premium-zen-mode .article-body h2, body.premium-zen-mode .article-body h3 { color:#f0ede6; }
body.premium-zen-mode .article-meta { border-color:#333; opacity:.5; }
body.premium-zen-mode .article-wrapper { max-width:700px; }
body.premium-zen-mode .premium-player-bar { background:rgba(26,26,26,.98); border-color:#333; }
body.premium-zen-mode .premium-player-btn { color:#ccc; }
body.premium-zen-mode .premium-player-title { color:#e8e4dc; }
body.premium-zen-mode .premium-float-btn { background:rgba(26,26,26,.95); border-color:#333; color:#999; }
body.premium-zen-mode .premium-word-highlight { background:rgba(0,98,51,.35)!important; color:#b8f0c8!important; }
body.premium-zen-mode .premium-sentence-highlight { background:rgba(0,98,51,.1)!important; }
body.premium-zen-mode .back-btn { opacity:.5; }
body.premium-zen-mode .share-buttons { opacity:.3; }
body.premium-zen-mode .tag-filter { opacity:.4; }
body.premium-zen-mode .related-articles { opacity:.3; }

/* Mobile overrides for premium player */
@media (max-width: 768px) {
    .premium-player-main { padding:.6rem 1rem; gap:.5rem; }
    .premium-player-time { min-width:70px; font-size:.72rem; }
    .premium-floating-controls { display:none; }
    .premium-player-expanded { padding:0 1rem; }
    .premium-shortcuts-hint { display:none; }
    .premium-play-btn { width:42px; height:42px; }
    .premium-player-btn { width:30px; height:30px; font-size:.85rem; }
    .premium-visualizer { display:none; }
}
.voice-select:focus,
.voice-select:hover { border-color: var(--primary); }
.audio-sticky-bar.playing .voice-select { border-color: var(--primary); }

/* ── Status & pulse ──────────────────────────────────────────────── */
.audio-status { font-size: 0.6rem; font-weight: 800; color: var(--text-muted); letter-spacing: 1px; transition: color 0.2s; }
.audio-sticky-bar.playing .audio-status { color: var(--primary); animation: tts-pulse 1.4s ease-in-out infinite; }
@keyframes tts-pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
.reading-time { background: var(--bg); padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; color: var(--text-dark); }
.article-body h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.3; margin-bottom: 20px; color: var(--text-dark); }
.article-body h2 { font-size: 1.5rem; color: var(--primary); margin: 30px 0 15px; border-left: 4px solid var(--secondary); padding-left: 15px; }
.article-body p { font-size: 1.1rem; line-height: 1.8; color: #333; margin-bottom: 20px; }
.article-text { white-space: pre-wrap; }
.article-text table { width: 100%; margin: 30px 0; border-collapse: collapse; overflow-x: auto; display: block; font-size: 0.95rem; }
.article-text th, .article-text td { padding: 12px 15px; border: 1px solid var(--border); text-align: left; }
.article-text th { background: var(--bg); font-weight: 700; }
.article-text img { max-width: 350px; height: auto; display: block; margin: 25px auto; border-radius: 8px; box-shadow: var(--shadow-sm); }
.share-buttons { display: flex; gap: 10px; margin: 30px 0; padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.share-btn { flex: 1; min-width: 120px; padding: 12px; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; transition: var(--transition); color: #fff; }
.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.youtube { background: #D21034; }
.share-btn.copy { background: var(--bg); color: var(--text-dark); }
.share-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.related-articles { max-width: 800px; margin: 50px auto 0; }
.related-articles h3 { font-size: 1.5rem; margin-bottom: 25px; color: #fff; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card { background: var(--bg-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; transition: var(--transition); }
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.related-card img { width: 100%; height: 150px; object-fit: cover; }
.related-card h4 { padding: 15px; font-size: 0.9rem; font-weight: 600; color: var(--text-dark); }
.footer { background: #111; color: #fff; padding: 50px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-about p { font-size: 0.9rem; color: rgba(255,255,255,0.6); line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; color: #fff; transition: var(--transition); }
.footer-social a:hover { background: var(--secondary); transform: translateY(-3px); }
.footer h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 25px; color: #fff; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.9rem; transition: var(--transition); display: flex; align-items: center; gap: 8px; cursor: pointer; }
.footer-links a:hover { color: #fff; padding-left: 5px; }
.footer-links a i { font-size: 0.7rem; color: var(--secondary); }
.footer-bottom { padding-top: 25px; text-align: center; font-size: 0.85rem; color: rgba(255,255,255,0.3); }
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; background: var(--primary); color: #fff; border: none; border-radius: 50%; cursor: pointer; font-size: 1.2rem; display: none; align-items: center; justify-content: center; box-shadow: var(--shadow-md); transition: var(--transition); z-index: 99; }
.back-to-top.visible { display: flex; }
.back-to-top:hover { background: var(--secondary); transform: translateY(-3px); }
.admin-btn { position: fixed; bottom: 30px; right: 100px; width: 55px; height: 55px; background: linear-gradient(135deg, var(--secondary), #e84453); color: #fff; border: none; border-radius: 50%; cursor: pointer; font-size: 1.3rem; box-shadow: var(--shadow-lg); transition: var(--transition); z-index: 98; display: flex; align-items: center; justify-content: center; }
.admin-btn:hover { transform: scale(1.1); box-shadow: 0 8px 20px rgba(210, 16, 52, 0.4); }
.admin-btn:active { transform: scale(0.95); }
.admin-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity 0.3s; }
.admin-modal.show { display: flex; opacity: 1; }
.modal-content { background: var(--bg-white); border-radius: var(--radius); width: 100%; max-width: 700px; max-height: 90vh; overflow-y: auto; padding: 40px; position: relative; box-shadow: var(--shadow-lg); }
.modal-close { position: absolute; top: 15px; right: 15px; width: 40px; height: 40px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); transition: var(--transition); }
.modal-close:hover  { color: var(--secondary); transform: rotate(90deg); }
.admin-modal h2 { margin-bottom: 25px; font-size: 1.5rem; color: var(--text-dark); display: flex; align-items: center; gap: 10px; }
.admin-modal h2 i { color: var(--secondary); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--text-dark); font-size: 0.95rem; }
.form-group label .required { color: var(--secondary); }
.form-group input[type="text"], .form-group input[type="date"], .form-group input[type="time"], .form-group select, .form-group textarea {
width: 100%; padding: 10px 12px; border: 2px solid var(--border); border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 0.95rem;
color: var(--text-dark); background: var(--bg-white); transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); background: var(--bg); }
.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }
@media (max-width: 600px) { .form-row {  grid-template-columns: 1fr; } }
.file-input-wrapper { position: relative; }
.file-input-wrapper input[type="file"] { display: none; }
.file-label { display: block; padding: 15px; background: var(--bg); border: 2px dashed var(--border); border-radius: 8px; text-align: center; cursor: pointer;  transition: var(--transition); color: var(--text-muted); }
.file-label:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.image-preview { margin-top: 15px; }
.image-preview img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: var(--shadow-md); }
.form-actions { display: flex; gap: 12px; margin-top: 30px; padding-top: 20px; border-top: 2px solid var(--border); }
.btn-primary, .btn-secondary { padding: 12px 24px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: var(--transition); font-size: 0.95rem; display: flex; align-items: center; gap: 8px; }
.btn-primary { background: linear-gradient(135deg, var(--primary), #005a28); color: #fff;  flex: 1; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--border); color: var(--text-dark); flex: 1; }
.btn-secondary:hover { background: var(--text-muted); color: #fff; }
/* ── SMART HUB IA ───────────────────────────────────────────── */
.hub-smart-zone { background: linear-gradient(135deg,#0d1b2a,#1a2940); border-radius: 12px; padding: 18px 20px; margin-bottom: 24px; border: 1px solid rgba(210,16,52,0.3); }
.hub-smart-header { font-weight: 700; font-size: 0.95rem; color: #fff; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.hub-smart-header i { color: #D21034; font-size: 1.1rem; }
.hub-smart-hint { font-weight: 400; font-size: 0.78rem; color: #8899aa; margin-left: 4px; }
.hub-smart-zone .form-group label { color: #ccd6e0; font-size: 0.82rem; margin-bottom: 4px; }
.hub-smart-zone input[type="url"],
.hub-smart-zone textarea { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15); color: #fff; border-radius: 8px; padding: 9px 12px; width: 100%; font-size: 0.88rem; }
.hub-smart-zone input[type="url"]::placeholder,
.hub-smart-zone textarea::placeholder { color: #556677; }
.hub-smart-zone input[type="url"]:focus,
.hub-smart-zone textarea:focus { outline: none; border-color: #D21034; background: rgba(255,255,255,0.1); }
.hub-smart-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.hub-btn { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border: none; border-radius: 8px; cursor: pointer; font-size: 0.82rem; font-weight: 600; background: rgba(255,255,255,0.1); color: #ccd6e0; transition: all 0.2s; }
.hub-btn:hover { background: rgba(255,255,255,0.18); color: #fff; transform: translateY(-1px); }
.hub-btn i { font-size: 0.85rem; }
.hub-btn-generate { background: linear-gradient(135deg,#1a3a5c,#0d2640); color: #7ec8f4; border: 1px solid rgba(126,200,244,0.25); }
.hub-btn-generate:hover { background: linear-gradient(135deg,#1f4570,#12305a); }
.hub-btn-fill { background: linear-gradient(135deg,#2d1a00,#4a2d00); color: #f4c86c; border: 1px solid rgba(244,200,108,0.25); }
.hub-btn-fill:hover { background: linear-gradient(135deg,#3d2400,#5a3800); }
.hub-btn-loading { opacity: 0.6; cursor: not-allowed; }
.hub-btn-done { background: rgba(34,197,94,0.2) !important; color: #4ade80 !important; border: 1px solid rgba(74,222,128,0.3) !important; }
.hub-gen-wrap { position: relative; }
.hub-gen-dropdown { display:none; position:absolute; bottom:calc(100% + 6px); left:50%; transform:translateX(-50%); background:#1a1a2e; border:1px solid rgba(99,102,241,.4); border-radius:10px; padding:6px; z-index:100; min-width:180px; }
.hub-gen-wrap.open .hub-gen-dropdown { display:flex; flex-direction:column; gap:4px; }
.hub-gen-option { display:flex; align-items:center; gap:8px; padding:9px 12px; border:none; border-radius:8px; background:transparent; color:#ccd6e0; font-size:.82rem; cursor:pointer; transition:background .15s; white-space:nowrap; }
.hub-gen-option:hover { background:rgba(99,102,241,.15); color:#fff; }
.hub-gen-option small { opacity:.55; font-size:.72rem; }
.hub-gen-option.checked::before { content:'✓'; color:#10b981; font-weight:700; margin-right:2px; }
.hub-url-row { display: flex; gap: 8px; }
.hub-url-row input[type="url"] { flex: 1; width: auto; min-width: 0; }
.hub-btn-web { background: linear-gradient(135deg,#0f4a3a,#0a3328); color: #6ee7b7; border: 1px solid rgba(110,231,183,0.3); white-space: nowrap; flex-shrink: 0; }
.hub-btn-web:hover { background: linear-gradient(135deg,#125c48,#0d4433); color: #fff; }
.hub-source-badge { font-size: 0.72rem; color: #6ee7b7; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 8px; background: rgba(110,231,183,0.08); border-radius: 5px; border-left: 2px solid #6ee7b7; }
.hub-source-badge.hidden { display: none; }
/* ── FIN SMART HUB ─────────────────────────────────────────── */
.loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--bg-white); z-index: 9999; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 20px; transition: opacity 0.5s ease; }
.loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loader { width: 50px; height: 50px; border: 4px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-weight: 700; color: var(--text-dark); font-size: 1.1rem; }
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--text-dark); color: #fff; padding: 12px 24px; border-radius: 8px; font-size: 0.9rem; z-index: 3000; opacity: 0; transition: all 0.3s; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
/* ── Hamburger button (caché sur desktop) ── */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
    flex-shrink: 0;
}
.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}
.hamburger-btn:hover { background: var(--primary); border-color: var(--primary); }
.hamburger-btn:hover span { background: #fff; }

/* ── Menu mobile overlay ── */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    backdrop-filter: blur(2px);
}
.mobile-menu-overlay.active { display: block; }

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: var(--bg-white);
    z-index: 1200;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 30px rgba(0,0,0,0.2);
    overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.mobile-menu-close {
    width: 36px;
    height: 36px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.mobile-menu-close:hover { background: var(--secondary); color: #fff; border-color: var(--secondary); }

.mobile-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 16px;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.mobile-search i { color: var(--text-muted); font-size: 0.85rem; flex-shrink: 0; }
.mobile-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.9rem;
    color: var(--text-dark);
    width: 100%;
    font-family: 'Inter', sans-serif;
}
.mobile-search input::placeholder { color: var(--text-light); }

.mobile-nav-list {
    list-style: none;
    padding: 0 8px;
    flex: 1;
}
.mobile-nav-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
}
.mobile-nav-list li a i {
    width: 20px;
    text-align: center;
    color: var(--primary);
    font-size: 0.9rem;
}
.mobile-nav-list li a:hover {
    background: var(--primary);
    color: #fff;
}
.mobile-nav-list li a:hover i { color: #fff; }
.mobile-nav-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 6px;
}

.mobile-menu-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.mobile-theme-btn {
    width: 100%;
    padding: 11px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}
.mobile-theme-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

@media (max-width: 1024px) {
    .content-layout { grid-template-columns: 1fr; }
    .hero-grid { grid-template-columns: 1fr; height: auto; }
    .hero-main { height: 350px; }
    .hero-side-card { grid-template-columns: 1fr 1fr; height: 200px; }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .related-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .main-nav { display: none; }
    .hamburger-btn { display: flex; }
}

@media (max-width: 768px) {
    /* Top bar compacte : lieu, horloge, date, météo, devise.
       Les icônes sociales sont masquées pour éviter le débordement. */
    .top-bar { display: block; padding: 6px 0; font-size: 0.68rem; }
    .top-bar .container { justify-content: center; }
    .top-bar-left {
        gap: 10px;
        row-gap: 3px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .top-bar-right { display: none; }
    /* Popups météo / devise : en position:absolute leur boîte élargissait
       la page (débordement horizontal). En mobile on les ancre au viewport
       via position:fixed (un élément fixed n'étend pas le scroll horizontal). */
    .top-bar .weather-card,
    .top-bar .currency-card {
        position: fixed;
        left: 10px;
        right: 10px;
        top: 60px;
        width: auto;
        max-width: none;
        transform: translateY(-8px);
    }
    .top-bar .weather-wrap:hover .weather-card,
    .top-bar .currency-card.cc-visible {
        transform: translateY(0);
    }
    .top-bar .weather-card::before,
    .top-bar .currency-card::before { display: none; }

    /* Header compact */
    .header-content {
        padding: 10px 0;
        gap: 8px;
    }
    .logo-text h1, .logo-text .logo-name { font-size: 1.2rem; }
    .logo-text p { display: none; }
    .logo-icon { width: 40px; height: 40px; font-size: 1.1rem; }
    .logo-img { height: 62px; width: 62px; }

    /* Barre de recherche masquée sur mobile (dans menu) */
    .search-box { display: none; }
    .theme-toggle { display: none; }

    /* Hero */
    .hero-section { padding: 16px 0; }
    .hero-main { height: 260px; }
    .hero-overlay h2 { font-size: 1.25rem; }
    .hero-overlay p { display: none; }

    /* Side cards : image droite réduite, titre gauche élargi */
    .hero-side-card { grid-template-columns: 1fr; height: auto; gap: 10px; }
    .hero-side-card > div {
        min-height: 96px;
        position: relative;
        background: var(--bg-white);
        border-radius: var(--radius);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
    }
    .hero-side-card > div > img {
        position: absolute;
        right: 0; top: 0;
        width: 38%; height: 100%;
        object-fit: cover;
    }
    /* Overlay en flux normal : la hauteur de la carte est pilotée par le
       texte (pas de hauteur fixe). Aucun débordement / chevauchement même
       si la police système du téléphone est agrandie ou le titre long. */
    .hero-side-card .hero-overlay {
        position: static;
        margin-right: 38%;
        background: var(--bg-white);
        color: var(--text-dark);
        padding: 10px 12px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
    }
    .hero-side-card .hero-meta-wrapper {
        gap: 6px;
        row-gap: 4px;
        margin-bottom: 0;
        max-width: 100%;
    }
    .hero-side-card .hero-overlay h2 {
        font-size: 0.92rem;
        line-height: 1.35;
        color: var(--text-dark);
        -webkit-line-clamp: 3;
        margin-bottom: 0;
    }
    .hero-side-card .hero-meta-tag { font-size: 0.62rem; padding: 2px 6px; }
    /* Le tag catégorie peut contenir plusieurs libellés collés par "|" :
       on le borne à la zone texte et on tronque proprement (ellipsis)
       pour éviter qu'il déborde sur l'image / au-dessus de la carte. */
    .hero-side-card .category-tag  {
        font-size: 0.58rem;
        padding: 2px 6px;
        min-width: 0;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Filtres scrollables horizontalement */
    .tag-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        scrollbar-width: none;
        /* fix débordement horizontal mobile : largeur bornée au parent,
           les puces défilent horizontalement à l'intérieur */
        min-width: 0;
        width: 100%;
        max-width: 100%;
        flex-basis: 100%;
    }
    .tag-filters::-webkit-scrollbar { display: none; }
    .tag-filter { white-space: nowrap; flex-shrink: 0; }

    /* Section header */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Grille news */
    .news-grid { grid-template-columns: 1fr; gap: 16px; }

    /* Sidebar masquée sur mobile ou en dessous */
    .content-layout { padding: 16px 0; gap: 20px; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }

    /* Article */
    .article-body { padding: 20px 16px; }
    .article-body h1 { font-size: 1.45rem; }
    .article-body h2 { font-size: 1.15rem; }
    .article-body p { font-size: 1rem; }
    .share-buttons { flex-direction: column; }
    .share-btn { width: 100%; }
    .related-grid { grid-template-columns: 1fr; }

    /* Old audio sticky bar — replaced by premium player */
    .audio-sticky-bar { display: none !important; }

    /* Cadenas : z-index suffisant + zone de tap agrandie */
    .admin-unlock-hint {
        z-index: 200;
        width: 56px;
        height: 56px;
        bottom: 24px;
        right: 24px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    /* Boutons admin/top */
    .admin-btn { bottom: 20px; right: 76px; width: 48px; height: 48px; }
    .back-to-top { bottom: 20px; right: 20px; width: 44px; height: 44px; }
}

/* ═══════════════════════════════════════════════════
   VEILLE V2 — Dashboard Thématique RSS
   ═══════════════════════════════════════════════════ */
.veille-v2 { background: var(--bg); }

/* ── KPI bar ───────────────────────────────────── */
.v2-stats-bar { background: var(--primary); color:#fff; padding:14px 0; border-bottom:3px solid var(--secondary); }
.v2-stats-inner { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.v2-kpis { display:flex; gap:28px; flex-wrap:wrap; align-items:center; }
.v2-kpi { display:flex; align-items:center; gap:8px; font-size:0.82rem; opacity:0.92; }
.v2-kpi i { font-size:0.75rem; opacity:0.6; }
.v2-kpi strong { font-size:1.35rem; font-weight:800; line-height:1; }
.v2-kpi span { font-size:0.72rem; opacity:0.72; }
.v2-kpi--dz strong  { color:#fde68a; }
.v2-kpi--fr strong  { color:#93c5fd; }
.v2-kpi--tic strong { color:#c4b5fd; }
.v2-stats-right { display:flex; align-items:center; gap:14px; flex-shrink:0; }
.v2-live-badge { font-size:0.72rem; display:flex; align-items:center; gap:5px; background:rgba(255,255,255,.12); padding:4px 10px; border-radius:12px; opacity:.88; }
.v2-live-badge .fa-circle { color:#4ade80; font-size:.5rem; animation:v2pulse 2s ease-in-out infinite; }
@keyframes v2pulse { 0%,100%{opacity:1} 50%{opacity:.2} }
.v2-add-btn { display:flex; align-items:center; gap:6px; padding:9px 20px; border-radius:22px; border:1.5px solid rgba(255,255,255,.4); background:rgba(255,255,255,.14); color:#fff; font-size:.82rem; font-weight:600; cursor:pointer; transition:all .18s; white-space:nowrap; }
.v2-add-btn:hover { background:rgba(255,255,255,.28); transform:translateY(-1px); }

/* ── Tabs ──────────────────────────────────────── */
.v2-tabs-bar { background:var(--bg-white); border-bottom:2px solid var(--border); box-shadow:0 1px 6px rgba(0,0,0,.05); }
.v2-tabs { display:flex; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
.v2-tabs::-webkit-scrollbar { display:none; }
.v2-tab { display:flex; align-items:center; gap:7px; padding:15px 22px; border:none; background:none; color:var(--text-muted); font-size:.87rem; font-weight:600; cursor:pointer; border-bottom:3px solid transparent; transition:all .18s; white-space:nowrap; margin-bottom:-2px; }
.v2-tab-label { display:inline; }
.v2-tab-count { background:var(--bg); color:var(--text-muted); font-size:.68rem; font-weight:700; padding:2px 7px; border-radius:10px; min-width:22px; text-align:center; transition:all .18s; }
.v2-tab:hover { color:var(--primary); background:rgba(0,98,51,.04); }
.v2-tab--dz.active     { color:#006233; border-color:#006233; }
.v2-tab--dz.active .v2-tab-count     { background:#006233; color:#fff; }
.v2-tab--fr.active     { color:#1d4ed8; border-color:#1d4ed8; }
.v2-tab--fr.active .v2-tab-count     { background:#1d4ed8; color:#fff; }
.v2-tab--tic.active    { color:#7c3aed; border-color:#7c3aed; }
.v2-tab--tic.active .v2-tab-count    { background:#7c3aed; color:#fff; }
.v2-tab--manuel.active { color:#d97706; border-color:#d97706; }
.v2-tab--manuel.active .v2-tab-count { background:#d97706; color:#fff; }

/* ── Topic pills ───────────────────────────────── */
.v2-topics-bar { background:var(--bg); padding:12px 0; border-bottom:1px solid var(--border); }
.v2-topics-inner { display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; padding-bottom:2px; }
.v2-topics-inner::-webkit-scrollbar { display:none; }
.v2-pill { padding:6px 14px; border-radius:20px; border:1.5px solid var(--border); background:var(--bg-white); color:var(--text-muted); font-size:.78rem; font-weight:500; cursor:pointer; transition:all .18s; white-space:nowrap; }
.v2-pill:hover { border-color:var(--primary); color:var(--primary); }
.v2-pill.active { background:var(--primary); color:#fff; border-color:var(--primary); }

/* ── Body ──────────────────────────────────────── */
.v2-body { padding:30px 0 56px; }
.v2-loading-msg { text-align:center; padding:32px; color:var(--text-muted); font-style:italic; }
.v2-empty { text-align:center; padding:70px 20px; color:var(--text-muted); }
.v2-empty i { font-size:2.8rem; opacity:.2; display:block; margin-bottom:14px; }
.v2-empty p { font-size:.9rem; }

/* ── Grid ──────────────────────────────────────── */
.v2-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }

/* ── Card ──────────────────────────────────────── */
.v2-card { background:var(--bg-white); border-radius:14px; border:1px solid var(--border); padding:18px 18px 14px; display:flex; flex-direction:column; gap:11px; position:relative; overflow:hidden; transition:box-shadow .2s, transform .2s; }
.v2-card::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; border-radius:14px 14px 0 0; background:var(--v2-accent, var(--primary)); }
.v2-card:hover { box-shadow:0 10px 30px rgba(0,0,0,.1); transform:translateY(-2px); }
.v2-card--dz     { --v2-accent:#006233; }
.v2-card--fr     { --v2-accent:#1d4ed8; }
.v2-card--tic    { --v2-accent:#7c3aed; }
.v2-card--manuel { --v2-accent:#d97706; }

.v2-card-header { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.v2-card-source { display:flex; align-items:center; gap:8px; min-width:0; }
.v2-avatar { width:30px; height:30px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:.62rem; font-weight:800; color:#fff; flex-shrink:0; letter-spacing:-.5px; }
.v2-src-name { font-size:.72rem; font-weight:600; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.v2-new { display:inline-flex; align-items:center; gap:3px; flex-shrink:0; font-size:.6rem; font-weight:800; letter-spacing:.02em; text-transform:uppercase; color:#fff; background:#22c55e; padding:2px 7px; border-radius:999px; box-shadow:0 0 0 0 rgba(34,197,94,.5); animation:v2NewPulse 2s ease-in-out infinite; }
.v2-new i { font-size:.58rem; }
@keyframes v2NewPulse { 0%,100% { box-shadow:0 0 0 0 rgba(34,197,94,.45); } 50% { box-shadow:0 0 0 4px rgba(34,197,94,0); } }
body.dark-mode .v2-new { background:#16a34a; }

.v2-badge { font-size:.66rem; font-weight:700; padding:3px 9px; border-radius:10px; white-space:nowrap; flex-shrink:0; }
.v2-badge--Télécoms      { background:#e0f2fe; color:#0369a1; }
.v2-badge--Mobile        { background:#dbeafe; color:#1d4ed8; }
.v2-badge--Startups      { background:#ffedd5; color:#c2410c; }
.v2-badge--IA            { background:#ede9fe; color:#6d28d9; }
.v2-badge--Internet      { background:#d1fae5; color:#065f46; }
.v2-badge--Data          { background:#e0e7ff; color:#3730a3; }
.v2-badge--Cloud         { background:#e0f2fe; color:#0284c7; }
.v2-badge--Cybersécurité { background:#fee2e2; color:#b91c1c; }
.v2-badge--Numérique     { background:#f1f5f9; color:#334155; }
.v2-badge--Tech          { background:#f3f4f6; color:#6b7280; }

.v2-card-title { font-size:.89rem; font-weight:600; color:var(--text-dark); line-height:1.45; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; flex-grow:1; }
.v2-card-title a { color:inherit; text-decoration:none; }
.v2-card-title a:hover { color:var(--primary); text-decoration:underline; }

.v2-card-footer { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-top:6px; border-top:1px solid var(--border); margin-top:auto; }
.v2-card-date { font-size:.7rem; color:var(--text-light); display:flex; align-items:center; gap:4px; }
.v2-card-date i { font-size:.62rem; }
.v2-card-acts { display:flex; gap:6px; }
.v2-act-btn { padding:5px 12px; border-radius:7px; font-size:.74rem; font-weight:600; border:1.5px solid var(--border); background:var(--bg); color:var(--text-muted); cursor:pointer; text-decoration:none; display:flex; align-items:center; gap:5px; transition:all .16s; line-height:1; }
.v2-act-btn:hover        { background:var(--primary); color:#fff; border-color:var(--primary); }
.v2-act-btn.v2-edit:hover   { background:#f59e0b; color:#fff; border-color:#f59e0b; }
.v2-act-btn.v2-delete:hover { background:var(--secondary); color:#fff; border-color:var(--secondary); }

/* ── Voir plus ─────────────────────────────────── */
.v2-more-wrap { display:flex; justify-content:center; margin-top:36px; }
.v2-more-btn { padding:13px 40px; border-radius:30px; border:2px solid var(--primary); background:transparent; color:var(--primary); font-weight:700; font-size:.87rem; cursor:pointer; display:inline-flex; align-items:center; gap:8px; transition:all .2s; }
.v2-more-btn:hover { background:var(--primary); color:#fff; }

/* ── Dark mode ─────────────────────────────────── */
body.dark-mode .v2-card { background:var(--bg-white); }
body.dark-mode .v2-badge--Télécoms      { background:rgba(14,165,233,.15);  color:#38bdf8; }
body.dark-mode .v2-badge--Mobile        { background:rgba(59,130,246,.15);  color:#60a5fa; }
body.dark-mode .v2-badge--Startups      { background:rgba(249,115,22,.15);  color:#fb923c; }
body.dark-mode .v2-badge--IA            { background:rgba(139,92,246,.15);  color:#a78bfa; }
body.dark-mode .v2-badge--Internet      { background:rgba(16,185,129,.15);  color:#34d399; }
body.dark-mode .v2-badge--Data          { background:rgba(99,102,241,.15);  color:#818cf8; }
body.dark-mode .v2-badge--Cloud         { background:rgba(14,165,233,.15);  color:#38bdf8; }
body.dark-mode .v2-badge--Cybersécurité { background:rgba(239,68,68,.15);   color:#f87171; }
body.dark-mode .v2-badge--Numérique     { background:rgba(100,116,139,.15); color:#94a3b8; }
body.dark-mode .v2-badge--Tech          { background:rgba(107,114,128,.15); color:#9ca3af; }

/* ── Responsive ────────────────────────────────── */
@media (max-width:1024px) { .v2-cards { grid-template-columns:repeat(2,1fr); } }
@media (max-width:640px) {
  .v2-cards { grid-template-columns:1fr; }
  .v2-kpis  { gap:16px; }
  .v2-stats-inner { flex-direction:column; align-items:flex-start; gap:12px; }
  .v2-tab   { padding:12px 14px; font-size:.8rem; }
  .v2-tab-label { display:none; }
}
/* ═══════════════════════════════════════════════════ */

/* === [REVUE DE PRESSE IA] STYLES MODERNES === */
.revue-wrapper { margin: 40px auto; padding: 35px; background: var(--bg-white); border-radius: var(--radius); box-shadow: var(--shadow-md); border-top: 4px solid var(--accent); }
.revue-container { display: grid; grid-template-columns: 50% 50%; align-items: stretch; margin-top: 0; line-height: 1.8; color: var(--text-dark); }
.revue-loading { grid-column: 1 / -1; text-align: center; padding: 40px; color: var(--text-muted); display: flex; flex-direction: column; gap: 15px; align-items: center; }
.revue-loading i { font-size: 2rem; color: var(--accent); }
.revue-intro { background: rgba(26, 115, 232, 0.05); padding: 25px; border-radius: var(--radius); margin-bottom: 30px; border-left: 5px solid var(--accent); font-size: 1.05rem; }
.revue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 25px; }
.revue-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: var(--transition); display: flex; flex-direction: column; gap: 12px; }
.revue-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.revue-card-tag { display: inline-block; padding: 3px 10px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; width: fit-content; }
.revue-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-dark); line-height: 1.4; }
.revue-card p { font-size: 0.9rem; color: var(--text-muted); }
.revue-card-link { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--accent); font-weight: 600; text-decoration: none; }
.revue-card-link:hover { text-decoration: underline; }
/* ── Filtres ─────────────────────────────────────────────────────────────── */
.revue-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.revue-filter-btn { padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text-muted); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.revue-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.revue-filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.revue-count { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 20px; }
/* ── Source logo + badge ─────────────────────────────────────────────────── */
.revue-card-source { display: flex; align-items: center; gap: 8px; }
.revue-source-logo { width: 20px; height: 20px; border-radius: 4px; object-fit: contain; flex-shrink: 0; }
.revue-source-name { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.revue-pays-badge { font-size: 0.68rem; font-weight: 700; padding: 2px 7px; border-radius: 10px; white-space: nowrap; }
.revue-pays-badge.dz { background: rgba(0,98,60,0.1); color: #00623c; }
.revue-pays-badge.fr { background: rgba(26,115,232,0.1); color: var(--accent); }
/* ── Accroche IA ─────────────────────────────────────────────────────────── */
.revue-accroche { font-size: 0.9rem; color: var(--text-muted); line-height: 1.55; }
.revue-empty { text-align: center; color: var(--text-muted); padding: 30px; }
@media (max-width: 768px) {
    .revue-wrapper { padding: 20px; }
    .revue-grid { grid-template-columns: 1fr; }
    .revue-intro { font-size: 0.95rem; padding: 15px; }
    .revue-filters { gap: 6px; }
    .revue-filter-btn { font-size: 0.75rem; padding: 5px 11px; }
}
/* === FIN [REVUE DE PRESSE IA] === */

/* === [REVUE DE PRESSE IA] COULEURS CATÉGORIES + POLISH VISUELS (ajout pur — aucune ligne existante modifiée) === */
.revue-accroche {
    border-left: 2px solid var(--border);
    padding-left: 10px;
    margin-top: 4px;
}
.revue-source-logo {
    background: var(--bg);
    padding: 1px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px var(--border);
}
.revue-pays-badge {
    letter-spacing: 0.3px;
    flex-shrink: 0;
}
/* Couleurs injectées via JS MutationObserver (data-cat-ok) */
.revue-card-tag[data-cat="IA"]            { background: #7c3aed; }
.revue-card-tag[data-cat="Télécoms"]      { background: #006233; }
.revue-card-tag[data-cat="Startups"]      { background: #d97706; }
.revue-card-tag[data-cat="Innovation"]    { background: #10b981; }
.revue-card-tag[data-cat="Numérique"]     { background: #0891b2; }
.revue-card-tag[data-cat="Cybersécurité"] { background: #dc2626; }
.revue-card-tag[data-cat="Réseaux"]       { background: #0369a1; }
/* === FIN AJOUT REVUE PRESSE === */

/* ================================================================
   REVUE DE PRESSE — REFONTE GRAND JOURNAL (Le Monde · Guardian · NYT)
   Append pur — aucune ligne existante modifiée
   ================================================================ */

/* ── Wrapper principal ────────────────────────────────────────── */
.revue-wrapper {
    padding: 0 !important;
    border-top: none !important;
    scroll-margin-top: 80px;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: var(--bg-white) !important;
    /* overflow must NOT be hidden — it breaks position:sticky on children */
}

/* ── Bloc header sticky (Titre + Catégories) ──────────────────── */
/* .revue-header-sticky n'existe plus dans le DOM rendu — conservé pour compatibilité */
.revue-header-sticky { position: static; }

/* ── Masthead éditorial — défile normalement ─────────────────── */
.revue-masthead {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 40px 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
    gap: 20px;
    background: var(--bg-white);
}
body.dark-mode .revue-masthead { background: var(--bg-white); border-bottom-color: rgba(255,255,255,0.08); }
.revue-masthead-brand { display: flex; flex-direction: column; gap: 4px; }
.revue-masthead-label {
    display: flex; align-items: center; gap: 16px;
    font-size: 0.6rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 3px; color: var(--secondary); margin-bottom: 2px;
}
.revue-masthead-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.45rem; font-weight: 900; letter-spacing: -0.8px;
    line-height: 1; color: var(--text-dark);
}
.revue-masthead-title span { color: var(--secondary); }
.revue-masthead-subtitle {
    font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1.8px;
    color: var(--text-muted); font-weight: 600;
}
.revue-masthead-date {
    text-align: right; font-size: 0.82rem; color: var(--text-muted);
    line-height: 1.6; font-weight: 500;
}
.revue-masthead-date strong { display: inline; font-weight: 800;
    color: var(--text-dark); font-size: 0.9rem; letter-spacing: -0.3px; }
.revue-masthead-date-line { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ── Synthèse éditoriale ──────────────────────────────────────── */
.revue-synthese-bloc {
    grid-column: 1;
    padding: 10px 16px 12px;
    margin: 12px 8px 12px 40px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.06);
    position: relative;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.revue-synthese-eyelet {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.6rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 2.5px; color: var(--secondary); margin-bottom: 10px;
}
.revue-synthese-eyelet::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}
.revue-synthese-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 0.92rem !important; font-weight: 500 !important; line-height: 1.35 !important;
    color: var(--text-dark) !important; font-style: normal !important;
    max-width: 900px; padding: 0 !important; border: none !important;
    background: transparent !important;
    display: -webkit-box !important; -webkit-line-clamp: 4 !important; -webkit-box-orient: vertical !important; overflow: hidden !important;
}

.revue-synthese-bloc:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.revue-synthese-bloc:hover .revue-synthese-text {
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
}

/* ── Article du jour (synthèse APS cliquable) ─────────────────── */
.revue-article-du-jour {
    grid-column: 1;
    display: flex; align-items: center; gap: 14px;
    margin: 0 8px 16px 40px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--secondary, #1a73e8);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(26,115,232,0.06), rgba(26,115,232,0.01));
    cursor: pointer;
    transition: box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.revue-article-du-jour:hover {
    box-shadow: 0 6px 18px rgba(26,115,232,0.15);
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(26,115,232,0.1), rgba(26,115,232,0.02));
}
.revue-article-du-jour-icon {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px;
    background: var(--secondary, #1a73e8); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.revue-article-du-jour-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.revue-article-du-jour-label {
    font-size: 0.62rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1.5px; color: var(--secondary, #1a73e8);
}
.revue-article-du-jour-titre {
    font-size: 0.96rem; font-weight: 700; color: var(--text-dark);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.revue-article-du-jour-cta {
    flex: 0 0 auto; font-size: 0.82rem; font-weight: 700; color: var(--secondary, #1a73e8);
    white-space: nowrap;
}
@media (max-width: 640px) {
    .revue-article-du-jour { margin: 0 16px 14px; flex-wrap: wrap; }
    .revue-article-du-jour-titre { white-space: normal; }
    .revue-article-du-jour-cta { display: none; }
}

/* ── Modale : Article du jour (plein texte) ───────────────────── */
.revue-article-modal-content { max-width: 720px; max-height: 85vh; overflow-y: auto; text-align: left; }
.revue-article-full-dateline { font-weight: 700; color: var(--text-dark); }
.revue-article-full-titre { font-size: 1.4rem; font-weight: 800; line-height: 1.25; margin: 6px 0 14px; color: var(--text-dark); }
.revue-article-full-lead { font-weight: 600; font-size: 1rem; line-height: 1.55; margin-bottom: 14px; color: var(--text-dark); }
.revue-article-full-corps p { font-size: 0.94rem; line-height: 1.65; margin-bottom: 12px; color: var(--text-dark); }
.revue-article-source-link { color: #1a56db; text-decoration: underline; font-weight: 600; }
.revue-article-source-link:hover { color: #1140a8; }

.revue-article-full-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.82rem; color: var(--text-light, #667); margin: 6px 0 16px; }
.revue-article-full-meta span { display: flex; align-items: center; gap: 5px; }
.revue-article-full-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.revue-article-admin-bar { display: flex; justify-content: flex-end; margin-bottom: 8px; }

/* ── Admin : gestion manuelle (localhost uniquement) ──────────────── */
.revue-add-btn {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 8px; border: none;
    background: var(--secondary, #1a73e8); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.revue-add-btn:hover { transform: scale(1.08); box-shadow: 0 4px 12px rgba(26,115,232,0.35); }

.revue-delete-btn {
    position: absolute; top: 10px; right: 10px; z-index: 3;
    width: 28px; height: 28px; border-radius: 7px; border: none;
    background: rgba(220,38,38,0.12); color: #dc2626; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 0.8rem;
    transition: background 0.2s ease, transform 0.2s ease;
}
.revue-delete-btn:hover { background: #dc2626; color: #fff; transform: scale(1.06); }
.revue-une { position: relative; }

.revue-edit-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
    border-radius: 8px; border: 1px solid var(--border); background: var(--bg);
    color: var(--text-dark); font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.revue-edit-btn:hover { background: var(--bg-light); }

.revue-edit-para-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.revue-edit-para-row textarea { flex: 1; }
.revue-para-del {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 8px; border: none;
    background: rgba(220,38,38,0.1); color: #dc2626; cursor: pointer;
}
.revue-para-del:hover { background: #dc2626; color: #fff; }
.revue-para-add {
    margin-top: 4px; padding: 8px 14px; border-radius: 8px; border: 1px dashed var(--border);
    background: transparent; color: var(--secondary, #1a73e8); font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.revue-para-add:hover { background: rgba(26,115,232,0.06); }

/* ── Filtres journaux — SEUL élément sticky ───────────────────── */
.revue-toolbar {
    grid-column: 1 / -1;
    display: flex; align-items: center; justify-content: space-between;
    padding: 3px 40px 5px;
    flex-wrap: wrap; gap: 6px;
    /* sticky : colle sous le .header principal (≈78px) */
    position: sticky;
    top: 78px;
    z-index: 50;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
body.dark-mode .revue-toolbar { background: var(--bg); }
.revue-filters-journal { display: flex; flex-wrap: wrap; gap: 5px; }
.revue-filter-journal {
    padding: 3px 10px; border-radius: 2px;
    border: 1.5px solid var(--border); background: transparent;
    color: var(--text-muted); font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.8px; text-transform: uppercase; cursor: pointer;
    transition: all 0.18s;
}
.revue-filter-journal:hover { border-color: var(--text-dark); color: var(--text-dark); }
.revue-filter-journal.active {
    background: var(--text-dark); color: #fff; border-color: var(--text-dark);
}
body.dark-mode .revue-filter-journal.active { background: #f1f5f9; color: #0f172a; }
.revue-count-journal {
    font-size: 0.7rem; color: var(--text-light); white-space: nowrap;
    text-transform: uppercase; letter-spacing: 1.5px;
}

/* ── Article à la UNE ─────────────────────────────────────────── */
.revue-une {
    grid-column: 2;
    display: grid; grid-template-columns: 3fr 2fr;
    gap: 0;
    margin: 16px 40px 16px 8px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
    position: relative; will-change: transform;
}
/* UNE : transform + box-shadow gérés par le moteur JS 3D */
.revue-une:hover {
    border-color: transparent;
    box-shadow: 0 12px 40px rgba(0,0,0,0.14);
    z-index: 10;
}
.revue-une-left {
    padding: 12px 20px 12px 24px;
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
}
.revue-une-cat {
    font-size: 0.62rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 2.5px; color: var(--secondary);
}

/* Lien titre UNE — sans décoration, sombre, survol vert */
a.revue-une-title-link {
    text-decoration: none; color: inherit; display: block;
}
.revue-une-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.0rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.3px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    color: var(--text-dark);
    border-left: 4px solid var(--secondary); padding-left: 14px;
    transition: color 0.25s ease;
}
a.revue-une-title-link:hover .revue-une-title { color: var(--secondary); }

.revue-une-accroche {
    font-size: 0.82rem; line-height: 1.4; color: var(--text-muted);
    font-weight: 500; max-width: 520px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.revue-une-right {
    padding: 10px 16px 10px 16px;
    display: flex; flex-direction: column; gap: 6px;
    background: var(--bg); justify-content: center;
}
.revue-une-source-row {
    display: flex; align-items: center; gap: 10px;
    padding-bottom: 8px; border-bottom: 1px dashed var(--border);
}
.revue-une-logo {
    width: 32px; height: 32px; border-radius: 6px; object-fit: contain;
    background: #fff; padding: 3px; box-shadow: 0 0 0 1px var(--border);
    flex-shrink: 0;
}
.revue-une-source-name {
    font-weight: 700; font-size: 0.9rem; color: var(--text-dark); flex: 1;
}
.revue-une-pays {
    font-size: 0.65rem; font-weight: 800; padding: 3px 8px; border-radius: 3px;
}
.revue-une-pays.dz { background: rgba(0,98,60,0.12); color: #00623c; }
.revue-une-pays.fr { background: rgba(26,115,232,0.1); color: var(--accent); }
.revue-une-ai-badge { display: none; }
.revue-ai-pulse { display: none; }
.revue-une-resume {
    font-size: 0.78rem; color: var(--text-muted); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Grille 3 colonnes — style cartes modernes ────────────────── */
.revue-grid-journal {
    grid-column: 1 / -1;
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 20px 40px 28px;
}
.revue-card-journal {
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: grid; grid-template-columns: auto 1fr; gap: 8px 10px;
    transition: all 0.3s ease;
    position: relative; will-change: transform;
}
/* Cartes uniformes — pas de séparateurs de colonnes style journal */
.revue-card-journal:nth-child(3n+2),
.revue-card-journal:nth-child(3n) {
    padding-left: 18px;
    border-left: 1px solid var(--border);
}
.revue-card-journal:hover { background: rgba(0,98,51,0.025); }

/* Badge catégorie coloré */
.revue-card-cat {
    grid-column: 1; grid-row: 1; align-self: center;
    display: inline-block; font-size: 0.58rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 2px;
    padding: 3px 8px; border-radius: 2px; color: #fff; width: fit-content;
}
.revue-card-cat.cat-ia            { background: #7c3aed; }
.revue-card-cat.cat-telecoms      { background: #006233; }
.revue-card-cat.cat-startups      { background: #d97706; }
.revue-card-cat.cat-innovation    { background: #10b981; }
.revue-card-cat.cat-numerique     { background: #0891b2; }
.revue-card-cat.cat-cybersecurite { background: #dc2626; }
.revue-card-cat.cat-reseaux       { background: #0369a1; }
.revue-card-cat.cat-default       { background: var(--accent); }

.revue-card-title-journal {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.98rem; font-weight: 700; line-height: 1.35; letter-spacing: -0.2px;
    color: var(--text-dark);
    display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden;
}
.revue-card-accroche-journal {
    grid-column: 1 / -1; grid-row: 3;
    font-size: 0.8rem; color: var(--text-muted); font-weight: 500;
    line-height: 1.5; border-left: 2px solid var(--border); padding-left: 8px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.revue-card-footer-journal {
    grid-column: 2; grid-row: 1; align-self: center;
    display: flex; align-items: center; gap: 6px;
}
.revue-card-logo-sm {
    width: 16px; height: 16px; border-radius: 2px; object-fit: contain;
    flex-shrink: 0;
}
.revue-card-source-sm {
    font-size: 0.7rem; font-weight: 600; color: var(--text-muted);
    flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.revue-card-pays-sm { display: none; }
.revue-card-pays-sm.dz { background: rgba(0,98,60,0.1); color: #00623c; }
.revue-card-pays-sm.fr { background: rgba(26,115,232,0.1); color: var(--accent); }
.revue-card-lire { display: none; }
.revue-card-lire:hover { text-decoration: underline; }

/* ── Pied de page édition ─────────────────────────────────────── */
.revue-footer-edition {
    grid-column: 1 / -1;
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 40px; border-top: 2px solid var(--border); margin-top: 2px;
    flex-wrap: wrap; gap: 10px;
}
.revue-footer-sources {
    font-size: 0.7rem; color: var(--text-light);
    text-transform: uppercase; letter-spacing: 1.5px;
}
.revue-footer-ai {
    display: flex; align-items: center; gap: 7px;
    font-size: 0.72rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.3px;
}

/* ── Vide ─────────────────────────────────────────────────────── */
.revue-empty-journal {
    padding: 40px; text-align: center; color: var(--text-muted);
    font-weight: 500; grid-column: 1 / -1;
}

/* ── Archives picker ──────────────────────────────────────────── */
.revue-archive-picker {
    padding: 40px; text-align: center; grid-column: 1 / -1;
    border: 2px dashed var(--border); border-radius: var(--radius);
    margin: 20px 40px;
}
.revue-archive-picker h4 {
    font-size: 1rem; font-weight: 700; color: var(--text-dark);
    margin-bottom: 18px; letter-spacing: -0.2px;
}
.revue-archive-picker p {
    font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px;
}
.revue-archive-row {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; flex-wrap: wrap;
}
.revue-archive-input {
    padding: 8px 14px; border: 1.5px solid var(--border);
    border-radius: var(--radius); font-family: 'Inter', sans-serif;
    font-size: 0.88rem; font-weight: 500; color: var(--text-dark);
    background: var(--bg-white); cursor: pointer;
}
.revue-archive-input:focus { outline: none; border-color: var(--accent); }
.revue-archive-btn {
    padding: 9px 20px; background: var(--text-dark); color: #fff;
    border: none; border-radius: var(--radius); cursor: pointer;
    font-family: 'Inter', sans-serif; font-size: 0.85rem; font-weight: 700;
    letter-spacing: 0.3px; transition: background 0.18s;
}
.revue-archive-btn:hover { background: var(--secondary); }
.revue-filter-journal.archives-btn {
    border-color: var(--secondary); color: var(--secondary);
}
.revue-filter-journal.archives-btn.active,
.revue-filter-journal.archives-btn:hover {
    background: var(--secondary); color: #fff; border-color: var(--secondary);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
    /* minmax(0,1fr) : la piste peut rétrécir sous la largeur du contenu
       (1fr = minmax(auto,1fr) gonflait la grille à ~900px sur mobile) */
    .revue-container { grid-template-columns: minmax(0, 1fr); }
    .revue-synthese-bloc { margin: 12px 20px; }
    .revue-une { grid-column: 1; margin: 0 20px 12px; grid-template-columns: 1fr; }
    .revue-une-left { border-right: none; border-bottom: 1px solid var(--border); }
    .revue-grid-journal { grid-template-columns: repeat(2, 1fr); }
    .revue-card-journal:nth-child(3n+2),
    .revue-card-journal:nth-child(3n) { padding-left: 0; border-left: none; }
    .revue-card-journal:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--border); }
}
/* ══ ANIMATIONS & HOVER EFFECTS (Revue de Presse) ════════════════ */
@keyframes revueFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Article UNE : entrée douce */
.revue-une {
    animation: revueFadeIn 0.45s ease both;
}

/* Synthèse : apparition rapide */
.revue-synthese-bloc {
    animation: revueFadeIn 0.3s ease both;
}

/* Cards grille : entrée en cascade */
.revue-card-journal {
    animation: revueFadeIn 0.35s ease both;
    transition: all 0.3s ease;
}
.revue-card-journal:nth-child(1)  { animation-delay: 0.04s; }
.revue-card-journal:nth-child(2)  { animation-delay: 0.08s; }
.revue-card-journal:nth-child(3)  { animation-delay: 0.12s; }
.revue-card-journal:nth-child(4)  { animation-delay: 0.16s; }
.revue-card-journal:nth-child(5)  { animation-delay: 0.20s; }
.revue-card-journal:nth-child(6)  { animation-delay: 0.24s; }
.revue-card-journal:nth-child(7)  { animation-delay: 0.28s; }
.revue-card-journal:nth-child(8)  { animation-delay: 0.32s; }
.revue-card-journal:nth-child(9)  { animation-delay: 0.36s; }
.revue-card-journal:nth-child(10) { animation-delay: 0.40s; }
.revue-card-journal:nth-child(11) { animation-delay: 0.44s; }

/* Hover card : transform + shadows gérés par le moteur JS 3D (initRevueTilt3D) */
.revue-card-journal:hover {
    border-color: transparent;
    background: var(--bg-white);
    z-index: 10;
}
.revue-card-journal:hover .revue-card-lire {
    color: var(--secondary);
    letter-spacing: 0.8px;
}
.revue-card-title-journal {
    transition: color 0.25s ease;
}
.revue-card-journal:hover .revue-card-title-journal {
    color: var(--secondary);
}

/* Lien titre carte — sans style lien par défaut */
a.revue-card-title-link {
    grid-column: 1 / -1; grid-row: 2;
    text-decoration: none; color: inherit; display: block;
}
a.revue-card-title-link:hover .revue-card-title-journal {
    color: var(--secondary);
}

/* Hover filtres catégories */
.revue-filter-journal {
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.revue-filter-journal:hover:not(.active) {
    border-color: var(--secondary);
    color: var(--secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,98,51,0.15);
}
.revue-filter-journal.active {
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transform: translateY(-1px);
}

/* Wrapper : pas de marge parasite */
.revue-wrapper {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* ══════════════════════════════════════════════════════════════════
   LÉVITATION 3D — "Quantum Cards" (moteur JS : initRevueTilt3D)
   ══════════════════════════════════════════════════════════════════ */

/* Rotation du dégradé de bordure */
@keyframes gradientBorderSpin {
    0%   { background-position: 0%   50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}

/* Couche 1 : bordure gradient tournante (2px) */
.revue-card-journal::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: linear-gradient(135deg,
        #00d4ff 0%,
        #7b2ff7 33%,
        #00e676 66%,
        #00d4ff 100%
    );
    background-size: 300% 300%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.35s ease;
    animation: gradientBorderSpin 3s ease infinite;
    pointer-events: none;
}
.revue-card-journal:hover::before { opacity: 1; }

/* Couche 2 : halo externe coloré (catégorie via --revue-glow) */
.revue-card-journal::after {
    content: '';
    position: absolute;
    inset: -16px;
    border-radius: 28px;
    background: radial-gradient(ellipse at center,
        var(--revue-glow, rgba(0,212,255,0.18)) 0%,
        transparent 70%
    );
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    filter: blur(8px);
    pointer-events: none;
}
.revue-card-journal:hover::after { opacity: 1; }

/* Couche 3 : reflet spéculaire (suit le curseur via JS) */
.revue-card-shine {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.28s ease;
    background: radial-gradient(
        circle at var(--mx, 50%) var(--my, 50%),
        rgba(255,255,255,0.42) 0%,
        rgba(255,255,255,0.06) 38%,
        transparent 65%
    );
    z-index: 1;
}
.revue-card-journal:hover .revue-card-shine,
.revue-une:hover .revue-card-shine { opacity: 1; }

/* Contenu des cartes au-dessus du reflet */
.revue-card-journal .revue-card-cat,
.revue-card-journal a.revue-card-title-link,
.revue-card-journal .revue-card-accroche-journal,
.revue-card-journal .revue-card-footer-journal {
    position: relative; z-index: 2;
}

/* Mobile : effet 3D désactivé (pas de mousemove sur touch) */
@media (max-width: 768px) {
    .revue-card-journal::before,
    .revue-card-journal::after,
    .revue-card-shine { display: none !important; }
    .revue-card-journal:hover {
        transform: translateY(-3px) !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    }
    .revue-une:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    }
}

/* ══ FIN ANIMATIONS ════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .revue-toolbar { top: 68px; } /* header mobile plus compact */
    .revue-masthead,
    .revue-synthese-bloc,
    .revue-toolbar,
    .revue-footer-edition { padding-left: 16px !important; padding-right: 16px !important; }
    .revue-synthese-bloc { margin: 10px 16px !important; border-radius: 10px; }
    .revue-une { margin: 0 16px 10px !important; border-radius: 10px; }
    .revue-une-left { padding: 14px 16px !important; }
    .revue-une-right { padding: 14px 16px !important; }
    .revue-grid-journal { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px 20px; }
    .revue-card-journal:nth-child(n) { padding-left: 16px !important; border-left: none !important; border-radius: 10px; }
    .revue-card-journal:hover { transform: none; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
    .revue-une:hover { transform: none; box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
    .revue-une-title { font-size: 1.1rem; }
    .revue-masthead-title { font-size: 1.2rem; }
    .revue-masthead { flex-direction: row; align-items: center; padding: 8px 16px 6px; }
    .revue-toolbar { padding: 4px 16px 8px; }
    .revue-filters-journal { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
    .revue-filter-journal { white-space: nowrap; flex-shrink: 0; }
}
/* ================================================================
   FIN REFONTE GRAND JOURNAL
   ================================================================ */

/* === ADMIN CONTROLS - VISIBILITY === */
.admin-control {
    transition: opacity 0.3s, visibility 0.3s;
}

.admin-hidden {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.admin-unlock-hint {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(0,98,51,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.3;
    transition: all 0.3s;
    z-index: 97;
    font-size: 1.2rem;
    color: var(--primary);
}

.admin-unlock-hint:hover {
    opacity: 0.8;
    transform: scale(1.1);
    background: rgba(0,98,51,0.25);
}

.admin-unlock-hint.unlocked {
    background: rgba(210,16,52,0.2);
    color: var(--secondary);
    opacity: 0.6;
}

/* ===== BARRE NAV SECONDAIRE (Veille / Réseaux Sociaux / Revue / Baromètre) ===== */
.quick-nav {
    background: linear-gradient(90deg, #004d28 0%, #006233 60%, #00843f 100%);
    border-top: 1px solid rgba(255,255,255,.12);
    position: sticky;
    top: 0;
    z-index: 998;
    box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.quick-nav .container {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.quick-nav .container::-webkit-scrollbar { display: none; }
.qn-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    color: rgba(255,255,255,.82);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,.1);
    transition: background .18s, color .18s;
    cursor: pointer;
    background: transparent;
    border-top: none;
    border-bottom: none;
    border-left: none;
    outline: none;
}
.qn-link:last-child { border-right: none; }
.qn-link:hover,
.qn-link.active {
    background: rgba(255,255,255,.14);
    color: #fff;
}
.qn-link i { font-size: .8rem; opacity: .85; }
.qn-link .qn-badge {
    background: rgba(255,255,255,.22);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .04em;
}
.qn-link.qn-new .qn-badge { background: #fbbf24; color: #1a202c; }
body.dark-mode .quick-nav {
    background: linear-gradient(90deg, #003d1e 0%, #004d28 60%, #006233 100%);
}
@media (max-width: 640px) {
    .qn-link { padding: 9px 14px; font-size: .74rem; }
}

/* ===== METEO WIDGET ===== */
/* ===== METEO WIDGET ===== */
.weather-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.weather-trigger {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    color: inherit;
    font-size: 0.8rem;
}
.weather-trigger:hover,
.weather-wrap:hover .weather-trigger {
    background: rgba(255,255,255,0.18);
}

/* Carte popup deux-panneaux */
.weather-card {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    transform: translateY(-8px);
    width: min(600px, calc(100vw - 20px));
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.22);
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    color: var(--text-dark);
}
.weather-wrap:hover .weather-card {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.weather-card::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 28px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #006233;
    z-index: 1;
}

/* Layout deux-colonnes */
.wc-layout {
    display: flex;
    align-items: stretch;
}
.wc-left {
    flex: 0 0 295px;
    border-right: 1px solid var(--border);
    overflow: hidden;
}
.wc-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Header colonne droite */
.wc-right-hd {
    background: linear-gradient(135deg, #004d28, #006233, #00843f);
    color: #fff;
    padding: 12px 14px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Recherche wilaya */
.wc-search-wrap {
    position: relative;
    padding: 7px 10px;
    border-bottom: 1px solid var(--border);
}
.wc-search-ico {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    font-size: 0.62rem;
    pointer-events: none;
}
.wc-search {
    width: 100%;
    box-sizing: border-box;
    padding: 5px 8px 5px 26px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.74rem;
    background: var(--bg-white);
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s;
}
.wc-search:focus { border-color: #006233; }
body.dark-mode .wc-search { background: #1e2530; }

/* Liste scrollable des wilayas */
.wc-wil-list {
    flex: 1;
    overflow-y: auto;
    max-height: 432px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,98,51,0.3) transparent;
}
.wc-wil-list::-webkit-scrollbar { width: 4px; }
.wc-wil-list::-webkit-scrollbar-thumb { background: rgba(0,98,51,0.3); border-radius: 4px; }

.wc-wil-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px 7px 10px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.14s;
}
.wc-wil-item:last-child { border-bottom: none; }
.wc-wil-item:hover { background: rgba(0,98,51,0.06); }
.wc-wil-item.active {
    background: rgba(0,98,51,0.11);
    border-left: 3px solid #006233;
    padding-left: 7px;
}
body.dark-mode .wc-wil-item:hover  { background: rgba(255,255,255,0.04); }
body.dark-mode .wc-wil-item.active { background: rgba(0,150,70,0.16); border-left-color: #00c864; }

.wc-wil-num  { font-size: 0.57rem; color: #bbb; width: 20px; flex-shrink: 0; font-weight: 600; }
.wc-wil-name { flex: 1; font-size: 0.77rem; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-wil-item.active .wc-wil-name { font-weight: 700; color: #006233; }
body.dark-mode .wc-wil-item.active .wc-wil-name { color: #00c864; }
.wc-wil-temp { font-size: 0.79rem; font-weight: 800; color: var(--text-dark); min-width: 26px; text-align: right; }
.wc-wil-empty { padding: 20px; text-align: center; color: #aaa; font-size: 0.76rem; }

.wc-loading { display: flex; align-items: center; justify-content: center; height: 200px; color: #006233; font-size: 1.5rem; }
.wc-error   { display: flex; align-items: center; justify-content: center; gap: 8px; height: 200px; color: #ef4444; font-size: 0.84rem; }

/* Header vert panneau gauche */
.wc-header {
    background: linear-gradient(135deg, #004d28, #006233, #00843f);
    color: #fff;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.wc-header i { margin-right: 4px; color: #D21034; }
.wc-time { background: rgba(255,255,255,0.18); padding: 2px 8px; border-radius: 20px; font-size: 0.68rem; }

/* Body */
.wc-body { padding: 12px 13px 11px; }

/* Zone principale icon + temp */
.wc-main {
    text-align: center;
    padding: 4px 0 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 9px;
}
.wc-main-icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 3px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.14));
}
.wc-main-temp {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text-dark);
    letter-spacing: -0.03em;
}
.wc-unit { font-size: 1.15rem; font-weight: 600; vertical-align: super; }
.wc-desc {
    font-size: 0.76rem;
    color: #777;
    margin-top: 3px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Grille 3 colonnes */
.wc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
    margin-bottom: 9px;
}
.wc-item {
    background: rgba(0,98,51,0.07);
    border-radius: 9px;
    padding: 8px 4px 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
    transition: background 0.2s;
}
.wc-item:hover { background: rgba(0,98,51,0.14); }
body.dark-mode .wc-item { background: rgba(255,255,255,0.06); }
body.dark-mode .wc-item:hover { background: rgba(255,255,255,0.11); }
.wc-item i    { color: var(--primary); font-size: 0.84rem; }
.wc-item span { font-size: 0.57rem; color: #888; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.2; }
.wc-item b    { font-size: 0.83rem; color: var(--text-dark); font-weight: 700; }

/* Previsions 7 jours */
.wc-week {
    display: flex;
    justify-content: space-around;
    padding: 7px 2px 5px;
    margin: 5px -13px 9px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.wc-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
    text-align: center;
}
.wc-day-name { font-size: 0.52rem; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 0.04em; }
.wc-day i    { font-size: 0.8rem; }
.wc-day-max  { font-size: 0.68rem; font-weight: 800; color: var(--text-dark); line-height: 1; }
.wc-day-min  { font-size: 0.58rem; color: #aaa; line-height: 1; }
body.dark-mode .wc-day-name { color: rgba(255,255,255,.5); }
body.dark-mode .wc-day-min  { color: rgba(255,255,255,.35); }

/* Bouton lien */
.wc-link {
    display: block;
    text-align: center;
    font-size: 0.69rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 8px 8px;
    border-radius: 9px;
    background: linear-gradient(90deg, #006233, #00a855);
    transition: opacity 0.2s, transform 0.15s;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(0,98,51,0.28);
}
.wc-link:hover { opacity: 0.88; transform: translateY(-1px); }

@keyframes weatherPulse {
    0%   { opacity: 0.5; transform: scale(0.95); }
    100% { opacity: 1;   transform: scale(1); }
}
.weather-trigger.updating { animation: weatherPulse 0.4s ease forwards; }

/* ===== DEVISE WIDGET ===== */
.currency-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.currency-trigger {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    color: inherit;
    font-size: 0.8rem;
}
.currency-trigger:hover { background: rgba(255,255,255,0.18); }

/* ── Carte popup ── */
.currency-card {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    width: 340px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.22);
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    color: var(--text-dark);
}
.currency-card.cc-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
/* Caret */
.currency-card::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #b45309;
    z-index: 1;
}

/* Header */
.cc-header {
    background: linear-gradient(135deg, #78350f, #b45309, #d97706);
    color: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.cc-header i { margin-right: 4px; }
.cc-date {
    background: rgba(255,255,255,0.18);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
}

/* Body */
.cc-body { padding: 14px 16px 12px; }
.cc-subtitle {
    font-size: 0.68rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Scrollable table wrapper */
.cc-scroll-body {
    max-height: 230px;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0 -16px;
    padding: 0 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(180,83,9,0.3) transparent;
}
.cc-scroll-body::-webkit-scrollbar { width: 4px; }
.cc-scroll-body::-webkit-scrollbar-track { background: transparent; }
.cc-scroll-body::-webkit-scrollbar-thumb { background: rgba(180,83,9,0.3); border-radius: 4px; }

/* Table */
.cc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.cc-table thead { position: sticky; top: 0; background: var(--bg-white); z-index: 1; }
.cc-table thead tr { background: rgba(180,83,9,0.07); }
.cc-table th {
    padding: 7px 10px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: right;
}
.cc-table th:first-child { text-align: left; }
.cc-table td {
    padding: 6px 10px;
    text-align: right;
    font-weight: 700;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border);
    font-size: 0.83rem;
}
.cc-table td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--text-dark);
}
.cc-table tr:last-child td { border-bottom: none; }
.cc-table tbody tr:hover td { background: rgba(180,83,9,0.05); }
.cc-buy  { color: #16a34a; }
.cc-sell { color: #dc2626; }

/* Badges de variation */
.cc-badge {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    letter-spacing: 0;
    line-height: 1.5;
}
.cc-up   { background: rgba(22,163,74,0.12);  color: #16a34a; }
.cc-down { background: rgba(220,38,38,0.12);  color: #dc2626; }
.cc-flat { background: rgba(0,0,0,0.06);       color: #bbb;    }

/* Bouton PDF */
.cc-pdf-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    background: linear-gradient(90deg, #b45309, #d97706);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(180,83,9,0.3);
}
.cc-pdf-btn:hover { opacity: 0.88; transform: translateY(-1px); color: #fff; }
.cc-pdf-btn i { font-size: 0.9rem; }

/* Loader skeleton */
.cc-loading-body {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

/* Timestamp de mise à jour */
.cc-update-time {
    display: block;
    font-size: 0.6rem;
    color: #bbb;
    margin-top: 2px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

/* Footer */
.cc-footer {
    margin-top: 10px;
    font-size: 0.65rem;
    color: #aaa;
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
.cc-footer i { margin-right: 3px; color: #b45309; }
.cc-footer a { color: #b45309; text-decoration: none; font-weight: 600; }
.cc-footer a:hover { text-decoration: underline; }

/* ── Badge source PDF officiel / API ─────────────────────────────── */
.cc-src-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.6rem; font-weight: 700; letter-spacing: .03em;
    padding: 2px 6px; border-radius: 8px; vertical-align: middle;
    text-transform: uppercase; margin-left: 6px;
}
.cc-src-boa {
    background: rgba(220,38,38,.12); color: #dc2626;
    border: 1px solid rgba(220,38,38,.25);
}
body.dark-mode .cc-src-boa { background: rgba(220,38,38,.2); color: #f87171; }
.cc-src-api {
    background: rgba(180,83,9,.10); color: #b45309;
    border: 1px solid rgba(180,83,9,.22);
}
body.dark-mode .cc-src-api { background: rgba(180,83,9,.2); color: #fbbf24; }

/* Dark mode */
body.dark-mode .cc-table thead { background: var(--bg-white); }
body.dark-mode .cc-table th    { color: rgba(255,255,255,0.4); }
body.dark-mode .cc-subtitle    { color: rgba(255,255,255,0.4); }
body.dark-mode .cc-footer      { color: rgba(255,255,255,0.3); }
body.dark-mode .cc-flat        { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.4); }
body.dark-mode .cc-table tbody tr:hover td { background: rgba(255,255,255,0.04); }


/* ══════════════════════════════════════════════════════════════════
   ALGERIA TECH — VERSION ARABE / RTL  v1.0
   Active via : <html class="ar" dir="rtl" lang="ar">
   Géré dynamiquement par /i18n.js
══════════════════════════════════════════════════════════════════ */

/* ── Bouton sélecteur de langue ──────────────────────────────── */
/* ── Sélecteur 3 langues : pilule segmentée ─────────────────────── */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1;
  font-family: 'Cairo', 'Inter', sans-serif;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  height: 28px;
}
.lang-toggle:hover { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0,98,51,.08); }
.lang-toggle .lt-opt {
  padding: 0 9px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  opacity: 0.38;
  font-weight: 500;
  transition: opacity .2s, background .2s, color .2s;
  border-radius: 0;
}
.lang-toggle .lt-opt + .lt-opt { border-left: 1px solid var(--border); }
.lang-toggle .lt-opt.lt-active {
  opacity: 1;
  color: var(--primary);
  font-weight: 800;
  background: rgba(0,98,51,.07);
}
body.dark-mode .lang-toggle { border-color: rgba(255,255,255,.18); color: #e2e8f0; }
body.dark-mode .lang-toggle:hover { border-color: var(--primary); }
body.dark-mode .lang-toggle .lt-opt + .lt-opt { border-color: rgba(255,255,255,.12); }
body.dark-mode .lang-toggle .lt-opt.lt-active { color: #6ee7b7; background: rgba(110,231,183,.10); }
@media (max-width: 768px) { .lang-toggle { display: none; } }

/* ── Police arabe ─────────────────────────────────────────────── */
html.ar body,
html.ar h1, html.ar h2, html.ar h3, html.ar h4, html.ar h5,
html.ar p, html.ar button, html.ar input, html.ar a, html.ar span {
  font-family: 'Cairo', 'Inter', sans-serif;
}

/* ── Top-bar ──────────────────────────────────────────────────── */
/* ── Navigation principale — le header est figé LTR via header { direction:ltr !important } ── */
/* Les dropdown-menus restent RTL-friendly pour le contenu arabe */
html.ar .dropdown-menu      { left: auto !important; right: 0; text-align: right; }
html.ar .dropdown-menu li   { text-align: right; direction: rtl; }

/* ── Quick-nav ────────────────────────────────────────────────── */
html.ar .quick-nav .container { flex-direction: row-reverse; }
html.ar .qn-link              { flex-direction: row-reverse; }
html.ar .qn-link i            { margin-right: 0; margin-left: 6px; }

/* ── Breaking news ────────────────────────────────────────────── */
html.ar .breaking-news .container { flex-direction: row-reverse; }
html.ar .breaking-ticker           { direction: rtl; }
html.ar .ticker-track              { animation-direction: reverse; }

/* ── Section headers & filtres ───────────────────────────────── */
html.ar .section-header { flex-direction: row-reverse; }
html.ar .section-title  { flex-direction: row-reverse; }
html.ar .tag-filters    { justify-content: flex-start; direction: rtl; }

/* ── Grille d'articles ────────────────────────────────────────── */
html.ar .news-card-body   { text-align: right; direction: rtl; }
html.ar .news-card-body h3 { text-align: right; }
html.ar .card-meta        { flex-direction: row-reverse; }
html.ar .card-footer      { flex-direction: row-reverse; }

/* ── Hero section ─────────────────────────────────────────────── */
html.ar .hero-card-content { text-align: right; direction: rtl; }
html.ar .hero-card-meta    { flex-direction: row-reverse; }

/* ── Sidebar ──────────────────────────────────────────────────── */
html.ar .sidebar             { text-align: right; direction: rtl; }
html.ar .widget-title        { text-align: right; flex-direction: row-reverse; }
html.ar .trending-list       { padding-right: 0; }
html.ar .trending-item       { flex-direction: row-reverse; text-align: right; }
html.ar .tag-cloud           { direction: rtl; text-align: right; }
html.ar .newsletter-widget p { text-align: right; }
html.ar .newsletter-form     { direction: rtl; }
html.ar .newsletter-form input { text-align: right; }

/* ── Veille V2 ────────────────────────────────────────────────── */
html.ar .v2-stats-inner  { flex-direction: row-reverse; }
html.ar .v2-kpis         { flex-direction: row-reverse; }
html.ar .v2-kpi          { text-align: right; }
html.ar .v2-tabs         { flex-direction: row-reverse; }
html.ar .v2-topics-inner { flex-direction: row-reverse; }
html.ar .v2-card         { text-align: right; direction: rtl; }
html.ar .v2-card-title   { text-align: right; direction: rtl; }
html.ar .v2-card-source  { flex-direction: row-reverse; }
html.ar .v2-stats-right  { flex-direction: row-reverse; }

/* ── Revue de presse ──────────────────────────────────────────── */
html.ar .revue-masthead    { flex-direction: row-reverse; }
html.ar .revue-filter-bar  { flex-direction: row-reverse; }
html.ar .revue-card        { text-align: right; direction: rtl; }
html.ar .revue-card-meta   { flex-direction: row-reverse; }
html.ar .revue-card-title-journal { text-align: right; }

/* ── Mobile menu ──────────────────────────────────────────────── */
html.ar .mobile-menu-header  { flex-direction: row-reverse; }
html.ar .mobile-nav-list     { direction: rtl; text-align: right; }
html.ar .mobile-nav-list a   { flex-direction: row-reverse; gap: 10px; }
html.ar .mobile-nav-list a i { margin-right: 0; }
html.ar .mobile-menu-footer  { direction: rtl; }
html.ar .mobile-search       { flex-direction: row-reverse; }

/* ── Layout global ────────────────────────────────────────────── */
html.ar .content-layout { direction: rtl; }
html.ar .container      { direction: rtl; }

/* ── Page article ─────────────────────────────────────────────── */
html.ar .article-page        { direction: rtl; }
html.ar .back-btn            { flex-direction: row-reverse; }
html.ar .article-body        { direction: rtl; text-align: right; }
html.ar .article-body h1     { text-align: right; direction: rtl; }
html.ar .article-meta        { flex-direction: row-reverse; flex-wrap: wrap; }
html.ar .article-text        { direction: rtl; text-align: right; }
html.ar .article-text p,
html.ar .article-text h2,
html.ar .article-text h3,
html.ar .article-text li     { text-align: right; direction: rtl; }
html.ar .article-text ul,
html.ar .article-text ol     { padding-right: 1.5em; padding-left: 0; }
html.ar .share-buttons       { flex-direction: row-reverse; flex-wrap: wrap; }
html.ar .related-articles h3 { text-align: right; }
html.ar .related-grid        { direction: rtl; }
html.ar .related-card        { text-align: right; }
html.ar .trending-item       { flex-direction: row-reverse; text-align: right; }
html.ar .trending-content    { text-align: right; }

/* ══════════════════════════════════════════════════════════════
   SYNTHÈSE IA — Bouton + Bloc résumé
══════════════════════════════════════════════════════════════ */
/* ── Rangée de boutons actions article ─────────────────────── */
.article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 18px;
}

/* ── Bouton Synthèse IA ─────────────────────────────────────── */
.synthese-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 9px 20px;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    box-shadow: 0 3px 12px rgba(26,115,232,.35);
    transition: transform .15s, box-shadow .15s, opacity .2s;
}
.synthese-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(26,115,232,.45);
}
.synthese-btn:disabled {
    opacity: .75;
    cursor: not-allowed;
}
.synthese-btn .fa-bolt   { font-size: 0.85em; }
.synthese-btn .fa-spinner{ font-size: 0.85em; }

/* ── Conteneur Synthèse (outer wrapper, toujours dans le DOM) ── */
#syntheseBox {
    display: block;
    overflow: hidden;
    max-height: 0;
    transition: max-height .4s ease, opacity .35s ease;
    opacity: 0;
    margin-bottom: 0;
}
#syntheseBox.synthese-visible {
    max-height: 600px;
    opacity: 1;
    margin-bottom: 22px;
}

/* ── Bloc intérieur : rectangle flottant ── */
.synthese-inner {
    background: #fff;
    border: 1.5px solid #c5d8fd;
    border-left: 5px solid #1a73e8;
    border-radius: 14px;
    padding: 18px 22px 16px;
    box-shadow: 0 8px 28px rgba(26,115,232,.18), 0 2px 8px rgba(0,0,0,.06);
    transform: translateY(-4px);
    animation: synthRise .38s cubic-bezier(.22,.68,0,1.2) forwards;
}
@keyframes synthRise {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to   { opacity: 1; transform: translateY(-4px) scale(1); }
}

/* ── En-tête ── */
.synthese-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.92rem;
    color: #1a73e8;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.synthese-header .fa-bolt { font-size: 0.88em; }
.synthese-ia-badge {
    font-size: 0.6rem;
    font-weight: 800;
    background: #1a73e8;
    color: #fff;
    border-radius: 4px;
    padding: 2px 5px;
    letter-spacing: .07em;
    margin-left: auto;
}

/* ── Liste tirets ── */
.synthese-list {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #1c1c2e;
    font-size: 0.93rem;
    line-height: 1.7;
}
.synthese-list li {
    margin-bottom: 7px;
    padding-left: 1.5em;
    position: relative;
}
.synthese-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: #1a73e8;
    font-weight: 700;
}
.synthese-list li:last-child { margin-bottom: 0; }

.synthese-error {
    color: #c62828;
    font-size: 0.88rem;
    margin: 0;
}

/* ── RTL ── */
html.ar .synthese-inner        { border-left: 1.5px solid #c5d8fd; border-right: 5px solid #1a73e8; }
html.ar .synthese-header       { flex-direction: row-reverse; }
html.ar .synthese-ia-badge     { margin-left: 0; margin-right: auto; }
html.ar .synthese-list         { direction: rtl; text-align: right; }
html.ar .synthese-list li      { padding-left: 0; padding-right: 1.5em; }
html.ar .synthese-list li::before { left: auto; right: 0; }
html.ar .synthese-btn          { flex-direction: row-reverse; }

/* ══════════════════════════════════════════════════════════════
   DÉCHIFFRER LE JARGON — Bouton + Termes + Tooltip
══════════════════════════════════════════════════════════════ */

/* ── Bouton ─────────────────────────────────────────────────── */
.jargon-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    background: linear-gradient(135deg, #00897b 0%, #00695c 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    box-shadow: 0 3px 12px rgba(0,137,123,.35);
    transition: transform .15s, box-shadow .15s;
    white-space: nowrap;
}
.jargon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,137,123,.45);
}
.jargon-btn.jargon-active {
    background: linear-gradient(135deg, #e53935 0%, #b71c1c 100%);
    box-shadow: 0 3px 12px rgba(229,57,53,.35);
}
.jargon-btn.jargon-active:hover {
    box-shadow: 0 6px 18px rgba(229,57,53,.45);
}

/* ── Terme surligné ─────────────────────────────────────────── */
.jargon-term {
    color: #1a73e8;
    font-weight: 600;
    border-bottom: 1px dotted #1a73e8;
    cursor: help;
    transition: color .15s;
}
.jargon-term:hover {
    color: #1557b0;
}

/* ── Tooltip ────────────────────────────────────────────────── */
#jargonTooltip {
    position: absolute;
    z-index: 9999;
    max-width: 320px;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e0e7ff;
    border-top: 3px solid #1a73e8;
    border-radius: 10px;
    padding: 11px 14px 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.08);
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity .18s ease, transform .18s ease;
    font-size: 0.86rem;
    line-height: 1.55;
    direction: ltr;
    text-align: left;
}
#jargonTooltip.jt-vis {
    opacity: 1;
    transform: translateY(0);
}
.jt-term {
    display: block;
    font-size: 0.92rem;
    color: #1a73e8;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 0.01em;
}
.jt-def {
    color: #2c2c3e;
    display: block;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .article-actions { flex-direction: column; align-items: flex-start; }
    .jargon-btn, .synthese-btn { width: 100%; justify-content: center; }
    #jargonTooltip { max-width: calc(100vw - 24px); }

    /* Cibles tactiles confortables (~44px) sur mobile */
    .meta-audio-btn, .meta-lite-btn { min-height: 40px; padding: 8px 14px; font-size: 0.85rem; }
    .synthese-btn, .debat-btn { min-height: 44px; }
    .debat-btn { width: 100%; justify-content: center; }
    /* La barre méta reste sur une ligne d'infos, boutons alignés à droite qui reviennent à la ligne proprement */
    .article-meta { gap: 10px 14px; }
}

/* ── RTL ─────────────────────────────────────────────────────── */
html.ar .jargon-btn     { flex-direction: row-reverse; }
html.ar .article-actions{ flex-direction: row-reverse; }


/* ══════════════════════════════════════════════════════════════
   COMPARATEUR D OFFRES MOBILES
══════════════════════════════════════════════════════════════ */
.comp-wrap { max-width:1200px; margin:0 auto; padding:0 16px 60px; }
.comp-hero { text-align:center; padding:48px 20px 36px; background:linear-gradient(135deg,#e8f0fb 0%,#fce8e9 50%,#fbe9e7 100%); border-radius:20px; margin-bottom:32px; }
.comp-hero-icons { display:flex; justify-content:center; gap:20px; margin-bottom:16px; }
.comp-op-logo { height:36px; object-fit:contain; }
.comp-hero-title { font-size:1.9rem; font-weight:800; color:#1a1a2e; margin:0 0 10px; }
.comp-hero-title .fa-mobile-alt { color:#1565C0; margin-right:10px; }
.comp-hero-sub { color:#555; font-size:1rem; max-width:560px; margin:0 auto; line-height:1.6; }
.comp-layout { display:grid; grid-template-columns:280px 1fr; gap:28px; align-items:start; }
@media(max-width:860px){ .comp-layout{ grid-template-columns:1fr; } }
.comp-filters { background:#fff; border-radius:16px; padding:22px 20px; box-shadow:0 2px 16px rgba(0,0,0,.08); position:sticky; top:80px; }
.comp-filters-title { font-size:1rem; font-weight:700; color:#1a1a2e; margin:0 0 20px; display:flex; align-items:center; gap:8px; }
.comp-filter-group { margin-bottom:20px; }
.comp-filter-label { display:block; font-size:.82rem; font-weight:700; color:#666; text-transform:uppercase; letter-spacing:.06em; margin-bottom:8px; }
.comp-pills { display:flex; flex-wrap:wrap; gap:6px; }
.comp-pill { padding:6px 12px; border:1.5px solid #e0e0e0; border-radius:20px; background:#fafafa; color:#444; font-size:.82rem; font-weight:500; cursor:pointer; transition:all .15s; white-space:nowrap; }
.comp-pill:hover { border-color:#1565C0; color:#1565C0; }
.comp-pill-active { background:#1565C0; border-color:#1565C0; color:#fff; font-weight:700; }
.comp-updated { font-size:.78rem; color:#999; margin:20px 0 0; display:flex; align-items:center; gap:6px; }
.comp-count { font-size:.88rem; color:#666; margin:0 0 16px; display:flex; align-items:center; gap:6px; }
.comp-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:20px; }
.comp-card { background:#fff; border-radius:16px; overflow:hidden; box-shadow:0 3px 14px rgba(0,0,0,.09); transition:transform .2s,box-shadow .2s; animation:compCardIn .3s ease both; display:flex; flex-direction:column; }
.comp-card:hover { transform:translateY(-4px); box-shadow:0 10px 30px rgba(0,0,0,.13); }
@keyframes compCardIn { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
.comp-card-top { border:2.5px solid var(--op-color); box-shadow:0 6px 24px rgba(0,0,0,.14); }
.comp-card-header { background:var(--op-color); padding:12px 16px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px; }
.comp-op-name { color:#fff; font-weight:800; font-size:1rem; letter-spacing:.02em; }
.comp-rec-badge { background:#FFD700; color:#333; font-size:.72rem; font-weight:700; padding:3px 9px; border-radius:12px; display:flex; align-items:center; gap:4px; }
.comp-pop-badge { background:rgba(255,255,255,.25); color:#fff; font-size:.7rem; font-weight:700; padding:3px 8px; border-radius:10px; display:flex; align-items:center; gap:4px; }
.comp-pro-badge   { background:#212121; color:#FFD700; font-size:.7rem; font-weight:700; padding:3px 8px; border-radius:10px; display:flex; align-items:center; gap:4px; }
.comp-best-badge  { background:rgba(255,255,255,.2); color:#fff; font-size:.7rem; font-weight:700; padding:3px 8px; border-radius:10px; border:1px solid rgba(255,255,255,.5); display:flex; align-items:center; gap:4px; }
.comp-validity-warn { font-size:.8rem; color:#e65100; font-style:normal; font-weight:600; }
.comp-card-body { padding:18px 18px 16px; flex:1; display:flex; flex-direction:column; }
.comp-offer-name { font-weight:700; font-size:1.05rem; color:#1a1a2e; margin-bottom:6px; }
.comp-price { margin-bottom:14px; }
.comp-price strong { font-size:2rem; font-weight:900; color:var(--op-color); line-height:1; }
.comp-currency { font-size:.95rem; color:#555; margin-left:3px; }
.comp-currency small { font-size:.78rem; }
.comp-specs { list-style:none; margin:0 0 12px; padding:0; display:flex; flex-direction:column; gap:5px; }
.comp-specs li { font-size:.88rem; color:#333; display:flex; align-items:flex-start; gap:8px; }
.comp-specs li .fas { color:var(--op-color); width:14px; flex-shrink:0; margin-top:2px; }
.comp-extras { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:14px; }
.comp-extra-tag { background:var(--op-light); color:var(--op-color); font-size:.73rem; font-weight:600; padding:3px 9px; border-radius:10px; }
.comp-value-row { display:flex; align-items:center; gap:8px; margin-bottom:16px; }
.comp-value-label { font-size:.75rem; color:#888; white-space:nowrap; display:flex; align-items:center; gap:4px; }
.comp-value-bar { flex:1; height:6px; background:#eee; border-radius:6px; overflow:hidden; }
.comp-value-fill { height:100%; border-radius:6px; width:0%; transition:width .6s cubic-bezier(.22,.68,0,1.2); }
.comp-value-pct { font-size:.75rem; font-weight:700; color:#555; width:32px; text-align:right; }
.comp-cta { display:flex; align-items:center; justify-content:center; gap:8px; padding:11px 16px; border-radius:10px; color:#fff; font-weight:700; font-size:.88rem; text-decoration:none; margin-top:auto; transition:opacity .15s,transform .15s; }
.comp-cta:hover { opacity:.88; transform:translateY(-1px); color:#fff; }
.comp-empty { text-align:center; padding:60px 20px; color:#aaa; }
.comp-empty .fas { font-size:3rem; display:block; margin-bottom:16px; }
.comp-empty p { margin:0 0 6px; font-size:1rem; color:#666; }
.comp-empty-hint { font-size:.88rem; color:#aaa !important; }
.comp-disclaimer { margin-top:32px; padding:14px 18px; background:#fff8e1; border-left:4px solid #f9a825; border-radius:8px; font-size:.84rem; color:#5d4037; display:flex; align-items:flex-start; gap:10px; line-height:1.5; }
.comp-disclaimer .fas { margin-top:2px; color:#f9a825; flex-shrink:0; }
html.ar .comp-hero-title { direction:rtl; }
html.ar .comp-filters { direction:rtl; text-align:right; }
html.ar .comp-filter-label { text-align:right; }
html.ar .comp-card-header { flex-direction:row-reverse; }
html.ar .comp-specs li { flex-direction:row-reverse; }
html.ar .comp-disclaimer { flex-direction:row-reverse; border-left:none; border-right:4px solid #f9a825; }

/* ═══════════════════════════════════════════════════════════
   DÉBAT IA — Bouton + Panneau chat flottant
   algeria-tech — juin 2026
═══════════════════════════════════════════════════════════ */

/* ── Bouton dans les actions article ───────────────────── */
.debat-btn {
  background: linear-gradient(135deg, #6200ea 0%, #7c4dff 100%);
  color: #fff;
  border: none;
  border-radius: 22px;
  padding: 9px 18px;
  font-size: .87rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 3px 10px rgba(98,0,234,.3);
  transition: opacity .15s, transform .12s, box-shadow .15s;
}
.debat-btn:hover { opacity:.9; transform:translateY(-1px); box-shadow:0 5px 18px rgba(98,0,234,.38); }
.debat-btn:active { transform:translateY(0); }

/* ── Bouton "Version Interactive" (Mode Immersif) ─────────── */
.at-immersive-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; margin: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; border: none; border-radius: 25px;
  font-size: 0.92rem; font-weight: 600; letter-spacing: 0.02em;
  cursor: pointer; box-shadow: 0 3px 12px rgba(0,98,51,.35);
  transition: transform .15s, box-shadow .15s;
}
.at-immersive-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,98,51,.45); }

/* ── Modale plein écran (carte interactive) ───────────────── */
/* Version interactive : elle occupe tout l'ecran et masque entierement
   l'article normal — sinon on lit les deux mises en page l'une sur l'autre. */
/* Au-dessus des widgets flottants du site (assistant vocal, WhatsApp,
   panneau de préférences...), qui montent jusqu'à 9999. */
.at-immersive-modal { background: var(--bg, #0b0f19); padding: 0; z-index: 2147482000; }
body.at-immersive-open #premiumPlayerBar,
body.at-immersive-open .premium-reading-progress,
body.at-immersive-open .reading-progress { display: none !important; }
.at-immersive-modal .modal-content {
  max-width: 100%; width: 100%; max-height: 100vh; height: 100vh;
  padding: 0; margin: 0; border-radius: 0; overflow: hidden;
  background: transparent; box-shadow: none;
}
.at-immersive-modal .modal-content > iframe { height: calc(100vh - 48px) !important; border-radius: 0 !important; }
/* Barre fixe en haut : « Retour à l'article » à gauche, « Fermer » bien visible à droite (remplace la petite croix perdue dans le coin) */
.at-imm-bar { position: sticky; top: 0; z-index: 5; height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; background: #0b1729; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.at-imm-bar button { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: 600 .9rem/1 inherit; border-radius: 999px; padding: 9px 16px; }
.at-imm-back { background: rgba(255,255,255,.12); color: #fff; }
.at-imm-back:hover { background: rgba(255,255,255,.22); }
.at-imm-x { background: var(--secondary, #d21034); color: #fff; }
.at-imm-x:hover { background: #b00d2b; }
.at-immersive-modal .modal-close {
  position: fixed; top: 14px; right: 16px; z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff; backdrop-filter: blur(4px);
}
.at-immersive-modal .modal-close:hover { background: var(--secondary, #d21034); color: #fff; }
@media (max-width: 600px) { .at-immersive-btn { width: 100%; justify-content: center; } }

/* ── Panneau flottant ──────────────────────────────────── */
.debat-panel {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 60px);
  background: #fff;
  border-radius: 20px;
  box-shadow:
    0 20px 60px rgba(0,0,0,.16),
    0 4px 16px rgba(98,0,234,.12);
  display: flex;
  flex-direction: column;
  z-index: 1200;
  /* État fermé */
  transform: translateY(24px) scale(.97);
  opacity: 0;
  pointer-events: none;
  transition:
    transform .3s cubic-bezier(.22,.68,0,1.15),
    opacity   .25s ease;
}
.debat-panel.debat-visible {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* ── En-tête ─────────────────────────────────────────── */
.debat-header {
  background: linear-gradient(135deg, #6200ea 0%, #7c4dff 100%);
  border-radius: 20px 20px 0 0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}
.debat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  min-width: 0;
}
.debat-avatar {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1rem; color: #fff;
}
.debat-header-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.debat-title {
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  line-height: 1.2;
}
.debat-subtitle {
  color: rgba(255,255,255,.7);
  font-size: .73rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.debat-header-actions { display: flex; gap: 6px; flex-shrink: 0; }
.debat-icon-btn {
  background: rgba(255,255,255,.18);
  border: none;
  color: #fff;
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  transition: background .15s;
}
.debat-icon-btn:hover { background: rgba(255,255,255,.32); }

/* ── Zone messages ───────────────────────────────────── */
.debat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
  /* scrollbar discrète */
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}
.debat-messages::-webkit-scrollbar { width: 4px; }
.debat-messages::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

/* ── Bulles ───────────────────────────────────────────── */
.debat-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  animation: debatIn .22s ease;
}
@keyframes debatIn {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0);   }
}
.debat-ia   { align-self: flex-start; }
.debat-user { align-self: flex-end;   flex-direction: row-reverse; }

.debat-ia-avatar {
  width: 28px; height: 28px;
  background: #ede7f6;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .8rem;
  color: #6200ea;
}

.debat-bubble {
  max-width: calc(100% - 40px);
  padding: 10px 14px;
  border-radius: 16px;
  font-size: .875rem;
  line-height: 1.6;
}
.debat-ia   .debat-bubble {
  background: #f3e8ff;
  color: #1a1a2e;
  border-bottom-left-radius: 4px;
}
.debat-user .debat-bubble {
  background: #6200ea;
  color: #fff;
  border-bottom-right-radius: 4px;
  text-align: left;
}
.debat-bubble p { margin: 0 0 .6em; }
.debat-bubble p:last-child { margin: 0; }

/* ── Typing dots ──────────────────────────────────────── */
.debat-typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 12px 14px !important;
}
.debat-typing span {
  width: 7px; height: 7px;
  background: #9c5ef0;
  border-radius: 50%;
  animation: debatDot 1.1s infinite ease-in-out;
}
.debat-typing span:nth-child(2) { animation-delay: .18s; }
.debat-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes debatDot {
  0%,80%,100% { transform:scale(.65); opacity:.45; }
  40%         { transform:scale(1.1);  opacity:1;   }
}

/* ── Longueur de réponse (courte / moyenne / longue) ─── */
.debat-len-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.debat-len-label {
  font-size: .72rem;
  font-weight: 700;
  color: #6200ea;
  opacity: .75;
  margin-right: 2px;
  white-space: nowrap;
}
.debat-len-btn {
  background: #fff;
  color: #6200ea;
  border: 1.5px solid #d1a3ff;
  border-radius: 14px;
  padding: 4px 12px;
  font-size: .74rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.debat-len-btn:hover { background: #f3e8ff; transform: scale(1.03); }
.debat-len-btn.active {
  background: linear-gradient(135deg, #6200ea, #7c4dff);
  border-color: #6200ea;
  color: #fff;
  box-shadow: 0 2px 8px rgba(98,0,234,.25);
}

/* ── Suggestions rapides ─────────────────────────────── */
.debat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
  flex-shrink: 0;
}
.debat-chip {
  background: #f3e8ff;
  color: #6200ea;
  border: 1.5px solid #d1a3ff;
  border-radius: 14px;
  padding: 5px 12px;
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.debat-chip:hover { background: #e9d5ff; transform: scale(1.03); }

/* ── Saisie ───────────────────────────────────────────── */
.debat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid #f0e6ff;
  background: #fdf8ff;
  border-radius: 0 0 20px 20px;
  flex-shrink: 0;
}
.debat-input {
  flex: 1;
  border: 1.5px solid #d1a3ff;
  border-radius: 22px;
  padding: 9px 14px;
  font-size: .875rem;
  outline: none;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.debat-input:focus {
  border-color: #6200ea;
  box-shadow: 0 0 0 3px rgba(98,0,234,.12);
}
.debat-send {
  background: linear-gradient(135deg, #6200ea, #7c4dff);
  color: #fff;
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .9rem;
  transition: transform .13s, opacity .13s;
}
.debat-send:hover   { transform: scale(1.08); }
.debat-send:active  { transform: scale(.96);  }
.debat-send:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Responsive mobile ───────────────────────────────── */
@media (max-width: 480px) {
  .debat-panel { right: 10px; bottom: 10px; width: calc(100vw - 20px); height: 70vh; }
}

/* ═══════════════════════════════════════════════════════════
   VEILLE RÉGLEMENTAIRE — JORADP
   Algeria Tech — juin 2026
═══════════════════════════════════════════════════════════ */

/* ── Wrapper global ──────────────────────────────────────── */
.reg-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* ── Hero ────────────────────────────────────────────────── */
.reg-hero {
  text-align: center;
  padding: 48px 24px 36px;
  background: linear-gradient(135deg, #1a237e 0%, #283593 60%, #1565C0 100%);
  border-radius: 20px;
  margin-bottom: 32px;
  color: #fff;
}
.reg-hero-icon {
  font-size: 2.8rem;
  margin-bottom: 14px;
  opacity: .9;
}
.reg-hero-title {
  font-size: 2rem;
  font-weight: 900;
  margin: 0 0 10px;
  letter-spacing: -.01em;
}
.reg-hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.82);
  max-width: 640px;
  margin: 0 auto 20px;
  line-height: 1.6;
}
.reg-hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: .82rem;
  color: rgba(255,255,255,.7);
}
.reg-count {
  background: rgba(255,255,255,.15);
  padding: 4px 12px;
  border-radius: 14px;
  font-weight: 700;
  color: #fff;
}
.reg-last-check { display: flex; align-items: center; gap: 5px; }
.reg-last-check .fas { opacity: .7; }
/* Liens sources hero */
.reg-src-link {
  color: #90caf9; text-decoration: none; font-weight: 600;
  display: flex; align-items: center; gap: 5px; transition: color .15s;
}
.reg-src-link:hover { color: #fff; }
.reg-src-link-arpce { color: #a5d6a7; }
.reg-src-link-arpce:hover { color: #fff; }

/* ── Badges source sur les cartes ───────────────────────── */
.reg-card-head { flex-wrap: wrap; gap: 6px; }
.reg-card-head-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.reg-src-badge {
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 3px;
}
.reg-src-joradp { background: #e3f2fd; color: #0d47a1; }
.reg-src-arpce  { background: #e8f5e9; color: #1b5e20; }

/* ── Filtres ─────────────────────────────────────────────── */
/* ── Barre de recherche ──────────────────────────────────── */
.reg-search-wrap {
  margin-bottom: 20px;
}
.reg-search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.reg-search-ico {
  position: absolute;
  left: 16px;
  color: #9ea8c4;
  font-size: .9rem;
  pointer-events: none;
}
.reg-search-input {
  width: 100%;
  padding: 11px 44px 11px 42px;
  border: 2px solid #e0e4f0;
  border-radius: 12px;
  font-size: .9rem;
  background: #f8f9ff;
  color: #1a237e;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.reg-search-input:focus {
  border-color: #3f51b5;
  box-shadow: 0 0 0 3px rgba(63,81,181,.12);
  background: #fff;
}
.reg-search-input::placeholder { color: #aab0cc; }
.reg-search-clear {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #aab0cc;
  cursor: pointer;
  font-size: .9rem;
  padding: 4px;
  line-height: 1;
  transition: color .15s;
}
.reg-search-clear:hover { color: #3f51b5; }
body.dark-mode .reg-search-input {
  background: #1a1f35;
  border-color: #2d3561;
  color: #c5cae9;
}
body.dark-mode .reg-search-input:focus {
  border-color: #5c6bc0;
  box-shadow: 0 0 0 3px rgba(92,107,192,.18);
  background: #1e2440;
}

.reg-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}
.reg-pill {
  background: #f5f5f5;
  color: #444;
  border: 1.5px solid #ddd;
  border-radius: 20px;
  padding: 7px 16px;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.reg-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.reg-filter-label { font-size:.78rem; font-weight:700; color:#555; min-width:52px; }
.reg-pill:hover { background: #e8eaf6; border-color: #3f51b5; color: #3f51b5; }
.reg-pill-active { background: #1a237e; color: #fff; border-color: #1a237e; }
/* Source pills : ARPCE = vert */
.reg-pill-arpce.reg-pill-active { background: #2e7d32; border-color: #2e7d32; }

/* ── Grille de cartes ────────────────────────────────────── */
.reg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ── Carte ───────────────────────────────────────────────── */
.reg-card {
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid #e8e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: transform .18s, box-shadow .18s;
  animation: regCardIn .25s ease;
}
@keyframes regCardIn {
  from { opacity:0; transform:translateY(10px); }
  to   { opacity:1; transform:translateY(0); }
}
.reg-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

/* ── Header de carte ─────────────────────────────────────── */
.reg-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  background: var(--rl, #eceff1);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.reg-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--rc, #455A64);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 10px;
  white-space: nowrap;
}
.reg-jo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #555;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.reg-jo-badge .fas { color: #888; }

/* ── Corps de carte ──────────────────────────────────────── */
.reg-card-body {
  padding: 14px 16px 12px;
  flex: 1;
}
.reg-numero {
  font-size: .75rem;
  color: var(--rc, #455A64);
  font-weight: 700;
  margin: 0 0 6px;
  font-family: monospace;
}
.reg-titre {
  font-size: .93rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.45;
  margin: 0 0 10px;
}
.reg-pertinence {
  font-size: .8rem;
  color: #555;
  line-height: 1.5;
  margin: 0;
  padding: 8px 10px;
  background: #fafafa;
  border-left: 3px solid var(--rc, #455A64);
  border-radius: 0 6px 6px 0;
  display: flex;
  gap: 6px;
}
.reg-pertinence .fas { color: #f9a825; flex-shrink: 0; margin-top: 2px; }

/* ── Pied de carte ───────────────────────────────────────── */
.reg-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid #f0f0f5;
  background: #fafafa;
}
.reg-page-info {
  font-size: .75rem;
  color: #888;
  display: flex; align-items: center; gap: 5px;
}
.reg-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 16px;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .14s, transform .12s;
}
.reg-link:hover { opacity: .85; transform: translateY(-1px); color: #fff; }

/* ── États ───────────────────────────────────────────────── */
.reg-loading, .reg-error, .reg-empty {
  text-align: center;
  padding: 64px 24px;
  color: #aaa;
}
.reg-loading .fas, .reg-error .fas, .reg-empty .fas {
  font-size: 3rem;
  display: block;
  margin-bottom: 18px;
}
.reg-empty .fas { color: #c5cae9; }
.reg-error .fas  { color: #ef9a9a; }
.reg-empty p, .reg-error p { margin: 0 0 6px; font-size: 1rem; color: #666; }
.reg-empty-hint  { font-size: .85rem; color: #aaa !important; }

/* ── Disclaimer ──────────────────────────────────────────── */
.reg-disclaimer {
  margin-top: 36px;
  padding: 14px 18px;
  background: #e8eaf6;
  border-left: 4px solid #3f51b5;
  border-radius: 8px;
  font-size: .83rem;
  color: #283593;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.reg-disclaimer a { color: #1a237e; font-weight: 700; }
.reg-disclaimer .fas { margin-top: 2px; flex-shrink: 0; }

/* ── Widget abonnement email ──────────────────────────────── */
.reg-subscribe-box {
  margin: 28px 0 20px;
  background: linear-gradient(135deg,#1a237e 0%,#283593 100%);
  border-radius: 12px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.reg-sub-icon {
  font-size: 2rem;
  color: #ffd54f;
  flex-shrink: 0;
}
.reg-sub-text { flex: 1; min-width: 180px; }
.reg-sub-text strong { color: #fff; font-size: 1rem; display: block; margin-bottom: 4px; }
.reg-sub-text p { color: #90caf9; margin: 0; font-size: .85rem; line-height: 1.4; }
.reg-sub-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}
.reg-sub-form input[type="email"] {
  border: none;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: .9rem;
  min-width: 210px;
  outline: none;
  background: rgba(255,255,255,.15);
  color: #fff;
}
.reg-sub-form input[type="email"]::placeholder { color: #b0bec5; }
.reg-sub-form input[type="email"]:focus { background: rgba(255,255,255,.25); }
.reg-sub-btn {
  background: #ffd54f;
  color: #1a237e;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  transition: transform .12s, opacity .12s;
  white-space: nowrap;
}
.reg-sub-btn:hover { opacity: .9; transform: translateY(-1px); }
.reg-sub-btn:disabled { opacity: .6; cursor: default; }
.reg-sub-msg {
  width: 100%;
  font-size: .85rem;
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 6px;
}
.reg-sub-ok  { background: #e8f5e9; color: #1b5e20; }
.reg-sub-err { background: #ffebee; color: #b71c1c; }

@media (max-width: 600px) {
  .reg-subscribe-box { flex-direction: column; text-align: center; }
  .reg-sub-form { justify-content: center; }
  .reg-sub-form input[type="email"] { min-width: 0; width: 100%; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .reg-hero-title { font-size: 1.5rem; }
  .reg-grid { grid-template-columns: 1fr; }
}

/* ===== FLOATING VIDEO PLAYER ===== */
/* L'iframe reste dans le DOM, on change juste sa position via CSS */
.video-anchor { position: relative; }
.video-anchor #floatingVideoHeader { display: none; }

/* Mode flottant : la video-container passe en position fixed */
.video-anchor.video-floating .video-container {
    position: fixed !important;
    bottom: 80px;
    right: 20px;
    width: 320px;
    height: 180px !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-radius: 0 0 12px 12px !important;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    animation: videoFloatIn 0.3s ease forwards;
}
.video-anchor.video-floating #floatingVideoHeader {
    display: flex;
    position: fixed;
    bottom: calc(80px + 180px);
    right: 20px;
    width: 320px;
    z-index: 10000;
    border-radius: 12px 12px 0 0;
    background: #1a1a2e;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.4);
    animation: videoFloatIn 0.3s ease forwards;
}
@keyframes videoFloatIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header partagé */
.floating-video-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0,0,0,0.35);
}
.floating-video-title {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.9;
}
.floating-video-close {
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: background 0.2s;
    flex-shrink: 0;
}
.floating-video-close:hover { background: rgba(210,16,52,0.85); }

@media (max-width: 480px) {
    .video-anchor.video-floating .video-container {
        width: 260px; height: 146px !important; bottom: 65px; right: 10px;
    }
    .video-anchor.video-floating #floatingVideoHeader {
        width: 260px; bottom: calc(65px + 146px); right: 10px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PLATFORM HUB — Centre de Commandement du Numérique Algérien
═══════════════════════════════════════════════════════════════ */

.platform-hub {
    background: linear-gradient(145deg, #060d18 0%, #0b1a0b 45%, #09121e 100%);
    padding: 52px 0 48px;
    position: relative;
    overflow: hidden;
}

.platform-hub::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 60% at 15% 25%, rgba(0,98,51,0.2) 0%, transparent 60%),
        radial-gradient(ellipse 45% 55% at 85% 75%, rgba(210,16,52,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 35% 40% at 55% 5%,  rgba(21,101,192,0.12) 0%, transparent 55%);
    pointer-events: none;
}

.platform-hub::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0,98,51,0.6) 30%, rgba(210,16,52,0.4) 70%, transparent 100%);
}

.hub-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.hub-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.28);
    color: #22c55e;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hub-live-pulse {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: hubLivePulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes hubLivePulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px #22c55e; }
    50%       { opacity: 0.45; transform: scale(0.7); box-shadow: 0 0 3px #22c55e; }
}

.hub-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hub-title span {
    background: linear-gradient(90deg, #00a854, #006233);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hub-subtitle {
    color: rgba(255,255,255,0.38);
    font-size: 0.88rem;
    font-weight: 400;
}

.hub-pulse-strip {
    display: flex;
    align-items: center;
    gap: 22px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 14px;
    padding: 16px 26px;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
}

.hub-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.hub-stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.hub-stat-label {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.hub-stat-sep {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.hub-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 22px 18px 18px;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.4,0,0.2,1),
                box-shadow 0.22s cubic-bezier(0.4,0,0.2,1),
                border-color 0.22s,
                background 0.22s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
    opacity: 0;
    animation: hubCardIn 0.45s ease both;
}

.hub-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--hc-color, #006233);
    border-radius: 16px 16px 0 0;
    transition: height 0.2s;
}

.hub-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--hc-glow, rgba(0,98,51,0.12)) 0%, transparent 65%);
    opacity: 0;
    transition: opacity 0.22s;
    border-radius: 16px;
    pointer-events: none;
}

.hub-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.07);
    box-shadow: 0 20px 50px rgba(0,0,0,0.45), 0 0 28px var(--hc-glow, rgba(0,98,51,0.15));
}

.hub-card:hover::before { height: 4px; }
.hub-card:hover::after  { opacity: 1; }

.hub-card:nth-child(1)  { animation-delay: 0.05s; }
.hub-card:nth-child(2)  { animation-delay: 0.10s; }
.hub-card:nth-child(3)  { animation-delay: 0.15s; }
.hub-card:nth-child(4)  { animation-delay: 0.20s; }
.hub-card:nth-child(5)  { animation-delay: 0.25s; }
.hub-card:nth-child(6)  { animation-delay: 0.30s; }
.hub-card:nth-child(7)  { animation-delay: 0.35s; }
.hub-card:nth-child(8)  { animation-delay: 0.40s; }
.hub-card:nth-child(9)  { animation-delay: 0.45s; }
.hub-card:nth-child(10) { animation-delay: 0.50s; }

@keyframes hubCardIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hub-card-icon {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.07);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 14px;
    color: var(--hc-color);
    position: relative;
    z-index: 1;
    transition: background 0.2s, transform 0.2s;
}

.hub-card:hover .hub-card-icon {
    background: rgba(255,255,255,0.12);
    transform: scale(1.08);
}

.hub-card-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.hub-card-desc {
    font-size: 0.71rem;
    color: rgba(255,255,255,0.36);
    line-height: 1.45;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.hub-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
    min-height: 22px;
}

.hub-card-count {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--hc-color);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.hub-card-unit {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.hub-dot-live {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 7px #22c55e;
    animation: hubLivePulse 1.8s ease-in-out infinite;
    margin-left: auto;
    flex-shrink: 0;
}

.hub-news-toggle {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hub-news-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.11);
    color: rgba(255,255,255,0.5);
    padding: 11px 28px;
    border-radius: 28px;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.hub-news-btn:hover {
    background: rgba(255,255,255,0.09);
    color: #fff;
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.qn-link.qn-hub {
    background: linear-gradient(135deg, rgba(0,98,51,0.25), rgba(0,98,51,0.1));
    border-color: rgba(0,98,51,0.4);
    color: #4ade80;
    font-weight: 600;
}

.mobile-nav-section-label {
    padding: 14px 24px 6px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    list-style: none;
    pointer-events: none;
    border-top: 1px solid rgba(255,255,255,0.07);
    margin-top: 6px;
}

.mobile-nav-section-label:first-of-type { border-top: none; margin-top: 0; }

@media (max-width: 1200px) { .hub-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 960px) {
    .hub-grid { grid-template-columns: repeat(3, 1fr); }
    .hub-header { flex-direction: column; align-items: flex-start; }
    .hub-pulse-strip { width: 100%; justify-content: space-around; }
    .hub-title { font-size: 1.6rem; }
}
@media (max-width: 640px) {
    .hub-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .platform-hub { padding: 36px 0 32px; }
    .hub-pulse-strip { gap: 12px; padding: 12px 16px; }
    .hub-stat-sep { display: none; }
    .hub-stat-num { font-size: 1.2rem; }
    .hub-title { font-size: 1.35rem; }
}

body.dark-mode .platform-hub {
    background: linear-gradient(145deg, #030810 0%, #060f06 45%, #04090f 100%);
}

/* ═══════════════════════════════════════════════════════════════
   HUB — Mega Menu & Nav Intelligence inline
═══════════════════════════════════════════════════════════════ */

/* ── Bouton Hub : badge vert distinctif ── */
.nav-hub-trigger {
    background: var(--primary) !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 5px 13px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: background 0.2s, box-shadow 0.2s !important;
}
.nav-hub-trigger:hover {
    background: var(--primary-dark) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(0,98,51,0.35) !important;
}
.nav-hub-trigger i:first-child { font-size: 0.8rem; }

/* ── Hub Mega Menu ── */
.hub-mega-menu {
    left: 0 !important;
    transform: none !important;
    min-width: 500px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 14px !important;
}

/* Masque le triangle générique pour le Hub (header vert) */
.hub-mega-menu::before { display: none !important; }

.hub-mega-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 14px 14px 0 0;
}

.hub-mega-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 7px;
}

.hub-mega-count {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}

.hub-mega-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 10px;
    background: var(--bg-white);
    border-radius: 0 0 14px 14px;
}

.hub-mega-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    border: 1px solid transparent;
}

.hub-mega-item:hover {
    background: var(--bg);
    border-color: var(--border);
    transform: translateY(-1px);
}

.hmi-icon {
    width: 34px; height: 34px;
    border-radius: 9px;
    background: rgba(167,139,250,0.1);
    background: color-mix(in srgb, var(--hmi-c, #a78bfa) 12%, transparent);
    color: var(--hmi-c, #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.hub-mega-item:hover .hmi-icon { transform: scale(1.1); }

.hmi-text strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 2px;
}
.hmi-text span {
    font-size: 0.67rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Dark mode Hub */
body.dark-mode .hub-mega-grid { background: var(--bg-white); }
body.dark-mode .hub-mega-item:hover { background: rgba(255,255,255,0.04); }

/* ── Items Intelligence inline (même ligne) ── */
.nav-intel-inline a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 0.82rem !important;
    color: var(--text-dark) !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    transition: background 0.15s, color 0.15s !important;
}
.nav-intel-inline a:hover {
    background: rgba(34,197,94,0.08) !important;
    color: #16a34a !important;
}
body.dark-mode .nav-intel-inline a:hover { color: #4ade80 !important; }

/* ── Live dot (Veille / Réseaux) ── */
.nav-live-dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: hubLivePulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}

/* ── Séparateur vertical entre platform et catégories ── */
.nav-sep {
    width: 1px !important;
    height: 18px !important;
    background: var(--border) !important;
    margin: 0 6px !important;
    pointer-events: none !important;
    align-self: center !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
}

/* Réduit légèrement la taille des items nav pour tout faire tenir */
.main-nav ul li a {
    font-size: 0.84rem;
}

/* Mega dropdown container */
li.mega-dropdown { position: relative; }

.mega-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 580px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.14), 0 0 0 1px rgba(0,0,0,0.04);
    padding: 20px;
    display: none;
    z-index: 1100;
}

/* Petit triangle au-dessus */
.mega-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px; height: 12px;
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
    border-radius: 2px;
    rotate: 45deg;
}

.mega-dropdown:hover .mega-menu { display: block; }

.mega-menu-heading {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.mega-menu-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.mega-menu-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, transform 0.18s;
    border: 1px solid transparent;
}

.mega-menu-card:hover {
    background: var(--bg);
    border-color: var(--border);
    transform: translateY(-2px);
}

.mm-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.mm-icon--blue  { background: rgba(74,158,255,0.12);  color: #4a9eff; }
.mm-icon--green { background: rgba(74,222,128,0.12);  color: #4ade80; }
.mm-icon--red   { background: rgba(251,113,133,0.12); color: #fb7185; }

.mm-content strong {
    display: block;
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
    line-height: 1.3;
}

.mm-content p {
    font-size: 0.71rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 8px;
}

.mm-live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.62rem;
    font-weight: 700;
    color: #22c55e;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* Dark mode mega menu */
body.dark-mode .mega-menu {
    border-color: var(--border);
    box-shadow: 0 24px 64px rgba(0,0,0,0.45);
}
body.dark-mode .mega-menu::before {
    background: var(--bg-white);
    border-color: var(--border);
}
body.dark-mode .mega-menu-card:hover { background: rgba(255,255,255,0.04); }

/* ═══════════════════════════════════════════════════════════════
   PLATFORM SERVICES BAR — Barre de services niveau 2
═══════════════════════════════════════════════════════════════ */

.platform-services-bar {
    background: #0b1628;
    border-bottom: 1px solid rgba(0,98,51,0.22);
    overflow-x: auto;
    scrollbar-width: none;
}
.platform-services-bar::-webkit-scrollbar { display: none; }

.psb-container {
    display: flex;
    align-items: center;
    height: 46px;
    gap: 0;
    min-width: max-content;
    padding: 0 16px;
}

/* Override container padding from global styles */
.platform-services-bar .container.psb-container {
    max-width: 100%;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
}

.psb-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    padding-right: 14px;
    border-right: 1px solid rgba(255,255,255,0.08);
    margin-right: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}
.psb-label i { color: #4ade80; font-size: 0.65rem; }

.psb-tools {
    display: flex;
    align-items: center;
    gap: 5px;
}

.psb-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border-radius: 22px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    color: rgba(255,255,255,0.58);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
    line-height: 1;
}
.psb-tool i { font-size: 0.72rem; }

.psb-tool:hover {
    background: rgba(0,98,51,0.22);
    border-color: rgba(0,168,84,0.38);
    color: #4ade80;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,98,51,0.22);
}

.psb-tool.psb-active {
    background: rgba(0,98,51,0.25);
    border-color: rgba(0,168,84,0.45);
    color: #4ade80;
}

.psb-live {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.66rem;
    color: rgba(255,255,255,0.28);
    padding-left: 14px;
    border-left: 1px solid rgba(255,255,255,0.08);
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Responsive : masquer la barre sur très petit écran (accessible via hamburger) */
@media (max-width: 640px) {
    .psb-label { display: none; }
    .psb-live  { display: none; }
    .psb-tool span { display: none; }
    .psb-tool { padding: 6px 10px; border-radius: 50%; }
    .psb-tool i { font-size: 0.85rem; }
}

/* ══════════════════════════════════════════════════════════════════
   ★ REFONTE HEADER 2026 — Glassmorphism · 2 lignes · colonne utilitaire
   Senior Creative Front-end — surcharge les règles header antérieures
   (l'ordre de source garantit la priorité)
══════════════════════════════════════════════════════════════════ */

/* ── 1. Conteneur header : verre dépoli + sticky + transition fluide ── */
/* Le header est TOUJOURS LTR, quelle que soit la langue active */
header, header * { direction: ltr !important; }
header .at-search-input,
header input { text-align: left !important; }

.header {
    background: color-mix(in srgb, var(--bg-white) 80%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(165%);
    backdrop-filter: blur(20px) saturate(165%);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
    box-shadow: 0 2px 16px rgba(0,0,0,.05);
    transition: box-shadow .35s ease, background .35s ease, padding .35s ease;
}
/* Filet néon discret sous le header (vert → rouge Algérie) */
.header::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 55%, transparent) 35%, color-mix(in srgb, var(--secondary) 45%, transparent) 65%, transparent);
    opacity: .55;
    pointer-events: none;
}
body.dark-mode .header {
    background: color-mix(in srgb, var(--bg-white) 74%, transparent);
    border-bottom-color: rgba(255,255,255,.07);
    box-shadow: 0 2px 18px rgba(0,0,0,.35);
}

/* ── 2. Grille principale : Logo | Pile nav (2 lignes) | Utilitaires ── */
.header-content.at-grid {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 36px;
    padding: 6px 0;
    flex-wrap: nowrap;
    transition: padding .35s cubic-bezier(.4,0,.2,1);
}

/* ── 3. Logo (sa taille pilote l'effet de réduction au scroll) ── */
.at-logo { margin: 0; align-self: center; }
.at-logo .logo-img {
    height: 52px; width: 52px;
    transition: height .35s cubic-bezier(.4,0,.2,1), width .35s cubic-bezier(.4,0,.2,1), transform .25s ease;
}
.at-logo .logo-img:hover { transform: scale(2); }
.at-logo .logo-text h1, .at-logo .logo-text .logo-name { font-size: 1.32rem; }

/* ── 4. Pile de navigation (2 lignes empilées, centrées verticalement) ── */
.at-nav-stack {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    min-width: 0;
}

/* ── 4a. LIGNE 1 — Navigation principale : typo élégante + soulignement néon ── */
.at-mainnav > ul { display: flex; align-items: center; gap: 2px; list-style: none; flex-wrap: nowrap; }
.at-mainnav ul li a,
.at-mainnav a {
    position: relative;
    display: inline-block;
    padding: 7px 13px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: .15px;
    color: var(--text-dark);
    background: transparent;
    border-radius: 9px;
    white-space: nowrap;
    transition: color .22s ease, background .22s ease;
}
.at-mainnav a::after {
    content: '';
    position: absolute;
    left: 13px; right: 13px; bottom: 3px;
    height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    box-shadow: 0 0 8px rgba(0,98,51,.55);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.at-mainnav a:hover,
.at-mainnav a.active { color: var(--primary); background: rgba(0,98,51,.06); }
.at-mainnav a:hover::after,
.at-mainnav a.active::after { transform: scaleX(1); }
body.dark-mode .at-mainnav a:hover,
body.dark-mode .at-mainnav a.active { color: #4ade80; background: rgba(74,222,128,.10); }

/* ── 4b. LIGNE 2 — Le Hub : badges alignés + défilement horizontal masqué ── */
.at-hub { display: flex; align-items: center; gap: 8px; min-width: 0; max-height: 40px; overflow: hidden; transition: max-height .35s ease, opacity .3s ease, margin .35s ease; }
.at-hub-track {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent 100%);
}
.at-hub-track::-webkit-scrollbar { display: none; }
.at-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.735rem;
    font-weight: 600;
    letter-spacing: .1px;
    color: var(--text-muted);
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
    background: color-mix(in srgb, var(--bg-white) 55%, transparent);
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.at-badge i { font-size: 0.7rem; opacity: .72; }
.at-badge:hover {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
    background: rgba(0,98,51,.07);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,98,51,.13);
}
.at-badge:hover i { opacity: 1; }
.at-badge.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(0,98,51,.3);
}
.at-badge.active i { opacity: 1; }
.at-badge-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #22c55e; box-shadow: 0 0 6px #22c55e;
    animation: hubLivePulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes hubLivePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.35); opacity: .55; }
}
body.dark-mode .at-badge { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.10); }
body.dark-mode .at-badge:hover { color: #4ade80; background: rgba(74,222,128,.10); border-color: rgba(74,222,128,.4); }

/* ── 4c. Outils phares : puce de marque (icône colorée + halo au survol) ── */
.at-badge--tool {
    color: var(--text-dark);
    background: var(--bg-white);
    border-color: color-mix(in srgb, var(--border) 70%, transparent);
}
.at-badge--tool i { color: var(--chip, var(--primary)); opacity: 1; }
.at-badge--tool:hover {
    color: var(--chip, var(--primary));
    border-color: color-mix(in srgb, var(--chip, var(--primary)) 55%, var(--border));
    background: color-mix(in srgb, var(--chip, var(--primary)) 11%, transparent);
    box-shadow: 0 4px 13px color-mix(in srgb, var(--chip, var(--primary)) 30%, transparent);
}
.at-badge--tool:hover i { color: var(--chip, var(--primary)); }
.at-badge--tool.active,
.at-badge--tool.active i { color: #fff; }
body.dark-mode .at-badge--tool {
    color: #e2e8f0;
    background: rgba(255,255,255,.05);
    border-color: rgba(255,255,255,.10);
}
body.dark-mode .at-badge--tool:hover {
    color: color-mix(in srgb, var(--chip, #4ade80) 72%, #fff);
    background: color-mix(in srgb, var(--chip, #4ade80) 17%, transparent);
    border-color: color-mix(in srgb, var(--chip, #4ade80) 55%, transparent);
}

/* Séparateur de groupes dans le hub (outils ↔ Explorer) */
.at-hub-sep {
    width: 1px;
    height: 17px;
    flex-shrink: 0;
    margin: 0 5px;
    background: color-mix(in srgb, var(--border) 80%, transparent);
}
body.dark-mode .at-hub-sep { background: rgba(255,255,255,.12); }

/* ── 4d. Bouton « Explorer » : déclencheur du menu déroulant ── */
.at-badge--explore {
    position: relative;
    font-family: inherit;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    border-color: color-mix(in srgb, var(--primary) 32%, var(--border));
}
.at-badge--explore i { color: var(--primary); opacity: 1; }
.at-badge--explore .at-explore-caret { font-size: 0.6rem; opacity: .75; transition: transform .25s ease; }
.at-badge--explore:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: transparent;
    box-shadow: 0 4px 13px rgba(0,98,51,.28);
}
.at-badge--explore:hover i { color: #fff; }
.at-badge--explore[aria-expanded="true"] {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(0,98,51,.3);
}
.at-badge--explore[aria-expanded="true"] i { color: #fff; }
.at-badge--explore[aria-expanded="true"] .at-explore-caret { transform: rotate(180deg); }
/* Pastille « du frais à l'intérieur » (Veille + Réseaux sont live) */
.at-explore-live {
    position: absolute; top: -2px; right: -2px;
    width: 7px; height: 7px; border-radius: 50%;
    background: #22c55e; box-shadow: 0 0 6px #22c55e;
    animation: hubLivePulse 1.8s ease-in-out infinite;
}
body.dark-mode .at-badge--explore {
    color: #4ade80;
    background: rgba(74,222,128,.10);
    border-color: rgba(74,222,128,.32);
}
body.dark-mode .at-badge--explore i { color: #4ade80; }

/* ── 4e. Panneau « Explorer » (flottant, positionné en JS) ── */
.at-explore-menu {
    position: fixed;
    top: 0; left: 0;
    display: none;
    min-width: 212px;
    padding: 6px;
    background: var(--bg-white);
    border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
    border-radius: 13px;
    box-shadow: 0 14px 36px rgba(0,0,0,.16);
    z-index: 2000;
}
.at-explore-menu.open { display: block; animation: atExploreIn .18s cubic-bezier(.4,0,.2,1); }
@keyframes atExploreIn { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }
.at-explore-menu a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.at-explore-menu a i { width: 17px; text-align: center; font-size: 0.85rem; color: var(--chip, var(--text-muted)); }
.at-explore-menu a:hover { background: color-mix(in srgb, var(--primary) 9%, transparent); color: var(--primary); }
.at-explore-menu .at-mini-dot {
    margin-left: auto;
    width: 7px; height: 7px; border-radius: 50%;
    background: #22c55e; box-shadow: 0 0 6px #22c55e;
    animation: hubLivePulse 1.8s ease-in-out infinite;
}
.at-explore-sep { height: 1px; margin: 5px 8px; background: color-mix(in srgb, var(--border) 80%, transparent); }
body.dark-mode .at-explore-menu { background: #1e2535; border-color: rgba(255,255,255,.10); box-shadow: 0 14px 36px rgba(0,0,0,.5); }
body.dark-mode .at-explore-menu a { color: #e2e8f0; }
body.dark-mode .at-explore-menu a:hover { background: rgba(74,222,128,.12); color: #4ade80; }
body.dark-mode .at-explore-sep { background: rgba(255,255,255,.12); }
html.ar .at-explore-menu a { flex-direction: row-reverse; }
html.ar .at-explore-menu .at-mini-dot { margin-left: 0; margin-right: auto; }

/* ── 5. Bloc utilitaires — colonne verticale compacte (verre dépoli) ── */
.header-actions.at-utils {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    align-self: center;
    flex-shrink: 0;
}
.at-util-btn {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
    background: color-mix(in srgb, var(--bg-white) 55%, transparent);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.88rem;
    padding: 0;
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.at-util-btn:hover {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
    background: rgba(0,98,51,.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,98,51,.16);
}
body.dark-mode .at-util-btn { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.04); }
body.dark-mode .at-util-btn:hover { color: #4ade80; background: rgba(74,222,128,.10); border-color: rgba(74,222,128,.4); }

/* 5a. Switch nuit/jour — bascule d'icône lune ↔ soleil */
.at-i-sun { display: none; }
body.dark-mode .theme-toggle .at-i-moon { display: none; }
body.dark-mode .theme-toggle .at-i-sun  { display: inline-block; color: #fbbf24; }
.theme-toggle.at-util-btn { font-size: 0.92rem; }

/* 5b. Sélecteur de langue — pilule fine intégrée à la colonne */
.at-utils .lang-toggle { height: 26px; padding: 0 9px; border-radius: 999px; font-size: 0.73rem; background: color-mix(in srgb, var(--bg-white) 55%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* 5c. Recherche — la loupe déploie un champ flottant vers la gauche */
.at-search { position: relative; width: 26px; height: 26px; flex-shrink: 0; }
.at-search-btn { position: relative; z-index: 2; }
.at-search-input {
    position: absolute;
    top: 50%;
    right: 36px;
    transform: translateY(-50%);
    width: 0;
    opacity: 0;
    padding: 0;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    pointer-events: none;
    transition: width .35s cubic-bezier(.4,0,.2,1), opacity .25s ease, padding .35s cubic-bezier(.4,0,.2,1);
}
.at-search.open .at-search-input { width: 220px; opacity: 1; padding: 0 16px; pointer-events: auto; }
.at-search.open .at-search-btn {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,98,51,.3);
}
body.dark-mode .at-search-input { background: var(--bg-white); border-color: var(--border); }

/* ── 6. Hamburger : masqué desktop, conserve l'existant en mobile ── */
.at-hamburger { display: none; }

/* ── 7. État réduit au scroll (sticky shrink fluide) ── */
.header.at-scrolled { box-shadow: 0 6px 26px rgba(0,0,0,.10); background: color-mix(in srgb, var(--bg-white) 88%, transparent); }
body.dark-mode .header.at-scrolled { background: color-mix(in srgb, var(--bg-white) 86%, transparent); box-shadow: 0 6px 26px rgba(0,0,0,.45); }
.at-scrolled .header-content.at-grid { padding: 5px 0; }
.at-scrolled .at-logo .logo-img { height: 40px; width: 40px; }
.at-scrolled .at-logo .logo-text p { opacity: 0; height: 0; overflow: hidden; }
.at-scrolled .at-hub { max-height: 0; opacity: 0; margin-top: -7px; pointer-events: none; }
/* Colonne utilitaire → ligne horizontale en mode réduit (libère la compaction) */
.at-scrolled .header-actions.at-utils { flex-direction: row; gap: 9px; }

/* ── 8. RTL — header entièrement figé LTR via header { direction:ltr !important } ── */

/* ── 9. Responsive ── */
@media (max-width: 1024px) {
    .header-content.at-grid { grid-template-columns: auto 1fr auto; column-gap: 10px; }
    .at-nav-stack { display: none; }
    .header-actions.at-utils { flex-direction: row; gap: 8px; }
    .at-hamburger { display: flex; }
    .at-search { display: none; }
}
@media (max-width: 768px) {
    .header-content.at-grid { padding: 8px 0; }
    .at-utils .theme-toggle { display: none; }
    .at-logo .logo-img { height: 50px; width: 50px; }
    .at-logo .logo-text h1, .at-logo .logo-text .logo-name { font-size: 1.15rem; }
}

/* ── « À retenir » : l'essentiel de l'article, avant le corps du texte ── */
.at-retenir {
  margin: 22px 0 28px;
  padding: 20px 24px;
  background: var(--bg-light, #f6f8fc);
  border: 1px solid var(--border, #e3e8f0);
  border-left: 5px solid var(--secondary, #d21034);
  border-radius: 14px;
}
.at-retenir-title {
  display: flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 800; letter-spacing: .6px;
  text-transform: uppercase; color: var(--text-muted, #64748b);
  margin-bottom: 12px;
}
.at-retenir-title i { color: var(--secondary, #d21034); }
.at-retenir ul { margin: 0; padding-left: 20px; }
.at-retenir li {
  font-size: .97rem; line-height: 1.65; color: var(--text-dark, #1e2f3f);
  margin-bottom: 9px;
}
.at-retenir li:last-child { margin-bottom: 0; }
.at-retenir li::marker { color: var(--secondary, #d21034); }
@media (max-width: 600px) { .at-retenir { padding: 16px 18px; } }

/* ── Signalétique « version interactive » sur la vignette d'article ──────
   Le lecteur doit voir, dès la liste, qu'un article a son rendu interactif.
   Le badge suit le coin opposé à l'étiquette de catégorie. */
.at-badge-interactif {
    position: absolute; bottom: 10px; right: 10px; z-index: 3;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px; border-radius: 999px;
    font-size: .68rem; font-weight: 700; letter-spacing: .04em;
    color: #fff; pointer-events: none; white-space: nowrap;
    background: linear-gradient(135deg, #006233 0%, #0a8a4a 100%);
    border: 1px solid rgba(255, 255, 255, .28);
    box-shadow: 0 4px 12px rgba(0, 98, 51, .38);
}
.at-badge-interactif i { font-size: .7rem; }
@media (max-width: 600px) {
    .at-badge-interactif { bottom: 8px; right: 8px; padding: 4px 9px; font-size: .62rem; }
}

/* Renvoi vers la version interactive quand des visuels ont été écartés
   de l'article (ils ne vivent que dans le fichier .html). */
.at-visuels-note {
    margin: 22px 0 6px; padding: 12px 16px;
    border-left: 3px solid var(--primary, #006233);
    background: var(--bg-light, rgba(0, 98, 51, .06));
    border-radius: 0 10px 10px 0;
    font-size: .9rem; color: var(--text-muted, #555);
}
.at-visuels-note i { color: var(--primary, #006233); margin-right: 7px; }

/* Un tableau de données ne doit jamais élargir la page sur mobile :
   il défile dans son propre cadre. */
.article-text .at-data { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.article-text .at-data table { min-width: 100%; }

/* -- Lot 4 : accessibilite -- */
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media (pointer: coarse){
  .mobile-menu-close,.premium-speed-btn,.tag-filter,.fw-btn,.footer-social a{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  .wc-wil-num,.wc-day-name,.cc-badge,.at-badge-interactif,.hero-meta-tag{font-size:max(.75rem,12px)}
}
#at-wa-widget{display:none!important}


/* ═══ Typographie des articles — « Compact » (choix de l'éditeur, 21/10/2026) ═══════════════════════════
   PC : texte 16 px, interligne 1,5, 8 px entre paragraphes. Smartphone (≤ 640 px) : idem avec 10 px.
   Avant : 17,6 px, interligne 1,8, 20 px entre paragraphes + lignes vides parasites (white-space: pre-wrap).
   Le réglage « Interligne » du panneau de personnalisation (⚙️) reste prioritaire quand le lecteur l'active. */
.article-text { white-space: normal; }
.article-text pre { white-space: pre-wrap; }
.article-body { padding: 28px 28px 24px; }
.article-body p, .article-text p { font-size: 1rem; line-height: 1.5; margin: 0 0 8px; }
.article-body h2 { font-size: 1.19rem; line-height: 1.3; margin: 16px 0 6px; }
.article-body h3 { font-size: 1.05rem; line-height: 1.3; margin: 14px 0 5px; }
.article-text ul, .article-text ol { margin: 0 0 8px; padding-left: 1.3em; }
.article-text li { margin: 0 0 3px; line-height: 1.5; }
.article-text table { margin: 10px 0; }
.article-text th, .article-text td { padding: 7px 10px; }
.article-text img { margin: 14px auto; }
@media (max-width: 640px) {
    .article-body { padding: 16px 12px 20px; }
    .article-body p, .article-text p { margin-bottom: 10px; }
    .article-text ul, .article-text ol { margin-bottom: 10px; }
}
