/* Composants UI génériques.
 *
 * Ce fichier est chargé AVANT le <style> d'index.html : tout ce qu'il déclare
 * de générique gagne à spécificité égale et devient très difficile à corriger
 * en aval. Trois règles y faisaient des dégâts sur toute l'application et ont
 * été retirées :
 *
 *   .btn / .btn:hover  — posaient --primary-color puis --accent-color, or
 *     --accent-color vaut #e63946 (rouge). Comme `.btn:hover` a une
 *     spécificité (0,2,0) supérieure à `.btn-danger` (0,1,0), TOUS les boutons
 *     de l'app devenaient rouge vif au survol, y compris les boutons neutres.
 *     C'est ce bug que le `!important` de .sketch-collapse-btn contournait.
 *     La géométrie et les variantes de bouton sont définies dans index.html.
 *
 *   input, select, textarea — imposaient `border: 1px solid #ccc` et
 *     `border-radius: 4px`, non thémables, à tous les champs y compris les
 *     range, radio et file qui n'ont pas de style dédié. En thème sombre cela
 *     donnait une bordure gris clair sur fond foncé.
 *
 *   .firstaid-card / -intro — un dégradé blanc en dur et une bordure #eee,
 *     invisibles en sombre, plus un interligne de 1.35 trop serré pour lire
 *     une conduite à tenir en intervention. Ces cartes sont désormais stylées
 *     dans index.html avec les jetons de thème.
 *
 *   ..popup — sélecteur invalide (double point), n'a jamais rien stylé.
 */

/* Les contrôles natifs sans style dédié : on donne la couleur d'accent plutôt
   qu'une bordure grise non thémable, et une hauteur exploitable au doigt. */
input[type="range"] {
  accent-color: var(--accent);
  width: 100%;
  min-height: 44px;
}
input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--accent);
  width: 20px;
  height: 20px;
}

.debug-overlay {
  background: #222;
  color: #fff;
  font-size: 0.9em;
  padding: 0.5rem;
}

/* First-aid (PSC1) — seul l'indicateur de rythme reste ici, il n'a pas
   d'équivalent ailleurs. */
.beat-indicator { width:36px; height:36px; border-radius:50%; border:2px solid var(--accent); margin:6px 0; background:transparent; transition: transform 120ms ease, background 120ms ease; }
.beat-indicator.active { background: var(--accent); transform: scale(1.08); }

/* Landing page overlay (mobile-first) */
.landing-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: none; align-items: center; justify-content: center; z-index: 1200; }
.landing-overlay.visible { display: flex; }
.landing-panel { width: min(720px, 96%); max-width: 720px; background: var(--bg); border-radius: 12px; padding: 18px; box-shadow: 0 20px 40px rgba(0,0,0,0.35); text-align: left; }
.landing-close { position: absolute; right: 18px; top: 18px; background:transparent; border:none; font-size:20px; cursor:pointer; color:var(--text-muted); }
.landing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.landing-btn { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; padding: 12px; background: linear-gradient(180deg,#fff,#f7f7fb); border-radius:10px; border:1px solid #eee; cursor:pointer; min-height:92px; }
.landing-btn .landing-ico { font-size:28px; }
.landing-btn .landing-label { font-size:13px; color:var(--text-secondary); }
@media (max-width:640px) { .landing-grid { grid-template-columns: repeat(2, 1fr); } .landing-panel { padding:14px; } }
