/* Accueil IFC OS (core/views/home.ejs), à l'image de marque Inflight Canada.
   Couleurs du kit de marque : Encre #0A1B2E, Bleu nuit #0F2C4C, Bleu #2F7BF5, Ciel #7DB8FF, Brume #EEF3F8,
   Ardoise #4A5B6C, Rouge Canada #D52B1E (réservé à « canada » et à l'aube). Typographie : Segoe UI. */

.os-home {
  --os-ink: #0A1B2E;
  --os-blue: #2F7BF5;
  --os-sky: #7DB8FF;
  --os-mist: #EEF3F8;
  --os-slate: #4A5B6C;
  --os-fade: 0.45s ease; /* changement de thème : fondu de toutes les couleurs de la page */

  /* Thème clair : ciel blanc, horizon bleu, sol Brume (fond d'accueil clair du kit). */
  --os-eyebrow: var(--os-blue);
  --os-line: var(--os-blue);
  --os-band-left: rgba(47, 123, 245, 0.30); /* halo plus fort à gauche (l'aube), qui s'estompe vers la droite */
  --os-band-right: rgba(47, 123, 245, 0.07);
  --os-ground: var(--os-mist);
  --os-card: #FFFFFF;
  --os-card-border: #DCE5EF;
  --os-card-hover: var(--os-blue);
  --os-card-title: var(--os-ink);
  --os-card-text: var(--os-slate);
  --os-icon-tile: var(--os-mist);
  --os-shadow: 0 1px 2px rgba(10, 27, 46, 0.06), 0 8px 24px rgba(10, 27, 46, 0.06);
  --os-shadow-hover: 0 2px 4px rgba(10, 27, 46, 0.08), 0 16px 36px rgba(47, 123, 245, 0.16);

  max-width: none;
  padding: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--os-ground);
  transition: background-color var(--os-fade);
}

/* Thème sombre : ciel de nuit, lueur rouge Canada à gauche, liseré clair (fond d'accueil sombre du kit). */
:root[data-theme="dark"] .os-home {
  --os-eyebrow: var(--os-sky);
  --os-line: #FFE3DF;
  --os-band-left: rgba(213, 43, 30, 0.75);
  --os-band-right: rgba(213, 43, 30, 0.10);
  --os-ground: #13325A;
  --os-card: rgba(10, 27, 46, 0.55);
  --os-card-border: rgba(125, 184, 255, 0.22);
  --os-card-hover: var(--os-sky);
  --os-card-title: #FFFFFF;
  --os-card-text: #B9C7D6;
  --os-icon-tile: rgba(255, 255, 255, 0.08);
  --os-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 10px 28px rgba(0, 0, 0, 0.25);
  --os-shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.3), 0 18px 40px rgba(125, 184, 255, 0.14);
}

/* Toute la page aux couleurs du « sol » (pas de bande d'une autre couleur sous le contenu). */
body:has(.os-home) { background: #EEF3F8; transition: background-color 0.45s ease; }
:root[data-theme="dark"] body:has(.os-home) { background: #13325A; }
/* Pas de barre en haut : deux boutons ronds flottants sur le ciel (icône IFC OS à gauche, thème à droite). */
.topbar-floating {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  padding: clamp(12px, 2vw, 22px) clamp(14px, 2.4vw, 28px);
  pointer-events: none; /* seuls les boutons captent la souris */
}
.float-btn {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(10, 27, 46, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: #0F2C4C;
  box-shadow: 0 2px 10px rgba(10, 27, 46, 0.08);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.float-btn:hover { background: #FFFFFF; color: #2F7BF5; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(47, 123, 245, 0.18); }
.float-btn:active { transform: scale(0.95); }
.float-btn img { display: block; border-radius: 6px; }
:root[data-theme="dark"] .float-btn { background: rgba(255, 255, 255, 0.08); border-color: rgba(125, 184, 255, 0.22); color: #FFFFFF; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3); }
:root[data-theme="dark"] .float-btn:hover { background: rgba(255, 255, 255, 0.14); color: #7DB8FF; }
/* À droite : langue (pages de compte), thème, puis le menu de la personne connectée. */
.float-group { display: flex; align-items: center; gap: 10px; }
.float-group form { margin: 0; pointer-events: auto; }
.float-text { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; }
/* Menu de la personne connectée : une pastille à son nom, de la même matière que les boutons ronds. */
.float-user { pointer-events: auto; }
.float-user summary {
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(10, 27, 46, 0.08);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.72);
  color: #0F2C4C;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(10, 27, 46, 0.08);
  backdrop-filter: blur(8px);
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease;
}
.float-user summary:hover { background: #FFFFFF; color: #2F7BF5; }
:root[data-theme="dark"] .float-user summary { background: rgba(255, 255, 255, 0.08); border-color: rgba(125, 184, 255, 0.22); color: #FFFFFF; }
:root[data-theme="dark"] .float-user summary:hover { background: rgba(255, 255, 255, 0.14); color: #7DB8FF; }
/* Thème : lune en clair (passer au sombre), soleil en sombre (passer au clair), avec un petit fondu tournant. */
#theme-toggle svg { grid-area: 1 / 1; transition: opacity 0.35s ease, transform 0.45s ease; }
#theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
:root[data-theme="dark"] #theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }
:root[data-theme="dark"] #theme-toggle .icon-sun { opacity: 1; transform: none; }

/* ---- Ciel : logo, titre ---- */
/* Deux dégradés superposés (un dégradé CSS ne s'anime pas) : le ciel de nuit apparaît en fondu par-dessus le ciel clair. */
.os-sky { position: relative; background: linear-gradient(#FFFFFF, #F5F8FC); overflow: hidden; }
.os-sky::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(#0A1B2E, #0E2440);
  opacity: 0;
  transition: opacity var(--os-fade);
}
:root[data-theme="dark"] .os-sky::before { opacity: 1; }
.os-sky-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(64px, 7vw, 96px) clamp(16px, 4vw, 40px) clamp(112px, 10.5vw, 175px); /* bas : place de l'horizon sous le texte */
}
/* Logo au centre, tel quel ; les deux versions superposées pour un fondu enchaîné. */
.os-sky-inner { text-align: center; }
.os-logo { position: relative; display: block; width: 340px; max-width: 78vw; margin: 0 auto clamp(14px, 1.8vw, 22px); }
.os-logo img { display: block; width: 100%; height: auto; transition: opacity var(--os-fade); }
.os-logo .os-logo-dark { position: absolute; inset: 0; opacity: 0; }
:root[data-theme="dark"] .os-logo .os-logo-light { opacity: 0; }
:root[data-theme="dark"] .os-logo .os-logo-dark { opacity: 1; }
/* Sous le logo, seulement le nom de la plateforme, en bleu (Bleu sur fond clair, Ciel sur fond foncé). */
.os-home .os-name {
  margin: 0;
  color: var(--os-eyebrow);
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
  transition: color var(--os-fade);
}

/* ---- Horizon : arc d'ellipse, deux bandes de halo, liseré ---- */
.os-horizon { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: clamp(80px, 9.5vw, 160px); }
.os-band-left { stop-color: var(--os-band-left); transition: stop-color var(--os-fade); }
.os-band-right { stop-color: var(--os-band-right); transition: stop-color var(--os-fade); }
.os-band-outer { opacity: 0.55; }
.os-planet { fill: var(--os-ground); transition: fill var(--os-fade); }
.os-line { fill: none; stroke: var(--os-line); stroke-width: 2.5; vector-effect: non-scaling-stroke; transition: stroke var(--os-fade); }

/* ---- Sol : les outils, juste sous l'horizon ---- */
/* Chevauche le bas du ciel d'un pixel : pas de fine ligne entre l'horizon et le sol (arrondis de la mise à l'échelle). */
.os-ground { position: relative; margin-top: -1px; background: var(--os-ground); transition: background-color var(--os-fade); }
.os-ground-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4px clamp(16px, 4vw, 40px) 48px;
}
.os-footer { margin: 28px 0 0; color: var(--os-card-text); font-size: 0.8rem; text-align: center; transition: color var(--os-fade); }

/* ---- Connexion et mot de passe : une carte posée sur le sol, sous l'horizon ---- */
.os-home .os-login {
  max-width: 420px;
  margin: 0 auto;
  padding: 28px;
  border-color: var(--os-card-border);
  border-radius: 16px;
  background: var(--os-card);
  color: var(--os-card-title);
  box-shadow: var(--os-shadow);
}
:root[data-theme="dark"] .os-home .os-login { backdrop-filter: blur(6px); }
.os-login h2 { margin: 0 0 6px; font-size: 1.35rem; }
.os-login > .muted { margin: 0 0 20px; color: var(--os-card-text); font-size: 0.92rem; }
/* Séparateur « ou » avant les autres moyens de connexion (bientôt Microsoft). */
.os-login-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--os-card-text); font-size: 0.85rem; }
.os-login-or::before, .os-login-or::after { content: ""; flex: 1; border-top: 1px solid var(--os-card-border); }
.os-login-provider { display: flex; align-items: center; justify-content: center; gap: 10px; }
.os-login .btn-block + .btn-block { margin-top: 10px; }
.os-login-cancel { margin: 14px 0 0; text-align: center; font-size: 0.9rem; }

/* Pendant la bascule de thème, style.css impose (!important) des transitions limitées aux couleurs de fond, de texte
   et de bordure (.theme-anim *) : on y ajoute l'opacité du logo et les couleurs du dessin de l'horizon. */
.theme-anim .os-logo img { transition: opacity 0.45s ease !important; }
.theme-anim #theme-toggle svg { transition: opacity 0.35s ease, transform 0.45s ease !important; }
.theme-anim .os-planet { transition: fill 0.45s ease !important; }
.theme-anim .os-line { transition: stroke 0.45s ease !important; }
.theme-anim .os-band-left, .theme-anim .os-band-right { transition: stop-color 0.45s ease !important; }

@media (prefers-reduced-motion: reduce) {
  .os-home, .os-home *, .os-home *::before, .os-home *::after { transition: none !important; }
  .os-shortcut { transform: none !important; }
}

/* ---- Accueil vivant : ciel plus bas, salutation, raccourcis, tuiles de chaque outil ---- */
.os-sky.compact .os-sky-inner { padding-top: clamp(76px, 5vw, 80px); padding-bottom: clamp(84px, 8vw, 128px); }
.os-sky.compact .os-logo { width: 260px; margin-bottom: 10px; }
.os-sky.compact .os-horizon { height: clamp(64px, 7.5vw, 124px); }

.os-hello { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin: 0 0 18px; }
.os-hello h2 { margin: 0; color: var(--os-card-title); font-size: clamp(1.4rem, 2.2vw, 1.75rem); font-weight: 600; transition: color var(--os-fade); }
.os-hello p { margin: 4px 0 0; color: var(--os-card-text); font-size: 0.98rem; transition: color var(--os-fade); }

/* Actions rapides sur écran tactile (téléphone, tablette) : des pastilles sous les icônes. Avec une souris, elles restent
   dans la recherche Ctrl K. */
.os-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
@media (hover: hover) { .os-quick { display: none; } }
.os-shortcut {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 14px;
  border: 1px solid var(--os-card-border); border-radius: 999px; background: var(--os-card); color: var(--os-card-title);
  font: 600 0.88rem/1.2 inherit; text-decoration: none; cursor: pointer; box-shadow: var(--os-shadow);
  transition: transform 0.15s ease, border-color 0.2s ease, color 0.2s ease;
}
.os-shortcut:hover { transform: translateY(-1px); border-color: var(--os-card-hover); color: var(--os-card-title); text-decoration: none; background: var(--os-card); }
.os-shortcut img { border-radius: 5px; }

/* ---- Deux colonnes : les outils à gauche, le contenu (salutation, « À faire », « Aujourd'hui ») à droite ---- */
.os-layout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; }
/* Pas « .os-main » : ce nom appartient à la coque (os.css), qui le place en colonne 1 sous 900 px de large ; sur iPad,
   le contenu tombait alors sous la colonne des outils. */
.os-home-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.os-home-main > .os-hello, .os-home-main > .os-quick { margin: 0; }
/* Aujourd'hui : un titre, puis une petite carte par sujet, côte à côte et de même hauteur. */
.os-today h3 { margin: 4px 0 10px; color: var(--os-card-title); font-size: 1rem; font-weight: 600; }
.os-today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.os-panel {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px 18px;
  border: 1px solid var(--os-card-border); border-radius: 16px; background: var(--os-card); color: var(--os-card-title);
  box-shadow: var(--os-shadow); transition: border-color var(--os-fade), background-color var(--os-fade);
}
:root[data-theme="dark"] .os-panel { backdrop-filter: blur(6px); }
.os-panel h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1rem; font-weight: 600; color: var(--os-card-title); }
.os-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--os-icon-tile); color: var(--os-card-text); font-size: 0.8rem; font-weight: 600; text-align: center; }
.os-panel p { margin: 0; }
.os-note, .os-muted { color: var(--os-card-text); font-size: 0.85rem; }

/* À faire : une ligne par chose, pastille de couleur, texte, icône de l'outil. */
.os-todo-list { list-style: none; margin: 0 -8px; padding: 0; display: grid; gap: 2px; }
.os-todo-list a {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px;
  color: var(--os-card-title); font-size: 0.93rem; font-weight: 500; text-decoration: none; transition: background-color 0.15s ease;
}
.os-todo-list a:hover { background: var(--os-icon-tile); color: var(--os-card-title); text-decoration: none; }
.os-todo-list i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--os-todo); }
.os-todo-list a.bad i { background: var(--os-bad); }
.os-todo-list a.bad { color: var(--os-bad); }
.os-todo-list span { flex: 1; min-width: 0; }
.os-todo-list img { flex: none; border-radius: 5px; opacity: 0.85; }
.os-clear { display: flex; align-items: center; gap: 8px; color: var(--os-card-text); font-size: 0.93rem; }
.os-clear svg { flex: none; width: 20px; height: 20px; fill: var(--os-ok); }

/* Carte d'« Aujourd'hui » : cliquable en entier vers la bonne page de l'outil. */
.os-section { gap: 8px; text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.os-section:hover { border-color: var(--os-card-hover); box-shadow: var(--os-shadow-hover); color: var(--os-card-title); text-decoration: none; transform: translateY(-2px); }
.os-section-head { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; }
.os-section-head img { flex: none; border-radius: 6px; }
.os-section-head strong { font-weight: 600; }
.os-section-head .os-go { margin-left: auto; color: var(--os-card-text); font-size: 1.2rem; line-height: 1; transition: transform 0.15s ease, color 0.15s ease; }
.os-section:hover .os-go { color: var(--os-card-hover); transform: translateX(3px); }
/* Le grand chiffre (Check-In), et sa légende. */
.os-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.os-big strong { font-size: 1.75rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.os-big span { color: var(--os-card-text); font-size: 0.92rem; }
/* Lignes d'information, avec une pastille de couleur. */
.os-lines { display: grid; gap: 4px; font-size: 0.88rem; color: var(--os-card-text); }
.os-lines > span { display: flex; align-items: baseline; gap: 8px; }
.os-lines > span::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--os-card-border); transform: translateY(-2px); }
.os-lines > span.ok::before { background: var(--os-ok); }
.os-lines > span.warn::before { background: var(--os-warn); }
.os-lines > span.warn { color: var(--os-card-title); }
/* Check-In : sur place par zone (« Hangar 5 · Bureaux 4 »). */
.os-zones { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.88rem; color: var(--os-card-text); }
.os-zones b { color: var(--os-card-title); font-weight: 600; font-variant-numeric: tabular-nums; }
/* Barre de Preflight : à jour / en défaut / à faire. */
.os-bar { display: flex; height: 10px; overflow: hidden; border-radius: 999px; background: var(--os-icon-tile); }
.os-bar span { display: block; height: 100%; }
.os-bar .ok { background: var(--os-ok); }
.os-bar .bad { background: var(--os-bad); }
.os-bar .due { background: var(--os-warn); }
.os-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.88rem; color: var(--os-card-text); }
.os-legend b { color: var(--os-card-title); font-variant-numeric: tabular-nums; }
.os-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; }
.os-legend .ok { background: var(--os-ok); } .os-legend .bad { background: var(--os-bad); } .os-legend .due { background: var(--os-warn); }
/* Absents du jour : des noms en pastilles. */
.os-people { display: flex; flex-wrap: wrap; gap: 6px; }
.os-people span { padding: 3px 10px; border-radius: 999px; background: var(--os-icon-tile); font-size: 0.86rem; }
.os-people small { color: var(--os-card-text); }

.os-home { --os-todo: #2F7BF5; --os-ok: #1b7a49; --os-bad: #c0352a; --os-warn: #b26a00; }
:root[data-theme="dark"] .os-home { --os-todo: #7DB8FF; --os-ok: #4fc98b; --os-bad: #ff8077; --os-warn: #efae4a; }


/* ---- Barre fine en haut de l'accueil (pièces de la coque : recherche, menu du compte) ---- */
.os-home-live { font-family: var(--font); }
.os-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  height: 56px; padding: 0 clamp(12px, 2.4vw, 28px);
  background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.os-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; text-decoration: none; }
.os-brand:hover { text-decoration: none; color: var(--ink); }
.os-brand img { border-radius: 7px; }
.os-topbar .os-searchbtn { width: min(420px, 100%); margin: 0 auto; }
.os-topbar-me { position: relative; display: flex; align-items: center; gap: 10px; }
.os-topbar .os-me { width: auto; gap: 8px; padding: 4px 8px 4px 4px; }
.os-topbar .os-me-name strong { font-size: 13.5px; font-weight: 500; }
.os-topbar .os-chev { margin-left: 2px; }
.os-topbar .os-pop { left: auto; right: 0; top: calc(100% + 6px); min-width: 240px; }
.os-topbar .os-testmode { white-space: nowrap; }
.os-topbar button { min-height: 34px; border: 0; transform: none; }
.os-topbar .os-me:hover { background: var(--hover); }
.os-topbar .os-searchbtn { border: 1px solid var(--line); }
.os-home-live .os-sky.compact .os-sky-inner { padding-top: clamp(88px, 7vw, 100px); }

/* ---- Vos outils : ouvrir un outil d'un clic ---- */
.os-launch { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin: 0 0 18px; }
.os-launch-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; border-radius: 14px;
  border: 1px solid transparent; color: var(--os-card-title); font-weight: 500; font-size: 0.92rem; text-align: center; text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.os-launch-item:hover { background: var(--os-card); border-color: var(--os-card-border); color: var(--os-card-title); text-decoration: none; transform: translateY(-2px); }
.os-launch-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--os-card); border: 1px solid var(--os-card-border); box-shadow: var(--os-shadow); }
.os-launch-icon img { border-radius: 10px; }
.os-launch-icon { position: relative; }
/* Pastille : le nombre de choses qui attendent dans l'outil (rouge s'il y a un problème). */
.os-badge {
  position: absolute; top: -7px; right: -9px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  border: 2px solid var(--os-ground); background: var(--os-todo); color: #fff;
  font: 700 0.75rem/18px var(--font, inherit); text-align: center; font-variant-numeric: tabular-nums;
}
:root[data-theme="dark"] .os-badge { color: #0A1B2E; }
.os-badge.bad { background: var(--os-bad); }
.os-shortcut:hover { text-decoration: none; }

@media (max-width: 720px) {
  .os-topbar .os-searchbtn span, .os-topbar .os-searchbtn kbd, .os-topbar .os-me-name, .os-topbar .os-testmode-text { display: none; }
  .os-topbar .os-searchbtn { width: auto; margin: 0 0 0 auto; }
  .os-launch { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
  .os-launch-icon { width: 52px; height: 52px; }
}

/* ---- Tout l'accueil sur un écran : ciel en bandeau, outils et raccourcis sur une rangée, tuiles serrées ---- */
.os-topbar button:hover { background: var(--hover); }
.os-topbar .os-searchbtn:hover { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
/* Ciel en bandeau bas : le logo, sans prendre le quart de l'écran. */
.os-home-live .os-sky.compact .os-sky-inner { padding: 70px 16px clamp(34px, 3.5vw, 48px); }
.os-home-live .os-sky.compact .os-logo { width: 180px; margin-bottom: 4px; }
.os-home-live .os-name { font-size: 0.78rem; }
.os-home-live .os-sky.compact .os-horizon { height: clamp(26px, 3vw, 44px); }
.os-home-live .os-ground-inner { max-width: 1440px; padding: 6px clamp(16px, 3vw, 40px) 20px; }
.os-home-live .os-hello h2 { font-size: clamp(1.3rem, 1.9vw, 1.55rem); }
.os-home-live .os-hello { align-items: baseline; justify-content: flex-start; gap: 4px 14px; }
.os-hello .os-date { margin: 0; color: var(--os-card-text); font-size: 0.98rem; }
.os-date::first-letter { text-transform: uppercase; }
.os-quick .os-shortcut { min-height: 34px; padding: 5px 12px; font-size: 0.85rem; }
.os-home-live .os-footer { margin-top: 16px; }

/* Colonne des outils : une carte verticale, qui reste en vue en descendant dans la page. */
.os-dock {
  position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; width: 104px; margin: 0; padding: 10px 6px;
  border: 1px solid var(--os-card-border); border-radius: 18px; background: var(--os-card); box-shadow: var(--os-shadow);
}
:root[data-theme="dark"] .os-dock { backdrop-filter: blur(6px); }
.os-dock .os-launch-item { gap: 6px; padding: 9px 4px 7px; border-radius: 12px; font-size: 0.8rem; line-height: 1.2; }
.os-dock .os-launch-item:hover { background: var(--os-icon-tile); border-color: transparent; transform: none; }
.os-dock .os-launch-icon { width: 52px; height: 52px; border-radius: 14px; box-shadow: none; }
.os-dock .os-launch-icon img { width: 38px; height: 38px; border-radius: 10px; }
.os-dock .os-badge { border-color: var(--os-card); }
:root[data-theme="dark"] .os-dock .os-badge { border-color: #13325A; }

/* Téléphone : une seule colonne ; les outils en rangée au-dessus du contenu. */
@media (max-width: 720px) {
  .os-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .os-dock { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); width: auto; }
}

/* ---- Arrivée sur l'accueil juste après la connexion (.arrive, une seule fois) : la salutation, les outils, les raccourcis
   et les tuiles apparaissent l'un après l'autre ; le départ animé est sur la page de connexion (login.js). ---- */
.os-home-live.arrive :is(.os-hello, .os-app, .os-shortcut, .os-panel) {
  animation: ifc-arrive 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; animation-delay: calc(120ms + var(--i, 0) * 45ms);
}
@keyframes ifc-arrive { from { opacity: 0; transform: translateY(16px); } }

@media (prefers-reduced-motion: reduce) {
  .os-home-live.arrive :is(.os-hello, .os-app, .os-shortcut, .os-panel) { animation: none; }
}

/* « Bienvenue à bord » : bandeau bleu en haut de l'écran, sous la barre ; descend, reste 4 s, puis remonte. */
.os-welcome {
  position: fixed; z-index: 30; top: 68px; left: 50%; display: flex; align-items: center; gap: 10px;
  padding: 11px 22px 11px 16px; border-radius: 999px; background: linear-gradient(135deg, #2F7BF5, #1F5FD0); color: #fff;
  font-size: 1rem; font-weight: 600; box-shadow: 0 10px 30px rgba(47, 123, 245, 0.35), 0 2px 6px rgba(10, 27, 46, 0.15);
  transform: translateX(-50%); pointer-events: none; animation: os-welcome 5.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s both;
}
.os-welcome svg { width: 20px; height: 20px; fill: currentColor; }
@keyframes os-welcome {
  0% { opacity: 0; transform: translate(-50%, -24px); }
  10%, 85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -24px); visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { .os-welcome { animation: none; } }

/* Fil en direct (core/lib/feed.js) : en haut à droite, sous la barre, comme le fil de Preflight. Chaque annonce glisse
   depuis la droite, reste 12 s puis s'efface (5 au plus, 3 sur un téléphone). Seules les annonces avec un lien captent le clic. */
.os-feed {
  position: fixed; z-index: 25; top: 68px; right: 16px; display: flex; flex-direction: column; gap: 8px;
  width: min(340px, calc(100vw - 32px)); pointer-events: none;
}
.os-feed-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--ink); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--r);
  box-shadow: var(--shadow-pop); animation: os-feed-in 0.3s ease-out; transition: opacity 0.4s, transform 0.4s;
}
a.os-feed-item { pointer-events: auto; }
a.os-feed-item:hover { text-decoration: none; color: var(--ink); border-color: var(--line-strong); }
.os-feed-item.ok { border-left-color: var(--ok); }
.os-feed-item.bad { border-left-color: var(--bad); }
.os-feed-item.warn { border-left-color: var(--warn); }
.os-feed-item.todo, .os-feed-item.info { border-left-color: var(--info); }
.os-feed-item img { flex: none; width: 22px; height: 22px; border-radius: 6px; }
.os-feed-body { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.os-feed-body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-feed-body span { color: var(--muted); font-size: 0.84rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.os-feed-time { flex: none; font: 500 0.74rem var(--mono); color: var(--muted); }
.os-feed-item.leaving { opacity: 0; transform: translateX(24px); }
@keyframes os-feed-in { from { opacity: 0; transform: translateX(40px); } }
@media (max-width: 640px) { .os-feed-item:nth-child(n + 4) { display: none; } }
@media (prefers-reduced-motion: reduce) { .os-feed-item { animation: none; transition: none; } }
