/* CLIK.ma « Prendre une photo » with a computer's camera (js/core/clik-camera.js): over « Annonce magique » and the photo
 * search window. Classes `clik-cam-`. The 8 px rule: 8 px inside the card, 8 px between its parts. */
html.clik-cam-open { overflow: hidden; scrollbar-gutter: stable; }
.clik-cam { position: fixed; inset: 0; z-index: 1080; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; background: rgba(9, 12, 24, .62); opacity: 0; transition: opacity .18s ease; }
.clik-cam[hidden] { display: none; }
.clik-cam.is-in { opacity: 1; }
.clik-cam-card { position: relative; box-sizing: border-box; width: min(720px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 16px; background: #fff; color: #050505; box-shadow: 0 24px 64px -12px rgba(0, 0, 0, .5); transform: translateY(10px) scale(.98); transition: transform .24s cubic-bezier(.2, .9, .3, 1.2); outline: none; scrollbar-width: none; }
.clik-cam-card::-webkit-scrollbar { display: none; }
.clik-cam.is-in .clik-cam-card { transform: none; }
/* 23 Nov (the owner: « remove the colored line on top »): no line along the window's top - the ring round it is enough */
.clik-cam-card::before { content: none; display: none; }
body.night-mode .clik-cam-card { background: #242526; color: #e4e6eb; }

/* the title and its logo on the round ×'s middle */
.clik-cam-head { display: flex; align-items: center; gap: 10px; min-height: 36px; padding-inline-start: 8px; }
.clik-cam-t:not(#_) { flex: 1 1 auto; min-width: 0; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; white-space: nowrap; font-size: clamp(15px, 4.4vw, 20px); line-height: 1.2; font-weight: 800; color: inherit; }
.clik-cam-t .clik-cam-tw { min-width: 0; }
.clik-cam-t .clik-brand.is-inline:not(#_) { flex: none; margin: 0; gap: .3em; }
.clik-cam-t .clik-brand.is-inline .clik-brand-cube:not(#_) { height: 1.2em; width: auto; }
.clik-cam-t .clik-brand.is-inline .clik-brand-word:not(#_) { height: 1em; width: auto; }
.clik-cam-x:not(#_) { flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: #e4e6eb; color: #606770; cursor: pointer; transition: transform .2s, background .15s; }
.clik-cam-x svg { width: 18px; height: 18px; }
.clik-cam-x:hover, .clik-cam-x:focus-visible { transform: rotate(90deg); }
.clik-cam-x:focus { outline: none; }
.clik-cam-x:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0866FF; }
body.night-mode .clik-cam-x:not(#_) { background: #3a3b3c; color: #e4e6eb; }

/* the picture: the whole frame of the camera, never cut */
.clik-cam-stage { position: relative; aspect-ratio: 4 / 3; max-height: calc(100dvh - 200px); border-radius: 12px; overflow: hidden; background: #0b0d14; }
.clik-cam-v, .clik-cam-c { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.clik-cam-v[hidden], .clik-cam-c[hidden] { display: none; }
.clik-cam.is-mirror .clik-cam-v { transform: scaleX(-1); }
/* the photo shown as it will be sent (never a mirror) */
.clik-cam-c { opacity: 1; }
.clik-cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.clik-cam-flash.is-go { animation: clik-cam-flash .38s ease-out; }
@keyframes clik-cam-flash { from { opacity: .85; } to { opacity: 0; } }
.clik-cam-wait { position: absolute; inset: 0; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #e4e6eb; font-size: 14px; font-weight: 600; }
.clik-cam-wait[hidden] { display: none; }
.clik-cam-cube { width: 56px; height: 62px; background: var(--clik-cube-load, var(--clik-cube)) center / contain no-repeat; }
.clik-cam-err { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; }
.clik-cam-err[hidden] { display: none; }
.clik-cam-err p { margin: 0; max-width: 420px; color: #ffd1cc; font-size: 15px; font-weight: 600; line-height: 1.4; }

/* the buttons under it */
.clik-cam-bar { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 72px; }
.clik-cam-bar[hidden] { display: none; }
.clik-cam-bar.is-live { display: grid; grid-template-columns: 1fr auto 1fr; }
.clik-cam-bar.is-live[hidden] { display: none; }
.clik-cam-side { display: flex; align-items: center; justify-content: flex-start; }
.clik-cam-side:last-child { justify-content: flex-end; }
.clik-cam-round:not(#_) { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: #e4e6eb; color: #050505; cursor: pointer; transition: transform .12s, filter .15s; }
.clik-cam-round[hidden]:not(#_) { display: none; }
.clik-cam-round svg { width: 22px; height: 22px; }
body.night-mode .clik-cam-round:not(#_) { background: #3a3b3c; color: #e4e6eb; }
/* the shutter: a white ring round the CLIK blue-violet disc */
.clik-cam-shoot:not(#_) { position: relative; width: 68px; height: 68px; padding: 0; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #0866FF, 0 8px 22px -8px rgba(76, 77, 255, .8); cursor: pointer; transition: transform .12s, opacity .15s; }
.clik-cam-shoot i { position: absolute; inset: 6px; border-radius: 50%; background: linear-gradient(135deg, #0866FF 0%, #7c4dff 100%); transition: transform .12s; }
.clik-cam-shoot:hover i { transform: scale(.94); }
.clik-cam-shoot:active i { transform: scale(.84); }
.clik-cam-shoot[disabled]:not(#_) { opacity: .45; cursor: default; }
.clik-cam-shoot:focus { outline: none; }
.clik-cam-shoot:focus-visible { box-shadow: 0 0 0 3px #0866FF, 0 0 0 6px rgba(8, 102, 255, .3); }
body.night-mode .clik-cam-shoot:not(#_) { background: #18191a; box-shadow: 0 0 0 3px #4C9AFF, 0 8px 22px -8px rgba(76, 154, 255, .6); }
.clik-cam-b:not(#_) { height: 44px; padding: 0 18px; border: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer; color: #0866FF; background: #fff; box-shadow: inset 0 0 0 1.5px #0866FF; transition: transform .12s, filter .15s; }
.clik-cam-b[hidden]:not(#_) { display: none; }
.clik-cam-b svg { width: 20px; height: 20px; flex: none; }
.clik-cam-b.is-main:not(#_), .clik-cam-b.is-pick:not(#_) { color: #fff; background: linear-gradient(135deg, #0866FF 0%, #7c4dff 100%); box-shadow: 0 6px 16px -8px rgba(76, 77, 255, .8); }
.clik-cam-b.is-busy { opacity: .6; pointer-events: none; }
.clik-cam-b:active, .clik-cam-round:active { transform: scale(.97); }
.clik-cam-b:focus, .clik-cam-round:focus { outline: none; }
.clik-cam-b:focus-visible, .clik-cam-round:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0866FF; }
body.night-mode .clik-cam-b:not(.is-main):not(.is-pick):not(#_) { color: #8AB8FF; background: #1d2232; box-shadow: inset 0 0 0 1.5px #4C9AFF; }
.clik-cam-k { margin: 0; text-align: center; font-size: 12.5px; color: #65676b; }
.clik-cam.is-still .clik-cam-k { visibility: hidden; }
/* the camera blocked or missing: no dead shutter under the message (its own « Choisir une photo » is the way out) */
.clik-cam.is-err .clik-cam-bar:not(#_), .clik-cam.is-err .clik-cam-k { display: none; }
body.night-mode .clik-cam-k { color: #b0b3b8; }

@media (max-width: 575px) {
  .clik-cam { align-items: flex-end; padding: 0; }
  .clik-cam-card { width: 100%; border-radius: 16px 16px 0 0; max-height: 100dvh; transform: translateY(24px); }
  .clik-cam-k { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .clik-cam, .clik-cam-card, .clik-cam-x, .clik-cam-shoot, .clik-cam-shoot i { transition: none !important; }
  .clik-cam-card { transform: none !important; }
  .clik-cam-flash.is-go { animation: none; }
}

/* 25 Nov - the burst mode (window.clikCamera.open({many})): the photos taken, a strip under the picture, 8 px apart,
 * each with its round × in the top end corner; « Ajouter 3 photos » at the bar's end */
.clik-cam-tray { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; padding: 4px 2px; scrollbar-width: none; }
.clik-cam-tray::-webkit-scrollbar { display: none; }
.clik-cam-tray[hidden] { display: none; }
.clik-cam-it { position: relative; flex: none; width: 72px; height: 54px; border-radius: 8px; overflow: hidden; background: #0b0d14; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.clik-cam-it img { display: block; width: 100%; height: 100%; object-fit: cover; }
.clik-cam-it.is-new { animation: clik-cam-in .28s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes clik-cam-in { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.clik-cam-itx:not(#_) { position: absolute; top: 3px; inset-inline-end: 3px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .62); color: #fff; cursor: pointer; }
.clik-cam-itx svg { width: 12px; height: 12px; }
.clik-cam-itx:focus { outline: none; }
.clik-cam-itx:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0866FF; }
.clik-cam.is-many .clik-cam-side:last-child .clik-cam-b { padding: 0 14px; }
@media (max-width: 575px) { .clik-cam.is-many .clik-cam-side:last-child .clik-cam-b span { font-size: 13.5px; } }
@media (prefers-reduced-motion: reduce) { .clik-cam-it.is-new { animation: none; } }
