.exk-photo-trigger {flex:0 0 auto;background:#d8b765;color:#100f0c;border:1px solid #d8b765;border-radius:12px;padding:12px 16px;font-family:inherit;font-size:14px;font-weight: var(--font-weight-emphasis);cursor:pointer;min-height:44px}
.exk-photo-dialog {background:#151411;color:#f3f0e8;border:1px solid #d8b765;border-radius:20px;padding:32px;width:min(540px,calc(100vw - 32px));max-height:85dvh;overflow:auto;box-sizing:border-box}
.exk-photo-dialog::backdrop {background:rgba(0,0,0,.8)}
.exk-photo-dialog p,.exk-photo-dialog small {line-height:1.6}.exk-photo-dialog small {display:block;color:#c9c3b4;margin-top:12px}
.exk-photo-dialog input {display:block;width:100%;margin:12px 0;box-sizing:border-box}
.exk-photo-close {float:right;background:transparent;color:#f3f0e8;border:1px solid #8b784b;border-radius:8px;min-width:44px;min-height:44px;font-size:24px;cursor:pointer}
.exk-photo-analyse,.exk-photo-link {display:inline-block;background:#d8b765;color:#100f0c;border:0;border-radius:12px;padding:14px 18px;font-weight: var(--font-weight-emphasis);cursor:pointer;text-decoration:none;margin-top:12px}
.exk-photo-analyse:disabled {opacity:.5;cursor:wait}
@media(max-width:600px){#landing-library-search-form,#search-form {flex-wrap:wrap}.exk-photo-trigger{padding:10px 12px}.exk-photo-dialog{padding:20px}}

.exk-photo-trigger{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:9px}
.exk-photo-trigger svg{display:block;flex:none}
.exk-photo-dialog input[hidden]{display:none}
.exk-photo-choices{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.exk-photo-choices button{font:inherit;font-weight: var(--font-weight-emphasis);background:#24221c;color:#f3f0e8;border:1px solid #d8b765;border-radius:12px;padding:16px 12px;min-height:48px;cursor:pointer}
.exk-photo-choices button:hover{background:#373022}
.exk-photo-selection{overflow-wrap:anywhere}
@media(max-width:420px){.exk-photo-choices{grid-template-columns:1fr}}

/* Keep camera and barcode inside the Home search field at every width. */
#landing-library-search-form .recherche-champ{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center;gap:8px;min-width:0}
#landing-library-search-form .recherche-champ input{flex:1 1 0;min-width:0}
#landing-library-search-form .recherche-champ .recherche-scan,
#landing-library-search-form .recherche-champ .exk-photo-trigger{position:static!important;transform:none!important;inset:auto!important;flex:0 0 44px;width:44px;height:44px;margin:0;padding:9px}

#landing-library-search-form .recherche-champ{border:1px solid #706c61;border-radius:12px;background:#ffffff0d;padding:5px}
#landing-library-search-form .recherche-champ input{border:0!important;background:transparent!important;box-shadow:none!important}

/* Library: full-width field, then search + barcode + camera on one row.
   Match the library's existing 720px compact-layout breakpoint. */
@media (max-width:720px) {
  body[data-ex-biblio] #search-form {
    grid-template-columns:minmax(0,1fr) 44px 44px !important;
    grid-template-areas:"champ champ champ" "chercher scanner photo" !important;
    gap:10px !important;
  }
  body[data-ex-biblio] #search-form #search-input {
    box-sizing:border-box;
    width:100% !important;
    min-width:0 !important;
    height:52px;
    padding:10px 44px 10px 14px !important;
    border:1px solid #8f8878 !important;
    border-radius:10px !important;
    background:#292823 !important;
    color:#fffdf7 !important;
    box-shadow:none !important;
  }
  body[data-ex-biblio] #search-form #search-input::placeholder {color:#d4cfc3;opacity:1}
  body[data-ex-biblio] #search-form #search-input:focus {outline:2px solid #d8b765;outline-offset:2px}
  body[data-ex-biblio] #search-form .search-scan-separator {display:none !important}
  body[data-ex-biblio] #search-form #search-clear {position:absolute;top:18px;right:18px}
  body[data-ex-biblio] #search-form #search-submit {grid-area:chercher;width:100% !important;min-width:0 !important;height:44px;padding:8px 14px !important}
  body[data-ex-biblio] #search-form #search-scanner,
  body[data-ex-biblio] #search-form .exk-photo-trigger {width:44px !important;min-width:44px !important;height:44px;margin:0;align-self:center;box-sizing:border-box}
  body[data-ex-biblio] #search-form .exk-photo-trigger {grid-area:photo}
}
