/* Espaces Études, Sportif, Indépendant, Entrepreneur… (app/espaces.js, app/entreprise.js). Couleurs et polices de la v8. */
.ek-tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.ek-tuiles-app { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.ek-tuile { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ek-val { font-size: 30px; line-height: 1.05; font-weight: 400; color: var(--ink); }
.ek-etat-a-brancher .ek-val, .ek-etat-erreur .ek-val { color: var(--ink-3); }
.ek-pied { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 11px; color: var(--ink-3); min-width: 0; }
.ek-pied > span { overflow-wrap: anywhere; }
.ek-delta { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.ek-delta.haut { color: var(--signal); }
.ek-delta.bas { color: var(--danger); }
.ek-abrancher { color: var(--accent); font-weight: 600; }
.ek-doc { width: 100%; color: var(--ink-3); }
.ek-manuel { color: var(--ink-2); }
.ek-erreur { color: var(--danger); }
.ek-entete { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ek-nom { font-size: 24px; }
.ek-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.ek-barres { width: 100%; height: 84px; display: block; margin-bottom: 6px; }
.ek-vide { font-size: 12.5px; color: var(--ink-2); padding: 8px 0; }
.ek-texte { font-size: 13px; color: var(--ink-2); line-height: 1.5; margin: 0; }
.ek-source { font-size: 11px; color: var(--ink-3); padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--border); }
.ek-objectif { font-size: 15px; padding: 8px 0; border-top: 1px solid var(--border); }
.ek-entete + .ek-objectif { border-top: 0; }
.ek-table { display: flex; flex-direction: column; }
.ek-ligne { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--border); font-size: 12.5px; }
.ek-ligne span:nth-child(2) { color: var(--ink-2); }
.ek-form { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 10px; }
.ek-form-col { flex-direction: column; align-items: stretch; }
.ek-form input, .ek-form select { height: 34px; padding: 0 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink); font: inherit; font-size: 12.5px; min-width: 0; }
.ek-form input:not([type]), .ek-form input[type="text"], .ek-form select { flex: 1 1 140px; }
.ek-form input[type="number"] { width: 78px; }
.ek-form input[type="date"] { width: 150px; }
.ek-tag { font-size: 10.5px; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); }
.ek-x { min-width: 44px; height: 44px; margin: -8px -8px -8px 0; font-size: 12px; border-radius: 7px; color: var(--ink-3); line-height: 1; }
.ek-x:not(.arme) { font-size: 18px; }
.ek-x.arme { color: var(--danger); font-weight: 600; }
.ek-x:hover { background: var(--surface-2); color: var(--danger); }
.ek-petit { height: 28px !important; font-size: 11.5px !important; }
.ek-alerte { background: var(--danger-bg); border-color: var(--danger); display: flex; flex-direction: column; gap: 4px; }
.ek-note { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.ek-note strong { font-size: 24px; font-weight: 400; color: var(--accent); }
.ek-note span { font-size: 12px; color: var(--ink-2); }
.ek-pastille { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.ek-pastille.ek-fait { background: var(--signal-bg); color: var(--signal); }
.ek-pastille.ek-en-partie { background: var(--accent-bg); color: var(--accent); }
@media (max-width: 560px) {
  .ek-apps { grid-template-columns: minmax(0, 1fr); }
  .ek-tuiles, .ek-tuiles-app { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ek-val { font-size: 24px; }
  .ek-ligne { grid-template-columns: 56px 1fr; }
  .ek-ligne span:last-child { grid-column: 2; }
}
.ek-manque { margin: 0 0 12px; padding-top: 0; border-top: 0; }
.ek-form.ek-form-col > input { flex: none; } /* en colonne, flex-basis jouerait sur la hauteur */
.ek-facture { flex-wrap: wrap; row-gap: 6px; } /* sur iPhone, le montant et les boutons passent dessous au lieu de chevaucher le client */
.ek-facture > div { flex: 1 1 120px !important; }
