/* Hassanates : appli des fidèles (coquille, onglets, « Aujourd'hui », écrans). S'appuie sur identite.css.
   Principes : sections pleine largeur sur téléphone (pas de cartes flottantes), grand titre qui se replie,
   rail de rubriques, une seule action vive par écran (le vert), mouvement à ressort, rien qui saute. */
:root {
  --tabbar-h: 62px; --top-h: 52px; --rail-w: 92px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --app-maxw: 680px;
}
.app-body { min-height: 100dvh; padding-top: calc(var(--top-h) + var(--safe-t)); padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
.ico { display: inline-block; vertical-align: middle; flex: none; }
.ico-filled .f { fill: currentColor; }
.ico-filled .g { stroke: var(--ico-gap, var(--c-surface)); }
.brand-mark { flex: none; }

/* ---------- En-tête : barre fine ; le titre y apparaît quand le grand titre passe dessous ---------- */
.app-top {
  position: fixed; z-index: 50; inset: 0 0 auto 0; height: calc(var(--top-h) + var(--safe-t));
  padding: var(--safe-t) max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
  display: flex; align-items: center; gap: 4px; background: var(--c-bg); view-transition-name: app-top;
  transition: box-shadow .2s;
}
.app-top.is-condensed { box-shadow: 0 1px 0 var(--c-line); }
.app-bar-title { flex: 1; min-width: 0; font: 700 1.02rem/1 var(--f-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .35s var(--spring); padding-left: 4px; }
.app-top.is-condensed .app-bar-title { opacity: 1; transform: none; }
.app-top .spacer { flex: 0 1 auto; }
.app-top .visually-hidden + .spacer { flex: 1; }
.app-logo, .app-back, .app-search { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; background: transparent; color: var(--c-text); text-decoration: none; border-radius: var(--r-md); cursor: pointer; transition: transform .35s var(--spring), background-color .15s; }
.app-logo { width: auto; padding: 0 8px; display: flex; gap: 8px; align-items: center; }
.app-wordmark { font: 800 1.14rem/1 var(--f-title); letter-spacing: -.03em; }
.app-back:active, .app-search:active { transform: scale(.86); }
@media (hover: hover) { .app-back:hover, .app-search:hover { background: var(--c-surface-2); } }
.app-offline { font: 600 .8125rem/1 var(--f-body); padding: .45em .6em; border-radius: var(--r-sm); background: var(--c-warn); color: var(--on-warn); }
.app-offline[data-state="ok"] { background: var(--c-surface-2); color: var(--c-text); }
.app-offline[data-state="syncing"] { background: var(--jade); color: var(--on-jade); }
.app-offline[data-state="rejected"] { background: var(--c-err); color: var(--on-err); }
:is(body[data-page="accueil"], body.sky-top) { --bar: var(--sky-top); }
:is(body[data-page="accueil"], body.sky-top) .app-top { background: var(--sky-top); color: var(--on-sky); }
@supports (animation-timeline: scroll()) {
  /* la barre laisse voir le ciel, et ne se remplit que lorsque la feuille arrive dessous */
  :is(body[data-page="accueil"], body.sky-top) .app-top { background: transparent; animation: bar-fill linear both; animation-timeline: scroll(root); animation-range: 90px 190px; }
  @keyframes bar-fill { to { background-color: var(--sky-top); } }
}
:is(body[data-page="accueil"], body.sky-top) .app-top > * { color: var(--on-sky); }

/* Bandeaux de /pro : toujours au-dessus du ciel, qui passe sous la barre haute. Avec un bandeau, la barre ne touche plus le ciel : elle le porte. */
.notices { position: relative; z-index: 3; }
:is(body[data-page="accueil"], body.sky-top):has(.notices > *) .app-top { background: var(--sky-top); animation: none; }
.qr-reading .notices, .rc-focus .notices { margin-top: 52px; } /* sous la barre fixe du lecteur */

/* ---------- Grand titre + rail des rubriques ---------- */
.app-head { width: min(100% - 2 * var(--gutter), var(--app-maxw)); margin: 2px auto 14px; }
.app-title { margin: 0; font: var(--t-normal); letter-spacing: -.03em; }
.app-head[data-level="fort"] { margin-top: 6px; margin-bottom: var(--sp-bloc); }
.app-head[data-level="fort"] .app-title { font: var(--t-fort); letter-spacing: -.04em; }
.app-head[data-level="outil"] { margin-bottom: var(--sp-voisin); }
.app-head[data-level="outil"] .app-title { font: var(--t-outil); letter-spacing: -.02em; }
.app-rail { position: relative; display: flex; gap: 22px; margin: 12px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); box-shadow: inset 0 -1px 0 var(--c-line); }
.app-rail::-webkit-scrollbar { display: none; }
.app-rail a { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--c-muted); font: 600 .95rem/1 var(--f-title); text-decoration: none; scroll-snap-align: start; white-space: nowrap; }
.app-rail a[aria-current] { color: var(--c-text); }
.app-rail a[aria-current]::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--mark); border-radius: 2px 2px 0 0; animation: rail-in .45s var(--spring); }
.app-rail i { font: 600 .8125rem/1 var(--f-body); font-style: normal; color: var(--accent-fg); }
@keyframes rail-in { from { transform: scaleX(.2); opacity: 0; } }

.invite { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.invite .grow { flex: 1 1 200px; min-width: 0; }
.invite p { margin: 2px 0 0; font-size: .88rem; }

/* ---------- Barre d'onglets ---------- */
.app-tabs {
  position: fixed; z-index: 50; inset: auto 0 0 0; height: calc(var(--tabbar-h) + var(--safe-b));
  padding: 0 max(4px, env(safe-area-inset-right)) var(--safe-b) max(4px, env(safe-area-inset-left));
  display: grid; grid-template-columns: 1.05fr .9fr 1.35fr 1fr .75fr; background: var(--c-surface); box-shadow: 0 -1px 0 var(--c-line);
  --ico-gap: var(--c-surface); view-transition-name: app-tabs;
}
.app-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; color: var(--c-muted); text-decoration: none; font: 600 .8125rem/1.05 var(--f-title); letter-spacing: -.012em; touch-action: manipulation; text-align: center; }
.app-tab-ico { display: grid; place-items: center; width: 44px; height: 30px; transition: transform .45s var(--spring); }
.app-tab:active .app-tab-ico { transform: scale(.78) translateY(2px); transition-duration: .1s; }
.app-tab.is-active { color: var(--c-text); }
.app-tab.is-active .app-tab-ico { color: var(--mark); animation: tab-pop .55s var(--spring); }
.app-tab.is-within { color: var(--c-text); } /* page dans cet onglet, mais pas sa racine : repère, pas « vous êtes ici » */
@keyframes tab-pop { from { transform: scale(.72); } }

/* ---------- Contenu : sections pleine largeur sur téléphone ---------- */
.app-main { width: min(100% - 2 * var(--gutter), var(--app-maxw)); margin: 0 auto; display: grid; gap: var(--sp-voisin); }
.app-main > * { min-width: 0; }
.app-main > .card, .app-main > section.card, .app-main > article.card, .app-main > nav.card, .app-main > fieldset.card { margin-inline: calc(-1 * var(--gutter)); border-radius: 0; padding: 18px var(--gutter); }
@media (min-width: 712px) { .app-main > .card, .app-main > section.card, .app-main > article.card, .app-main > nav.card, .app-main > fieldset.card { margin-inline: 0; border-radius: var(--r-lg); padding: 20px; } }
.app-main > :is(.card, section, article, nav) { animation: rise .42s var(--ease) both; }
.app-main > :nth-child(2) { animation-delay: .03s; } .app-main > :nth-child(3) { animation-delay: .06s; } .app-main > :nth-child(n+4) { animation-delay: .09s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }
.app-main h2 { font-size: 1.3rem; margin: 0 0 .45em; }
.app-main h3 { font-size: 1.02rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin: var(--sp-bloc) 0 0; }
.section-head h2 { margin: 0; }
.section-head a { font: 600 .88rem var(--f-body); min-height: 44px; display: inline-flex; align-items: center; color: var(--accent-fg); text-decoration: none; }
.card-tight { padding: 12px 16px; }
.skeleton { min-height: 120px; border-radius: var(--r-lg); background: var(--c-surface); animation: soft-pulse 1.6s ease-in-out infinite; }
@keyframes soft-pulse { 50% { opacity: .5; } }
.empty { text-align: left; padding: 26px var(--gutter); color: var(--c-muted); display: grid; justify-items: start; gap: 8px; }
.empty .ico { width: 40px; height: 40px; color: var(--c-text); margin-bottom: 4px; }
.empty p { margin: 0; max-width: 38ch; }
.empty b, .empty strong { color: var(--c-text); }
.chip-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-padding-inline: var(--gutter); padding: 2px var(--gutter); margin: 0 calc(-1 * var(--gutter)); scroll-snap-type: x proximity; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 44px; padding: .4em .95em; border-radius: var(--r-md); border: 1.5px solid var(--c-line-strong); background: transparent; color: var(--c-text); font: 600 .86rem var(--f-body); cursor: pointer; scroll-snap-align: start; transition: transform .35s var(--spring), background-color .15s, border-color .15s; }
.chip:active { transform: scale(.93); }
.chip[aria-pressed="true"], .chip.is-on { background: var(--c-solid); border-color: var(--c-solid); color: var(--c-on-solid); }
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 10px 0; border-bottom: 1px solid var(--c-line); color: inherit; text-decoration: none; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item small { color: var(--c-muted); }
a.list-item > .ico:last-child { color: var(--c-muted); }
a.list-item { transition: background-color .15s; }
a.list-item:active { background: var(--c-surface-2); }
a.card.list-item { padding: 12px var(--gutter); }
.tile-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--r-md); background: var(--c-surface-2); color: var(--c-text); }
.tile-ico.gold { background: var(--brand); color: var(--on-brand); }

/* Bandeau générique (Premium et anciens écrans) : de l'encre, le ciel est réservé à l'accueil */
.hero { position: relative; color: var(--c-on-solid); background: var(--c-solid); padding: 26px var(--gutter); margin-inline: calc(-1 * var(--gutter)); }
.hero .muted, .hero small { color: color-mix(in srgb, var(--c-on-solid) 74%, transparent); }
@media (min-width: 712px) { .hero { margin-inline: 0; border-radius: var(--r-lg); } }

/* ---------- Horaires d'une mosquée (fiche) ---------- */
.times { display: grid; background: var(--c-surface); border-radius: var(--r-lg); padding: 4px 16px; }
.time { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "name ar t" "iq iq t"; align-items: center; column-gap: 12px; min-height: 54px; padding: 6px 0; box-shadow: inset 0 -1px 0 var(--c-line); }
.time:last-child { box-shadow: none; }
.time .name { grid-area: name; font-weight: 600; }
.time .ar { grid-area: ar; font: 700 1rem var(--f-kufi); color: var(--c-muted); }
.time .t { grid-area: t; font: 700 1.3rem var(--f-moment); font-variant-numeric: tabular-nums; text-align: right; }
.time .iq { grid-area: iq; font-size: .8125rem; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.time.is-past { color: var(--c-muted); }
.time.is-next { position: relative; color: var(--c-text); }
.time.is-next::before { content: ''; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 3px 3px 0; background: var(--mark); }
.time.is-next .name { color: var(--accent-fg); }

/* ---------- Mosquées ---------- */
.fav-btn { width: 48px; height: 48px; flex: none; border-radius: var(--r-md); border: 0; background: var(--c-surface-2); color: var(--c-muted); display: grid; place-items: center; cursor: pointer; transition: transform .45s var(--spring); }
.fav-btn:active { transform: scale(.8); }
.fav-btn[aria-pressed="true"] { background: var(--jade); color: var(--on-jade); animation: tab-pop .55s var(--spring); }
.fav-btn[aria-pressed="true"] .ico { fill: currentColor; }
.annonce { padding: 10px 0 10px 14px; box-shadow: inset 3px 0 0 var(--c-surface-3); font-size: .92rem; }
.annonce b { display: block; }
.services { display: flex; flex-wrap: wrap; gap: 6px; }
.search-bar { position: relative; }
.search-bar .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--c-muted); pointer-events: none; }
.search-bar input { padding-left: 44px; min-height: 50px; background: var(--c-surface); }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.table-compact th, .table-compact td { padding: 8px 4px; font-size: .82rem; text-align: center; }
.table-compact td:first-child, .table-compact th:first-child { text-align: left; }
.table-compact tr.is-today { background: color-mix(in srgb, var(--jade) 18%, transparent); font-weight: 700; }

/* ---------- Qibla ---------- */
.compass-wrap { display: grid; place-items: center; padding: 12px 0; }
.compass { position: relative; width: min(78vw, 300px); aspect-ratio: 1; border-radius: 50%; background: var(--c-surface); box-shadow: inset 0 0 0 2px var(--c-text); transition: transform .25s linear; }
.compass .mark { position: absolute; inset: 0; display: grid; justify-items: center; font: 700 .85rem var(--f-moment); color: var(--c-muted); padding-top: 10px; }
.compass .needle { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transition: transform .25s linear; }
.compass .needle::before { content: ''; position: absolute; left: -7px; bottom: 0; width: 14px; height: calc(min(78vw, 300px) * .38); background: var(--mark); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.compass .kaaba { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--c-ink); color: var(--jade); z-index: 1; }
.compass.is-aligned { box-shadow: inset 0 0 0 4px var(--mark); background: color-mix(in srgb, var(--jade) 14%, var(--c-surface)); }
.bearing { font: 800 2.8rem/1 var(--f-moment); font-variant-numeric: tabular-nums; text-align: center; letter-spacing: -.02em; }
.qibla-map { width: 100%; border-radius: var(--r-md); background: var(--c-surface-2); }

/* ---------- Calendrier ---------- */
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav h2 { flex: 1; text-align: center; margin: 0; font-size: 1.1rem; }
.cal-nav small { display: block; font: 400 .8rem var(--f-body); color: var(--c-muted); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal .dow { text-align: center; font-size: .8125rem; font-weight: 600; color: var(--c-muted); padding: 4px 0; }
.cal-day { position: relative; aspect-ratio: 1 / 1.1; min-height: 44px; border-radius: var(--r-sm); border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; font: inherit; color: inherit; padding: 2px; cursor: pointer; transition: background-color .15s; }
.cal-day .g { font: 700 1rem/1.1 var(--f-moment); font-variant-numeric: tabular-nums; }
.cal-day .h { font-size: .66rem; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.cal-day.is-today { background: var(--c-solid); color: var(--c-on-solid); }
.cal-day.is-today .h { color: inherit; opacity: .75; }
.cal-day.is-ramadan { background: color-mix(in srgb, var(--jade) 14%, transparent); }
.cal-day.k-fete { background: var(--jade); color: var(--on-jade); }
.cal-day.k-fete .h { color: inherit; }
.cal-day .dot { position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-fg); }
.cal-day.k-jeune .dot { background: var(--c-ok); }
.cal-day.k-nuit .dot { background: var(--k-coucher); }
.cal-day[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--c-text); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--c-muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

/* ---------- Adhkar ---------- */
.dhikr { display: grid; gap: 12px; }
.dhikr .ar { font-size: 1.55rem; line-height: 2; text-align: right; }
.dhikr .phon { color: var(--c-muted); font-size: .92rem; }
.counter { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 64px; border-radius: var(--r-md); border: 0; background: var(--c-surface-2); font: 800 1.5rem var(--f-moment); font-variant-numeric: tabular-nums; color: var(--c-text); cursor: pointer; touch-action: manipulation; transition: transform .4s var(--spring), background-color .2s; }
.counter:active { transform: scale(.95); transition-duration: .08s; background: var(--jade); color: var(--on-jade); }
.counter.is-done { background: var(--jade); color: var(--on-jade); }
.progress { height: 6px; border-radius: 3px; background: var(--c-surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--mark); border-radius: inherit; transition: width .6s var(--spring); }

/* ---------- Interrupteurs et segments ---------- */
.switch-row { display: flex; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--c-line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row label { flex: 1; margin: 0; font-weight: 500; font-size: 1rem; cursor: pointer; }
.switch { appearance: none; -webkit-appearance: none; width: 52px !important; min-height: 32px !important; height: 32px; border-radius: 16px; background: var(--c-surface-3); box-shadow: inset 0 0 0 1.5px var(--c-line-strong); position: relative; cursor: pointer; transition: background-color .25s; flex: none; border: 0; padding: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform .45s var(--spring); }
.switch:checked { background: var(--mark); }
.switch:checked::after { transform: translateX(20px); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: var(--r-md); background: var(--c-surface-2); }
.seg button { min-height: 44px; border: 0; border-radius: 8px; background: transparent; font: 600 .88rem var(--f-body); color: var(--c-muted); cursor: pointer; transition: background-color .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--c-surface); color: var(--c-text); box-shadow: 0 1px 0 var(--c-line); }

/* ---------- Premium ---------- */
.plans { display: grid; gap: 10px; }
.plan { position: relative; display: grid; gap: 6px; }
.plan.is-featured { box-shadow: inset 0 0 0 2px var(--mark); }
.plan .price { font: 800 2rem/1 var(--f-moment); letter-spacing: -.02em; }
.plan .ribbon { position: absolute; top: -10px; right: 16px; }
.paywall { display: grid; justify-items: start; gap: 4px; }
.paywall-ico { width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--jade); color: var(--on-jade); }
.demo-note { background: var(--c-surface-2); border-radius: var(--r-md); padding: 12px 14px; font-size: .88rem; }

/* ---------- Bandeaux flottants (installer, mise à jour) ---------- */
.install-card, .update-card { position: fixed; z-index: 60; left: var(--gutter); right: var(--gutter); bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); max-width: 520px; margin-inline: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 16px; border-radius: var(--r-lg); background: var(--c-ink); color: #f1f4f1; animation: toast-in .55s var(--spring); }
:root[data-theme="dark"] :is(.install-card, .update-card) { background: var(--c-surface-3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.install-card, .update-card) { background: var(--c-surface-3); } }
.install-card > div, .update-card > div { flex: 1; min-width: 0; font-size: .88rem; line-height: 1.35; }
.install-card b, .update-card b { display: block; font-weight: 600; }
.install-card .muted, .update-card .muted, .update-card span { color: rgb(241 244 241 / .72); }
.install-card .ico { display: inline; }
.install-close, .update-card button:not(.btn) { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: var(--r-md); background: transparent; color: inherit; font-size: 1.4rem; cursor: pointer; }
.toasts { bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); }
.app-body.qr-reading .toasts { bottom: calc(var(--safe-b) + 74px); } /* au-dessus de la barre audio */

/* ---------- Feuilles du bas (dialog) : on les tire vers le bas pour fermer ---------- */
dialog.sheet {
  width: min(100%, 560px); max-width: 100%; max-height: min(90dvh, 780px); overflow: auto; color: var(--c-text); background: var(--c-surface);
  margin: auto auto 0; padding: 26px var(--gutter) calc(18px + var(--safe-b)); border: 0; border-radius: var(--r-xl) var(--r-xl) 0 0;
  animation: sheet-in .5s var(--spring); touch-action: pan-y; overscroll-behavior: contain;
}
dialog.sheet::before, .qr-sheet::before { content: ''; position: absolute; top: 9px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--c-surface-3); }
dialog.sheet::backdrop, .qr-sheet::backdrop, .rc-word-dlg::backdrop { background: rgb(6 9 7 / .5); animation: fade .25s; }
dialog.sheet fieldset { border: 0; padding: 0; margin: 0; }
dialog.sheet .switch-row { min-height: 52px; gap: 10px; font-weight: 500; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@media (min-width: 640px) { dialog.sheet { margin: auto; border-radius: var(--r-xl); padding-top: 22px; } dialog.sheet::before { display: none; } }
fieldset.card { border: 0; margin: 0; min-width: 0; }

/* ---------- Recherche universelle ---------- */
dialog.cmd { padding: 18px 0 calc(8px + var(--safe-b)); width: min(100%, 620px); max-width: 100%; height: min(92dvh, 780px); display: flex; flex-direction: column; }
dialog.cmd:not([open]) { display: none; }
@media (min-width: 640px) { dialog.cmd { margin: 10vh auto auto; height: min(76dvh, 680px); } }
.cmd-bar { display: flex; align-items: center; gap: 4px; padding: 0 8px 10px var(--gutter); box-shadow: 0 1px 0 var(--c-line); position: relative; }
.cmd-glass { position: absolute; left: calc(var(--gutter) + 12px); color: var(--c-muted); pointer-events: none; display: grid; }
.cmd-bar input { flex: 1; min-width: 0; padding-left: 42px; min-height: 50px; font-size: 1.02rem; }
.cmd-close { min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--accent-fg); font: 600 .95rem var(--f-body); cursor: pointer; }
.cmd-results { flex: 1; overflow: auto; padding: 4px var(--gutter) 20px; overscroll-behavior: contain; }
.cmd-group h3 { margin: 18px 0 4px; font: 700 .875rem var(--f-title); color: var(--c-muted); letter-spacing: 0; }
.cmd-group ul { list-style: none; margin: 0; padding: 0; }
.cmd-item { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; min-height: 54px; padding: 6px 8px; margin: 0 -8px; border-radius: var(--r-md); color: inherit; text-decoration: none; }
.cmd-item:hover, .cmd-item:focus-visible { background: var(--c-surface-2); }
.cmd-item:focus-visible { outline: 2px solid var(--accent-fg); outline-offset: -2px; }
.cmd-ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--c-surface-2); }
.cmd-txt b { display: block; font-weight: 600; line-height: 1.25; }
.cmd-txt small { display: block; color: var(--c-muted); font-size: .8rem; line-height: 1.3; }
.cmd-ar { font: 600 1.05rem var(--f-kufi); color: var(--c-muted); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-empty { color: var(--c-muted); padding: 24px 0; }

/* ---------- Compte ---------- */
.pg-stat small { display: block; }

/* ---------- Écrans larges : les onglets deviennent une colonne à gauche ---------- */
@media (min-width: 900px) {
  .app-body { padding-left: var(--rail-w); padding-bottom: 40px; }
  .app-tabs { inset: 0 auto 0 0; width: var(--rail-w); height: auto; padding: calc(var(--top-h) + 20px) 0 20px; display: flex; flex-direction: column; gap: 6px; box-shadow: 1px 0 0 var(--c-line); }
  .app-tab { min-height: 68px; gap: 4px; }
  .app-top { left: var(--rail-w); z-index: 51; }
  .app-top .app-logo { position: fixed; left: 0; top: var(--safe-t); width: var(--rail-w); justify-content: center; }
  .app-top .app-logo .app-wordmark { display: none; }
  .install-card, .update-card, .toasts { bottom: 20px; }
  .now { margin-top: calc(-1 * (var(--top-h) + var(--safe-t))); }
}

/* ---------- Moi ---------- */
.me-avatar { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--c-solid); color: var(--c-on-solid); font: 700 1.05rem var(--f-moment); }
.me-avatar.is-guest { background: var(--c-surface-2); color: var(--c-text); }
.app-main .me-group { margin: 6px 0 0; font: 700 .875rem var(--f-title); color: var(--c-muted); }

