/* ============================================================
   SHARED.CSS — Thème, Recherche globale, Boutons header, PWA
   Inclus sur toutes les pages via <link rel="stylesheet" href="/shared.css">
============================================================ */

/* ---- Boutons header ---- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.header-actions button {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    color: #aaa;
    font-size: 15px;
    cursor: pointer;
    padding: 5px 9px;
    border-radius: 18px;
    transition: all 0.25s;
    line-height: 1;
    font-family: inherit;
}
.header-actions button:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.35);
    color: #fff;
}
.header-actions .push-btn.subscribed {
    border-color: rgba(255,215,0,0.45);
    color: #ffd700;
    background: rgba(255,215,0,0.08);
}

/* ---- Toast notification ---- */
.fdp-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #111, #1c1c1c);
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    z-index: 99999;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 9px;
    animation: fdpToastIn 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
    font-family: 'Aptos','Inter','Segoe UI',sans-serif;
}
@keyframes fdpToastIn  { from { opacity:0; transform:translateY(16px) scale(0.9); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes fdpToastOut { from { opacity:1; transform:translateY(0);              } to { opacity:0; transform:translateY(10px); } }
.fdp-toast.hiding { animation: fdpToastOut 0.28s ease forwards; }

/* ---- Recherche globale overlay ---- */
.gsr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(6px);
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 56px 18px 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    overflow-y: auto;
}
.gsr-overlay.open {
    opacity: 1;
    pointer-events: all;
}
.gsr-box { width: 100%; max-width: 680px; }
.gsr-input-wrap {
    display: flex;
    align-items: center;
    background: #111;
    border: 1.5px solid rgba(255,0,21,0.4);
    border-radius: 12px;
    padding: 11px 16px;
    gap: 10px;
    margin-bottom: 12px;
}
.gsr-icon { font-size: 18px; color: #555; flex-shrink: 0; }
.gsr-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 17px;
    font-family: inherit;
}
.gsr-input::placeholder { color: #444; }
.gsr-close {
    background: none;
    border: none;
    color: #555;
    font-size: 22px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    font-family: inherit;
}
.gsr-close:hover { color: #fff; }
.gsr-hint { font-size: 11px; color: #333; text-align: center; margin-bottom: 6px; letter-spacing: 1px; }
.gsr-results {}
.gsr-section-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255,0,21,0.6);
    margin: 14px 0 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255,0,21,0.1);
}
.gsr-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}
.gsr-item:hover { background: rgba(255,255,255,0.07); }
.gsr-item-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}
.gsr-item-title { font-size: 14px; font-weight: 600; color: #fff; }
.gsr-item-sub   { font-size: 11px; color: #666; margin-top: 1px; }
.gsr-highlight  { color: #ff0015; font-weight: 800; background: rgba(255,0,21,0.1); border-radius: 2px; }
.gsr-empty {
    text-align: center;
    color: #333;
    font-size: 14px;
    padding: 32px 0;
}

/* ---- Mode clair ---- */
body.light-mode {
    background-color: #f0ebe0 !important;
    color: #1a1200 !important;
}
body.light-mode header {
    background-color: rgba(245,240,228,0.97) !important;
    border-bottom-color: rgba(200,0,0,0.35) !important;
    box-shadow: 0 0 15px rgba(200,0,0,0.12) !important;
}
body.light-mode .logo-text { color: #1a0a00 !important; }
body.light-mode nav ul li a { color: #444 !important; }
body.light-mode nav ul li a:hover { color: #000 !important; text-shadow: none !important; }
body.light-mode nav ul li a.nav-active {
    color: #000 !important;
    border-color: rgba(180,0,0,0.45) !important;
}
body.light-mode footer {
    background: #e8e2d4 !important;
    border-top-color: rgba(184,134,11,0.2) !important;
    color: #888 !important;
}
body.light-mode .header-actions button { color: #555; border-color: rgba(0,0,0,0.15); }
body.light-mode .header-actions button:hover { background: rgba(0,0,0,0.07); color: #000; }

/* ---- Responsive shared ---- */
@media (max-width: 768px) {
    .header-actions button { font-size: 14px; padding: 4px 8px; }
    .gsr-overlay { padding: 40px 12px 16px; }
    .gsr-input { font-size: 15px; }
}
@media (max-width: 480px) {
    .header-actions button { font-size: 13px; padding: 3px 7px; }
    .header-actions .push-btn { display: none; }
}
@media (max-width: 360px) {
    .header-actions .theme-btn { display: none; }
}
