/* ============================================================
   ZoodoMedia extras.css — Corrections & Responsive
   NE PAS modifier yt-layout.css ni main.css
   ============================================================ */

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE HEADER
   ═══════════════════════════════════════════════════════════ */

/* Logo toujours contrôlé */
.zm-logo img {
  height: clamp(26px, 4vw, 36px) !important;
  width: auto !important;
  max-width: clamp(100px, 22vw, 160px) !important;
  object-fit: contain !important;
}

/* Bouton recherche mobile — caché sur grand écran */
.zm-search-mobile-btn { display: none !important; }

/* < 900px : sidebar tiroir mobile (déjà géré par yt-layout.css) */
@media (max-width: 900px) {
  .zm-header-left { min-width: auto !important; }
  .zm-logo img {
    height: clamp(24px,5vw,30px) !important;
    max-width: clamp(90px,24vw,140px) !important;
  }
}

/* < 640px : masquer la barre de recherche centrale */
@media (max-width: 640px) {
  .zm-header-center { display: none !important; }
  .zm-search-mobile-btn { display: flex !important; }
  .zm-header { padding: 0 8px !important; }
  .zm-logo img {
    height: clamp(22px,6vw,28px) !important;
    max-width: clamp(80px,28vw,120px) !important;
  }
  .zm-icon-btn { width: 36px !important; height: 36px !important; }
  /* Dropdown guest sur mobile */
  #zm-guest-dropdown { right: -8px !important; min-width: min(260px,calc(100vw - 24px)) !important; }
}

/* < 480px : topbar ultra-compacte */
@media (max-width: 480px) {
  .zm-header { padding: 0 6px !important; }
  .zm-logo img { height: 22px !important; max-width: 90px !important; }
  .zm-icon-btn { width: 32px !important; height: 32px !important; }
  .zm-hamburger { width: 34px !important; height: 34px !important; }
  /* Masquer notifications sur très petit écran */
  .zm-notif-link { display: none !important; }
  #zm-guest-dropdown { min-width: calc(100vw - 16px) !important; right: 0 !important; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE FOOTER
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .zm-footer-grid { grid-template-columns: 1fr 1fr !important; gap: 24px; }
}
@media (max-width: 600px) {
  .zm-footer-grid { grid-template-columns: 1fr !important; gap: 20px; }
  .zm-footer-inner { padding: 28px 16px 0 !important; }
  .zm-footer-bottom { flex-direction: column !important; text-align: center; gap: 8px; }
  .zm-footer-desc { max-width: 100% !important; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE CONTENU & GRILLES
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .zm-content { padding: 14px 12px !important; }
  .zm-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%,200px),1fr)) !important; gap: 12px !important; }
  .zm-section-top { flex-wrap: wrap; gap: 8px; }
  .zm-chips { gap: 5px; }
}
@media (max-width: 400px) {
  .zm-grid { grid-template-columns: 1fr !important; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE DASHBOARD
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .db-wrapper { margin-left: 0 !important; }
  .db-topbar  { left: 0 !important; }
}
@media (max-width: 640px) {
  .db-content { padding: 76px 14px 32px !important; }
  .form-row   { grid-template-columns: 1fr !important; }
  .db-content-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  /* Tableau ads responsive */
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ═══════════════════════════════════════════════════════════
   CORRECTIONS BREAKING NEWS
   La structure HTML du vrai site : #zm-ticker animé par yt-layout.js en requestAnimationFrame
   On s'assure juste que le container est correct
   ═══════════════════════════════════════════════════════════ */
.zm-breaking {
  position: sticky;
  top: var(--zm-header-h, 64px);
  z-index: 90;
  flex-shrink: 0;
}
/* S'assurer que le track ne restreint pas le ticker */
.zm-breaking-track {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  white-space: nowrap;
  /* Animation gérée par JS (translateX), pas CSS */
  will-change: transform;
}
#zm-ticker {
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  /* translateX géré par requestAnimationFrame dans yt-layout.js */
}

/* ═══════════════════════════════════════════════════════════
   CORRECTIONS ARTICLES & CARDS
   Les classes zm-card, zm-grid sont définies dans yt-layout.css
   On ne les redéfinit PAS ici
   ═══════════════════════════════════════════════════════════ */

/* Juste s'assurer que les images ont un fond pendant le chargement */
.zm-card-thumb {
  background: var(--zm-border, #e5e7eb);
}
[data-theme="dark"] .zm-card-thumb {
  background: var(--zm-border, #374151);
}

/* ═══════════════════════════════════════════════════════════
   CORRECTIONS PUBLICITÉS (dashboard)
   ═══════════════════════════════════════════════════════════ */
/* Fix tableau publicités sur mobile */
@media (max-width: 768px) {
  .db-stat-grid { grid-template-columns: repeat(2,1fr) !important; }
  /* Masquer colonnes moins importantes sur petit écran */
  .table thead th:nth-child(6),
  .table thead th:nth-child(7),
  .table tbody td:nth-child(6),
  .table tbody td:nth-child(7) { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   HAMBURGER ANIMATION
   ═══════════════════════════════════════════════════════════ */
.zm-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  transform-origin: center;
}
/* Le JS (yt-layout.js) toggle .zm-mini sur body, pas .active sur le bouton */
/* On observe l'état de la sidebar pour les 3 barres */
