/* ================================================================
   EXPRESS MÉDIAS — DESIGN SYSTEM COMPLET v3.0
   Inspiré de : Le Monde, The Guardian, BBC, Al Jazeera
   Mode clair par défaut, sombre en option
   ================================================================ */

/* 1. GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,700&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* 2. VARIABLES */
:root {
  /* Couleurs identité */
  --em-blue:       #1b4381;
  --em-blue-light: #0e8cc6;
  --em-red:        #e8002d;
  --em-dark:       #0d1117;
  --em-text:       #1a1a2e;
  --em-muted:      #64748b;
  --em-border:     #e2e8f0;
  --em-bg:         #f8fafc;
  --em-white:      #ffffff;

  /* Typographie */
  --em-font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --em-font-display: 'Playfair Display', Georgia, serif;

  /* Espacements */
  --em-container: 1320px;
  --em-radius:    8px;
  --em-radius-lg: 14px;

  /* Transitions */
  --em-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Ombres */
  --em-shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --em-shadow:    0 4px 12px rgba(0,0,0,.08);
  --em-shadow-lg: 0 10px 30px rgba(0,0,0,.12);
}

[data-theme="dark"] {
  --em-dark:    #f0f4f8;
  --em-text:    #e2e8f0;
  --em-muted:   #94a3b8;
  --em-border:  #2d3748;
  --em-bg:      #0d1117;
  --em-white:   #161b22;
  --em-shadow:  0 4px 12px rgba(0,0,0,.3);
}

/* 3. RESET GLOBAL — Neutralise Bootstrap sans casser la grille */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--em-font-body) !important;
  font-size: 16px;
  line-height: 1.65;
  color: var(--em-text) !important;
  background: var(--em-bg) !important;
  margin: 0;
  padding: 0;
  transition: background 0.3s, color 0.3s;
}

img { max-width: 100%; height: auto; }

a { text-decoration: none; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--em-font-display) !important;
  color: var(--em-text) !important;
  line-height: 1.2;
  margin: 0;
}

/* ================================================================
   4. LAYOUT UTILITAIRE
   ================================================================ */
.em-container {
  max-width: var(--em-container);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) { .em-container { padding: 0 16px; } }

/* ================================================================
   5. BANNIÈRE PUBLICITAIRE
   ================================================================ */
.em-pub-banner {
  width: 100%;
  max-height: 130px !important;
  overflow: hidden !important;
  background: #f1f3f5;
  border-bottom: 1px solid var(--em-border);
}

.em-pub-banner .carousel,
.em-pub-banner .carousel-inner,
.em-pub-banner .carousel-item {
  max-height: 130px !important;
}

.em-pub-banner img {
  width: 100% !important;
  max-height: 130px !important;
  object-fit: cover !important;
  object-position: center top !important;
  display: block !important;
}

.em-pub-banner .carousel-indicators,
.em-pub-banner .carousel-control-prev,
.em-pub-banner .carousel-control-next { display: none !important; }

/* ================================================================
   6. TOPBAR
   ================================================================ */
.em-topbar {
  background: var(--em-blue) !important;
  border-bottom: 2px solid var(--em-blue-light);
  padding: 6px 0;
  font-family: var(--em-font-body);
  width: 100%;
  display: block;
}

.em-topbar__inner {
  max-width: var(--em-container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.em-topbar__date {
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.em-topbar__socials {
  display: flex;
  align-items: center;
  gap: 6px;
}

.em-topbar__socials a {
  color: rgba(255,255,255,0.85) !important;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  text-decoration: none !important;
  transition: var(--em-transition);
}

.em-topbar__socials a:hover {
  color: #fff !important;
  background: var(--em-blue-light);
  transform: translateY(-1px);
}

/* ================================================================
   7. HEADER PRINCIPAL
   ================================================================ */
.em-header {
  background: var(--em-white) !important;
  border-bottom: 1px solid var(--em-border);
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  box-shadow: var(--em-shadow-sm);
  transition: box-shadow 0.3s;
  width: 100%;
}

.em-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.em-header__inner {
  max-width: var(--em-container);
  margin: 0 auto;
  padding: 12px 24px;
  display: grid !important;
  grid-template-columns: 160px 1fr 220px;
  align-items: center;
  gap: 20px;
}

@media (max-width: 1024px) {
  .em-header__inner {
    grid-template-columns: auto 1fr auto;
    padding: 10px 16px;
    gap: 12px;
  }
}

/* Menu button */
.em-menu-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  background: transparent !important;
  border: 1.5px solid var(--em-border) !important;
  border-radius: 10px !important;
  padding: 8px 16px !important;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--em-text) !important;
  font-family: var(--em-font-body);
  transition: var(--em-transition);
  white-space: nowrap;
}

.em-menu-btn:hover {
  border-color: var(--em-blue) !important;
  color: var(--em-blue) !important;
  background: rgba(27,67,129,0.06) !important;
}

.em-menu-btn .bi { font-size: 16px; }

/* Logo */
.em-header__logo {
  display: flex !important;
  justify-content: center;
  align-items: center;
}

.em-header__logo img {
  height: 52px !important;
  width: auto !important;
  display: block;
}

/* Actions (search + toggle) */
.em-header__actions {
  display: flex !important;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

/* Search */
.em-search-wrap { position: relative; }

.em-search-input {
  background: #f1f5f9 !important;
  border: 1.5px solid var(--em-border) !important;
  border-radius: 50px !important;
  padding: 8px 18px 8px 40px !important;
  font-size: 14px;
  font-family: var(--em-font-body);
  width: 210px;
  color: var(--em-text) !important;
  outline: none !important;
  transition: var(--em-transition);
}

.em-search-input::placeholder { color: var(--em-muted); }

.em-search-input:focus {
  border-color: var(--em-blue-light) !important;
  background: var(--em-white) !important;
  width: 260px;
  box-shadow: 0 0 0 3px rgba(14,140,198,0.15) !important;
}

.em-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--em-muted);
  pointer-events: none;
  font-size: 14px;
}

.em-search-btn-mobile {
  display: none !important;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1.5px solid var(--em-border);
  color: var(--em-text);
  font-size: 15px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--em-transition);
}

@media (max-width: 767px) {
  .em-search-input { display: none !important; }
  .em-search-btn-mobile { display: inline-flex !important; }
}

/* Dark mode toggle */
.em-darkmode-toggle {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: #f1f5f9 !important;
  border: 1.5px solid var(--em-border) !important;
  color: var(--em-text) !important;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  transition: var(--em-transition);
  flex-shrink: 0;
}

.em-darkmode-toggle:hover {
  background: var(--em-blue) !important;
  border-color: var(--em-blue) !important;
  color: #fff !important;
  transform: rotate(15deg);
}

/* ================================================================
   8. BARRE DE NAVIGATION CATÉGORIES
   ================================================================ */
.em-navbar {
  background: var(--em-white) !important;
  border-bottom: 3px solid var(--em-blue);
  width: 100%;
  position: sticky !important;
  top: 77px !important;
  z-index: 999 !important;
}

.em-navbar__inner {
  max-width: var(--em-container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex !important;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
}

.em-navbar__inner::-webkit-scrollbar { display: none; }

.em-nav-item {
  display: inline-flex !important;
  align-items: center;
  padding: 13px 14px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--em-font-body);
  color: var(--em-muted) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  text-decoration: none !important;
  transition: var(--em-transition);
}

.em-nav-item:hover {
  color: var(--em-blue) !important;
  border-bottom-color: var(--em-blue);
}

.em-nav-item.active {
  color: var(--em-blue) !important;
  border-bottom-color: var(--em-blue);
}

.em-nav-item--aune {
  color: var(--em-red) !important;
  font-weight: 800;
}

.em-nav-item--aune:hover {
  color: var(--em-red) !important;
  border-bottom-color: var(--em-red);
}

/* ================================================================
   9. TICKER — BREAKING NEWS
   ================================================================ */
.em-ticker {
  background: var(--em-white) !important;
  border-bottom: 1px solid var(--em-border);
  display: flex !important;
  align-items: center;
  height: 40px;
  overflow: hidden;
  width: 100%;
}

.em-ticker__label {
  background: var(--em-red) !important;
  color: #fff !important;
  font-size: 10px;
  font-weight: 900;
  font-family: var(--em-font-body);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 0 16px;
  height: 100%;
  display: flex !important;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  animation: pulse-dot 1.4s ease infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.em-ticker__track {
  overflow: hidden;
  flex: 1;
}

.em-ticker__items {
  display: inline-flex;
  animation: em-ticker-scroll 40s linear infinite;
  white-space: nowrap;
}

.em-ticker__items:hover { animation-play-state: paused; }

@keyframes em-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.em-ticker__item {
  font-size: 13px;
  font-weight: 500;
  font-family: var(--em-font-body);
  color: var(--em-text) !important;
  padding: 0 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.em-ticker__item::before {
  content: "▸";
  color: var(--em-blue-light);
  font-size: 10px;
  flex-shrink: 0;
}

/* ================================================================
   10. HERO SECTION — Style magazine premium
   ================================================================ */
.em-hero {
  max-width: var(--em-container);
  margin: 24px auto;
  padding: 0 24px;
}

.em-hero__grid {
  display: grid !important;
  grid-template-columns: 3fr 2fr;
  gap: 3px;
  border-radius: var(--em-radius-lg);
  overflow: hidden;
  height: 520px;
  box-shadow: var(--em-shadow-lg);
}

@media (max-width: 991px) {
  .em-hero__grid { grid-template-columns: 1fr; height: auto; }
}

/* Article principal */
.em-hero__main {
  position: relative;
  overflow: hidden;
  display: block;
  height: 100%;
  cursor: pointer;
}

.em-hero__main > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.em-hero__main:hover > img { transform: scale(1.04); }

.em-hero__main-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.25) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
}

.em-hero__main-cat {
  display: inline-block;
  background: var(--em-blue-light);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  font-family: var(--em-font-body);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  width: fit-content;
}

.em-hero__main-title {
  font-family: var(--em-font-display) !important;
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 700;
  color: #fff !important;
  line-height: 1.2;
  margin-bottom: 12px;
  text-decoration: none !important;
  display: block;
}

.em-hero__main-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  font-family: var(--em-font-body);
}

.em-hero__main-meta i { color: rgba(255,255,255,0.6); }

/* Articles secondaires */
.em-hero__sub {
  display: flex;
  flex-direction: column;
  gap: 3px;
  height: 100%;
}

.em-hero__sub-card {
  position: relative;
  overflow: hidden;
  flex: 1;
  display: block;
  cursor: pointer;
  min-height: 0;
}

.em-hero__sub-card > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.em-hero__sub-card:hover > img { transform: scale(1.06); }

.em-hero__sub-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 16px;
}

.em-hero__sub-cat {
  font-size: 9px;
  font-weight: 800;
  font-family: var(--em-font-body);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 4px;
}

.em-hero__sub-title {
  font-family: var(--em-font-display) !important;
  font-size: 14px;
  font-weight: 700;
  color: #fff !important;
  line-height: 1.3;
  text-decoration: none !important;
  display: block;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================================================================
   11. SECTIONS CATÉGORIES
   ================================================================ */
.em-section {
  max-width: var(--em-container);
  margin: 0 auto 48px;
  padding: 0 24px;
}

.em-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--em-blue);
  position: relative;
}

.em-section__header::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 60px;
  height: 3px;
  background: var(--em-blue-light);
}

.em-section__title {
  font-family: var(--em-font-display) !important;
  font-size: 21px;
  font-weight: 800;
  color: var(--em-text) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 !important;
}

.em-section__more {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--em-font-body);
  color: var(--em-blue-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none !important;
  transition: var(--em-transition);
}

.em-section__more:hover {
  color: var(--em-blue);
  gap: 8px;
}

/* ================================================================
   12. CARDS ARTICLES
   ================================================================ */
.em-cat-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1200px) { .em-cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .em-cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .em-cat-grid { grid-template-columns: 1fr; } }

.em-card {
  background: var(--em-white) !important;
  border-radius: var(--em-radius-lg);
  overflow: hidden;
  box-shadow: var(--em-shadow-sm);
  border: 1px solid var(--em-border);
  display: flex;
  flex-direction: column;
  transition: var(--em-transition);
}

.em-card:hover {
  box-shadow: var(--em-shadow);
  transform: translateY(-4px);
  border-color: transparent;
}

/* Image */
.em-card__img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: block;
  flex-shrink: 0;
}

.em-card__img-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.5s ease;
}

.em-card:hover .em-card__img-wrap img { transform: scale(1.07); }

.em-card__cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--em-blue);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  font-family: var(--em-font-body);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 3px 8px;
  border-radius: 4px;
}

/* Body */
.em-card__body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.em-card__title {
  font-family: var(--em-font-display) !important;
  font-size: 15px;
  font-weight: 700;
  color: var(--em-text) !important;
  line-height: 1.35;
  margin-bottom: 10px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none !important;
  transition: color 0.2s;
}

.em-card__title:hover { color: var(--em-blue) !important; }

.em-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--em-muted);
  font-family: var(--em-font-body);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--em-border);
}

.em-card__meta i { color: var(--em-blue-light); }

/* Card Featured (grande carte) */
.em-card--featured {
  grid-column: span 2;
  flex-direction: row;
}

.em-card--featured .em-card__img-wrap {
  width: 48%;
  flex-shrink: 0;
  aspect-ratio: unset;
}

.em-card--featured .em-card__title { font-size: 19px; }

@media (max-width: 767px) {
  .em-card--featured {
    grid-column: span 2;
    flex-direction: column;
  }
  .em-card--featured .em-card__img-wrap {
    width: 100%;
    aspect-ratio: 16/9;
  }
}

/* ================================================================
   13. SIDEBAR
   ================================================================ */
.em-sidebar-widget {
  background: var(--em-white);
  border: 1px solid var(--em-border);
  border-radius: var(--em-radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

.em-sidebar-widget__title {
  background: var(--em-blue);
  color: #fff;
  font-family: var(--em-font-body);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 11px 16px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.em-sidebar-widget__body { padding: 10px; }

.em-sidebar-article {
  display: flex;
  gap: 12px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--em-border);
  align-items: flex-start;
}

.em-sidebar-article:last-child { border-bottom: none; }

.em-sidebar-article__num {
  font-size: 28px;
  font-weight: 900;
  color: var(--em-border);
  line-height: 1;
  flex-shrink: 0;
  width: 34px;
  font-family: var(--em-font-display);
}

.em-sidebar-article__info { flex: 1; min-width: 0; }

.em-sidebar-article__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--em-text);
  line-height: 1.35;
  font-family: var(--em-font-display);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
}

.em-sidebar-article__title:hover { color: var(--em-blue); }

.em-sidebar-article__meta {
  font-size: 11px;
  color: var(--em-muted);
  font-family: var(--em-font-body);
  margin-top: 4px;
  display: flex;
  gap: 8px;
}

/* Tags */
.em-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
}

.em-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--em-font-body);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(27,67,129,0.08);
  color: var(--em-blue);
  border: 1.5px solid rgba(27,67,129,0.15);
  transition: var(--em-transition);
  text-decoration: none;
}

.em-tag:hover {
  background: var(--em-blue);
  color: #fff;
  border-color: var(--em-blue);
}

/* ================================================================
   14. DRAWER MENU
   ================================================================ */
.em-sidebar-drawer {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 310px;
  height: 100%;
  background: var(--em-white) !important;
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 30px rgba(0,0,0,0.15);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.em-sidebar-drawer.open { transform: translateX(0) !important; }

.em-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
  backdrop-filter: blur(2px);
}

.em-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Drawer header */
.em-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--em-border);
  background: var(--em-blue);
}

.em-drawer-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--em-transition);
}

.em-drawer-close:hover { background: rgba(255,255,255,0.3); }

.em-drawer-nav {
  list-style: none;
  margin: 0;
  padding: 12px;
  flex: 1;
}

.em-drawer-nav li { margin-bottom: 2px; }

.em-drawer-nav a {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--em-font-body);
  color: var(--em-text) !important;
  text-decoration: none !important;
  transition: var(--em-transition);
}

.em-drawer-nav a:hover {
  background: rgba(27,67,129,0.08);
  color: var(--em-blue) !important;
  padding-left: 22px;
}

.em-drawer-nav a i {
  width: 20px;
  text-align: center;
  color: var(--em-blue-light);
}

/* ================================================================
   15. OVERLAY RECHERCHE MOBILE
   ================================================================ */
.em-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9995;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.em-search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.em-search-overlay__inner {
  background: var(--em-white);
  border-radius: var(--em-radius-lg);
  padding: 24px;
  width: 90%;
  max-width: 540px;
  position: relative;
}

.em-search-overlay input {
  width: 100%;
  padding: 14px 20px;
  font-size: 18px;
  font-family: var(--em-font-body);
  border: 2px solid var(--em-border);
  border-radius: 10px;
  outline: none;
  color: var(--em-text);
}

.em-search-overlay input:focus {
  border-color: var(--em-blue-light);
  box-shadow: 0 0 0 3px rgba(14,140,198,0.15);
}

.em-search-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--em-border);
  border: none;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--em-text);
}

/* ================================================================
   16. FOOTER
   ================================================================ */
.em-footer {
  background: #070d1f !important;
  color: #94a3b8;
  padding: 60px 0 0;
  border-top: 3px solid var(--em-blue);
  font-family: var(--em-font-body);
  margin-top: 60px;
}

.em-footer__inner {
  max-width: var(--em-container);
  margin: 0 auto;
  padding: 0 24px;
  display: grid !important;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 48px;
}

@media (max-width: 1024px) {
  .em-footer__inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 576px) {
  .em-footer__inner { grid-template-columns: 1fr; gap: 28px; }
}

.em-footer-logo { margin-bottom: 16px; }

.em-footer-logo img {
  height: 48px;
  width: auto;
  display: block;
}

.em-footer-desc {
  font-size: 14px;
  line-height: 1.7;
  color: #64748b;
  margin-bottom: 20px;
}

.em-footer-address {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.em-footer-address div {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: #64748b;
}

.em-footer-address i { color: var(--em-blue-light); width: 16px; text-align: center; }

.em-footer-address a { color: #64748b; transition: color 0.2s; }

.em-footer-address a:hover { color: var(--em-blue-light); }

.em-footer-heading {
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--em-font-body);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.em-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.em-footer-links a {
  color: #64748b;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: var(--em-transition);
}

.em-footer-links a:hover { color: var(--em-blue-light); padding-left: 4px; }

.em-footer-links a::before {
  content: '›';
  color: var(--em-blue-light);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

/* Footer socials */
.em-footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.em-footer-social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  transition: var(--em-transition);
  flex-shrink: 0;
}

.em-footer-social-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  color: #fff;
}

/* Footer bottom bar */
.em-footer__bottom {
  margin-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 18px 24px;
  text-align: center;
  font-size: 13px;
  color: #475569;
}

.em-footer__bottom a { color: var(--em-blue-light); transition: color 0.2s; }
.em-footer__bottom a:hover { color: #fff; }

/* ================================================================
   17. COOKIES
   ================================================================ */
.em-cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  background: #fff;
  border: 1px solid var(--em-border);
  border-radius: var(--em-radius-lg);
  padding: 22px 24px;
  max-width: 340px;
  box-shadow: var(--em-shadow-lg);
  transform: translateX(calc(100% + 32px));
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.em-cookie-banner.show { transform: translateX(0); }

.em-cookie-banner h3 {
  font-family: var(--em-font-body) !important;
  font-size: 15px;
  font-weight: 700;
  color: var(--em-text) !important;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.em-cookie-banner p {
  font-size: 13px;
  color: var(--em-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.em-cookie-banner p a { color: var(--em-blue-light); }

.em-cookie-actions {
  display: flex;
  gap: 8px;
}

.em-cookie-accept {
  flex: 1;
  background: var(--em-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--em-font-body);
  cursor: pointer;
  transition: var(--em-transition);
}

.em-cookie-accept:hover { background: var(--em-blue-light); }

.em-cookie-decline {
  background: transparent;
  color: var(--em-muted);
  border: 1px solid var(--em-border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--em-font-body);
  cursor: pointer;
  transition: var(--em-transition);
}

.em-cookie-decline:hover { border-color: var(--em-text); color: var(--em-text); }

/* ================================================================
   18. RETOUR EN HAUT
   ================================================================ */
.em-back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--em-blue);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 16px rgba(27,67,129,0.35);
  opacity: 0;
  pointer-events: none;
  transition: var(--em-transition);
  z-index: 990;
  text-decoration: none;
}

.em-back-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.em-back-top:hover {
  background: var(--em-blue-light);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(14,140,198,0.4);
}

/* ================================================================
   19. PAGE ARTICLE (single.php)
   ================================================================ */
.em-article-header {
  max-width: 860px;
  margin: 0 auto 0;
  padding: 32px 24px 0;
}

.em-article-cover {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
  border-radius: var(--em-radius-lg);
  margin-bottom: 0;
}

.em-article-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--em-text);
  font-family: var(--em-font-body);
}

.em-article-body p { margin-bottom: 1.4em; }

.em-article-body h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 1.8em 0 0.8em;
  color: var(--em-text);
}

.em-share-bar {
  position: sticky;
  top: 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 32px;
}

/* ================================================================
   20. DARK MODE — Overrides
   ================================================================ */
[data-theme="dark"] .em-header { background: #111827 !important; border-bottom-color: #1e293b; }
[data-theme="dark"] .em-navbar { background: #111827 !important; }
[data-theme="dark"] .em-nav-item { color: #94a3b8 !important; }
[data-theme="dark"] .em-nav-item:hover { color: #fff !important; }
[data-theme="dark"] .em-ticker { background: #111827 !important; border-color: #1e293b; }
[data-theme="dark"] .em-ticker__item { color: #e2e8f0 !important; }
[data-theme="dark"] .em-card { background: #111827 !important; border-color: #1e293b; }
[data-theme="dark"] .em-card__meta { border-top-color: #1e293b; }
[data-theme="dark"] .em-sidebar-widget { background: #111827; border-color: #1e293b; }
[data-theme="dark"] .em-sidebar-article { border-bottom-color: #1e293b; }
[data-theme="dark"] .em-search-input { background: #1e293b !important; color: #e2e8f0 !important; border-color: #2d3748 !important; }
[data-theme="dark"] .em-menu-btn { border-color: #2d3748 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .em-darkmode-toggle { background: #1e293b !important; border-color: #2d3748 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .em-tag { background: rgba(14,140,198,0.15); color: #7dd3fc; border-color: rgba(14,140,198,0.2); }
[data-theme="dark"] .em-cookie-banner { background: #111827; border-color: #1e293b; }

/* ================================================================
   21. PAGE CATÉGORIE
   ================================================================ */
.em-breadcrumb {
  max-width: var(--em-container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--em-muted);
  font-family: var(--em-font-body);
}

.em-breadcrumb a { color: var(--em-blue-light); text-decoration: none; }
.em-breadcrumb a:hover { color: var(--em-blue); }
.em-breadcrumb-sep { color: var(--em-border); }

.em-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 40px 0;
}

.em-page-btn {
  min-width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--em-white);
  border: 1.5px solid var(--em-border);
  color: var(--em-text);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--em-font-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  text-decoration: none;
  transition: var(--em-transition);
}

.em-page-btn:hover, .em-page-btn.active {
  background: var(--em-blue);
  border-color: var(--em-blue);
  color: #fff;
}

/* ================================================================
   22. UTILITAIRES RESPONSIVE FINAUX
   ================================================================ */
@media (max-width: 768px) {
  .em-hero { padding: 0 16px; margin: 16px auto; }
  .em-hero__grid { height: auto; border-radius: 10px; }
  .em-hero__main { height: 280px; }
  .em-hero__sub { flex-direction: row; }
  .em-hero__sub-card { min-height: 130px; }
  .em-section { padding: 0 16px; margin-bottom: 32px; }
  .em-footer__inner { padding: 0 16px; }
  .em-navbar { top: 66px !important; }
  .em-navbar__inner { padding: 0 16px; }
}

@media (max-width: 480px) {
  .em-hero__sub { flex-direction: column; }
  .em-hero__main { height: 240px; }
  .em-header__inner { padding: 8px 12px; }
}

/* ================================================================
   23. NEUTRALISATION DES STYLES BOOTSTRAP VISUELS
       Cibles les classes Bootstrap qui causent des conflits
   ================================================================ */

/* Supprimer les styles de nav bootstrap */
.navbar, nav.navbar { background: transparent !important; padding: 0 !important; }
.navbar-expand-lg .navbar-nav { display: block !important; }

/* Supprimer les margins/paddings forcés par Bootstrap sur body */
body { margin: 0 !important; }

/* Eviter que Bootstrap redéfinisse la couleur de body */
body.navbar-fixed-top { padding-top: 0 !important; }

/* Override couleur texte trop grise de Bootstrap */
p, li { color: inherit; }

/* Assurer que les liens dans le contenu restent lisibles */
.em-card__body a, .em-article-body a { color: var(--em-blue-light); }

/* ================================================================
   24. ANIMATIONS
   ================================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.em-hero__main-overlay { animation: fadeInUp 0.5s ease; }

/* Shimmer loading placeholder */
.em-skeleton {
  background: linear-gradient(90deg, #f0f2f5 25%, #e8ecf0 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}


