/* Jonas Galeries Manager 7 — interface d'administration (page cachée). Tout est préfixé .jgm- ou .jgm-app pour ne rien casser dans Divi. */
.jgm-app { max-width: 1100px; margin: 30px auto; background: #16191f; padding: 30px; border-radius: 12px; color: #fff; font-family: inherit; font-size: 14px; line-height: 1.4; box-shadow: 0 20px 40px rgba(0,0,0,.4); box-sizing: border-box; }
.jgm-app *, .jgm-app *::before, .jgm-app *::after { box-sizing: border-box; }
.jgm-app h2, .jgm-app h3, .jgm-app h4 { color: #fff; font-family: inherit; text-transform: none; letter-spacing: 0; margin: 0 0 12px; padding: 0; line-height: 1.25; }
.jgm-app h2 { font-size: 24px; color: #2ec4b6; }
.jgm-app h3 { font-size: 16px; }
.jgm-app h4 { font-size: 14px; color: #2ec4b6; }
.jgm-app p { color: inherit; font-size: inherit; margin: 0 0 10px; }
.jgm-app a { color: inherit; text-decoration: none; }
.jgm-muted, .jgm-hint { opacity: .65; font-size: 12px; }

.jgm-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid #282c37; padding-bottom: 15px; margin-bottom: 20px; }
.jgm-header h2 { margin: 0; }
.jgm-logout { color: #ff6b6b !important; background: rgba(255,107,107,.1); padding: 8px 15px; border-radius: 6px; font-size: 14px; }

.jgm-flash { padding: 12px 14px; border-radius: 6px; margin-bottom: 15px; font-weight: 600; }
.jgm-flash-ok { background: #2ec4b6; color: #111317; }
.jgm-flash-err { background: #ff6b6b; color: #111317; }

.jgm-layout { display: flex; gap: 25px; flex-wrap: wrap; align-items: flex-start; }
.jgm-sidebar { width: 290px; flex: 0 0 290px; background: #21252e; padding: 18px; border-radius: 8px; }
.jgm-main { flex: 1 1 420px; min-width: 0; background: #21252e; padding: 20px; border-radius: 8px; }
@media (max-width: 760px) { .jgm-sidebar { width: 100%; flex-basis: 100%; } .jgm-app { padding: 16px; } }

/* Formulaires */
.jgm-app label, .jgm-label { display: block; font-size: 12px; opacity: .85; margin: 10px 0 4px; color: #fff; }
.jgm-app input[type="text"], .jgm-app input[type="url"], .jgm-app input[type="password"], .jgm-app input[type="number"], .jgm-app select, .jgm-app textarea {
    width: 100%; padding: 10px; background: #16191f; border: 1px solid #333842; color: #fff !important; border-radius: 6px; font-family: inherit; font-size: 14px; margin: 0; box-shadow: none; height: auto;
}
.jgm-app textarea { resize: vertical; }
.jgm-app input:focus, .jgm-app select:focus, .jgm-app textarea:focus { outline: 2px solid #2ec4b6; outline-offset: 0; }
.jgm-check { display: flex !important; align-items: center; gap: 10px; cursor: pointer; font-size: 14px !important; opacity: 1 !important; background: rgba(46,196,182,.06); border: 1px solid rgba(46,196,182,.25); padding: 12px; border-radius: 6px; margin: 14px 0 !important; }
.jgm-check input { width: 18px; height: 18px; accent-color: #2ec4b6; }
.jgm-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 0; }
.jgm-row > div { flex: 1 1 140px; min-width: 130px; }
.jgm-inline-fields { display: flex; align-items: center; gap: 6px; }
.jgm-inline-fields input, .jgm-inline-fields select { text-align: center; }

.jgm-btn { display: inline-block; padding: 10px 20px; background: #2ec4b6; color: #111317 !important; border: none; border-radius: 6px; font-weight: 700; font-size: 14px; font-family: inherit; cursor: pointer; transition: filter .2s; text-transform: none; letter-spacing: 0; line-height: 1.2; }
.jgm-btn:hover { filter: brightness(.9); }
.jgm-btn:disabled { opacity: .5; cursor: wait; }
.jgm-btn-block { display: block; width: 100%; margin-top: 14px; }

/* Connexion */
.jgm-login { max-width: 400px; }
.jgm-login h2 { text-align: center; color: #fff; }
.jgm-login .jgm-muted { text-align: center; margin-bottom: 20px; }

/* Barre latérale */
.jgm-sidebar h3 { border-bottom: 1px solid #333842; padding-bottom: 10px; }
.jgm-sidebar h3:not(:first-child) { margin-top: 24px; }
.jgm-folder { margin-bottom: 8px; }
.jgm-folder > summary, .jgm-settings > summary { cursor: pointer; font-weight: 700; background: #16191f; padding: 9px 11px; border-radius: 6px; list-style-position: inside; }
.jgm-settings { margin-top: 22px; }
.jgm-settings form { padding-top: 6px; }
.jgm-album-list { list-style: none; margin: 6px 0 0; padding: 0 0 0 6px; }
.jgm-album { display: flex; align-items: center; justify-content: space-between; margin: 5px 0; background: rgba(255,255,255,.03); border: 1px solid transparent; border-radius: 6px; }
.jgm-album.is-active { background: rgba(46,196,182,.15); border-color: #2ec4b6; }
.jgm-album.is-active a { color: #2ec4b6; font-weight: 700; }
.jgm-album a { flex: 1; min-width: 0; padding: 8px 6px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jgm-album .jgm-grip { padding-left: 8px; }
.jgm-empty { font-size: 12px; opacity: .5; padding: 4px 0; list-style: none; }
.jgm-grip { opacity: .45; cursor: grab; font-size: 13px; user-select: none; }
.jgm-inline { display: inline; margin: 0; }
.jgm-x { background: none; border: none; color: #ff6b6b; font-size: 18px; line-height: 1; padding: 4px 9px; cursor: pointer; }

/* Panneau principal */
.jgm-title { font-size: 18px !important; }
.jgm-title span { color: #2ec4b6; }
.jgm-title small { font-size: 12px; opacity: .6; font-weight: 400; }
.jgm-subtitle { margin: 18px 0 8px !important; color: #fff !important; }
.jgm-card { background: #16191f; padding: 16px; border-radius: 6px; border: 1px solid #333842; margin-bottom: 18px; }
.jgm-dashed { border: 1px dashed #2ec4b6; }
.jgm-welcome { text-align: center; padding: 60px 10px; }
.jgm-welcome strong { color: #2ec4b6; font-size: 16px; }
.jgm-addvideo { display: flex; gap: 10px; flex-wrap: wrap; }
.jgm-addvideo input { flex: 1 1 250px; width: auto; }
.jgm-upload { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.jgm-upload input[type="file"] { color: #fff; font-size: 13px; max-width: 100%; }

/* Liste de vidéos */
.jgm-video-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.jgm-video { display: flex; align-items: center; gap: 12px; background: #21252e; border: 1px solid #333842; border-radius: 6px; padding: 8px 12px; cursor: grab; }
.jgm-video img { width: 56px; height: 36px; object-fit: cover; border-radius: 4px; background: #000; flex: none; pointer-events: none; }
.jgm-video-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }

/* Grille de photos */
.jgm-thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; min-height: 100px; }
.jgm-thumb { position: relative; height: 92px; border-radius: 4px; overflow: hidden; background: #000; cursor: grab; }
.jgm-thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; display: block; }
.jgm-thumb-del { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; padding: 0; border: none; border-radius: 50%; background: rgba(0,0,0,.8); color: #fff; cursor: pointer; font-size: 14px; line-height: 22px; text-align: center; }
.jgm-thumb-del:hover { background: #ff6b6b; color: #111317; }

/* Glisser-déposer */
.is-dragging { opacity: .35; outline: 2px dashed #2ec4b6; }

/* Progression */
.jgm-progress { margin-top: 14px; }
.jgm-progress-top { display: flex; justify-content: space-between; font-size: 12px; color: #2ec4b6; margin-bottom: 5px; }
.jgm-progress-track { width: 100%; height: 8px; background: #333842; border-radius: 4px; overflow: hidden; }
#jgm-progress-bar { width: 0; height: 100%; background: #2ec4b6; transition: width .15s linear; }

/* Notification */
.jgm-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); padding: 11px 18px; border-radius: 8px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 99999; max-width: 90vw; }
.jgm-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.jgm-toast.is-ok { background: #2ec4b6; color: #111317; }
.jgm-toast.is-err { background: #ff6b6b; color: #111317; }