/* ==========================================================================
   Taysir Voyages — gestion de l'agence
   Barre latérale nuit, 5 vues (Départs, Pèlerins, Chambrage, Paiements,
   Messages), barre d'onglets en bas sur téléphone, mode intégré pour la
   page « en direct ».
   ========================================================================== */

html { overflow-x: clip; }
body.ad { min-height: 100vh; background: var(--sand); }

/* ---------- Coquille --------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - 38px); }
.side { position: sticky; top: 0; z-index: 40; display: flex; flex-direction: column; gap: 22px; height: 100vh; padding: 22px 16px 18px; background: var(--night); color: var(--paper); isolation: isolate; overflow: hidden; }
.side::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--khatam-light) 0 0 / 72px 72px; opacity: .07; mask-image: linear-gradient(180deg, transparent 30%, #000); -webkit-mask-image: linear-gradient(180deg, transparent 30%, #000); }
.side__logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px; color: var(--paper); text-decoration: none; }
.side__logo .ty-logo__mark { width: 34px; height: 34px; }
.side__logo b { display: block; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1; }
.side__logo small { display: block; margin-top: 4px; font: 500 9.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); }
.side__logo .ar-serif { margin-left: auto; font-size: 20px; color: var(--gold-2); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 12px; color: rgba(251, 248, 242, .72); font-weight: 600; font-size: 14.5px; text-decoration: none; transition: background-color .2s, color .2s; }
.nav a:hover { background: rgba(251, 248, 242, .06); color: var(--paper); }
.nav a[aria-current="page"] { background: rgba(212, 180, 106, .16); color: var(--paper); box-shadow: inset 3px 0 0 var(--gold-2); }
.nav a[aria-current="page"] .i { color: var(--gold-2); }
.nav__badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: var(--ink); font: 700 11.5px/22px var(--sans); font-style: normal; text-align: center; }
.nav__badge.is-red { background: var(--red); }
.side__foot { margin-top: auto; display: grid; gap: 12px; padding: 14px 8px 0; border-top: 1px solid rgba(251, 248, 242, .1); }
.live-dot { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: rgba(251, 248, 242, .7); }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: #6fd3a5; box-shadow: 0 0 0 0 rgba(111, 211, 165, .6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(111, 211, 165, 0); } 100% { box-shadow: 0 0 0 0 rgba(111, 211, 165, 0); } }
.side__reset { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: rgba(251, 248, 242, .6); font-size: 13px; font-weight: 600; }
.side__reset:hover { color: var(--gold-2); }
.side__reset .i { width: 16px; height: 16px; }

.main { min-width: 0; padding: 22px clamp(18px, 3vw, 40px) 70px; outline: none; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.topbar__date { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.topbar h1 { margin-top: 2px; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.2vw, 44px); line-height: 1; letter-spacing: -.01em; }
.topbar__r { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.outlet { animation: view-in .4s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Composants ----------------------------------------------------------- */
.k { font: 500 10.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.card { min-width: 0; padding: 18px 20px; border-radius: 20px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.card__h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card__h h2, .h2 { font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.05; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; min-width: 0; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 14px; background: var(--sand-2); }
.seg button { min-height: 38px; padding: 0 13px; border-radius: 11px; font-size: 13.5px; font-weight: 650; color: var(--ink-2); white-space: nowrap; transition: background-color .2s, color .2s, box-shadow .2s; }
.seg button { text-align: center; }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 0 rgba(19, 32, 31, .06), 0 6px 14px -8px rgba(14, 42, 43, .45); }
.seg button small { margin-left: 5px; font: 500 11px var(--mono); color: var(--ink-3); }
.bar { position: relative; display: block; height: 7px; border-radius: 999px; background: var(--sand-2); overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--gold); transition: width .8s var(--ease); }
.bar--palm > i { background: var(--palm); }
.av { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--mist); color: var(--night); font: 700 12.5px/1 var(--sans); }
.av--F { background: var(--gold-soft); color: var(--gold-ink); }
.av--H { background: var(--mist); color: var(--night-3); }
.dots { display: inline-flex; gap: 5px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--palm); flex: none; }
.dot--warn { background: var(--amber); } .dot--bad { background: var(--red); } .dot--na { background: var(--sand-3); } .dot--wait { background: transparent; box-shadow: inset 0 0 0 2px var(--sand-3); }
.linkish { color: var(--gold-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(125, 96, 32, .35); }
.empty { padding: 22px 6px; color: var(--ink-3); font-size: 14px; text-align: center; }
.is-new { animation: flash 2.4s var(--ease); }
@keyframes flash { 0%, 30% { background-color: var(--gold-soft); } 100% { background-color: transparent; } }
.amt { white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { position: relative; display: grid; gap: 6px; align-content: start; min-width: 0; padding: 16px 18px; border-radius: 20px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), var(--shadow); text-align: left; }
.kpi b { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
.kpi b small { font-family: var(--sans); font-size: 15px; color: var(--ink-3); margin-left: 3px; }
.kpi p { font-size: 13px; color: var(--ink-2); }
.kpi--night { background: var(--night); color: var(--paper); box-shadow: var(--shadow-lg); }
.kpi--night .k, .kpi--night p { color: rgba(251, 248, 242, .66); }
.kpi--night b small { color: rgba(251, 248, 242, .6); }
.kpi--night .bar { background: rgba(251, 248, 242, .14); }
.kpi--alert { box-shadow: 0 0 0 1.5px rgba(184, 67, 47, .4), var(--shadow); }
.kpi--alert b { color: var(--red); }
a.kpi, a.deprow { color: inherit; text-decoration: none; }
a.kpi.kpi--night { color: var(--paper); }
a.kpi:hover { transform: translateY(-2px); }
a.kpi { transition: transform .3s var(--ease); }
button.kpi { cursor: pointer; transition: transform .3s var(--ease); }
button.kpi:hover { transform: translateY(-2px); }

/* Phrase du gérant + constat */
.owner { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; padding: 16px 20px; border-radius: 20px; background: linear-gradient(100deg, var(--gold-soft), rgba(242, 231, 204, .2)); box-shadow: inset 0 0 0 1px rgba(184, 145, 58, .25); }
.owner svg { width: 30px; height: 30px; flex: none; }
.owner p { font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.owner p em { color: var(--gold-ink); }
.insights { display: grid; gap: 8px; margin-bottom: 18px; }
.insight { display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); font-size: 14px; line-height: 1.45; }
.insight .i { width: 19px; height: 19px; margin-top: 1px; color: var(--amber); }
.insight--bad .i { color: var(--red); }
.insight--ok .i { color: var(--palm); }
.insight b { font-weight: 700; }
.insight a, .insight button { color: var(--gold-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Départs */
.deps { display: grid; gap: 10px; }
.deprow { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; align-items: center; width: 100%; padding: 14px 16px; border-radius: 16px; background: var(--white); box-shadow: 0 0 0 1px var(--line); text-align: left; transition: box-shadow .2s, transform .3s var(--ease); }
.deprow:hover { box-shadow: 0 0 0 1.5px var(--gold), var(--shadow); }
.deprow__t b { display: block; font-weight: 700; font-size: 15px; }
.deprow__t small { display: block; color: var(--ink-3); font-size: 12.5px; }
.deprow__fill { display: grid; gap: 6px; }
.deprow__fill .row { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.fill { position: relative; height: 10px; border-radius: 999px; background: var(--sand-2); }
.fill > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--night-3); }
.fill > i.is-full { background: var(--gold); }
.fill__seuil { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--red); border-radius: 2px; }
.fill__seuil.is-passed { background: var(--gold); box-shadow: 0 0 0 1.5px var(--white); }
.mini { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.mini b { font: 700 14px/1 var(--mono); color: var(--ink); }
.marge b { color: var(--palm); }
.marge.is-neg b { color: var(--red); }
.marge.is-near b { color: var(--amber-ink); }

/* Activité / demandes */
.feed { display: grid; gap: 2px; }
.feed li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; line-height: 1.4; }
.feed li:last-child { border-bottom: 0; }
.feed .i { width: 18px; height: 18px; margin: 2px auto 0; color: var(--gold); }
.feed time { color: var(--ink-3); font: 500 11.5px var(--mono); white-space: nowrap; }
.req { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.req:last-child { border-bottom: 0; }
.req__top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.req__top b { font-size: 15px; }
.req__acts { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Chambrage ---------------------------------------------------------------- */
.ch { display: grid; gap: 14px; }
.ch__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ch__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; align-items: end; padding: 16px 18px; border-radius: 20px; background: var(--night); color: var(--paper); box-shadow: var(--shadow-lg); position: relative; isolation: isolate; overflow: hidden; }
.ch__head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--khatam-light) 0 0 / 64px 64px; opacity: .1; mask-image: linear-gradient(100deg, transparent 35%, #000); -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000); }
.ch__head .k { color: rgba(251, 248, 242, .6); }
.ch__count { display: grid; gap: 6px; min-width: 0; }
.ch__num { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ch__num b { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: .95; font-variant-numeric: tabular-nums; }
.ch__num b small { font-size: .55em; color: rgba(251, 248, 242, .55); }
.ch__num b.is-bump { color: var(--gold-2); animation: bump .7s var(--spring); }
@keyframes bump { 35% { transform: scale(1.12); } }
.ch__num span { font-size: 13px; color: rgba(251, 248, 242, .66); }
.ch__head .bar { background: rgba(251, 248, 242, .14); height: 6px; }
.ch__head .bar > i { background: var(--gold-2); }
.ch__tools { display: flex; gap: 6px; }
.tool { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px; border-radius: 12px; background: rgba(251, 248, 242, .08); box-shadow: inset 0 0 0 1px rgba(251, 248, 242, .14); color: var(--paper); font-size: 13px; font-weight: 650; white-space: nowrap; }
.tool:hover, .tool[aria-expanded="true"] { background: rgba(212, 180, 106, .2); }
.tool .i { width: 17px; height: 17px; }
.rules { display: grid; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 1.5px rgba(184, 145, 58, .45), var(--shadow); font-size: 13.5px; animation: view-in .35s var(--ease); }
.rules__h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.rules__h b { font-family: var(--serif); font-weight: 400; font-size: 21px; }
.rules { position: relative; }
.rules__done { position: absolute; top: 12px; right: 14px; }
.rules__h { padding-right: 110px; }
.rules ul { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.rules li { display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.rules .tag { flex: none; }
.rules p.muted { font-size: 12.5px; }
.room__rules { display: grid; gap: 5px; pointer-events: auto !important; }
.rr { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 10px; border-radius: 10px; background: var(--sand); font-size: 12.5px; font-weight: 650; color: var(--ink-2); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background-color .2s, color .2s; }
.rr::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; }
.rr--F { color: #9a4a3a; } .rr--H { color: #2f5566; } .rr--fam { color: var(--gold-ink); }
.rr[aria-pressed="true"] { background: var(--night); color: var(--paper); }
.rr[aria-pressed="true"]::before { background: var(--gold-2); opacity: 1; }
.rr.is-no { opacity: .45; }
.ch.is-rules .room { box-shadow: 0 0 0 1px var(--line-2); }
.tag--mod { box-shadow: inset 0 0 0 1px currentColor; }
.toast__undo { flex: none; min-height: 36px; margin-left: 4px; padding: 0 12px; border-radius: 10px; background: rgba(251, 248, 242, .12); color: var(--gold-2); font-size: 13px; font-weight: 700; }
.toast__undo:hover { background: rgba(212, 180, 106, .22); }
.insight button { padding: 0; }

.strip-wrap { display: grid; gap: 8px; min-width: 0; }
.strip-wrap__h { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; }
.strip-wrap__h .sel { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-wrap__h .sel b { color: var(--ink); }
.strip { display: flex; gap: 8px; margin: 0 -4px; padding: 6px 4px 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip.is-nudge { animation: nudge .6s var(--ease); }
@keyframes nudge { 30% { transform: translateX(-6px); } 60% { transform: translateX(4px); } }
.pchip { position: relative; flex: none; display: grid; grid-template-columns: 38px auto; gap: 9px; align-items: center; min-height: 56px; padding: 8px 14px 8px 8px; border-radius: 16px; background: var(--white); box-shadow: 0 0 0 1px var(--line-2), 0 6px 16px -12px rgba(14, 42, 43, .5); scroll-snap-align: start; transition: transform .35s var(--spring), box-shadow .25s, background-color .25s; }
.pchip .av { width: 38px; height: 38px; }
.pchip b { display: block; font-size: 14px; white-space: nowrap; }
.pchip small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.pchip small i { width: 8px; height: 8px; border-radius: 3px; background: var(--fc, var(--gold)); }
.pchip.is-picked { transform: translateY(-5px); background: var(--night); color: var(--paper); box-shadow: 0 0 0 2px var(--gold-2), 0 16px 26px -14px rgba(14, 42, 43, .8); }
.pchip.is-picked small { color: rgba(251, 248, 242, .66); }
.pchip.is-out { animation: chip-out .45s var(--ease) forwards; }
@keyframes chip-out { to { opacity: 0; transform: translateY(-14px) scale(.9); } }
.strip-empty { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--palm-soft); color: var(--palm); font-weight: 650; font-size: 14px; }
.strip-empty .i { width: 18px; height: 18px; }
.selbar { display: flex; flex-wrap: wrap; gap: 6px; }

.copy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(184, 145, 58, .3); font-size: 14px; }

.floor { display: grid; gap: 10px; }
.floor__h { display: flex; align-items: baseline; gap: 10px; }
.floor__h h3 { font-family: var(--serif); font-weight: 400; font-size: 21px; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 10px; }
.room { position: relative; isolation: isolate; display: grid; gap: 8px; align-content: start; min-width: 0; min-height: 132px; padding: 12px 12px 11px; border-radius: 18px; background: var(--white); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .25s, opacity .3s, transform .35s var(--ease), background-color .3s; }
.room__hit { position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.room > :not(.room__hit) { position: relative; z-index: 1; pointer-events: none; }
.room .room__occ button { pointer-events: auto; }
/* Un pèlerin est choisi : toute la carte devient la cible « placer ici », les noms ne captent plus le doigt. */
.ch.is-picking .room .room__occ button { pointer-events: none; }
.room__top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.room__no { font: 500 22px/1 var(--mono); letter-spacing: -.02em; }
.room__type { font-size: 11.5px; font-weight: 650; color: var(--ink-3); }
.room__rule { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.room__rule .tag { height: 22px; padding: 0 8px; font-size: 11.5px; }
.tag--F { background: #f6e4e0; color: #9a4a3a; }
.tag--H { background: #dfe9ee; color: #2f5566; }
.tag--fam { background: var(--gold-soft); color: var(--gold-ink); }
.room__beds { display: flex; align-items: center; gap: 5px; }
.room__n { margin-left: auto; font-size: 12px; color: var(--ink-2); }
.bed { width: 22px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--sand-3); }
.bed.is-on { background: var(--night-3); box-shadow: none; }
.bed.is-new { background: var(--gold); animation: bed .9s var(--spring); }
@keyframes bed { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } }
.room__occ { display: grid; gap: 1px; font-size: 12.5px; line-height: 1.3; }
.room__occ button { display: block; max-width: 100%; min-height: 28px; padding: 4px 0; text-align: left; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 4px; }
.room__occ button:hover { color: var(--ink); text-decoration: underline; }
.room__occ button.is-new { color: var(--gold-ink); font-weight: 700; animation: none; }
.room__occ button.is-picked { color: var(--gold-ink); font-weight: 700; }
.room__free { color: var(--ink-3); font-size: 12px; }
.room__hint, .room__msg { display: none; padding: 6px 9px; border-radius: 10px; font-size: 12px; font-weight: 700; line-height: 1.25; text-align: center; }
.room__hint { background: var(--gold); color: var(--ink); }
.room__msg { background: var(--red); color: var(--white); }
/* Au doigt : des noms assez hauts pour être touchés sans viser */
@media (pointer: coarse), (max-width: 860px) { .room__occ { gap: 2px; } .room__occ button { min-height: 36px; padding: 7px 0; } }

.ch.is-picking .room { opacity: .42; }
.ch.is-picking .room.is-ok { opacity: 1; background: #fffaf0; box-shadow: 0 0 0 1.5px var(--gold), 0 0 0 6px rgba(184, 145, 58, .14), 0 14px 26px -18px rgba(184, 145, 58, .9); animation: glow 1.8s ease-in-out infinite; }
.ch.is-picking .room.is-ok .room__hint { display: block; }
.ch.is-picking .room.is-best { box-shadow: 0 0 0 2px var(--gold), 0 0 0 8px rgba(184, 145, 58, .2), 0 16px 30px -16px rgba(184, 145, 58, 1); }
@keyframes glow { 50% { box-shadow: 0 0 0 1.5px var(--gold), 0 0 0 10px rgba(184, 145, 58, .05), 0 14px 26px -18px rgba(184, 145, 58, .9); } }
.room__fam { display: none; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--night); color: var(--gold-2); font-size: 11px; font-weight: 700; }
.room__fam .i { width: 12px; height: 12px; }
.ch.is-picking .room.is-best .room__fam { display: inline-flex; }
.room.is-shake { opacity: 1 !important; animation: shake .5s cubic-bezier(.36, .07, .19, .97) both !important; box-shadow: 0 0 0 2px var(--red) !important; }
.room.is-shake .room__msg { display: block; }
.room.is-shake .room__hint { display: none !important; }
@keyframes shake { 15%, 85% { transform: translateX(-2px); } 30%, 70% { transform: translateX(4px); } 45%, 55% { transform: translateX(-6px); } 50% { transform: translateX(6px); } }
.room.is-flash { animation: room-flash 1.6s var(--ease); }
@keyframes room-flash { 0% { background: var(--gold-2); box-shadow: 0 0 0 3px var(--gold), 0 0 40px 6px rgba(212, 180, 106, .8); transform: scale(1.03); } 100% { background: var(--white); } }
.room.is-full .room__no { color: var(--ink-3); }

/* Liste à imprimer */
.print-sheet { display: none; }
@media print {
  body.ad.print-rooms > :not(.print-sheet) { display: none !important; }
  body.ad:not(.print-rooms) .print-sheet { display: none !important; }
  .print-sheet { display: block; color: #000; font: 12px/1.4 var(--sans); }
  .print-sheet h1 { font: 400 26px var(--serif); margin-bottom: 4px; }
  .print-sheet table { width: 100%; border-collapse: collapse; margin-top: 14px; }
  .print-sheet th, .print-sheet td { padding: 6px 8px; border-bottom: 1px solid #bbb; text-align: left; vertical-align: top; }
}

/* ---------- Pèlerins ------------------------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.search { position: relative; flex: 1 1 220px; min-width: 0; max-width: 340px; }
.search .i { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; color: var(--ink-3); pointer-events: none; }
.search input { width: 100%; height: 44px; padding: 0 14px 0 38px; border: 0; border-radius: 13px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14.5px; }
.search input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--gold); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13px; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.fchip b { margin-left: 4px; font: 600 11.5px var(--mono); color: var(--ink-3); }
.fchip[aria-pressed="true"] { background: var(--night); color: var(--paper); box-shadow: none; }
.fchip[aria-pressed="true"] b { color: var(--gold-2); }
.ptable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.ptable th { padding: 8px 10px; text-align: left; font: 500 10.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.ptable th.c, .ptable td.c { text-align: center; }
.ptable td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ptable tr[data-open] { cursor: pointer; transition: background-color .15s; }
.ptable tr[data-open]:hover td { background: rgba(184, 145, 58, .07); }
.ptable tr.is-bad td { background: rgba(184, 67, 47, .06); }
.ptable tr.is-bad td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.pname { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pname b { display: block; font-weight: 700; white-space: nowrap; }
.pname small { display: block; font-size: 12px; color: var(--ink-3); }
.pname small.bad { color: var(--red); font-weight: 650; white-space: normal; }
.ptable td .dot { display: block; width: 12px; height: 12px; margin: 0 auto; }
.roomno { font: 600 13px var(--mono); }
.roomno.is-none { color: var(--amber-ink); font-family: var(--sans); font-weight: 650; font-size: 12.5px; }

/* ---------- Paiements -------------------------------------------------------------------- */
.plist { display: grid; }
.prow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.prow:last-child { border-bottom: 0; }
.prow__t { display: flex; align-items: center; gap: 10px; min-width: 0; }
.prow__t div { min-width: 0; }
.prow__t b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow__t small { display: block; font-size: 12.5px; color: var(--ink-3); }
.prow__acts { display: flex; gap: 6px; }
.prow--open { cursor: pointer; border-radius: 12px; transition: background-color .15s; }
.prow--open:hover { background: rgba(184, 145, 58, .07); }
.prow__go { display: grid; place-items: center; width: 28px; color: var(--ink-3); }
.prow__go .i { width: 16px; height: 16px; }
.chart { position: relative; }
.chart svg { display: block; overflow: visible; }
.chart { margin-top: 6px; }
.chart-svg { display: block; overflow: visible; }
.chart-svg .gridline { stroke: var(--line); stroke-width: 1; }
.chart-svg .axis { stroke: var(--line-2); stroke-width: 1; }
.chart-svg .tick { fill: var(--ink-3); font: 500 10.5px var(--mono); font-variant-numeric: tabular-nums; }
.chart-svg .tick.is-now { fill: var(--gold-ink); font-weight: 700; }
.col__bar { fill: var(--night-3); transition: fill .15s; }
.col--now .col__bar { fill: var(--gold); }
.col__plan { fill: url(#hatch); stroke: rgba(184, 145, 58, .75); stroke-width: 1; stroke-dasharray: 3 2; }
.hatch__bg { fill: rgba(184, 145, 58, .1); }
.hatch__ln { stroke: rgba(184, 145, 58, .5); stroke-width: 2.2; }
.col.is-hover .col__bar { fill: var(--night); }
.col--now.is-hover .col__bar { fill: var(--gold-ink); }
.col.is-hover .col__plan { fill: rgba(184, 145, 58, .3); }
.col__val { fill: var(--ink-2); font: 600 10.5px var(--mono); font-variant-numeric: tabular-nums; }
.hit { fill: transparent; cursor: crosshair; outline: none; }
.hit:focus-visible { stroke: var(--gold); stroke-width: 1.5; }
.tip { position: fixed; left: 0; top: 0; z-index: 95; max-width: 260px; padding: 9px 12px; border-radius: 12px; background: var(--night); color: var(--paper); font-size: 13px; line-height: 1.45; pointer-events: none; box-shadow: var(--shadow-lg); }
.tip b { color: var(--gold-2); }
.tip .muted { color: rgba(251, 248, 242, .62); }
.tip[hidden] { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 10px; border-radius: 3px; }
.lg--paid { background: var(--night-3); }
.lg--now { background: var(--gold); }
.lg--plan { background: repeating-linear-gradient(45deg, rgba(184, 145, 58, .55) 0 2px, rgba(184, 145, 58, .1) 2px 5px); box-shadow: inset 0 0 0 1px rgba(184, 145, 58, .7); }
.cins { display: grid; gap: 6px; margin: 12px 0 4px; }
.cins p { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.cins .i { width: 17px; height: 17px; margin-top: 1px; flex: none; color: var(--gold); }
.cins b { color: var(--ink); }
.seg--sm button { min-height: 34px; padding: 0 11px; font-size: 12.5px; }
/* Courbes miniatures des chiffres clés */
.kpi .spark { position: absolute; top: 14px; right: 14px; }
.spark__ln { fill: none; stroke: var(--palm); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.spark__area { fill: rgba(46, 107, 85, .1); }
.spark circle { fill: var(--palm); stroke: var(--paper); stroke-width: 1.5; }
.kpi--night .spark__ln { stroke: var(--gold-2); }
.kpi--night .spark__area { fill: rgba(212, 180, 106, .14); }
.kpi--night .spark circle { fill: var(--gold-2); stroke: var(--night); }
.free { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--palm); font-weight: 650; }
.free .i { width: 16px; height: 16px; }

/* ---------- Messages ------------------------------------------------------------------- */
.compose { display: grid; gap: 12px; }
.compose label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.compose textarea { width: 100%; min-height: 92px; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14.5px; line-height: 1.45; resize: vertical; }
.compose textarea[dir="rtl"] { font-family: var(--ar-sans); font-size: 15.5px; }
.compose textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--gold); }
.tpls { display: flex; flex-wrap: wrap; gap: 6px; }
.sent { display: grid; gap: 12px; }
.msg { display: grid; gap: 9px; padding: 14px 16px; border-radius: 16px; background: var(--white); box-shadow: 0 0 0 1px var(--line); }
.msg__top { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink-3); }
.msg__top b { color: var(--ink-2); }
.msg p { font-size: 14.5px; line-height: 1.45; }
.msg p[lang="ar"] { font-family: var(--ar-sans); font-size: 14.5px; color: var(--ink-2); }
.reads { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; }
.reads b { font: 700 14px var(--mono); white-space: nowrap; }
.reads b.is-bump { color: var(--palm); animation: bump .7s var(--spring); }
.msg__acts { display: flex; flex-wrap: wrap; gap: 6px; }
.unread { display: flex; flex-wrap: wrap; gap: 5px; }
.unread span { padding: 3px 9px; border-radius: 999px; background: var(--sand-2); font-size: 12px; }

/* ---------- Tiroir (dossier pèlerin) ------------------------------------------------------- */
.drawer { position: fixed; inset: 0; z-index: 85; visibility: hidden; overflow: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(14, 42, 43, .42); opacity: 0; transition: opacity .35s; }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); overflow-y: auto; overscroll-behavior: contain; background: var(--sand); box-shadow: -30px 0 60px -30px rgba(14, 42, 43, .6); transform: translateX(104%); transition: transform .5s var(--ease); outline: none; }
.drawer.is-open .drawer__panel { transform: none; }
.dr__head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 48px minmax(0, 1fr) 44px; gap: 12px; align-items: center; padding: 16px 18px; background: var(--night); color: var(--paper); }
.dr__head .av { width: 48px; height: 48px; font-size: 15px; }
.dr__head h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.05; }
.dr__head p { font-size: 12.5px; color: rgba(251, 248, 242, .66); }
.dr__x { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(251, 248, 242, .08); }
.dr__body { display: grid; gap: 14px; padding: 16px 18px 40px; }
.dr__sec { display: grid; gap: 10px; padding: 14px 16px; border-radius: 18px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.dr__sec > h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 500 10.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.dr__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.drow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.drow:last-child { border-bottom: 0; }
.drow b { display: block; }
.drow small { display: block; font-size: 12.5px; color: var(--ink-3); }
.drow small.bad { color: var(--red); font-weight: 650; }
.drow__r { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.fam { display: flex; flex-wrap: wrap; gap: 6px; }
.fam button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px 0 5px; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13px; font-weight: 650; }
.fam button .av { width: 30px; height: 30px; font-size: 11px; }
.fam button[aria-current="true"] { background: var(--night); color: var(--paper); }
.payform { display: grid; gap: 10px; }
.payform .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.danger { display: grid; gap: 8px; }
.btn--red { background: var(--red); color: var(--white); }
.btn--line-red { box-shadow: inset 0 0 0 1.5px rgba(184, 67, 47, .5); color: var(--red); }
.btn--xs { min-height: 36px; padding: 0 12px; font-size: 12.5px; gap: 6px; }
.btn--xs .i { width: 15px; height: 15px; }
.btn--soft { background: var(--gold-soft); color: var(--gold-ink); }
.btn--soft:hover { background: #ecdcb4; }

/* Toasts */
.ad-toasts { bottom: max(20px, env(safe-area-inset-bottom)); left: 248px; }
/* Bascule « Site client | Gestion agence » : jamais posée sur les listes.
   Ordinateur : dans le pied du menu ; téléphone et tablette : dans le flux, en pied de page. */
.pmode--side, .pmode--flow { position: static; left: auto; bottom: auto; transform: none; }
.pmode--side { align-self: stretch; margin: 2px -4px 0; background: rgba(5, 18, 19, .55); box-shadow: inset 0 0 0 1px rgba(251, 248, 242, .14); }
.pmode--side a { flex: 1 1 0; min-height: 38px; padding: 0 8px; font-size: 12.5px; }
html:has(.drawer.is-open) .pmode--side { opacity: 1; pointer-events: auto; }
.mfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 16px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.pmode--flow { box-shadow: inset 0 0 0 1px rgba(251, 248, 242, .12); }
@media (min-width: 861px) { .mfoot { display: none; } }
@media (min-width: 861px) {
  body.ad > .demo-bar { position: sticky; top: 0; }
  .side { top: 38px; height: calc(100vh - 38px); }
  .is-embed .side { top: 0; height: 100vh; }
}
.ad-toasts .toast { max-width: min(520px, 100%); }
.toast b { color: var(--gold-2); }

/* ---------- Tablette ------------------------------------------------------------------------ */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .deprow { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .deprow .mini { grid-column: auto; }
}

/* ---------- Téléphone : onglets en bas ------------------------------------------------------- */
@media (max-width: 860px) {
  .shell { display: block; min-height: 0; }
  .side { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; top: auto; height: auto; flex-direction: row; gap: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(14, 42, 43, .96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 -10px 30px -20px rgba(0, 0, 0, .6); }
  .side::before, .side__logo, .side__foot { display: none; }
  .nav { flex: 1; flex-direction: row; gap: 2px; }
  .nav a { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; height: 56px; min-height: 0; padding: 0 2px; font-size: 11px; border-radius: 12px; }
  .nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav a[aria-current="page"] { box-shadow: none; }
  .nav__badge { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; line-height: 18px; }
  .main { padding: 14px 14px calc(100px + env(safe-area-inset-bottom)); }
  .topbar { margin-bottom: 14px; }
  .topbar__r { display: none; }
  .topbar h1 { font-size: 32px; }
  .ad-toasts { left: 0; bottom: calc(84px + env(safe-area-inset-bottom)); }
  input, select, textarea { font-size: 16px !important; }
  .seg button { min-height: 44px; }
  .fchip { min-height: 44px; }
  .btn--xs { min-height: 44px; }
  .rr { min-height: 40px; }
  .toast__undo { min-height: 44px; }
  .ptable thead { display: none; }
  .ptable, .ptable tbody { display: block; }
  .ptable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; padding: 11px 8px; border-bottom: 1px solid var(--line); }
  .ptable tr.is-bad { background: rgba(184, 67, 47, .06); box-shadow: inset 3px 0 0 var(--red); }
  .ptable td { display: block; padding: 0; border: 0; background: none !important; box-shadow: none !important; }
  .ptable td.cdots { grid-column: 1 / -1; display: flex; gap: 12px; flex-wrap: wrap; padding-left: 46px; }
  .ptable td.c { display: none; }
  .ptable td.cdots { gap: 4px 9px; }
  .cdots span { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-3); }
  .cdots .dot { width: 9px; height: 9px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-left: -14px !important; margin-right: -14px; padding: 0 14px 2px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .drawer__panel { top: auto; left: 0; width: 100%; max-height: 92%; border-radius: 22px 22px 0 0; transform: translateY(104%); }
  .dr__head { border-radius: 22px 22px 0 0; }
}
@media (min-width: 861px) { .cdots { display: none; } }
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .seg { flex-wrap: nowrap; }
  .seg button { padding: 0 11px; }
  .seg[role="group"][aria-label="Départ"] button small { display: none; }
  .ch__bar, .toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ch__bar .seg, .toolbar .seg { display: flex; width: 100%; }
  .ch__bar .seg button, .toolbar .seg button, .seg--sm button { flex: 1 1 0; min-width: 0; padding: 0 4px; }
  .toolbar .search { max-width: none; }
  .seg--sm { display: flex; width: 100%; }
  .kpi .spark { display: none; }
  .rules__done { position: static; justify-self: start; }
  .rules__h { padding-right: 0; }
  .ch__head { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .tool span { display: none; }
  .tool { width: 40px; padding: 0; justify-content: center; }
  .room__no { font-size: 19px; }
  .room__occ { font-size: 12px; }
  .room { gap: 6px; }
  .kpis { gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi b { font-size: 28px; }
  .kpi p { font-size: 12px; }
  .deprow { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .deprow .minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .owner p { font-size: 19px; }
  .ch__head { padding: 14px 16px; }
  .ch__num b { font-size: 38px; }
  .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .room { min-height: 124px; padding: 10px 10px 9px; }
  .prow { grid-template-columns: minmax(0, 1fr) auto; }
  .prow__acts { grid-column: 1 / -1; padding-left: 46px; }
  .prow--open { grid-template-columns: minmax(0, 1fr) auto auto; }
  .drow { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .drow__r { justify-content: flex-start; }
  .drow:has(.drow__r > .amt) { grid-template-columns: minmax(0, 1fr) auto; }
  .drow:has(.drow__r > .amt) .drow__r { justify-content: flex-end; }
}
@media (min-width: 601px) { .deprow .minis { display: contents; } }
@media (max-width: 360px) { .nav a { font-size: 10.5px; letter-spacing: -.01em; } }
@media (min-width: 500px) and (max-width: 860px) { .rooms { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Intégré dans la page « en direct » ------------------------------------------------ */
.is-embed body.ad { min-height: 100vh; }
.is-embed .topbar__r { display: none; }
.is-embed .main { padding-top: 12px; }
.is-embed .topbar { margin-bottom: 12px; }
.is-embed .topbar h1 { font-size: 28px; }
.is-embed .topbar__date { display: none; }
.is-embed .ad-toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
