/* ============================================
   AITA Notifications - Styles front-end
   ============================================ */

.aita-hidden { display: none !important; }

/* ---------- CLOCHE ---------- */
.aita-notif-bell-wrap {
    position: relative;
    display: inline-block;
}

.aita-notif-bell-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s, border-color .2s;
    padding: 0;
}

.aita-notif-bell-btn:hover {
    background: #eff8ff;
    border-color: #bae6fd;
    color: #0ea5e9;
}

.aita-notif-badge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-sizing: border-box;
    animation: aita-badge-pulse 2s infinite;
}

@keyframes aita-badge-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.12); }
}

/* ---------- POP-UP ---------- */
.aita-notif-popup {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-width: 92vw;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, .18);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

.aita-notif-popup.aita-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.aita-notif-popup::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 14px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
    transform: rotate(45deg);
}

.aita-notif-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
}

.aita-notif-popup-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.aita-notif-markall {
    background: none;
    border: none;
    color: #0ea5e9;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.aita-notif-markall:hover {
    text-decoration: underline;
}

.aita-notif-popup-body {
    max-height: 380px;
    overflow-y: auto;
}

.aita-notif-loading,
.aita-notif-empty-msg {
    padding: 32px 18px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

/* ---------- ITEM ---------- */
.aita-notif-item {
    display: flex;
    gap: 10px;
    padding: 13px 18px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    transition: background .15s;
    cursor: pointer;
}

.aita-notif-item:last-child {
    border-bottom: none;
}

.aita-notif-item:hover {
    background: #f8fafc;
}

.aita-notif-item.aita-unread {
    background: #f0f9ff;
}

.aita-notif-item.aita-unread:hover {
    background: #e0f2fe;
}

.aita-notif-item-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    margin-top: 6px;
}

.aita-notif-item.aita-unread .aita-notif-item-dot {
    background: #0ea5e9;
}

.aita-notif-item-body {
    flex: 1;
    min-width: 0;
}

.aita-notif-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 2px;
    line-height: 1.4;
}

.aita-notif-item-text {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 4px;
    line-height: 1.5;
}

.aita-notif-item-date {
    font-size: 11px;
    color: #94a3b8;
}

/* --- v2.2 : item unique de la cloche (synchro bandeau) --- */
.aita-notif-bell-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 18px;
    text-decoration: none;
    transition: background .15s;
}

a.aita-notif-bell-item {
    cursor: pointer;
}

a.aita-notif-bell-item:hover {
    background: #f0f9ff;
}

.aita-notif-bell-item-plain {
    cursor: default;
}

.aita-notif-bell-item-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1abc9c;
    margin-top: 5px;
}

.aita-notif-bell-item-body {
    flex: 1;
    min-width: 0;
}

.aita-notif-bell-item-title {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin-bottom: 3px;
}

.aita-notif-bell-item-text {
    display: block;
    font-size: 12.5px;
    color: #475569;
    line-height: 1.55;
}

.aita-notif-bell-item-icon {
    flex-shrink: 0;
    color: #1abc9c;
    font-size: 15px;
    font-weight: 700;
    margin-top: 2px;
}

/* ════════════════════════════════════════════
   BANDEAU DÉFILANT v2.0 — Design Dashboard AITA
   ════════════════════════════════════════════ */

/* --- Breakout asymétrique v2.3 ---
   Le bandeau s'étend du point d'insertion jusqu'au bord DROIT de l'écran.
   Côté gauche : marge de 20px. Côté droit : collé au bord, zéro marge.
   Espacement vertical retiré : géré via Elementor. */
.aita-notif-ticker-breakout {
    position: relative;
    /* S'étire jusqu'au bord droit de la fenêtre */
    width: calc(100vw - (50vw - 50%));
    margin-top: 0;
    margin-bottom: 0;
    margin-right: calc(50% - 50vw);
    padding: 0 0 0 20px;
    box-sizing: border-box;
}

/* --- Carte du bandeau : asymétrique ---
   Coins arrondis à GAUCHE seulement, bord droit carré et collé. */
.aita-notif-ticker {
    display: flex;
    align-items: stretch;
    width: 100%;
    /* Arrondi à gauche, carré à droite */
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* --- Label "Annonces" : fond bleu marine, coins arrondis à gauche --- */
.aita-notif-ticker-label {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #0f4d6d;
    color: #ffffff;
    padding: 0 18px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    white-space: nowrap;
    flex-shrink: 0;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.aita-notif-ticker-label svg {
    stroke: #ffffff;
}

/* --- Zone défilante : fond rouge bordeaux --- */
.aita-notif-ticker-viewport {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #a31d27;
}

.aita-notif-ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: aita-ticker-scroll 38s linear infinite;
}

.aita-notif-ticker:hover .aita-notif-ticker-track {
    animation-play-state: paused;
}

@keyframes aita-ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Item de notification --- */
.aita-notif-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 30px;
    color: #ffffff;
    text-decoration: none;
    font-size: 13.5px;
    transition: opacity .2s;
}

a.aita-notif-ticker-item:hover {
    opacity: 0.82;
}

/* Item sans lien : curseur normal, pas d'effet de survol */
.aita-notif-ticker-plain {
    cursor: default;
}

.aita-notif-ticker-item strong {
    color: #ffffff;
    font-weight: 700;
}

/* --- Pastille turquoise --- */
.aita-notif-ticker-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #1abc9c;
    flex-shrink: 0;
}

/* --- Séparateur turquoise --- */
.aita-notif-ticker-sep {
    color: #1abc9c;
    font-weight: 700;
}

/* --- Icône de lien --- */
.aita-notif-ticker-link-icon {
    color: #1abc9c;
    font-size: 14px;
    font-weight: 700;
    margin-left: 2px;
}

/* --- Accessibilité : réduction du mouvement --- */
@media (prefers-reduced-motion: reduce) {
    .aita-notif-ticker-track {
        animation-duration: 120s;
    }
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .aita-notif-ticker-breakout { padding: 0 0 0 12px; }
    .aita-notif-ticker-label span { display: none; }
    .aita-notif-ticker-label { padding: 0 14px; }
    .aita-notif-ticker-item { font-size: 12.5px; padding: 10px 22px; }
}
