@charset "UTF-8";
/* ==========================================================================
   cardio.css — Écran « Cardio en direct » (sport/cardio.html).

   Même famille visuelle que l'onglet Sport (polices Figtree / Outfit, fond nuit, panneaux
   arrondis, dégradé bleu → violet du bouton principal), mais pensé pour être lu de loin pendant
   l'effort : tout l'écran prend la couleur de la zone, le chiffre occupe la place.

   La zone n'est jamais indiquée par la couleur seule : un libellé (« Zone cible », « Trop haut —
   ralentis ») et un pictogramme l'accompagnent toujours.
   ========================================================================== */

@font-face {
  font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url('/fonts/figtree.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/outfit.woff2') format('woff2');
}

:root {
  --fc-fond: #070a12;
  --fc-texte: #ffffff;
  --fc-texte-2: rgba(255, 255, 255, .82);
  --fc-panneau: rgba(4, 8, 16, .36);
  --fc-bord: rgba(255, 255, 255, .16);
  --fc-police: 'Figtree', -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
  --fc-chiffres: 'Outfit', 'Figtree', -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
  --fc-accent: #00A8FF;
  --fc-accent-2: #7B2FFF;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100%; font-family: var(--fc-police); color: var(--fc-texte);
  background-color: var(--fc-fond);
  transition: background-color 450ms ease-out;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

/* --- Les quatre zones : le fond de tout l'écran --------------------------- */
body[data-zone="neutre"] { --fc-fond: #070a12; --fc-panneau: rgba(255, 255, 255, .05); --fc-bord: rgba(148, 163, 184, .2); }
body[data-zone="bas"]    { --fc-fond: #1a4fc0; }
body[data-zone="cible"]  { --fc-fond: #0f7a3a; }
body[data-zone="limite"] { --fc-fond: #c2590a; }
body[data-zone="haut"]   { --fc-fond: #c01f1f; }

/* Un voile fixe (clair en haut, sombre en bas) donne du relief au fond sans gêner la transition
   de couleur, qui ne porte que sur background-color. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(90% 60% at 50% 32%, rgba(255, 255, 255, .13), transparent 70%),
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .28));
}
body[data-zone="neutre"]::before {
  background:
    radial-gradient(90% 60% at 100% 0%, color-mix(in srgb, var(--fc-accent) 13%, transparent), transparent 62%),
    radial-gradient(70% 50% at 0% 0%, color-mix(in srgb, var(--fc-accent-2) 9%, transparent), transparent 60%);
}
/* Dans le rouge, le bord de l'écran palpite : visible du coin de l'œil, même sans le son. */
body[data-zone="haut"]::after {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .85), inset 0 0 90px rgba(0, 0, 0, .45);
  animation: fc-alerte 1s ease-in-out infinite;
}
@keyframes fc-alerte { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }

/* --- Gabarit --------------------------------------------------------------- */
.fc-app {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh;
  /* Zones nommées : le panneau des réglages, masqué la plupart du temps, ne doit pas décaler les
     autres blocs d'une rangée (le chiffre garde toujours la rangée extensible). */
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto;
  grid-template-areas: "barre" "reglages" "scene" "seance"; row-gap: 6px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) calc(14px + env(safe-area-inset-right, 0px))
           calc(14px + env(safe-area-inset-bottom, 0px)) calc(14px + env(safe-area-inset-left, 0px));
  max-width: 1500px; margin: 0 auto;
}

/* --- Barre du haut ---------------------------------------------------------- */
.fc-barre { grid-area: barre; }
.fc-reglages { grid-area: reglages; }
.fc-scene { grid-area: scene; padding: 6px 0; }
.fc-seance { grid-area: seance; }
.fc-barre { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.fc-retour {
  flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px 0 8px;
  border-radius: 999px; background: var(--fc-panneau); border: 1px solid var(--fc-bord);
  color: var(--fc-texte); text-decoration: none; font-weight: 700; font-size: .92rem;
}
.fc-retour svg, .fc-outil svg, .fc-btn svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.fc-etat {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; min-height: 36px; padding: 0 14px;
  border-radius: 999px; background: var(--fc-panneau); border: 1px solid var(--fc-bord);
  font-size: .85rem; font-weight: 600;
}
@media (max-width: 620px) {
  .fc-barre { gap: 8px; }
  .fc-retour { width: 44px; padding: 0; justify-content: center; }
  .fc-retour span { display: none; }
  .fc-etat { flex: 1; justify-content: center; padding: 0 10px; font-size: .8rem; }
  .fc-outils { gap: 6px; }
  /* Le plein écran sert sur un ordinateur ou une tablette ; sur téléphone la place va au nom de la ceinture. */
  #fcPleinEcran { display: none; }
}
.fc-etat > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-etat__point { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; }
.fc-etat[data-etat="connecte"] .fc-etat__point { background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .25); }
.fc-etat[data-etat="recherche"] .fc-etat__point,
.fc-etat[data-etat="connexion"] .fc-etat__point,
.fc-etat[data-etat="reconnexion"] .fc-etat__point { background: #fbbf24; animation: fc-clignote 1s ease-in-out infinite; }
.fc-etat[data-etat="simulation"] .fc-etat__point { background: #c084fc; }
.fc-etat__batterie { flex: none; color: var(--fc-texte-2); font-weight: 500; }
.fc-etat__batterie::before { content: '· '; }
@keyframes fc-clignote { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.fc-outils { flex: none; display: flex; gap: 8px; }
.fc-outil {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 12px;
  border-radius: 999px; background: var(--fc-panneau); border: 1px solid var(--fc-bord); color: var(--fc-texte);
  font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer;
}
.fc-outil__lib { display: none; }
.fc-outil__off, .fc-outil[aria-pressed="false"] .fc-outil__on { display: none; }
.fc-outil[aria-pressed="false"] .fc-outil__off { display: block; }
.fc-outil[aria-pressed="false"] { background: rgba(0, 0, 0, .5); color: #fca5a5; border-color: rgba(252, 165, 165, .5); }
.fc-outil[aria-expanded="true"] { background: #fff; color: #0b1020; border-color: #fff; }
@media (min-width: 760px) { .fc-outil__lib { display: inline; } .fc-outil { padding: 0 16px; } }

/* --- Réglages (panneau replié par défaut) ------------------------------------ */
.fc-reglages {
  display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 20px;
  background: rgba(4, 8, 16, .62); border: 1px solid var(--fc-bord);
  animation: fc-descend 220ms ease-out;
}
@keyframes fc-descend { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.fc-reglages__champs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 760px; }
.fc-champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fc-champ label { font-size: .86rem; font-weight: 700; }
.fc-champ label small { display: block; font-size: .72rem; font-weight: 500; color: var(--fc-texte-2); }
.fc-pas { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; }
.fc-pas button, .fc-pas input {
  height: 46px; border-radius: 12px; border: 1px solid var(--fc-bord); background: rgba(255, 255, 255, .08); color: #fff;
  font: inherit; font-family: var(--fc-chiffres); font-size: 1.25rem; font-weight: 700; text-align: center;
}
.fc-pas button { cursor: pointer; }
.fc-pas button:active { transform: scale(.94); }
.fc-pas input { width: 100%; min-width: 0; padding: 0 4px; -moz-appearance: textfield; appearance: textfield; }
.fc-pas input::-webkit-outer-spin-button, .fc-pas input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fc-reglages__resume { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: .82rem; color: var(--fc-texte-2); }
.fc-reglages__resume span::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.fc-reglages__resume [data-z="bas"]::before { background: #60a5fa; }
.fc-reglages__resume [data-z="cible"]::before { background: #4ade80; }
.fc-reglages__resume [data-z="limite"]::before { background: #fbbf24; }
.fc-reglages__resume [data-z="haut"]::before { background: #f87171; }
@media (max-width: 560px) {
  .fc-reglages__champs { grid-template-columns: minmax(0, 1fr); }
  .fc-champ { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .fc-pas { flex: none; width: 190px; }
}

.fc-lien { align-self: flex-start; padding: 6px 0; border: 0; background: none; color: var(--fc-texte-2); font: inherit; font-size: .84rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fc-lien--fort { color: #fff; font-weight: 800; font-size: .92rem; }
.fc-pied .fc-lien { align-self: auto; padding: 2px 0; }

/* --- Le chiffre -------------------------------------------------------------- */
.fc-scene { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-width: 0; text-align: center; }
.fc-zone {
  margin: 0; padding: 7px 16px; border-radius: 999px; background: rgba(0, 0, 0, .26);
  font-size: clamp(.95rem, 2.4vw, 1.5rem); font-weight: 800; letter-spacing: .01em;
}
body[data-zone="neutre"] .fc-zone { background: rgba(255, 255, 255, .07); color: var(--fc-texte-2); }
.fc-bpm { display: flex; align-items: baseline; justify-content: center; gap: .06em; line-height: 1;
  font-family: var(--fc-chiffres); font-size: clamp(6rem, min(40vw, 36vh), 26rem); }
.fc-bpm__valeur {
  font-weight: 800; line-height: .86; letter-spacing: -.035em; font-variant-numeric: tabular-nums;
  text-shadow: 0 6px 30px rgba(0, 0, 0, .28);
}
.fc-bpm__unite { font-size: .16em; font-weight: 600; letter-spacing: .02em; color: var(--fc-texte-2); }
body[data-zone="neutre"] .fc-bpm__valeur { color: rgba(255, 255, 255, .34); font-weight: 200; letter-spacing: .04em; }
/* Tant qu'aucune fréquence n'arrive, « –– » n'a pas besoin de toute la place : elle va aux boutons. */
body[data-source="aucune"] .fc-bpm { font-size: clamp(4.5rem, min(26vw, 20vh), 11rem); }
.fc-pct { margin: 0; font-family: var(--fc-chiffres); font-size: clamp(1.15rem, 3.4vw, 2.2rem); font-weight: 600; font-variant-numeric: tabular-nums; }

.fc-jauge { width: min(100%, 620px); margin-top: 8px; }
.fc-jauge__piste { position: relative; display: flex; height: 14px; border-radius: 999px; box-shadow: 0 0 0 3px rgba(0, 0, 0, .34); background: rgba(0, 0, 0, .34); }
.fc-jauge__seg { height: 100%; }
.fc-jauge__seg + .fc-jauge__seg { box-shadow: inset 2px 0 0 rgba(0, 0, 0, .45); }
.fc-jauge__seg--bas { background: #60a5fa; border-radius: 999px 0 0 999px; }
.fc-jauge__seg--cible { background: #4ade80; }
.fc-jauge__seg--limite { background: #fbbf24; }
.fc-jauge__seg--haut { background: #f87171; border-radius: 0 999px 999px 0; }
.fc-jauge__curseur {
  position: absolute; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  background: #fff; border: 4px solid #0b1020; box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
  transition: left 500ms cubic-bezier(.3, .8, .3, 1);
}
.fc-jauge__reperes { position: relative; height: 22px; margin-top: 8px; font-family: var(--fc-chiffres); font-size: .85rem; font-weight: 700; color: var(--fc-texte-2); }
.fc-jauge__reperes span { position: absolute; top: 0; transform: translateX(-50%); font-variant-numeric: tabular-nums; }

.fc-avis {
  max-width: 560px; margin: 4px 0 0; padding: 12px 16px; border-radius: 14px; text-align: left;
  background: rgba(4, 8, 16, .72); border: 1px solid rgba(251, 191, 36, .7); color: #fde68a; font-size: .9rem; font-weight: 600; line-height: 1.45;
}

.fc-depart { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(100%, 440px); margin-top: 12px; }
.fc-aide { margin: 0; max-width: 400px; color: var(--fc-texte-2); font-size: .86rem; line-height: 1.45; }
.fc-simu { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(100%, 520px); margin-top: 10px; padding: 14px 16px;
  border-radius: 18px; background: var(--fc-panneau); border: 1px solid var(--fc-bord); }
.fc-simu label { font-size: .86rem; font-weight: 700; }
.fc-simu .fc-btn { min-height: 40px; padding: 0 16px; font-size: .86rem; }
.fc-simu__ligne { display: flex; align-items: center; gap: 12px; width: 100%; font-family: var(--fc-chiffres); font-weight: 700; font-size: .9rem; }
.fc-simu__ligne input { flex: 1; min-width: 0; height: 36px; accent-color: #fff; cursor: pointer; }

/* --- Boutons ------------------------------------------------------------------ */
.fc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: 14px; border: 1px solid transparent; font: inherit; font-size: 1rem; font-weight: 800; cursor: pointer;
  transition: transform 120ms ease-out, box-shadow 160ms ease-out, background 160ms ease-out;
}
.fc-btn:active { transform: scale(.97); }
.fc-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.fc-btn--principal { width: 100%; min-height: 60px; font-size: 1.12rem; color: #06080d;
  background: linear-gradient(135deg, var(--fc-accent), var(--fc-accent-2)); box-shadow: 0 14px 34px -14px var(--fc-accent); }
.fc-btn--principal:hover:not(:disabled) { box-shadow: 0 0 0 4px color-mix(in srgb, var(--fc-accent) 40%, transparent), 0 14px 34px -14px var(--fc-accent); }
.fc-btn--plein { background: #fff; color: #0b1020; }
.fc-btn--plein[data-etat="en-cours"] { background: rgba(0, 0, 0, .42); color: #fff; border-color: rgba(255, 255, 255, .55); }
.fc-btn--discret { background: rgba(0, 0, 0, .2); color: #fff; border-color: rgba(255, 255, 255, .38); font-weight: 700; font-size: .92rem; }
body[data-zone="neutre"] .fc-btn--discret { background: rgba(255, 255, 255, .06); border-color: rgba(148, 163, 184, .3); }
.fc-btn--discret[data-armee="oui"] { background: #fff; color: #b91c1c; border-color: #fff; }

:where(a, button, input):focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* --- Séance : chrono + statistiques --------------------------------------------- */
.fc-seance {
  display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border-radius: 22px;
  background: var(--fc-panneau); border: 1px solid var(--fc-bord);
}
.fc-chrono { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fc-chrono__temps { font-family: var(--fc-chiffres); font-size: clamp(2.2rem, 9vw, 3.4rem); font-weight: 800; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.fc-chrono__boutons { display: flex; gap: 8px; flex-wrap: wrap; }
.fc-chrono__boutons .fc-btn--plein { min-width: 132px; }
.fc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.fc-stat { min-width: 0; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .2); }
body[data-zone="neutre"] .fc-stat { background: rgba(255, 255, 255, .04); }
.fc-stat dt { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fc-texte-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-stat dd { margin: 4px 0 0; font-family: var(--fc-chiffres); font-size: clamp(1.25rem, 4.6vw, 1.75rem); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fc-stat dd small { font-size: .55em; font-weight: 600; color: var(--fc-texte-2); }
/* Sur téléphone, la case « Zone verte » porte deux valeurs (durée + pourcentage) : elle est plus large. */
@media (max-width: 620px) {
  .fc-stats { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); }
  .fc-stat dt { letter-spacing: .04em; }
}
.fc-pied { display: flex; align-items: center; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; min-height: 20px; }
.fc-pied:not(:has(> :not([hidden]))) { display: none; }
.fc-veille { font-size: .76rem; font-weight: 600; color: var(--fc-texte-2); }
.fc-veille::before { content: '☀ '; }
.fc-veille[data-ok="non"] { color: #fde68a; }
.fc-veille[data-ok="non"]::before { content: '⚠ '; }

/* --- Écran large (ordinateur, tablette ou écran posé sur le tapis) -----------------
   Le chiffre à gauche, la séance en colonne à droite. */
@media (min-width: 960px) and (min-height: 540px) {
  .fc-app { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); grid-template-rows: auto auto 1fr;
    grid-template-areas: "barre barre" "reglages reglages" "scene seance"; gap: 8px 20px; padding-left: 24px; padding-right: 24px; }
  .fc-bpm { font-size: clamp(8rem, min(30vw, 50vh), 30rem); }
  body[data-source="aucune"] .fc-bpm { font-size: clamp(6rem, min(16vw, 24vh), 14rem); }
  body[data-source="simulation"] .fc-bpm { font-size: clamp(7rem, min(26vw, 36vh), 24rem); }
  .fc-seance { align-self: center; gap: 18px; padding: 24px; }
  .fc-chrono { flex-direction: column; align-items: stretch; gap: 16px; text-align: center; }
  .fc-chrono__temps { font-size: 4.2rem; }
  .fc-chrono__boutons { display: grid; grid-template-columns: 1fr 1fr; }
  .fc-stats { grid-template-columns: minmax(0, 1fr); }
  .fc-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px; }
  .fc-stat dd { margin: 0; font-size: 1.9rem; }
  .fc-stat dt { font-size: .76rem; }
}

/* --- Très grand écran (moniteur ou télé devant le tapis) : la colonne de séance grandit aussi,
   pour rester lisible à la même distance que le chiffre. */
@media (min-width: 1500px) and (min-height: 800px) {
  .fc-app { grid-template-columns: minmax(0, 1fr) minmax(420px, 520px); }
  .fc-zone { font-size: 2rem; padding: 10px 22px; }
  .fc-pct { font-size: 2.8rem; }
  .fc-jauge { width: min(100%, 820px); }
  .fc-jauge__piste { height: 18px; }
  .fc-jauge__reperes { font-size: 1.1rem; }
  .fc-seance { padding: 30px; gap: 22px; }
  .fc-chrono__temps { font-size: 5.8rem; }
  .fc-btn { min-height: 56px; font-size: 1.15rem; }
  .fc-stat { padding: 18px 20px; }
  .fc-stat dt { font-size: .95rem; }
  .fc-stat dd { font-size: 2.7rem; }
  .fc-veille, .fc-pied .fc-lien { font-size: .95rem; }
}

/* --- Téléphone couché (peu de hauteur) : même principe, en plus serré -------------- */
@media (orientation: landscape) and (max-height: 539px) {
  .fc-app { grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); grid-template-rows: auto auto 1fr;
    grid-template-areas: "barre barre" "reglages reglages" "scene seance"; gap: 3px 12px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px)); padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .fc-scene { gap: 4px; padding: 0; }
  .fc-bpm { font-size: clamp(4.5rem, min(26vw, 44vh), 14rem); }
  body[data-source="aucune"] .fc-bpm { font-size: clamp(3.5rem, 22vh, 6rem); }
  body[data-source="simulation"] .fc-bpm { font-size: clamp(4rem, 30vh, 9rem); }
  .fc-zone { padding: 4px 12px; font-size: .9rem; }
  .fc-pct { font-size: 1.05rem; }
  .fc-simu { flex-direction: row; gap: 10px; margin-top: 4px; padding: 6px 10px; border-radius: 14px; }
  .fc-simu label { display: none; }
  .fc-simu .fc-btn { flex: none; min-height: 36px; padding: 0 12px; }
  .fc-outil, .fc-retour { height: 38px; min-height: 38px; }
  .fc-avis { margin: 0; padding: 6px 12px; font-size: .8rem; }
  .fc-jauge__reperes, .fc-aide { display: none; }
  .fc-jauge { margin-top: 4px; }
  .fc-depart { flex-direction: row; width: auto; margin-top: 6px; }
  .fc-btn--principal { width: auto; min-height: 48px; font-size: 1rem; }
  .fc-seance { align-self: center; gap: 6px; padding: 10px 12px; }
  .fc-chrono { gap: 6px; }
  .fc-chrono__temps { font-size: 2rem; }
  .fc-chrono__boutons .fc-btn { min-height: 40px; padding: 0 12px; }
  .fc-chrono__boutons .fc-btn--plein { min-width: 0; }
  .fc-stats { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .fc-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 10px; }
  .fc-stat dd { margin: 0; font-size: 1.15rem; }
}

/* --- Téléphone peu haut tenu droit (≤ 700 px) : on serre pour que rien ne défile ---- */
@media (orientation: portrait) and (max-height: 700px) {
  .fc-app { row-gap: 4px; }
  .fc-scene { gap: 6px; padding: 2px 0; }
  .fc-bpm { font-size: clamp(5rem, min(38vw, 26vh), 12rem); }
  body[data-source="aucune"] .fc-bpm { font-size: clamp(3.5rem, 14vh, 6rem); }
  body[data-source="simulation"] .fc-bpm { font-size: clamp(4.5rem, min(36vw, 20vh), 10rem); }
  .fc-jauge { margin-top: 2px; }
  .fc-jauge__reperes { height: 18px; margin-top: 6px; }
  .fc-simu { gap: 6px; margin-top: 4px; padding: 10px 12px; }
  .fc-simu label { display: none; }
  .fc-seance { gap: 8px; padding: 12px; }
  .fc-aide { display: none; }
  .fc-depart { margin-top: 6px; gap: 8px; }
}

/* --- Petit téléphone ---------------------------------------------------------------- */
@media (max-width: 380px) {
  .fc-stat { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  body[data-zone="haut"]::after { opacity: 1; }
}

/* --- Diffusion vers la tablette murale (13/11/2026) --------------------------------------- */
.fc-tablette { text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--fc-bord); background: var(--fc-panneau); color: var(--fc-texte-2); font-size: .8rem; }
.fc-tablette[data-etat="direct"] { color: #fff; border-color: rgba(255, 255, 255, .7); }
.fc-tablette[data-etat="direct"]::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: #f87171; vertical-align: 1px; animation: fc-clignote 1.2s ease-in-out infinite; }
.fc-tablette[data-etat="coupee"], .fc-tablette[data-etat="hors"] { opacity: .8; }
.fc-tablette[data-etat="erreur"] { color: #fde68a; border-color: rgba(253, 230, 138, .6); }
