/* =====================================================
   notifications.css — Styles du système de Nouveautés
   Regarde Movie

   Extrait de notifications.js (CSS-in-JS) pour de
   meilleures performances (pas de FOUC) et une
   maintenance plus simple.
===================================================== */

    /* ===== CLOCHE ===== */
    .notif-bell-wrapper {
      position: relative;
      flex-shrink: 0;
    }

    .notif-bell-btn {
      position: relative;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 50%;
      width: 36px; height: 36px;
      display: flex; align-items: center; justify-content: center;
      color: var(--text-dim);
      cursor: pointer;
      transition: all 0.2s;
    }
    .notif-bell-btn:hover {
      border-color: var(--border-hover);
      color: var(--text);
    }
    .notif-bell-btn.has-notif {
      border-color: var(--accent);
      color: var(--accent);
      animation: bell-ring 0.6s ease 0s 2;
    }

    @keyframes bell-ring {
      0%,100% { transform: rotate(0deg); }
      20%     { transform: rotate(-15deg); }
      40%     { transform: rotate(15deg); }
      60%     { transform: rotate(-10deg); }
      80%     { transform: rotate(10deg); }
    }

    /* Badge rouge */
    .notif-badge {
      position: absolute;
      top: -4px; right: -4px;
      background: var(--accent);
      color: #fff;
      font-size: 0.55rem;
      font-weight: 800;
      min-width: 16px; height: 16px;
      border-radius: 50px;
      display: flex; align-items: center; justify-content: center;
      padding: 0 3px;
      border: 2px solid var(--bg);
      pointer-events: none;
    }

    /* ===== PANNEAU ===== */
    .notif-panel {
      position: absolute;
      top: calc(100% + 10px);
      right: 0;
      width: 340px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 14px;
      box-shadow: 0 20px 60px rgba(0,0,0,0.5);
      z-index: 5000;
      overflow: hidden;
      opacity: 0;
      transform: translateY(-8px) scale(0.97);
      pointer-events: none;
      transition: opacity 0.2s ease, transform 0.2s ease;
    }
    .notif-panel.open {
      opacity: 1;
      transform: translateY(0) scale(1);
      pointer-events: auto;
    }

    .notif-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 16px;
      border-bottom: 1px solid var(--border);
    }
    .notif-panel-header h3 {
      font-family: var(--font-display);
      font-size: 1.1rem;
      letter-spacing: 1px;
      color: var(--text);
    }
    .notif-mark-all {
      background: none; border: none;
      color: var(--accent); font-size: 0.72rem;
      font-weight: 700; cursor: pointer;
      font-family: var(--font-body);
      transition: opacity 0.2s;
    }
    .notif-mark-all:hover { opacity: 0.7; }

    /* Liste */
    .notif-list {
      max-height: 400px;
      overflow-y: auto;
      scrollbar-width: thin;
      scrollbar-color: var(--accent) var(--bg-surface);
    }

    .notif-empty {
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      padding: 40px 20px; gap: 8px; text-align: center;
    }
    .notif-empty span { font-size: 2rem; }
    .notif-empty p    { font-size: 0.82rem; color: var(--text-muted); }

    /* Item */
    .notif-item {
      display: flex; gap: 12px;
      padding: 12px 16px;
      cursor: pointer;
      border-bottom: 1px solid var(--border);
      transition: background 0.15s;
    }
    .notif-item:last-child { border-bottom: none; }
    .notif-item:hover { background: var(--bg-surface); }
    .notif-item.unread { background: rgba(255,0,204,0.04); }

    .notif-item-poster {
      position: relative; flex-shrink: 0;
      width: 44px; height: 66px;
      border-radius: 6px; overflow: hidden;
      background: var(--bg-surface);
    }
    .notif-item-poster img {
      width: 100%; height: 100%;
      object-fit: cover; display: block;
    }
    .notif-no-poster {
      width: 100%; height: 100%;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.2rem;
    }
    .notif-unread-dot {
      position: absolute; top: -3px; right: -3px;
      width: 8px; height: 8px; border-radius: 50%;
      background: var(--accent);
      border: 2px solid var(--bg-card);
    }

    .notif-item-body { flex: 1; min-width: 0; }
    .notif-item-title {
      font-size: 0.85rem; font-weight: 700;
      color: var(--text); line-height: 1.3;
      margin-bottom: 3px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .notif-item-meta {
      font-size: 0.68rem; color: var(--accent);
      font-weight: 600; margin-bottom: 4px;
    }
    .notif-item-overview {
      font-size: 0.72rem; color: var(--text-dim);
      line-height: 1.5;
      display: -webkit-box; -webkit-line-clamp: 2;
      -webkit-box-orient: vertical; overflow: hidden;
      margin-bottom: 4px;
    }
    .notif-item-time {
      font-size: 0.65rem; color: var(--text-muted);
    }

    /* ===== TOAST ===== */
    .notif-toast {
      position: fixed;
      bottom: 24px; right: 24px;
      z-index: 9999;
      max-width: 320px;
      transform: translateY(120%);
      opacity: 0;
      transition: transform 0.35s ease, opacity 0.35s ease;
      pointer-events: none;
    }
    .notif-toast.visible {
      transform: translateY(0);
      opacity: 1;
      pointer-events: auto;
    }
    .notif-toast-inner {
      display: flex; align-items: flex-start; gap: 10px;
      background: var(--bg-card);
      border: 1px solid var(--accent);
      border-radius: 12px;
      padding: 12px 14px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    }
    .notif-toast-icon { font-size: 1.3rem; flex-shrink: 0; }
    .notif-toast-title {
      font-size: 0.72rem; font-weight: 800;
      letter-spacing: 1px; text-transform: uppercase;
      color: var(--accent); margin-bottom: 2px;
    }
    .notif-toast-msg {
      font-size: 0.82rem; color: var(--text);
      line-height: 1.4;
    }
    .notif-toast-close {
      background: none; border: none;
      color: var(--text-muted); cursor: pointer;
      font-size: 0.8rem; padding: 0; margin-left: auto;
      flex-shrink: 0; line-height: 1;
      transition: color 0.2s;
    }
    .notif-toast-close:hover { color: var(--text); }

    /* ===== RESPONSIVE ===== */
    @media (max-width: 600px) {
      .notif-panel {
        position: fixed;
        top: 64px; left: 8px; right: 8px;
        width: auto;
      }
      .notif-toast {
        left: 12px; right: 12px;
        max-width: none;
      }
    }
