/* =====================================================================
   BATTEASY — Design system de l'application (HTML / CSS / JS)
   Source : charte graphique officielle (planche page 115, 29 nov 2025)
   Ce fichier est LA référence de style : la future app doit l'importer
   tel quel. Tout est exprimé en tokens (variables CSS).
   ===================================================================== */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Couleurs officielles (charte) */
  --be-teal: #009989;          /* primaire : boutons, liens, icônes actives */
  --be-ink: #3c3c3b;           /* texte principal, logo noir */

  /* Déclinaisons dérivées (observées dans les maquettes finales p.73-131) */
  --be-teal-dark: #007d70;     /* hover / pressed */
  --be-teal-light: #7fcbc3;    /* boutons désactivés, surlignage secondaire */
  --be-teal-50: #e6f4f2;       /* fond de header dégradé, chips */
  --be-teal-10: #f2f9f8;       /* fond de sections */
  --be-ink-2: #6b6b6a;         /* texte secondaire */
  --be-ink-3: #9a9a99;         /* placeholders, libellés inactifs */
  --be-line: #e3e6e5;          /* bordures des champs, séparateurs */
  --be-bg: #ffffff;            /* fond des écrans */
  --be-bg-2: #f6f8f8;          /* fond des cartes secondaires */
  --be-success: #2db573;       /* connexion réussie, batterie chargée */
  --be-danger: #f24034;        /* alertes, toggle OFF, suppression */
  --be-warning: #f5a000;       /* logotype connexion, avertissements */
  --be-info: #2ca5e0;          /* liens d'information, Bluetooth */
  --be-white: #ffffff;

  /* Typographie : Nunito (Google Fonts, OFL). Graisses 400/600/700/800/900 */
  --be-font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --be-fs-xs: 11px;
  --be-fs-sm: 13px;
  --be-fs-md: 15px;
  --be-fs-lg: 18px;
  --be-fs-xl: 22px;
  --be-fs-2xl: 28px;
  --be-tracking-logo: 0.1em;   /* "interlettrage 100" de la charte */

  /* Rayons, espacements, ombres */
  --be-radius-sm: 8px;
  --be-radius-md: 12px;
  --be-radius-lg: 16px;
  --be-radius-pill: 999px;
  --be-space-1: 4px;
  --be-space-2: 8px;
  --be-space-3: 12px;
  --be-space-4: 16px;
  --be-space-5: 24px;
  --be-space-6: 32px;
  --be-shadow-sm: 0 1px 3px rgba(60, 60, 59, 0.08);
  --be-shadow-md: 0 6px 20px rgba(60, 60, 59, 0.12);
  --be-shadow-lg: 0 16px 40px rgba(60, 60, 59, 0.18);

  /* Format de référence des maquettes : iPhone 390 × 844 pt */
  --be-screen-w: 390px;
  --be-screen-h: 844px;
  --be-safe-top: 47px;
  --be-safe-bottom: 34px;
  --be-tabbar-h: 72px;
}

/* ---------- 2. RESET MINIMAL (scopé à .be-screen) ---------- */
.be-screen, .be-screen * { box-sizing: border-box; }
.be-screen {
  position: relative;
  width: var(--be-screen-w);
  height: var(--be-screen-h);
  overflow: hidden;
  background: var(--be-bg);
  color: var(--be-ink);
  font-family: var(--be-font);
  font-size: var(--be-fs-md);
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
.be-screen button, .be-screen input, .be-screen select { font: inherit; color: inherit; }
.be-screen button { cursor: pointer; border: 0; background: none; padding: 0; }
.be-screen a { color: var(--be-teal); text-decoration: none; font-weight: 700; }

/* ---------- 3. STATUS BAR (fictive, identique aux maquettes "9:41") ---------- */
.be-statusbar {
  height: var(--be-safe-top);
  flex: 0 0 auto;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 24px 8px;
  font-size: var(--be-fs-sm); font-weight: 800;
}
.be-statusbar .be-icons { display: flex; gap: 5px; align-items: center; }
.be-statusbar .be-icons i { display: inline-block; width: 16px; height: 10px; border-radius: 2px; background: var(--be-ink); opacity: .9; }
.be-statusbar .be-icons i.sig { width: 14px; background: linear-gradient(to right, var(--be-ink) 25%, transparent 25% 37%, var(--be-ink) 37% 62%, transparent 62% 74%, var(--be-ink) 74%); }
.be-statusbar .be-icons i.bat { width: 22px; border: 1.5px solid var(--be-ink); background: linear-gradient(to right, var(--be-ink) 80%, transparent 80%); }
.be-screen.is-brand .be-statusbar, .be-screen.is-brand .be-statusbar i { color: #fff; background-color: transparent; }
.be-screen.is-brand .be-statusbar .be-icons i { background: #fff; }

/* Fond dégradé teal clair en haut (écrans authentifiés dans les maquettes) */
.be-screen.has-gradient { background: linear-gradient(180deg, var(--be-teal-50) 0, var(--be-bg) 160px); }

/* ---------- 4. HEADER D'ÉCRAN ---------- */
/* En-tête : la flèche retour et le titre sont sur la MÊME ligne ; le sous-titre passe dessous, aligné sur le titre */
.be-header { padding: 6px 20px 8px; flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; }
.be-header .be-back { display: inline-flex; width: 36px; height: 36px; margin-left: -8px; align-items: center; justify-content: center; border-radius: 50%; }
.be-header .be-back:active { background: var(--be-teal-50); }
.be-header h1 { margin: 0; flex: 1 1 0; min-width: 0; font-size: var(--be-fs-lg); font-weight: 800; color: var(--be-teal); letter-spacing: .01em; line-height: 1.2; }
.be-header h1.is-ink { color: var(--be-ink); }
.be-header h1.is-xl { font-size: var(--be-fs-2xl); }
.be-header p { margin: 2px 0 0; flex: 0 0 100%; font-size: var(--be-fs-xs); color: var(--be-ink-2); font-weight: 600; }
.be-header .be-back + h1 + p, .be-header .be-back + h1.has-right + p { padding-left: 34px; }   /* sous-titre aligné sur le titre (largeur flèche 36 − 8 + 6) */
.be-header.is-centered { text-align: center; justify-content: center; }
.be-header .be-row { display: flex; align-items: center; justify-content: space-between; }

/* Bandeau "Welcome Home" avec avatar */
.be-welcome { display: flex; align-items: center; gap: 10px; padding: 8px 20px; }
.be-welcome .be-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--be-teal-light); overflow: hidden; flex: 0 0 auto; display: grid; place-items: center; color: #fff; font-weight: 900; }
.be-welcome .be-name small { display: block; font-size: var(--be-fs-xs); color: var(--be-teal); font-weight: 800; }
.be-welcome .be-name strong { display: block; font-size: var(--be-fs-md); font-weight: 800; }
.be-welcome .be-bell { margin-left: auto; width: 36px; height: 36px; display: grid; place-items: center; position: relative; }
.be-welcome .be-bell .be-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--be-danger); }

/* ---------- 5. CONTENU DÉFILANT ---------- */
.be-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 20px 16px; }
.be-body.no-scroll { overflow: hidden; }
.be-section-title { font-size: var(--be-fs-sm); font-weight: 800; color: var(--be-ink); margin: 14px 0 8px; }
.be-muted { color: var(--be-ink-2); font-size: var(--be-fs-xs); font-weight: 600; }
.be-center { text-align: center; }
.be-spacer { flex: 1 1 auto; }

/* ---------- 6. CHAMPS DE FORMULAIRE ---------- */
.be-field { margin: 0 0 12px; }
.be-field label { display: block; font-size: var(--be-fs-sm); font-weight: 800; margin-bottom: 6px; }
.be-input, .be-select {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 46px;
  padding: 0 14px; border: 1px solid var(--be-line); border-radius: var(--be-radius-sm);
  background: var(--be-bg); font-size: var(--be-fs-sm); font-weight: 600; color: var(--be-ink);
}
.be-input input { flex: 1 1 auto; border: 0; outline: 0; background: transparent; min-width: 0; }
.be-input input::placeholder, .be-select .placeholder { color: var(--be-ink-3); font-weight: 600; }
.be-input:focus-within, .be-select.is-open { border-color: var(--be-teal); box-shadow: 0 0 0 3px rgba(0,153,137,.12); }
.be-input.is-error { border-color: var(--be-danger); }
.be-field .be-error { color: var(--be-danger); font-size: var(--be-fs-xs); font-weight: 700; margin-top: 4px; }
.be-field .be-hint { color: var(--be-ink-3); font-size: var(--be-fs-xs); font-weight: 600; margin-top: 4px; }
.be-select { justify-content: space-between; cursor: pointer; position: relative; }
.be-select .be-chev { color: var(--be-ink-2); }
.be-select .be-chev.up { transform: rotate(180deg); }
.be-select .be-cal { color: var(--be-ink-2); }
.be-input .be-eye { color: var(--be-ink-3); }
.be-forgot { text-align: right; font-size: var(--be-fs-xs); margin: -4px 0 12px; }
.be-forgot a { color: var(--be-teal); font-weight: 800; }

/* Menu déroulant (liste ancrée sous le champ, ligne sélectionnée en teal) */
.be-dropdown { position: relative; }
.be-dropdown .be-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5;
  background: var(--be-bg); border: 1px solid var(--be-line); border-radius: var(--be-radius-sm);
  box-shadow: var(--be-shadow-md); overflow: hidden;
}
.be-menu .be-opt { padding: 11px 14px; font-size: var(--be-fs-sm); font-weight: 600; }
.be-menu .be-opt.is-selected { background: var(--be-teal); color: #fff; font-weight: 800; }

/* ---------- 7. BOUTONS ---------- */
.be-screen .be-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 48px; border-radius: var(--be-radius-pill);
  font-size: var(--be-fs-md); font-weight: 800; letter-spacing: .01em;
  transition: filter .15s, transform .05s;
}
.be-screen .be-btn:active { transform: scale(.985); }
.be-screen .be-btn-primary { background: var(--be-teal); color: #fff; }
.be-screen .be-btn-primary:hover { background: var(--be-teal-dark); }
.be-screen .be-btn-primary:disabled, .be-screen .be-btn-primary.is-disabled { background: var(--be-teal-light); color: #fff; cursor: not-allowed; }
.be-screen .be-btn-dark { background: #111; color: #fff; }
.be-screen .be-btn-outline { background: var(--be-bg); color: var(--be-ink); border: 1px solid var(--be-line); }
.be-screen .be-btn-ghost { background: transparent; color: var(--be-teal); }
.be-screen .be-btn-danger { background: var(--be-danger); color: #fff; }
.be-screen .be-btn-danger-soft { background: #fff2f1; color: var(--be-danger); }
.be-screen .be-btn-sm { height: 38px; font-size: var(--be-fs-sm); width: auto; padding: 0 18px; }
.be-btn-row { display: flex; gap: 10px; }
.be-btn-row .be-btn { flex: 1 1 0; }
.be-footer { padding: 10px 20px calc(var(--be-safe-bottom) + 6px); flex: 0 0 auto; }
.be-footer.has-tabbar { padding-bottom: 8px; }
.be-link-line { text-align: center; font-size: var(--be-fs-xs); color: var(--be-ink-2); font-weight: 600; margin-top: 12px; }
.be-fab { width: 56px; height: 56px; border-radius: 50%; background: var(--be-teal); color: #fff; display: grid; place-items: center; box-shadow: var(--be-shadow-md); font-size: 28px; font-weight: 400; line-height: 1; }

/* ---------- 8. LISTES, CARTES, TOGGLES, BADGES ---------- */
.be-list { display: flex; flex-direction: column; gap: 10px; }
.be-item {
  display: flex; align-items: center; gap: 12px; min-height: 52px;
  padding: 8px 12px; border: 1px solid var(--be-line); border-radius: var(--be-radius-md); background: var(--be-bg);
}
.be-item.is-selected { border-color: var(--be-teal); background: var(--be-teal-10); }
.be-item .be-ico { width: 34px; height: 34px; border-radius: 8px; background: var(--be-teal-50); color: var(--be-teal); display: grid; place-items: center; flex: 0 0 auto; }
.be-item .be-txt { flex: 1 1 auto; min-width: 0; }
.be-item .be-txt strong { display: block; font-size: var(--be-fs-sm); font-weight: 800; }
.be-item .be-txt small { display: block; font-size: var(--be-fs-xs); color: var(--be-ink-2); font-weight: 600; }
.be-item .be-txt small.ok { color: var(--be-success); }
.be-item .be-txt small.off { color: var(--be-ink-3); }
.be-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--be-teal-light); flex: 0 0 auto; }
.be-radio.is-on { border-color: var(--be-teal); background: radial-gradient(var(--be-teal) 45%, transparent 50%); }
.be-check { width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--be-teal-light); flex: 0 0 auto; }
.be-check.is-on { border-color: var(--be-teal); background: var(--be-teal); position: relative; }
.be-check.is-on::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
/* toggle un peu plus large (44 → 52 px) : le libellé ON / OFF ne touche plus le cercle */
.be-toggle { width: 52px; height: 24px; border-radius: 12px; background: var(--be-danger); position: relative; flex: 0 0 auto; }
.be-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.be-toggle.is-on { background: var(--be-teal); }
.be-toggle.is-on::after { left: 31px; }
.be-toggle.is-neutral { background: var(--be-ink-3); }
.be-toggle .be-lbl { position: absolute; top: 5px; font-size: 9px; font-weight: 900; color: #fff; }
.be-toggle.is-on .be-lbl { left: 8px; }
.be-toggle:not(.is-on) .be-lbl { right: 7px; }
.be-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: var(--be-radius-pill); font-size: var(--be-fs-xs); font-weight: 800; white-space: nowrap; flex: 0 0 auto; }
.be-badge.ok { background: #e7f7ef; color: var(--be-success); }
.be-badge.warn { background: #fff4e0; color: var(--be-warning); }
.be-badge.danger { background: #fdecea; color: var(--be-danger); }
.be-badge.teal { background: var(--be-teal-50); color: var(--be-teal); }
.be-badge.muted { background: var(--be-bg-2); color: var(--be-ink-2); }
.be-card { border: 1px solid var(--be-line); border-radius: var(--be-radius-md); padding: 12px 14px; background: var(--be-bg); }
.be-card.teal { background: var(--be-teal-10); border-color: var(--be-teal-50); }
.be-card .be-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.be-card .be-kv div small { display: block; font-size: var(--be-fs-xs); color: var(--be-ink-2); font-weight: 700; }
.be-card .be-kv div span { font-size: var(--be-fs-sm); font-weight: 800; }
.be-chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 6px 12px; border-radius: var(--be-radius-pill); border: 1px solid var(--be-line); font-size: var(--be-fs-xs); font-weight: 800; }
.be-chip.is-on { background: var(--be-teal); color: #fff; border-color: var(--be-teal); }
.be-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Lignes de réglages (Settings) */
.be-setting { display: flex; align-items: center; gap: 12px; height: 50px; border-bottom: 1px solid var(--be-line); font-size: var(--be-fs-sm); font-weight: 700; }
.be-setting .be-ico { width: 22px; color: var(--be-teal); display: grid; place-items: center; }
.be-setting .be-val { margin-left: auto; color: var(--be-ink-3); font-weight: 600; font-size: var(--be-fs-xs); }
.be-setting.danger { color: var(--be-danger); }
.be-setting.danger .be-ico { color: var(--be-danger); }
.be-profile { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--be-line); border-radius: var(--be-radius-md); margin-bottom: 10px; }
.be-profile .be-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--be-teal-light); display: grid; place-items: center; color: #fff; font-weight: 900; }
.be-profile strong { display: block; font-size: var(--be-fs-lg); font-weight: 800; line-height: 1.2; }
.be-profile small { display: block; font-size: var(--be-fs-xs); color: var(--be-ink-2); }

/* Notifications */
.be-notif { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--be-radius-md); margin-bottom: 10px; font-size: var(--be-fs-xs); }
.be-notif.ok { background: #e9f8f0; }
.be-notif.danger { background: #fdecea; }
.be-notif.info { background: var(--be-teal-50); }
.be-notif strong { display: block; font-size: var(--be-fs-sm); font-weight: 800; margin-bottom: 2px; }
.be-notif .be-ico { width: 26px; flex: 0 0 auto; display: grid; place-items: center; color: var(--be-success); }
.be-notif.danger .be-ico { color: var(--be-danger); }
.be-notif.info .be-ico { color: var(--be-teal); }
.be-notif time { display: block; color: var(--be-ink-3); font-weight: 700; margin-top: 4px; }

/* ---------- 9. BARRE D'ONGLETS (Home · + · Settings) ---------- */
.be-tabbar {
  flex: 0 0 auto; height: calc(var(--be-tabbar-h) + var(--be-safe-bottom) - 12px);
  border-top: 1px solid var(--be-line); background: var(--be-bg);
  display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: start; padding-top: 8px;
}
.be-tabbar .be-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; font-weight: 800; color: var(--be-ink-3); }
.be-tabbar .be-tab.is-active { color: var(--be-teal); }
.be-tabbar .be-tab .be-fab { margin-top: -30px; }
.be-tabbar .be-tab.is-active::after { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--be-teal); margin-top: 2px; }
.be-home-indicator { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 134px; height: 5px; border-radius: 3px; background: var(--be-ink); opacity: .9; }
.be-screen.is-brand .be-home-indicator { background: #fff; }

/* ---------- 10. MODALES, BOTTOM SHEETS, TOASTS ---------- */
.be-overlay { position: absolute; inset: 0; background: rgba(60,60,59,.55); z-index: 20; display: flex; align-items: center; justify-content: center; padding: 24px; }
.be-overlay.is-bottom { align-items: flex-end; padding: 0; }
.be-modal { width: 100%; background: var(--be-bg); border-radius: var(--be-radius-lg); padding: 20px 18px 16px; text-align: center; position: relative; box-shadow: var(--be-shadow-lg); }
.be-modal .be-close { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border-radius: 50%; color: var(--be-ink-2); display: grid; place-items: center; }
.be-modal .be-ico-big { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; }
.be-modal .be-ico-big.ok { background: #e9f8f0; color: var(--be-success); }
.be-modal .be-ico-big.danger { background: #fdecea; color: var(--be-danger); }
.be-modal .be-ico-big.teal { background: var(--be-teal-50); color: var(--be-teal); }
.be-modal h2 { font-size: var(--be-fs-md); font-weight: 800; margin: 0 0 4px; }
.be-modal h2 em { font-style: normal; color: var(--be-teal); }
.be-modal h2 em.danger { color: var(--be-danger); }
.be-modal p { font-size: var(--be-fs-xs); color: var(--be-ink-2); font-weight: 600; margin: 0 0 12px; }
.be-modal .be-field { text-align: left; }
.be-sheet { width: 100%; background: var(--be-bg); border-radius: var(--be-radius-lg) var(--be-radius-lg) 0 0; padding: 12px 18px calc(var(--be-safe-bottom) + 8px); box-shadow: var(--be-shadow-lg); }
.be-sheet .be-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--be-line); margin: 0 auto 12px; }
.be-toast { position: absolute; left: 16px; right: 16px; bottom: 100px; background: var(--be-ink); color: #fff; padding: 12px 14px; border-radius: var(--be-radius-md); font-size: var(--be-fs-sm); font-weight: 700; box-shadow: var(--be-shadow-lg); z-index: 25; }
.be-toast.ok { background: var(--be-success); }
.be-toast.danger { background: var(--be-danger); }

/* Permission système (style iOS, texte Bluetooth — remplace la modale "Maps" des maquettes) */
.be-sysalert { width: 270px; margin: 0 auto; background: rgba(250,250,250,.98); border-radius: 14px; overflow: hidden; text-align: center; color: #111; font-family: -apple-system, var(--be-font); }
.be-sysalert .be-sys-body { padding: 18px 16px 12px; }
.be-sysalert .be-sys-body strong { display: block; font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.be-sysalert .be-sys-body p { font-size: 12px; margin: 0; color: #333; }
.be-sysalert .be-sys-btn { border-top: 1px solid #d5d5d5; padding: 11px; font-size: 15px; color: #0a7aff; font-weight: 600; }
.be-sysalert .be-sys-btn.primary { font-weight: 700; }

/* ---------- 11. CALENDRIER, CRÉNEAUX, JOURS ---------- */
.be-calendar { border: 1px solid var(--be-line); border-radius: var(--be-radius-md); padding: 10px; background: var(--be-bg); box-shadow: var(--be-shadow-md); }
.be-calendar .be-cal-head { display: flex; align-items: center; justify-content: space-between; font-size: var(--be-fs-sm); font-weight: 800; margin-bottom: 8px; }
.be-calendar .be-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: var(--be-fs-xs); font-weight: 700; }
.be-calendar .be-cal-grid .dow { color: var(--be-ink-3); font-weight: 800; }
.be-calendar .be-cal-grid .d { height: 28px; line-height: 28px; border-radius: 6px; }
.be-calendar .be-cal-grid .d.is-on { background: var(--be-teal); color: #fff; font-weight: 900; }
.be-calendar .be-cal-grid .d.is-past { color: var(--be-ink-3); }
.be-calendar .be-cal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.be-days { display: flex; flex-direction: column; }
.be-days .be-day { display: flex; align-items: center; justify-content: space-between; padding: 10px 4px; font-size: var(--be-fs-sm); font-weight: 700; border-bottom: 1px solid var(--be-line); }
.be-slots { display: flex; flex-direction: column; gap: 6px; }
.be-slot { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--be-line); border-radius: var(--be-radius-sm); font-size: var(--be-fs-xs); font-weight: 700; }
.be-slot.is-on { border-color: var(--be-teal); background: var(--be-teal-10); }
.be-daygroup { margin: 8px 0; }
.be-daygroup .be-dg-title { display: flex; align-items: center; gap: 6px; font-size: var(--be-fs-xs); font-weight: 800; color: var(--be-ink-2); margin-bottom: 6px; }
.be-daygroup .be-dg-title .be-cnt { margin-left: auto; }
.be-daygroup .be-dg-row { display: flex; gap: 8px; align-items: center; }
.be-daygroup .be-dg-row .be-select { flex: 1 1 auto; height: 40px; }
.be-daygroup .be-dg-row .be-ic { color: var(--be-ink-3); }
.be-timepicker { width: 250px; margin: 0 auto; background: var(--be-bg); border-radius: var(--be-radius-lg); padding: 14px; text-align: center; box-shadow: var(--be-shadow-lg); }
.be-timepicker .be-tp-title { font-size: var(--be-fs-sm); font-weight: 800; margin-bottom: 6px; }
.be-timepicker .be-tp-digits { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 34px; font-weight: 800; }
.be-timepicker .be-tp-digits .h { color: var(--be-teal); }
.be-timepicker .be-tp-ampm { display: inline-flex; flex-direction: column; font-size: 10px; font-weight: 900; margin-left: 6px; }
.be-timepicker .be-tp-ampm .on { color: var(--be-teal); }
.be-timepicker .be-tp-clock { width: 170px; height: 170px; border-radius: 50%; background: var(--be-bg-2); margin: 10px auto; position: relative; }
.be-timepicker .be-tp-clock i { position: absolute; left: 50%; top: 50%; width: 2px; height: 70px; background: var(--be-teal); transform-origin: top center; transform: rotate(210deg); }
.be-timepicker .be-tp-clock i::after { content: ""; position: absolute; left: -6px; bottom: -6px; width: 14px; height: 14px; border-radius: 50%; background: var(--be-teal); }

/* ---------- 12. ÉCRANS DE MARQUE, ÉTATS VIDES, ILLUSTRATIONS ---------- */
.be-splash { background: var(--be-teal); color: #fff; align-items: center; justify-content: center; }
.be-splash .be-logo { width: 240px; }   /* 160 → 200 (+25 %) → 240 (+20 %) */
.be-logo-mark { display: inline-block; width: 1em; height: 1em; }
.be-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 30px 20px; color: var(--be-ink-2); font-size: var(--be-fs-sm); font-weight: 700; }
.be-empty .be-plug { width: 120px; height: 120px; }
.be-empty a { color: var(--be-teal); }
.be-plug-illus { width: 150px; height: 150px; margin: 10px auto; display: grid; place-items: center; }
.be-plug-illus svg { width: 100%; height: 100%; }
.be-plug-illus .be-wave { opacity: 0; animation: be-wave 1.6s infinite; }
.be-plug-illus .be-wave:nth-child(2) { animation-delay: .35s; }
.be-plug-illus .be-wave:nth-child(3) { animation-delay: .7s; }
@keyframes be-wave { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 0; } }
.be-phone-illus { width: 90px; height: 170px; margin: 0 auto; border: 4px solid var(--be-ink); border-radius: 18px; display: grid; place-items: center; background: #fff; color: var(--be-teal); font-size: 30px; }
.be-device-hero { text-align: center; padding: 6px 0 4px; }
.be-device-hero .be-name { font-size: var(--be-fs-lg); font-weight: 800; color: var(--be-teal); }
.be-device-hero .be-state { font-size: var(--be-fs-xs); font-weight: 800; color: var(--be-ink-2); }
.be-device-hero .be-state.ok { color: var(--be-success); }
.be-device-hero .be-state.off { color: var(--be-ink-3); }
.be-progress { height: 8px; border-radius: 4px; background: var(--be-teal-50); overflow: hidden; }
.be-progress i { display: block; height: 100%; background: var(--be-teal); border-radius: 4px; }
.be-gauge { display: flex; align-items: baseline; gap: 4px; }
.be-gauge strong { font-size: 40px; font-weight: 900; color: var(--be-teal); line-height: 1; }
.be-gauge span { font-size: var(--be-fs-sm); font-weight: 800; color: var(--be-ink-2); }
.be-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.be-stat { text-align: center; padding: 8px 4px; border-radius: var(--be-radius-sm); background: var(--be-bg-2); }
.be-stat strong { display: block; font-size: var(--be-fs-md); font-weight: 900; }
.be-stat small { font-size: 10px; font-weight: 700; color: var(--be-ink-2); }
.be-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--be-bg-2); font-size: var(--be-fs-sm); color: var(--be-ink-3); font-weight: 600; }
.be-lang { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid var(--be-line); font-size: var(--be-fs-sm); font-weight: 700; }
.be-lang small { display: block; color: var(--be-ink-3); font-size: var(--be-fs-xs); font-weight: 600; }
.be-lang .be-tick { color: var(--be-teal); font-weight: 900; }
.be-keyboard { background: #d1d4d9; padding: 8px 4px calc(var(--be-safe-bottom) + 4px); display: grid; gap: 6px; }
.be-keyboard .be-krow { display: flex; justify-content: center; gap: 5px; }
.be-keyboard .be-krow span { flex: 0 0 31px; height: 40px; border-radius: 5px; background: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 600; color: #111; box-shadow: 0 1px 0 #8a8f98; }
.be-keyboard .be-krow span.wide { flex-basis: 48px; background: #aeb3bc; }
.be-keyboard .be-krow span.space { flex-basis: 150px; }
.be-keyboard .be-krow span.go { flex-basis: 84px; background: var(--be-teal); color: #fff; }

/* ---------- 13. UTILITAIRES ---------- */
.be-mt-1 { margin-top: 4px; } .be-mt-2 { margin-top: 8px; } .be-mt-3 { margin-top: 12px; } .be-mt-4 { margin-top: 16px; } .be-mt-5 { margin-top: 24px; }
.be-mb-2 { margin-bottom: 8px; } .be-mb-3 { margin-bottom: 12px; } .be-mb-4 { margin-bottom: 16px; }
.be-flex { display: flex; align-items: center; gap: 8px; }
.be-flex > .be-grow { min-width: 0; }
.be-toggle, .be-radio, .be-check { display: inline-block; flex: 0 0 auto; vertical-align: middle; }   /* visibles aussi hors d'un conteneur flex (ex. .be-right) */
.be-grow { flex: 1 1 auto; }
.be-right { margin-left: auto; }
.be-teal { color: var(--be-teal); } .be-danger-txt { color: var(--be-danger); } .be-success-txt { color: var(--be-success); }
.be-bold { font-weight: 800; }
.be-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* =====================================================================
   14. AJOUTS PROTOTYPE (navigation, profil, sélecteurs, bannières)
   Flutter : chaque bloc correspond à un widget dans lib/widgets/
   ===================================================================== */
.be-app { position: relative; width: var(--be-screen-w); height: var(--be-screen-h); overflow: hidden; background: var(--be-bg); font-family: var(--be-font); }
.be-page { position: absolute; inset: 0; animation: be-page-in .22s ease-out; }
.be-page.is-back { animation: be-page-back .18s ease-out; }
.be-page.no-anim { animation: none; }
@keyframes be-page-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes be-page-back { from { transform: translateX(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
.be-overlay { animation: be-fade .15s ease-out; }
.be-overlay .be-modal, .be-overlay .be-timepicker, .be-overlay .be-sysalert { animation: be-pop .18s ease-out; }
.be-overlay .be-sheet { animation: be-up .2s ease-out; }
@keyframes be-fade { from { opacity: 0; } }
@keyframes be-pop { from { transform: scale(.94); opacity: 0; } }
@keyframes be-up { from { transform: translateY(40px); } }
.be-toast { animation: be-up .2s ease-out; }
.be-screen [data-go], .be-screen [data-action], .be-screen [data-back] { cursor: pointer; }
.be-item[data-go]:active, .be-item[data-action]:active, .be-setting[data-go]:active, .be-setting[data-action]:active { background: var(--be-teal-10); }
.be-menu .be-opt:active { background: var(--be-teal-50); }
.be-body { -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.be-body::-webkit-scrollbar { display: none; }

/* Avatar (cliquable, photo ou initiales) */
.be-welcome .be-avatar img, .be-profile .be-avatar img, .be-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.be-welcome .be-avatar { cursor: pointer; border: 2px solid #fff; box-shadow: var(--be-shadow-sm); }
.be-avatar-lg { width: 96px; height: 96px; border-radius: 50%; margin: 6px auto 4px; background: var(--be-teal-light); display: grid; place-items: center; color: #fff; font-size: 34px; font-weight: 900; overflow: hidden; position: relative; border: 3px solid #fff; box-shadow: var(--be-shadow-md); }
.be-avatar-wrap { position: relative; width: 96px; margin: 0 auto; }
.be-avatar-wrap .be-avatar-edit { position: absolute; right: -2px; bottom: 2px; width: 32px; height: 32px; border-radius: 50%; background: var(--be-teal); color: #fff; display: grid; place-items: center; border: 2px solid #fff; box-shadow: var(--be-shadow-sm); }
.be-avatar-presets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 8px 0 4px; }
.be-avatar-presets span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 16px; border: 3px solid transparent; cursor: pointer; }
.be-avatar-presets span.is-on { border-color: var(--be-ink); }

/* Compteur numérique (stepper) — Flutter : widget NumericStepper */
.be-stepper { display: flex; align-items: center; gap: 6px; }
.be-stepper button { width: 30px; height: 30px; border-radius: 50%; background: var(--be-teal-50); color: var(--be-teal); font-weight: 900; font-size: 18px; display: grid; place-items: center; }
.be-stepper button:disabled { opacity: .35; cursor: not-allowed; }
.be-stepper .be-val { min-width: 74px; text-align: center; font-weight: 800; font-size: var(--be-fs-sm); }
.be-kv-edit { display: grid; grid-template-columns: 1fr auto; gap: 10px 8px; align-items: center; }
.be-kv-edit small { font-size: var(--be-fs-xs); color: var(--be-ink-2); font-weight: 700; }

/* Segmented control — Flutter : CupertinoSlidingSegmentedControl */
.be-segment { display: flex; background: var(--be-bg-2); border-radius: var(--be-radius-pill); padding: 3px; }
.be-segment span { flex: 1 1 0; text-align: center; padding: 7px 4px; border-radius: var(--be-radius-pill); font-size: var(--be-fs-xs); font-weight: 800; color: var(--be-ink-2); cursor: pointer; }
.be-segment span.is-on { background: var(--be-teal); color: #fff; }

/* Sélecteur d'heure en grille (bottom sheet) */
.be-tp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 6px 0 10px; }
.be-tp-grid span { height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--be-bg-2); font-size: var(--be-fs-xs); font-weight: 800; cursor: pointer; }
.be-tp-grid span.is-on { background: var(--be-teal); color: #fff; }
.be-tp-grid.min { grid-template-columns: repeat(4, 1fr); }
.be-sheet h3 { margin: 0 0 8px; font-size: var(--be-fs-md); font-weight: 800; }
.be-sheet p { font-size: var(--be-fs-xs); color: var(--be-ink-2); font-weight: 600; margin: 0 0 10px; }
.be-calendar .be-cal-grid .d { cursor: pointer; }
.be-calendar .be-cal-head button { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--be-ink-2); }

/* Bannière de notification en app (haut de l'écran) */
.be-banner { position: absolute; left: 10px; right: 10px; top: 52px; z-index: 30; background: var(--be-bg); border-radius: var(--be-radius-md); box-shadow: var(--be-shadow-lg); padding: 10px 12px; display: flex; gap: 10px; align-items: center; font-size: var(--be-fs-xs); animation: be-down .25s ease-out; cursor: pointer; }
.be-banner strong { display: block; font-size: var(--be-fs-sm); font-weight: 800; }
.be-banner .be-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; background: var(--be-teal-50); color: var(--be-teal); }
.be-banner.danger .be-ico { background: #fdecea; color: var(--be-danger); }
.be-banner.ok .be-ico { background: #e9f8f0; color: var(--be-success); }
@keyframes be-down { from { transform: translateY(-30px); opacity: 0; } }

/* Notification avec action de suppression */
.be-notif { position: relative; cursor: pointer; }
.be-notif.is-unread::before { content: ""; position: absolute; left: 4px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--be-teal); }
.be-notif .be-del { margin-left: auto; color: var(--be-ink-3); align-self: flex-start; }

/* Ligne de champ avec valeur alignée à droite (Profil) */
.be-setting .be-right-ctl { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.be-setting .be-select.sm { height: 34px; width: 92px; padding: 0 10px; font-size: var(--be-fs-xs); }
.be-lock { color: var(--be-ink-3); }

/* Menu déroulant : hauteur limitée */
.be-dropdown .be-menu { max-height: 440px; overflow-y: auto; }

/* Lien inline */
.be-link { color: var(--be-teal); font-weight: 800; cursor: pointer; }

/* Sélecteur de prise en tête d'écran */
.be-plugpick { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--be-line); border-radius: var(--be-radius-md); margin-bottom: 8px; cursor: pointer; }
.be-plugpick .be-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--be-teal-50); color: var(--be-teal); display: grid; place-items: center; }
.be-plugpick strong { font-size: var(--be-fs-sm); font-weight: 800; display: block; }
.be-plugpick small { font-size: var(--be-fs-xs); color: var(--be-ink-2); font-weight: 600; }

/* Étapes de connexion */
.be-steps { display: flex; flex-direction: column; gap: 6px; text-align: left; margin: 12px auto 0; width: 240px; }
.be-steps div { display: flex; align-items: center; gap: 8px; font-size: var(--be-fs-xs); font-weight: 700; color: var(--be-ink-3); }
.be-steps div.is-done { color: var(--be-success); }
.be-steps div.is-active { color: var(--be-teal); }
.be-steps i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Illustration icône large */
.be-big-ico { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; margin-bottom: 12px; }
.be-big-ico svg { width: 36px; height: 36px; }
.be-big-ico.teal { background: var(--be-teal-50); color: var(--be-teal); }
.be-big-ico.danger { background: #fdecea; color: var(--be-danger); }
.be-big-ico.warn { background: #fff4e0; color: var(--be-warning); }
.be-empty strong { color: var(--be-ink); font-size: var(--be-fs-lg); font-weight: 800; }

/* ---------- assistant « Ajouter une prise » ---------- */
.be-wizard { padding: 2px 20px 8px; flex: 0 0 auto; }
.be-wz-bars { display: flex; gap: 6px; }
.be-wz-bars i { flex: 1 1 0; height: 6px; border-radius: 3px; background: var(--be-teal-50); transition: background .2s; }
.be-wz-bars i.is-done, .be-wz-bars i.is-active { background: var(--be-teal); }
.be-wz-txt { display: flex; justify-content: space-between; margin-top: 6px; font-size: var(--be-fs-xs); font-weight: 700; color: var(--be-ink-2); }
.be-wz-txt strong { color: var(--be-teal); font-weight: 800; }
.be-screen .be-btn .be-btn-ir { display: inline-flex; margin-left: 2px; }
.be-wz-intro { margin: 2px 0 10px; }
.be-header h1.has-right { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.be-header h1.has-right > span:first-child { min-width: 0; }
.be-header h1 .be-h1-r { flex: 0 0 auto; color: var(--be-ink); white-space: nowrap; }

/* réglage sur 2 lignes : libellé + explication (Réglages → Notifications) */
.be-setting.is-2l { height: auto; padding: 12px 0; align-items: center; }
.be-setting .be-txt { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.be-setting .be-txt strong { font-weight: 800; }
.be-setting .be-txt small { font-size: var(--be-fs-xs); font-weight: 600; color: var(--be-ink-2); line-height: 1.35; margin-top: 2px; }

/* Mes programmes : option Mode Expert repliable */
.be-expert { margin-top: 18px; border: 1px solid var(--be-line); border-radius: var(--be-radius-md); padding: 0 12px; background: var(--be-bg); }
.be-expert > .be-setting { border-bottom: 0; cursor: pointer; }
.be-expert.is-open > .be-setting { border-bottom: 1px solid var(--be-line); }
.be-expert-body { padding: 12px 0 14px; }

/* liste des prises (Réglages → Prises) : croix de suppression */
.be-item .be-del { color: var(--be-ink-3); padding: 6px; margin-right: -6px; }
.be-item .be-del:active { color: var(--be-danger); }

/* iOS : les détecteurs de données (e-mail, adresse, nom) ne doivent ni souligner ni colorer le texte de l'app */
.be-app a[x-apple-data-detectors], .be-app a[href^="mailto:"]:not(.be-link), .be-app a[href^="tel:"] { color: inherit !important; text-decoration: none !important; font: inherit !important; }
.be-app strong, .be-app small, .be-app .be-name { text-decoration: none; }

/* ---------- ÉCHELLE VISUELLE +15 % ----------
   Tout le contenu est agrandi de 15 % (textes, champs, boutons, cartes, icônes, dialogues, toasts),
   SAUF : la barre d'onglets (Accueil · + · Réglages), la cloche de l'accueil et la barre d'état.
   Le contenu garde la largeur de l'écran (zoom = mise à l'échelle dans la même largeur). Flutter : MediaQuery textScaleFactor 1.15 + tailles ×1.15 dans le thème. */
.be-screen > .be-header, .be-screen > .be-body, .be-screen > .be-footer, .be-screen > .be-wizard, .be-screen > .be-welcome, .be-screen > .be-overlay, .be-screen > .be-toast, .be-screen > .be-banner { zoom: 1.15; }
.be-welcome .be-bell { zoom: 0.8696; }   /* la cloche garde sa taille d'origine */
