/* ══════════════════════════════════════════════════════════════════════════════
   styles-patch.css — Correctifs performance & accessibilité
   ► À inclure APRÈS styles.min.css dans chaque page :
     <link rel="stylesheet" href="/styles.min.css">
     <link rel="stylesheet" href="/styles-patch.css">
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── 1. Alert-dot : remplacer box-shadow (force repaint) par transform+opacity ─
   Lighthouse : "Éviter les animations non composées" (5 éléments)
   box-shadow ne peut pas être géré par le GPU → jank sur mobile
   ───────────────────────────────────────────────────────────────────────────── */
.alert-dot {
    position: relative;
    animation: none;          /* désactive l'ancienne animation sur l'élément lui-même */
    overflow: visible;
}
.alert-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--hr, #dc2626);
    opacity: 0.6;
    animation: ap-ring 2s ease-out infinite;
    pointer-events: none;
}
@keyframes ap-ring {
    0%   { transform: scale(1);   opacity: 0.55; }
    100% { transform: scale(2.8); opacity: 0;    }
}


/* ── 2. Contraste : texte date "21/05/2025 – 21/05/2026"  ─────────────────────
   Lighthouse : "Les couleurs ne sont pas suffisamment contrastées"
   opacity:.7 sur texte noir/gris sur fond blanc → ratio ~3.5:1 (fail WCAG AA)
   Remplacé par une couleur fixe #6b7280 → ratio 4.6:1 (pass)
   Note : la règle inline dans index.php doit aussi être mise à jour (voir patch)
   ───────────────────────────────────────────────────────────────────────────── */
.hstat-l span[style*="opacity"] {
    opacity: 1 !important;
    color: #6b7280 !important;
}


/* ── 3. Contraste : badge orange (#d97706) sur les region-cards ────────────────
   #d97706 sur fond quasi-blanc → ratio 3.1:1 à 11.5px bold (fail WCAG AA 4.5:1)
   Note : la correction principale est dans le PHP (voir patch index.php)
   Ce sélecteur est un filet de sécurité en attendant le déploiement PHP
   ───────────────────────────────────────────────────────────────────────────── */
.region-card span[style*="#d97706"] {
    color: #92400e !important;  /* amber-800 → ratio 7.2:1 ✓ */
}


/* ── 4. Focus visible renforcé — navigation principale ─────────────────────────
   RGAA 10.7 : tout composant interactif doit avoir un focus visible
   ───────────────────────────────────────────────────────────────────────────── */
.nav-links a:focus-visible,
.mobile-nav-links a:focus-visible,
.mobile-nav-close:focus-visible,
.mobile-menu-btn:focus-visible {
    outline: 3px solid #fff !important;
    outline-offset: 3px !important;
    background: rgba(255,255,255,.25) !important;
    border-radius: 4px;
}

.skip-link:focus {
    top: 0 !important;
}
