/* ============================================================
   shared.css - CorePro24
   Centralise: cloche notifications, responsive global, bloc PWA.
   : marche sur pages joueur (--card-bg)
   et admin (--card).
   ============================================================ */

/* ---------- CLOCHE NOTIFICATIONS ---------- */
.notif-wrap {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color, var(--border, #333));
    color: var(--text-color, var(--text, #fff));
    background: transparent;
    font-size: 0.85rem;
}
.notif-wrap:hover {
    border-color: var(--primary, #ff914d);
    color: var(--primary, #ff914d);
}
.notif-bell { font-size: 1.1rem; line-height: 1; }
.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e74c3c;
    color: #fff;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
    line-height: 1.4;
}
.notif-dropdown {
    position: absolute;
    right: 0;
    top: 38px;
    width: 320px;
    max-height: 420px;
    overflow-y: auto;
    background: var(--card-bg, var(--card, #111));
    border: 1px solid var(--border-color, var(--border, #333));
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    text-align: left;
}
.notif-item {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color, var(--border, #333));
    color: var(--text-color, var(--text, #fff));
    text-decoration: none;
}
.notif-item:hover { background: rgba(255, 145, 77, 0.08); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(255, 145, 77, 0.12); }
.notif-item.unread:hover { background: rgba(255, 145, 77, 0.18); }
.notif-t { font-weight: 700; color: var(--primary, #ff914d); font-size: 0.85rem; }
.notif-m { font-size: 0.8rem; color: var(--text-color, var(--text, #fff)); margin: 3px 0; }
.notif-d { font-size: 0.7rem; color: var(--secondary-text, #888); }
.notif-empty { padding: 20px; text-align: center; color: var(--secondary-text, #888); font-size: 0.85rem; }

/* ---------- BLOC PWA / INSTALL ---------- */
.install-section {
    margin-top: 30px;
    background: var(--card-bg, var(--card, #111));
    border: 1px solid var(--border-color, var(--border, #333));
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.install-section h3 {
    color: var(--primary, #ff914d);
    text-transform: uppercase;
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.install-section p {
    color: var(--secondary-text, #888);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}
.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.install-card {
    background: var(--input-bg, #222);
    border-radius: 8px;
    padding: 18px;
}
.install-card h4 { color: var(--primary, #ff914d); margin-bottom: 10px; }
.install-card ol {
    padding-left: 18px;
    color: var(--text-color, var(--text, #fff));
    font-size: 0.85rem;
    line-height: 1.7;
}

/* ---------- RESPONSIVE GLOBAL ---------- */
@media (max-width: 900px) {
    .main-container { padding: 0 12px !important; }
    .card { padding: 16px; }
    .form-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .global-nav { padding: 10px 15px; }
    .nav-controls { flex-wrap: wrap; }
    .install-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
    .right-col .card { position: static !important; } /* nutrition sticky off */
    .notif-dropdown { width: 88vw; right: -30px; }
    .install-section { padding: 20px; }
    table { display: block; overflow-x: auto; white-space: nowrap; }
    
    
    /* ---------- BANDEAU CONNEXION INTERVALS ---------- */
.cp24-conn-banner {
    position: fixed; inset: 0; z-index: 999999;
    background: rgba(5, 5, 5, 0.97);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.cp24-conn-box {
    background: var(--card-bg, #111);
    border: 1px solid var(--primary, #ff914d);
    border-radius: 16px;
    padding: 40px 30px;
    max-width: 480px; width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    color: var(--text-color, #fff);
}
.cp24-conn-icon { font-size: 3rem; margin-bottom: 10px; }
.cp24-conn-box h2 { color: var(--primary, #ff914d); text-transform: uppercase; margin: 0 0 15px; font-size: 1.4rem; }
.cp24-conn-box p { color: var(--secondary-text, #888); font-size: 0.95rem; line-height: 1.6; margin: 0 0 25px; }
.cp24-conn-cta {
    background: var(--primary, #ff914d); color: #000; border: none;
    padding: 14px 28px; border-radius: 8px; font-weight: 800;
    text-transform: uppercase; cursor: pointer; font-size: 0.9rem;
}
.cp24-conn-cta:hover { opacity: 0.9; }
}