/* Caméras — couleur de l'appli : ardoise (celle de sa tuile dans la Toolbox). */
:root { --app: #334e68; --app-soft: #e6edf4; --app-fort: #243b53; }

.hd .hd-row { align-items: center; }
.hd-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.wrap { max-width: 1500px; }

.barre-o { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.barre-o .hint { display: flex; align-items: center; gap: 8px; }
.seg.vit { min-width: 220px; }

.mosaique { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .mosaique { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .mosaique.n3 { grid-template-columns: repeat(3, 1fr); } }

.cam { position: relative; border-radius: 14px; overflow: hidden; background: #0b1020; aspect-ratio: 16 / 9;
       cursor: zoom-in; border: 0; padding: 0; width: 100%; display: block; color: #fff; text-align: left; }
.cam:focus-visible { outline: 3px solid #ff861d; outline-offset: 2px; }
.cam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .3s; }
.cam.hs img { filter: grayscale(1) brightness(.55); }
.cam-h { position: absolute; left: 0; right: 0; top: 0; padding: 10px 12px 24px; display: flex; justify-content: space-between; gap: 8px;
         align-items: flex-start; background: linear-gradient(rgba(0,0,0,.6), transparent); }
.cam-n { font-weight: 700; font-size: 15.5px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.cam-l { font-size: 12.5px; opacity: .85; }
.cam-t { position: absolute; right: 10px; bottom: 8px; font: 600 12px var(--mono); padding: 3px 8px; border-radius: 999px;
         background: rgba(0,0,0,.55); }
.pastille { display: inline-flex; align-items: center; gap: 6px; font: 700 11.5px var(--font); letter-spacing: .04em; text-transform: uppercase;
            padding: 4px 9px; border-radius: 999px; background: rgba(0,0,0,.5); white-space: nowrap; }
.pastille i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.3); }
.pastille.hs i { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.3); }
.pastille.att i { background: #eab308; box-shadow: none; }
.cam-err { position: absolute; left: 12px; right: 12px; bottom: 40px; font-size: 13px; line-height: 1.35; text-shadow: 0 1px 2px #000; }
.cam-vide { position: absolute; inset: 0; display: grid; place-items: center; color: #9aa3b8; font-size: 14px; }

/* Plein écran */
#plein { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0;
         border-radius: 0; background: #000; color: #fff; padding: 0; overflow: hidden; }
#plein::backdrop { background: #000; }
.pl { position: absolute; inset: 0; }
#pl-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.pl-h > div:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-h { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px;
        padding: calc(10px + env(safe-area-inset-top)) 12px 18px; background: linear-gradient(rgba(0,0,0,.75), transparent); }
.pl-h b { font-size: 17px; }
.pl-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; cursor: pointer;
          display: grid; place-items: center; font-size: 22px; flex: none; }
.pl-btn:focus-visible { outline: 3px solid #ff861d; }
.pl-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.pl-nav.g { left: 10px; } .pl-nav.d { right: 10px; }
.pl-b { position: absolute; bottom: calc(12px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); }

/* Historique d'une caméra qui envoie (plein écran) */
#pl-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.pl.avec-hist #pl-img, .pl.avec-hist #pl-vid { height: calc(100% - 92px - env(safe-area-inset-bottom)); }
.pl.avec-hist .pl-b { bottom: calc(104px + env(safe-area-inset-bottom)); }
.pl-hist { position: absolute; left: 0; right: 0; bottom: 0; height: calc(92px + env(safe-area-inset-bottom)); display: flex; gap: 6px;
           overflow-x: auto; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: #0b1020; scroll-snap-type: x proximity; }
.pl-hist-v { color: #9aa3b8; font-size: 13px; align-self: center; padding: 0 8px; }
.pl-vign { flex: none; width: 104px; height: 76px; border-radius: 8px; border: 2px solid transparent; padding: 0; position: relative;
           overflow: hidden; background: #1b2338; color: #fff; cursor: pointer; scroll-snap-align: start; font: 600 12px var(--font); }
.pl-vign[aria-pressed="true"] { border-color: #ff861d; }
.pl-vign img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-vign .vid { display: grid; place-items: center; height: 100%; font-size: 24px; }
.pl-vign small { position: absolute; left: 0; right: 0; bottom: 0; font: 600 10px var(--mono); background: rgba(0,0,0,.6); padding: 2px 4px; text-align: left; }
.pl-vign.direct { width: 70px; line-height: 1.3; }

/* Direct */
#pl-live { position: absolute; inset: 0; display: block; background: #000; }
.pl.avec-hist #pl-live { height: calc(100% - 92px - env(safe-area-inset-bottom)); }
#pl-live video { width: 100%; height: 100%; object-fit: contain; display: block; }
.pl-direct { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: #dc2626; color: #fff;
             font: 700 14px var(--font); cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-direct:focus-visible { outline: 3px solid #ff861d; outline-offset: 2px; }
.pl-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: calc(100% - 40px);
          background: rgba(0,0,0,.72); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14.5px; text-align: center; z-index: 2; }

.pl-album { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.14);
            color: #fff; font: 700 14px var(--font); cursor: pointer; white-space: nowrap; }

/* Album timelapse */
.alb { position: absolute; inset: 0; display: flex; flex-direction: column; background: #05070d; color: #fff; }
.alb-h { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 6px; }
.alb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.alb-t b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alb-t span { font-size: 12.5px; color: #9aa3b8; }
.alb-jours { display: flex; gap: 6px; overflow-x: auto; padding: 4px 12px 8px; flex: none; }
.alb-j { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px;
         border: 1px solid rgba(255,255,255,.22); background: transparent; color: #dfe4ee; font: 600 13.5px var(--font); cursor: pointer; }
.alb-j small { font: 600 11px var(--mono); color: #9aa3b8; }
.alb-j[aria-pressed="true"] { background: #fff; color: #0f1530; border-color: #fff; }
.alb-j[aria-pressed="true"] small { color: #5f6a80; }
.alb-v { color: #9aa3b8; font-size: 13px; align-self: center; }
.alb-scene { position: relative; flex: 1; min-height: 0; }
#alb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.alb-heure { position: absolute; left: 12px; top: 10px; display: flex; flex-direction: column; text-shadow: 0 2px 6px rgba(0,0,0,.8); pointer-events: none; }
.alb-heure b { font: 600 clamp(30px, 8vw, 54px)/1 var(--mono); letter-spacing: -.02em; }
.alb-heure span { font-size: 13px; margin-top: 4px; opacity: .9; }
.alb-vide { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: #9aa3b8; font-size: 15px; }
.alb-planche { position: absolute; inset: 0; overflow-y: auto; background: #05070d; display: grid; gap: 4px; padding: 6px;
               grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); grid-auto-rows: max-content; align-content: start; }
.alb-planche button { position: relative; display: block; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #1b2338; cursor: pointer; }
.alb-planche button.on { border-color: #ff861d; }
.alb-planche img { width: 100%; height: auto; aspect-ratio: 7 / 4; object-fit: cover; display: block; }
.alb-planche small { position: absolute; left: 0; bottom: 0; font: 600 11px var(--mono); color: #fff; background: rgba(0,0,0,.6); padding: 1px 5px; border-top-right-radius: 6px; }
.alb-bas { flex: none; padding: 6px 12px calc(10px + env(safe-area-inset-bottom)); background: #0b1020; }
#alb-cur { width: 100%; accent-color: #ff861d; height: 28px; margin: 0; }
.alb-axe { position: relative; height: 16px; margin: 0 8px; }
.alb-axe span { position: absolute; transform: translateX(-50%); font: 500 11px var(--mono); color: #9aa3b8; white-space: nowrap; }
.alb-cmd { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.alb-b { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 17px; cursor: pointer;
         display: grid; place-items: center; }
.alb-b.lire { width: 58px; height: 58px; background: #ff861d; color: #1c0d00; font-size: 22px; }
.alb-b[aria-pressed="true"] { background: #fff; color: #0f1530; }
.alb-b:focus-visible, .alb-j:focus-visible { outline: 3px solid #ff861d; outline-offset: 2px; }
.seg.alb-vit { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.seg.alb-vit button { color: #dfe4ee; min-height: 38px; padding: 0 10px; }
.seg.alb-vit button[aria-pressed="true"] { background: #fff; color: #0f1530; }

/* Fiche FTP à recopier dans l'appli Reolink */
.ftp-fiche { border: 1px solid var(--gray-300); border-radius: 12px; overflow: hidden; }
.ftp-l { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-top: 1px solid var(--gray-200); font-size: 14px; }
.ftp-l:first-child { border-top: 0; }
.ftp-l span { flex: 1; color: var(--gray-700); }
.ftp-l b { font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; text-align: right; }
.ftp-l .btn.small { min-height: 32px; padding: 0 9px; font-size: 12.5px; }

/* Réglages */
.cam-a { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--gray-200); }
.cam-a:first-child { border-top: 0; }
.cam-a .t { flex: 1; min-width: 0; }
.cam-a .t b { display: block; font-size: 15px; }
.cam-a .t span { font: 500 12px var(--mono); color: var(--gray-700); overflow-wrap: anywhere; }
.cam-a .ord { display: flex; flex-direction: column; gap: 2px; }
.cam-a .ord button { width: 34px; height: 24px; border: 1px solid var(--gray-400); background: #fff; border-radius: 6px; cursor: pointer; font-size: 11px; }
.cam-a .ord button:disabled { opacity: .35; }
.row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
dialog#dlg { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
.sous-t { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-700); margin: 18px 0 4px; }
