/* Espace client v2 — /espace/client (s'appuie sur /v2/boostr-v2.css) */
:root {
  --es-line-d: rgba(255, 255, 255, .12);
  --es-surface-d: rgba(255, 255, 255, .06);
  --es-border-d: rgba(255, 255, 255, .14);
  --es-amber: #F5B544;
}
body { min-height: 100vh; }
/* Le header collant ne doit jamais masquer l'élément ciblé / focalisé */
html { scroll-padding-top: 96px; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.es-header .bar { font-size: 14px; }
.es-header nav.main { gap: 24px; }
.es-header nav.main a { padding: 8px 0; }
.es-header .aside { gap: 14px; }
.es-logout { border: 0; background: transparent; color: var(--muted); font-size: 14px; min-height: 44px; padding: 8px 10px; border-radius: 22px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.es-header .logo { display: inline-flex; align-items: center; min-height: 44px; }
.es-logout:hover { color: var(--blue); }
.es-avatar { width: 44px; height: 44px; border-radius: 22px; background: var(--ink); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; letter-spacing: .02em; }
.es-avatar.is-guest { width: auto; padding: 0 14px; font-size: 12px; background: var(--blue); }
.es-mode-chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); font-size: 12px; color: var(--ink); white-space: nowrap; }

/* ---------- Top: salutation + onglets ---------- */
.es-main { padding-top: 24px; padding-bottom: 64px; }
.es-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.es-greet { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 0; }
.es-meta { overflow-wrap: anywhere; }
.es-hello { font-size: 40px; letter-spacing: -.03em; line-height: 1; }
.es-context { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.es-context:empty { display: none; }
.es-switch { position: relative; display: inline-flex; }
.es-switch { max-width: 100%; min-width: 0; }
.es-switch select { appearance: none; -webkit-appearance: none; height: 34px; max-width: min(420px, 78vw); padding: 0 34px 0 14px; border-radius: 17px; border: 1px solid var(--line); background: var(--white); font-size: 13px; color: var(--ink); cursor: pointer; text-overflow: ellipsis; }
.es-switch::after { content: ''; position: absolute; right: 14px; top: 13px; width: 7px; height: 7px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); pointer-events: none; }
.es-link { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--ink); font-size: 13px; text-decoration: none; }
.es-owner { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 17px; background: rgba(44, 131, 255, .12); color: var(--blue-dark); font-size: 12px; font-weight: 600; }
.es-tabs { flex-shrink: 0; }
.es-tabs button { font-family: var(--font-body); }
.es-tabs .t-short { display: none; }

/* ---------- Grille principale ---------- */
.es-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.es-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.es-card { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-hero); background: var(--ink); color: var(--white); padding: 52px 56px 48px; min-height: 664px; display: flex; flex-direction: column; }
.es-card a:not(.btn):not(.btn-dl):not(.btn-dl-all):not(.btn-ghost-sm) { color: var(--white); }
.es-glow { position: absolute; left: 0; top: 0; width: 700px; height: 700px; margin: -350px 0 0 -350px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .18) 0%, rgba(44, 131, 255, .1) 35%, rgba(10, 10, 10, 0) 70%); pointer-events: none; z-index: -1; will-change: transform; }
.es-headline { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 4.2vw, 60px); line-height: 1.04; letter-spacing: -.035em; max-width: 840px; min-height: 1.05em; column-gap: .27em; margin-bottom: 40px; }
.es-headline > span { color: var(--white); }
.es-panel { display: flex; flex-direction: column; gap: 32px; flex: 1; opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease) .3s, transform .5s var(--ease) .3s; }
.es-panel.in { opacity: 1; transform: none; }
.es-lead { font-size: 18px; line-height: 1.5; color: var(--slate); max-width: 560px; }
.es-card .m-only { display: none; }
.es-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.es-actions .btn { font-size: 14px; }
.es-mono-d { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-dark); }
.es-notice { padding: 14px 18px; border-radius: 18px; background: rgba(44, 131, 255, .16); border: 1px solid rgba(44, 131, 255, .55); font-size: 14px; line-height: 1.5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.es-notice button { border: 0; background: var(--white); color: var(--ink); height: 44px; padding: 0 18px; border-radius: 20px; font-weight: 600; font-size: 13px; cursor: pointer; }

/* Étapes */
.es-stages { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.es-stages li { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.es-stage-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.es-stage-bar > span { display: block; height: 4px; border-radius: 2px; background: var(--blue); width: 0; transition: width 1.4s var(--ease) .6s; }
.es-stages.in .es-stage-bar > span { width: var(--v, 0%); }
.es-stage-dot { display: none; width: 10px; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .25); flex-shrink: 0; }
.es-stages li.is-on .es-stage-dot { background: var(--blue); }
.es-stage-n { font-family: var(--font-mono); font-size: 11px; color: var(--slate-dark); }
.es-stage-label { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; color: var(--slate-dark); }
.es-stages li.is-on .es-stage-label { color: var(--white); }
.es-stage-state { font-size: 13px; color: var(--slate); }
.es-stages li.is-current .es-stage-state { color: var(--white); }

/* Lignes livrables */
.es-rows { display: flex; flex-direction: column; }
.es-rows .es-mono-d { padding-bottom: 12px; }
.es-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--es-line-d); font-size: 15px; color: var(--white); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; font-family: var(--font-body); }
button.es-row { cursor: pointer; transition: color .2s, padding .25s var(--ease); }
button.es-row:hover { color: var(--blue); padding-left: 6px; }
.es-row > span:last-child { color: var(--slate); font-size: 14px; text-align: right; display: inline-flex; align-items: center; gap: 8px; }
.es-row .arr { color: var(--slate-dark); }

/* Sélecteur de vidéo (prévisualisation) */
.es-vlist { display: flex; flex-direction: column; gap: 8px; }
.es-vitem { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 16px 8px 8px; border-radius: 26px; border: 1px solid var(--es-border-d); background: var(--es-surface-d); color: var(--white); text-align: left; font-family: var(--font-body); font-size: 14px; cursor: pointer; transition: border-color .2s, background-color .2s; }
.es-vitem:hover { border-color: rgba(44, 131, 255, .7); }
.es-vitem[aria-pressed="true"] { border-color: var(--blue); background: rgba(44, 131, 255, .16); }
.es-vitem .pl { width: 36px; height: 36px; border-radius: 18px; background: var(--white); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.es-vitem .tt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.es-vitem .mt { color: var(--slate); font-size: 12px; white-space: nowrap; }

/* Messages */
.es-chat { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 340px; }
.messages-list { flex: 1; min-height: 260px; max-height: 460px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 4px 4px 0; }
.messages-list::-webkit-scrollbar { width: 3px; }
.messages-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); border-radius: 2px; }
.messages-list > :first-child { margin-top: auto; }
.msg { max-width: min(460px, 86%); padding: 14px 18px; font-size: 15px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.msg-boostr { align-self: flex-start; border-radius: 20px 20px 20px 6px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); }
.msg-client { align-self: flex-end; border-radius: 20px 20px 6px 20px; background: var(--blue); }
.msg-meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; opacity: .62; margin-top: 6px; white-space: normal; }
.msg-empty { color: var(--slate); font-size: 14px; text-align: center; margin: auto; }
.msg-input-row { display: flex; gap: 10px; }
.msg-input-row label { flex: 1; display: flex; min-width: 0; }
.msg-input { flex: 1; min-width: 0; height: 54px; border-radius: 27px; padding: 0 22px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); color: var(--white); font-size: 15px; }
.msg-input::placeholder { color: var(--slate-dark); }
.btn-send { width: 54px; height: 54px; border-radius: 27px; border: 0; background: var(--white); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }

/* ---------- Cadre vidéo (droite) ---------- */
.es-frame { position: sticky; top: 100px; border-radius: 30px; border: 2.5px solid var(--ink); padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 16px; min-height: 664px; }
.es-frame-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.es-frame-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-status { height: 28px; padding: 0 12px; border-radius: 14px; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; background: var(--white); border: 1px solid var(--line); white-space: nowrap; flex-shrink: 0; }
.es-status .pt.is-done { background: #2BB673; }
.es-player { position: relative; width: min(100%, 266px); aspect-ratio: 9 / 16; margin: 6px auto 0; border-radius: 20px; overflow: hidden; background: var(--tone-1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 24px 50px rgba(13, 26, 46, .22); transition: transform .45s var(--ease), box-shadow .45s; }
.es-frame:hover .es-player { transform: translateY(-8px) scale(1.03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 30px 60px rgba(13, 26, 46, .28); }
.es-player.is-playing, .es-frame:hover .es-player.is-playing { transform: none; }
.es-player > img, .es-player > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.es-player > video.is-live { object-fit: contain; background: #000; }
.es-player .es-sheen { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(125deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .05) 36%, rgba(255, 255, 255, 0) 58%); z-index: 1; }
.es-player .ph { position: absolute; left: 12px; right: 12px; top: 44%; text-align: center; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; color: var(--slate-dark); z-index: 1; }
.es-player .play { width: 56px; height: 56px; margin: -28px 0 0 -28px; cursor: pointer; }
.es-player .play[disabled] { opacity: .4; cursor: default; }
.es-player.is-playing .play { z-index: 5; transition: opacity .25s; }
.es-player.is-running .play { opacity: 0; }
.es-player.is-running:hover .play, .es-player.is-running .play:focus-visible { opacity: 1; }
.es-player .es-prog { position: absolute; left: 14px; right: 14px; bottom: 14px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .22); z-index: 2; pointer-events: none; }
.es-player .es-prog > span { display: block; height: 3px; border-radius: 2px; background: var(--blue); width: 0; }
.es-player.is-idle .es-prog > span { animation: esProg 16s linear infinite; }
.es-player.is-playing .es-prog, .es-player.is-playing .es-sheen { display: none; }
@keyframes esProg { from { width: 0; } to { width: 100%; } }
.es-player .livrable-watermark { z-index: 3; }
.es-frame-actions { display: flex; gap: 8px; margin-top: auto; }
.es-frame-actions .btn-replay { flex: 1; height: 48px; border-radius: 24px; border: 0; background: var(--ink); color: var(--white); font-weight: 600; font-size: 13px; cursor: pointer; }
.es-frame-actions .btn-replay[disabled] { opacity: .45; cursor: default; }
.es-icon-btn { width: 48px; height: 48px; border-radius: 24px; border: 1px solid var(--ink); background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.es-icon-btn[aria-disabled="true"] { opacity: .45; }
.es-frame-note { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.45; }

/* Colonne droite vue d'ensemble */
.es-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 100px; }
.es-side-card { border-radius: 30px; border: 2.5px solid var(--ink); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.es-side-card .mono { color: var(--muted); }
.es-side-title { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -.03em; line-height: 1.05; }
.es-side-card .btn { width: 100%; }

/* ---------- Vue d'ensemble : stats + commandes ---------- */
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card { border-top: 1px solid var(--es-line-d); padding-top: 14px; }
.stat-card-val { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.03em; line-height: 1.05; color: var(--white); }
.stat-card-val.blue { color: var(--blue); }
.stat-card-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-dark); margin-top: 6px; }
.commandes-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-dark); padding-bottom: 12px; }
.commandes-grid { display: flex; flex-direction: column; }
.commandes-group { display: flex; flex-direction: column; }
.commandes-group + .commandes-group { margin-top: 22px; }
.commandes-group-title { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); padding-bottom: 8px; }
.commande-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--es-line-d); text-decoration: none; color: var(--white); cursor: pointer; transition: padding .25s var(--ease); }
.es-card a.commande-card { color: var(--white); }
.commande-card:hover { padding-left: 8px; }
.commande-card:hover .cmd-titre { color: var(--blue); }
.cmd-titre { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; line-height: 1.15; transition: color .2s; overflow-wrap: anywhere; }
.commande-card > * { min-width: 0; }
.cmd-type { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-dark); margin-left: 8px; }
.cmd-meta { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--slate); }
.cmd-owner { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; background: rgba(44, 131, 255, .2); color: #9CC4FF; font-size: 11px; font-weight: 600; }
.livrable-chip { font-size: 12px; color: var(--slate-dark); }
.livrable-chip.active { color: var(--slate); }
.cmd-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.statut-badge { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid var(--es-border-d); font-size: 12px; white-space: nowrap; }
.statut-dot { width: 7px; height: 7px; border-radius: 4px; background: var(--slate-dark); }
.s-en_tournage .statut-dot, .s-en_montage .statut-dot, .s-validation .statut-dot { background: var(--blue); animation: pulse 1.8s ease-in-out infinite; }
.s-livre .statut-dot { background: #2BB673; }
.cmd-date, .cmd-shooting-date { font-size: 12px; color: var(--slate); }
.cmd-shooting-date { color: #9CC4FF; }
.cmd-arrow { display: none; }
.empty-commandes { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.empty-title { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
.empty-sub { color: var(--slate); font-size: 16px; line-height: 1.5; max-width: 480px; }

/* ---------- Agence (colonne claire) ---------- */
.agency-panel { display: none; }
.agency-panel.visible { display: flex; flex-direction: column; gap: 14px; border-radius: 30px; border: 2.5px solid var(--ink); padding: 24px; }
.agency-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.agency-identity { display: flex; align-items: center; gap: 12px; }
.agency-logo { width: 52px; height: 52px; border-radius: 26px; border: 1px solid var(--line); object-fit: contain; background: var(--white); padding: 3px; flex: 0 0 auto; }
.agency-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; line-height: 1.1; }
.agency-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.agency-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.agency-summary-card { border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; background: var(--white); }
.agency-summary-value { font-family: var(--font-display); font-size: 26px; line-height: 1; font-weight: 700; }
.agency-summary-label { margin-top: 4px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.agency-members { display: flex; flex-direction: column; gap: 8px; }
.agency-member { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; border: 1px solid var(--line); background: var(--white); border-radius: 18px; padding: 10px 12px 10px 14px; }
.agency-member.is-director { border-color: var(--blue); }
.agency-member-name { font-size: 14px; font-weight: 600; }
.agency-member-meta { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.agency-action { border: 1px solid var(--ink); background: transparent; color: var(--ink); border-radius: 18px; height: 36px; padding: 0 14px; font-size: 12px; font-weight: 600; cursor: pointer; }
.agency-action:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }
.agency-add { border-top: 1px solid var(--line); padding-top: 12px; }
.agency-add summary { cursor: pointer; color: var(--blue); font-size: 13px; font-weight: 600; list-style: none; min-height: 32px; display: flex; align-items: center; }
.agency-add summary::-webkit-details-marker { display: none; }
.agency-add-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 10px; }
.agency-input { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 22px; padding: 0 16px; font-size: 14px; background: var(--white); color: var(--ink); }
.agency-input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 4px rgba(44, 131, 255, .2); }
.agency-add-status { font-size: 12px; color: var(--muted); }

/* ---------- Sections livrables (dans la carte noire) ---------- */
.es-card .section { margin: 0; }
.es-sections { display: flex; flex-direction: column; gap: 36px; }
.section-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-hd-l { display: flex; align-items: baseline; gap: 10px; }
.section-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.section-hd-icon { display: none; }
.section-hd-title { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.section-hd-count { font-family: var(--font-mono); font-size: 11px; color: var(--slate-dark); }

.btn-dl, .btn-dl-all, .projection-video-btn, .photo-selection-btn, .btn-ghost-sm, .btn-preview { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border-radius: 20px; border: 1px solid transparent; font-family: var(--font-body); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease); }
.btn-dl, .btn-dl-all, .projection-video-btn, .photo-selection-btn { background: var(--white); color: var(--ink); }
.btn-dl:hover, .btn-dl-all:hover, .projection-video-btn:hover, .photo-selection-btn:hover { background: var(--blue); color: var(--white); }
.btn-ghost-sm, .btn-preview, .photo-selection-btn.secondary { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .3); font-weight: 400; }
.btn-ghost-sm:hover, .btn-preview:hover, .photo-selection-btn.secondary:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }
.es-card .btn-ghost-sm, .es-card .btn-dl { color: inherit; }
.es-card .btn-dl { color: var(--ink); }
.btn-dl-all.is-locked, .projection-video-btn.is-locked, .projection-video-btn:disabled, .btn-dl[disabled], .btn-preview[disabled] { background: rgba(255, 255, 255, .08); color: var(--slate-dark); border-color: rgba(255, 255, 255, .12); cursor: not-allowed; }
.btn-dl-all.is-locked:hover, .projection-video-btn.is-locked:hover { background: rgba(255, 255, 255, .08); color: var(--slate-dark); }
.btn-dl-all:disabled, .photo-selection-btn:disabled { opacity: .7; cursor: progress; }
.download-control { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.download-info-btn { width: 28px; height: 28px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: var(--slate); font-family: var(--font-mono); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex-shrink: 0; }
.download-info-tip { position: absolute; top: calc(100% + 10px); right: 0; width: min(260px, calc(100vw - 48px)); padding: 12px 14px; border-radius: 16px; background: var(--white); color: var(--ink); font-size: 13px; line-height: 1.5; box-shadow: 0 18px 38px rgba(0, 0, 0, .35); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .15s, transform .15s; z-index: 5; }
.download-control:hover .download-info-tip, .download-control:focus-within .download-info-tip, .download-control.is-open .download-info-tip { opacity: 1; transform: none; pointer-events: auto; }

/* Vidéos */
.video-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.video-card { background: var(--es-surface-d); border: 1px solid var(--es-border-d); border-radius: 20px; padding: 10px; display: flex; flex-direction: column; gap: 10px; transition: border-color .2s, transform .3s var(--ease); }
.video-card:hover { border-color: rgba(44, 131, 255, .7); transform: translateY(-3px); }
.video-thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 0; background: var(--tone-1); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.video-thumb-media { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--tone-1); }
.video-thumb-play { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .16); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 13px; pointer-events: none; }
.video-info { padding: 0 4px; min-width: 0; }
.video-name { font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.video-meta { font-size: 12px; color: var(--slate); margin-top: 2px; }
.video-actions { display: flex; gap: 8px; }
.video-actions .btn-preview { flex: 1; }
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.story-card { background: var(--es-surface-d); border: 1px solid var(--es-border-d); border-radius: 18px; padding: 8px; transition: transform .3s var(--ease), border-color .2s; }
.story-card:hover { transform: translateY(-3px); border-color: rgba(44, 131, 255, .7); }
.story-thumb { position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; border: 0; background: var(--tone-1); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.story-name { font-size: 13px; font-weight: 600; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.story-meta { font-size: 11px; color: var(--slate); padding: 0 2px; }

/* Filigrane & badge final */
.livrable-watermark { position: absolute; right: 8px; bottom: 8px; z-index: 4; pointer-events: none; width: 22px; height: 22px; color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 17px; font-weight: 800; line-height: 1; text-shadow: 0 1px 5px rgba(10, 10, 10, .42); }
.photo-item .livrable-watermark, .preview-body.is-photo-preview .livrable-watermark { left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); }
.es-player .livrable-watermark { left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); font-size: 22px; width: 28px; height: 28px; }
.projection-compare .livrable-watermark { right: 12px; bottom: 12px; }
.final-badge { position: absolute; left: 8px; top: 8px; z-index: 5; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; background: var(--blue); color: var(--white); font-size: 11px; font-weight: 600; pointer-events: none; }
.photo-item .final-badge { top: auto; bottom: 8px; }

/* Livraison finale */
.final-delivery-section { border: 1px solid rgba(44, 131, 255, .6); border-radius: 24px; background: rgba(44, 131, 255, .1); padding: 22px; display: flex; flex-direction: column; gap: 24px; }
.final-delivery-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.final-delivery-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.final-delivery-sub { margin-top: 6px; color: var(--slate); font-size: 14px; line-height: 1.45; }
.final-video-list { display: flex; flex-direction: column; }
.final-video-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--es-line-d); }
.final-video-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.final-video-meta { font-size: 12px; color: var(--slate); margin-top: 2px; }

/* Photos */
.es-counter { display: block; margin-bottom: 14px; }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.photo-item { border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; cursor: pointer; position: relative; background: var(--tone-2); border: 1px solid rgba(255, 255, 255, .16); transition: transform .3s var(--ease), box-shadow .25s, border-color .2s; }
.photo-item::before { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, #26344A 8%, #34435A 18%, #26344A 33%); background-size: 220% 100%; animation: photoShimmer 1.2s linear infinite; transition: opacity .18s; }
.photo-item.is-ready::before { opacity: 0; }
.photo-item:hover { transform: translateY(-3px); }
.photo-item:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .18s; position: relative; z-index: 1; }
.photo-item.is-ready img { opacity: 1; }
.photo-item::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(125deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .03) 38%, rgba(255, 255, 255, 0) 60%); }
.photo-overlay { position: absolute; inset: 0; z-index: 2; background: transparent; transition: background .15s; }
.photo-item:hover .photo-overlay { background: rgba(0, 0, 0, .18); }
.photo-dl-icon { display: none; }
.photo-select-control { position: absolute; top: 4px; right: 4px; z-index: 4; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.photo-select-control input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.photo-select-control .ck { width: 26px; height: 26px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: rgba(10, 10, 10, .35); border: 1px solid rgba(255, 255, 255, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background-color .2s, border-color .2s; }
.photo-select-control .ck svg { opacity: 0; transition: opacity .2s; }
.photo-select-control input:checked + .ck { background: var(--blue); border-color: var(--blue); }
.photo-select-control input:checked + .ck svg { opacity: 1; }
.photo-select-control input:focus-visible + .ck { outline: 2px solid var(--white); outline-offset: 2px; }
.photo-item.is-selected { border: 2px solid var(--blue); box-shadow: 0 0 0 4px rgba(44, 131, 255, .3); }
.photo-selection-bar { display: none; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border: 1px solid rgba(44, 131, 255, .55); border-radius: 22px; background: rgba(44, 131, 255, .14); padding: 8px 8px 8px 18px; margin: 0 0 14px; }
.photo-selection-bar.visible { display: flex; }
.photo-selection-count { font-size: 13px; font-weight: 600; }
.photo-selection-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@keyframes photoShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Projections avant / après */
.projection-grid { display: grid; gap: 14px; }
.projection-card { background: var(--es-surface-d); border: 1px solid var(--es-border-d); border-radius: 22px; padding: 14px; }
.projection-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.projection-card-title { font-size: 15px; font-weight: 600; }
.projection-card-sub { font-size: 12px; color: var(--slate); margin-top: 2px; }
.projection-download-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.projection-badge { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #9CC4FF; }
.projection-export-note { margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--es-border-d); border-radius: 16px; background: var(--es-surface-d); color: var(--slate); font-size: 13px; line-height: 1.45; }
.projection-export-note strong { color: var(--white); font-weight: 600; }
.projection-compare { --split: 50%; position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background: var(--tone-1); user-select: none; touch-action: pan-y; }
.projection-image, .projection-after-wrap { position: absolute; inset: 0; width: 100%; height: 100%; }
.projection-image { object-fit: cover; display: block; }
.projection-after-wrap { clip-path: inset(0 0 0 var(--split)); }
.projection-divider { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; background: var(--white); transform: translateX(-1px); box-shadow: 0 0 0 1px rgba(15, 23, 42, .18), 0 8px 24px rgba(15, 23, 42, .24); pointer-events: none; z-index: 6; }
.projection-handle { position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; transform: translate(-50%, -50%); border-radius: 18px; background: var(--white); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; }
.projection-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; z-index: 4; margin: 0; }
.projection-range:focus, .projection-range:focus-visible { outline: none; }
.projection-play-btn { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 22px; background: rgba(255, 255, 255, .16); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; z-index: 7; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background-color .2s, transform .2s; }
.projection-play-btn:hover { background: rgba(255, 255, 255, .3); transform: translateX(-50%) scale(1.05); }
.projection-play-btn.is-playing { background: var(--blue); border-color: var(--blue); }
.projection-labels { position: absolute; inset: 12px 12px auto; display: flex; justify-content: space-between; pointer-events: none; z-index: 8; }
.projection-labels span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--white); background: rgba(10, 10, 10, .6); border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; padding: 4px 9px; backdrop-filter: blur(8px); }
.projection-mobile-hint { display: none; }

/* Visite, documents, carte */
.matterport-wrap, .map-card { border: 1px solid var(--es-border-d); border-radius: 20px; overflow: hidden; background: var(--es-surface-d); }
.matterport-frame { position: relative; padding-top: 56.25%; background: var(--tone-1); }
.map-frame { position: relative; padding-top: 34%; min-height: 220px; background: var(--tone-2); }
.matterport-frame iframe, .map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.matterport-footer, .map-footer { padding: 10px 10px 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.matterport-label, .map-address { font-size: 13px; color: var(--slate); min-width: 0; overflow-wrap: anywhere; }
.doc-list { display: flex; flex-direction: column; }
.doc-card { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--es-line-d); }
.doc-icon { display: none; }
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.doc-type { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--slate-dark); text-transform: uppercase; margin-top: 2px; }
.empty-state { padding: 22px; text-align: left; border: 1px dashed rgba(255, 255, 255, .2); border-radius: 18px; }
.empty-state .es-icon { display: none; }
.empty-state p { font-size: 14px; color: var(--slate); }

/* Tournage (compte à rebours) */
.shooting-list { display: flex; flex-direction: column; gap: 10px; }
.shooting-card { border: 1px solid var(--es-border-d); background: var(--es-surface-d); border-radius: 22px; padding: 16px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.shooting-countdown { display: grid; grid-template-columns: repeat(4, 60px); gap: 8px; }
.shooting-timebox { height: 62px; border-radius: 16px; background: rgba(44, 131, 255, .18); border: 1px solid rgba(44, 131, 255, .45); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.shooting-timebox strong { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.shooting-timebox span { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); margin-top: 5px; }
.shooting-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.shooting-title { font-size: 15px; font-weight: 600; }
.shooting-status-pill { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 14px; background: rgba(43, 182, 115, .18); color: #7FE0B0; font-size: 12px; font-weight: 600; }

/* ---------- Toast (maquette : pilule noire, point bleu) ---------- */
.es-toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); z-index: 9999; display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 32px); min-height: 44px; padding: 10px 20px; border-radius: 22px; background: var(--ink); color: var(--white); font-family: var(--font-body); font-size: 14px; line-height: 1.35; box-shadow: 0 12px 30px rgba(13, 26, 46, .3); opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: opacity .25s, transform .3s var(--ease); }
.es-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.es-toast-dot { width: 8px; height: 8px; border-radius: 4px; background: var(--blue); flex-shrink: 0; }
.es-toast.is-error .es-toast-dot { background: #FF6B6B; }

/* ---------- Lightbox ---------- */
.preview-backdrop { overscroll-behavior: contain; position: fixed; inset: 0; background: rgba(10, 10, 10, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.preview-backdrop.open { display: flex; }
.preview-modal { width: min(960px, 92vw); max-height: 88vh; max-height: 88dvh; position: relative; background: var(--ink); color: var(--white); border-radius: 28px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); display: grid; grid-template-rows: auto 1fr; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--es-line-d); }
.preview-title { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.preview-title-wrap { min-width: 0; }
.preview-count { font-family: var(--font-mono); font-size: 11px; color: var(--slate-dark); margin-top: 3px; }
.preview-head-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.preview-nav-btn, .preview-close { width: 44px; height: 44px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: var(--white); font-size: 20px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.preview-nav-btn:hover, .preview-close:hover { background: var(--blue); border-color: var(--blue); }
.preview-nav-btn.is-hidden { display: none; }
.preview-nav-btn[disabled] { opacity: .35; cursor: default; }
.btn-preview-dl { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 22px; background: var(--white); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.btn-preview-dl:hover { background: var(--blue); color: var(--white); }
.preview-body { position: relative; padding: 18px; display: flex; align-items: center; justify-content: center; background: #050505; min-height: 260px; }
.preview-body img, .preview-body video { width: auto; max-width: 100%; max-height: 72vh; border-radius: 16px; display: block; background: var(--tone-1); }
.preview-body .livrable-watermark { right: 28px; bottom: 28px; width: 26px; height: 26px; font-size: 19px; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .es-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
  .es-card { padding: 44px 40px 40px; }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .es-tabs .t-long { display: none; }
  .es-tabs .t-short { display: inline; }
}
@media (max-width: 960px) {
  .es-grid { grid-template-columns: minmax(0, 1fr); }
  .es-frame, .es-side { position: static; }
  .es-frame { min-height: 0; }
  .es-card .d-only { display: none; }
  .es-card .m-only { display: inline; }
}
@media (max-width: 860px) {
  .es-header .bar { padding-left: 8px; }
  .es-header .aside { gap: 6px; }
  .es-logout { font-size: 13px; }
  .es-avatar { width: 42px; height: 42px; border-radius: 21px; font-size: 12px; }
  .es-main { padding-top: 12px; }
  .es-top { flex-direction: column; align-items: stretch; gap: 16px; margin-bottom: 16px; }
  .es-greet { padding: 0 8px; gap: 4px; }
  .es-meta { font-size: 10px; }
  .es-hello { font-size: 30px; }
  .es-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 3px; border-radius: 22px; width: 100%; }
  .es-tabs button { height: 36px; border-radius: 18px; padding: 0 4px; font-size: 12px; }
  .es-card { border-radius: 28px; padding: 24px 22px; min-height: 470px; }
  .es-headline { font-size: 32px; line-height: 1.02; margin-bottom: 20px; }
  .es-panel { gap: 22px; }
  .es-lead { font-size: 15px; }
  .es-actions { flex-direction: column; align-items: stretch; }
  .es-actions .btn { width: 100%; height: 50px; }
  .es-stages { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .es-stages li { flex-direction: row; align-items: center; gap: 12px; }
  .es-stage-bar, .es-stage-n { display: none; }
  .es-stage-dot { display: block; }
  .es-stage-label { flex: 1; font-size: 18px; }
  .es-stage-state { font-size: 12px; }
  .es-frame { border-radius: 28px; padding: 16px; gap: 14px; }
  .es-player { width: min(62%, 200px); }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commande-card { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cmd-right { flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: flex-start; text-align: left; }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .photo-item { border-radius: 14px; }
  .shooting-countdown { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  .video-list { grid-template-columns: minmax(0, 1fr); }
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-actions { width: 100%; justify-content: flex-start; margin-left: 0; }
  .final-delivery-section { padding: 16px; }
  .final-delivery-title { font-size: 24px; }
  .final-video-row { flex-direction: column; align-items: flex-start; }
  .map-frame { padding-top: 58%; min-height: 0; }
  .projection-card { padding: 12px; }
  .projection-card-sub { display: none; }
  .projection-handle { display: none; }
  .projection-compare { overflow: visible; margin-bottom: 46px; }
  .projection-range { top: calc(100% + 12px); right: 0; bottom: auto; left: 0; height: 30px; opacity: 1; accent-color: var(--blue); }
  .projection-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .2); }
  .projection-range::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -9px; border-radius: 12px; background: var(--blue); border: 3px solid var(--white); -webkit-appearance: none; appearance: none; }
  .projection-mobile-hint { display: block; margin-top: -8px; text-align: center; font-size: 12px; color: var(--slate); }
  .msg { max-width: 86%; padding: 12px 14px; font-size: 14px; border-radius: 18px 18px 18px 6px; }
  .msg-client { border-radius: 18px 18px 6px 18px; }
  .msg-input { height: 50px; border-radius: 25px; padding: 0 18px; }
  .btn-send { width: 50px; height: 50px; }
  .preview-modal { width: min(100%, 96vw); max-height: 92vh; grid-template-rows: auto minmax(0, 1fr) auto; border-radius: 24px; }
  .preview-head { display: contents; }
  .preview-title-wrap { padding: 14px 64px 12px 18px; border-bottom: 1px solid var(--es-line-d); }
  .preview-body { grid-row: 2; min-height: 0; padding: 12px; }
  .preview-body img, .preview-body video { max-height: 58vh; }
  .preview-head-actions { grid-row: 3; justify-content: center; gap: 12px; padding: 12px; border-top: 1px solid var(--es-line-d); margin: 0; }
  .preview-head-actions:not(.has-gallery):not(:has(.btn-preview-dl)) { display: none; }
  .preview-nav-btn { width: 58px; height: 48px; border-radius: 24px; font-size: 28px; }
  .preview-close { position: absolute; top: 10px; right: 10px; z-index: 2; }
}
@media (max-width: 520px) {
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .es-tabs button { font-size: 11.5px; }
}

/* ---------- Téléphone : confort au pouce ---------- */
@media (max-width: 860px) {
  html { scroll-padding-top: 76px; }
  /* Onglets ≥ 44px de haut */
  .es-tabs button { height: 44px; border-radius: 22px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .es-tabs { border-radius: 25px; }
  /* Sélecteur de commande / liens de contexte : 44px, 16px dans le select (pas de zoom iOS) */
  .es-switch select { height: 44px; border-radius: 22px; font-size: 16px; max-width: 100%; }
  .es-switch::after { top: 18px; }
  .es-link, .es-owner { height: 44px; border-radius: 22px; }
  .es-context { gap: 8px; }
  .es-context > * { max-width: 100%; }
  /* Champs : 16px minimum pour éviter le zoom automatique d'iOS */
  .msg-input, .agency-input { font-size: 16px; }
  .preview-backdrop { padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 400px) {
  .es-header .aside { gap: 4px; }
  .es-logout { padding: 8px 8px; }
  .es-header .logo { font-size: 22px; margin-right: 6px; }
}
@media (max-width: 359px) {
  .es-header .bar { padding-right: 8px; }
  .es-avatar { display: none; }
}
@media (max-width: 340px) {
  .es-header .logo { font-size: 21px; }
  .es-mode-chip { padding: 0 10px; }
  .es-logout { padding: 8px 6px; }
  .es-tabs button { font-size: 11px; }
}
/* Écrans tactiles : cibles ≥ 44px, pas d'effets de survol qui « collent » */
@media (pointer: coarse) {
  .btn-dl, .btn-dl-all, .projection-video-btn, .photo-selection-btn, .btn-ghost-sm, .btn-preview { height: 44px; border-radius: 22px; }
  .agency-action { height: 44px; border-radius: 22px; }
  .agency-add summary { min-height: 44px; }
  .photo-select-control { width: 44px; height: 44px; top: 2px; right: 2px; }
  .download-info-btn { position: relative; }
  .download-info-btn::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; }
}
@media (hover: none) {
  .es-frame:hover .es-player:not(.is-playing) { transform: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 24px 50px rgba(13, 26, 46, .22); }
  .video-card:hover, .story-card:hover, .photo-item:hover { transform: none; }
  .commande-card:hover { padding-left: 0; }
  button.es-row:hover { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .es-panel { opacity: 1; transform: none; transition: none; }
  .es-stage-bar > span { transition: none; }
  .photo-item::before, .es-player.is-idle .es-prog > span, .s-en_tournage .statut-dot, .s-en_montage .statut-dot, .s-validation .statut-dot { animation: none; }
  .video-card, .story-card, .photo-item, .commande-card, button.es-row, .es-player { transition: none; }
  .video-card:hover, .story-card:hover, .photo-item:hover, .es-frame:hover .es-player { transform: none; }
  .es-stage-bar > span { width: var(--v, 0%); }
  .es-glow { display: none; }
  .es-toast, .es-player.is-playing .play { transition: none; }
}
