/* Fine Art Cube — Back Office */
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background: #f4f5f7; color: #23272b; }
a { color: #e50000; }
h1, h2, h3 { font-weight: 700; }

/* Connexion */
.adm-login-body { display: flex; min-height: 100vh; align-items: center; justify-content: center; background: #1a1a1a; }
.adm-login { background: #fff; padding: 2.5rem; border-radius: 12px; width: 340px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.adm-login-logo { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; }
.adm-login h1 { margin: .6rem 0 0; font-size: 1.3rem; }
.adm-login-sub { color: #888; margin: .2rem 0 1.2rem; letter-spacing: .2em; text-transform: uppercase; font-size: .75rem; }
.adm-login label { display: block; text-align: left; font-size: .85rem; margin-bottom: .9rem; color: #555; }
.adm-login input { width: 100%; padding: .6rem .7rem; margin-top: .3rem; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; }
.adm-login-back { margin-top: 1.2rem; font-size: .85rem; }
.adm-login-back a { color: #888; text-decoration: none; }

/* Layout */
.adm-wrap { display: flex; min-height: 100vh; }
.adm-side { width: 240px; background: #1e2227; color: #cfd3d8; display: flex; flex-direction: column; position: fixed; height: 100%; }
.adm-brand { display: flex; align-items: center; gap: .6rem; padding: 1.2rem 1.1rem; font-weight: 700; color: #fff; border-bottom: 1px solid #2c3138; }
.adm-brand img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.adm-nav { display: flex; flex-direction: column; padding: .6rem 0; flex: 1; }
.adm-nav a { color: #cfd3d8; text-decoration: none; padding: .7rem 1.1rem; display: flex; align-items: center; gap: .7rem; font-size: .92rem; }
.adm-nav a:hover { background: #2a2f36; color: #fff; }
.adm-nav a.active { background: #e50000; color: #fff; }
.adm-nav a.adm-logout { margin-top: auto; color: #ff9b9b; }
.adm-user { padding: 1rem 1.1rem; font-size: .8rem; border-top: 1px solid #2c3138; color: #9aa0a6; }
.adm-main { margin-left: 240px; flex: 1; min-width: 0; }
.adm-top { background: #fff; padding: 1.1rem 1.6rem; border-bottom: 1px solid #e3e5e8; }
.adm-top h1 { margin: 0; font-size: 1.25rem; }
.adm-content { padding: 1.6rem; max-width: 1100px; }

/* Flash */
.adm-flash { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .92rem; }
.adm-flash-ok { background: #e6f6ea; color: #1c7a34; border: 1px solid #b7e2c1; }
.adm-flash-error { background: #fdeaea; color: #b02121; border: 1px solid #f2c2c2; }

/* Cartes chiffres */
.adm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.adm-card { background: #fff; border-radius: 10px; padding: 1.1rem 1.2rem; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.adm-card-n { font-size: 2rem; font-weight: 700; color: #1e2227; }
.adm-card-l { color: #7a8088; font-size: .82rem; margin-top: .2rem; }

.adm-panel { background: #fff; border-radius: 10px; padding: 1.3rem 1.4rem; box-shadow: 0 2px 10px rgba(0,0,0,.05); margin-bottom: 1.4rem; }
.adm-panel h2 { margin: 0 0 1rem; font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; color: #1e2227; }
.adm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 900px) { .adm-grid2 { grid-template-columns: 1fr; } .adm-side { position: static; width: 100%; height: auto; } .adm-main { margin-left: 0; } .adm-wrap { flex-direction: column; } }

/* Graphiques */
.adm-chart { width: 100%; height: 200px; }
.adm-chart-line { width: 100%; height: 230px; }
.adm-legend { font-size: .82rem; color: #777; margin-top: .4rem; }
.adm-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: middle; margin-right: 5px; }

/* Tables & barres */
.adm-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.adm-table td, .adm-table th { padding: .45rem .5rem; border-bottom: 1px solid #eef0f2; text-align: left; }
.adm-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.adm-pct { text-align: right; color: #999; width: 46px; }
.adm-bars .adm-bar-label { width: 34%; }
.adm-bar-track { background: #eef0f2; border-radius: 6px; height: 12px; position: relative; min-width: 120px; }
.adm-bar-track span { position: absolute; left: 0; top: 0; height: 100%; background: #e50000; border-radius: 6px; }
.adm-muted { color: #8a9098; font-size: .86rem; }
.adm-mt { margin-top: 1.2rem; }

.adm-quick { list-style: none; padding: 0; margin: 0; }
.adm-quick li { margin-bottom: .5rem; }
.adm-quick a { display: block; padding: .7rem .9rem; background: #f7f8fa; border-radius: 8px; text-decoration: none; color: #23272b; }
.adm-quick a:hover { background: #eef0f2; }

/* Boutons */
.adm-btn { display: inline-block; background: #eceef1; color: #23272b; border: none; padding: .55rem .95rem; border-radius: 7px; text-decoration: none; font-size: .88rem; cursor: pointer; }
.adm-btn:hover { background: #e0e3e7; }
.adm-btn-primary { background: #e50000; color: #fff; }
.adm-btn-primary:hover { background: #c40000; }
.adm-btn-sm { padding: .35rem .6rem; font-size: .8rem; }
.adm-btn-danger { background: #f7dede; color: #b02121; }
.adm-btn-danger:hover { background: #f0caca; }
.adm-btn.active { background: #1e2227; color: #fff; }
.adm-period { margin-bottom: 1rem; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }

/* Formulaires */
.adm-form { max-width: 100%; }
.adm-f { display: block; margin-bottom: 1rem; }
.adm-f > span { display: block; font-size: .82rem; color: #555; margin-bottom: .3rem; font-weight: 600; }
.adm-f input[type=text], .adm-f input[type=password], .adm-f select, .adm-form textarea, .adm-f textarea {
    width: 100%; padding: .55rem .65rem; border: 1px solid #ccd0d5; border-radius: 6px; font-size: .95rem; font-family: inherit; }
.adm-sec { background: #fff; border-radius: 10px; margin-bottom: 1rem; box-shadow: 0 2px 10px rgba(0,0,0,.05); padding: .3rem 1.2rem; }
.adm-sec > summary { cursor: pointer; font-weight: 700; padding: .9rem .2rem; font-size: 1rem; }
.adm-bi { margin-bottom: 1rem; }
.adm-bi-label { font-size: .82rem; color: #555; font-weight: 600; margin-bottom: .3rem; }
.adm-bi-cols { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.adm-bi-col span.adm-lang { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #999; margin-bottom: .2rem; }
.adm-bi-col input, .adm-bi-col textarea { width: 100%; padding: .5rem .6rem; border: 1px solid #ccd0d5; border-radius: 6px; font-family: inherit; font-size: .92rem; }
@media (max-width: 700px){ .adm-bi-cols { grid-template-columns: 1fr; } }
.adm-subcard { background: #f7f8fa; border-radius: 8px; padding: .9rem 1rem; margin-bottom: .9rem; }
.adm-img-field { margin-bottom: 1rem; }
.adm-img-field > span { display: block; font-size: .82rem; color: #555; margin-bottom: .3rem; font-weight: 600; }
.adm-thumb { display: block; max-width: 240px; max-height: 130px; border-radius: 6px; margin-bottom: .4rem; border: 1px solid #e0e3e7; }
.adm-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, #f4f5f7 40%); padding: 1rem 0; }
.adm-form-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)) auto; gap: .8rem; align-items: end; }

/* Liste expositions */
.adm-exh-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.adm-exh-item { display: flex; align-items: center; gap: .9rem; background: #fff; border-radius: 10px; padding: .6rem .9rem; margin-bottom: .6rem; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.adm-exh-item.dragging { opacity: .5; }
.adm-drag { cursor: grab; color: #b0b6bd; }
.adm-exh-cover { width: 76px; height: 54px; border-radius: 6px; background: #eee center/cover no-repeat; flex-shrink: 0; }
.adm-exh-info { flex: 1; min-width: 0; }
.adm-exh-info strong { display: block; }
.adm-exh-info small { color: #8a9098; }
.adm-exh-actions { display: flex; gap: .35rem; }

/* Photos */
.adm-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.adm-photo { background: #fff; border-radius: 8px; padding: .5rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); cursor: grab; }
.adm-photo.dragging { opacity: .5; }
.adm-photo img { width: 100%; height: 110px; object-fit: cover; border-radius: 5px; display: block; }
.adm-photo-del { display: block; font-size: .75rem; color: #b02121; margin: .3rem 0; }
.adm-photo-alt { width: 100%; font-size: .75rem; padding: .3rem; border: 1px solid #ddd; border-radius: 4px; }
.adm-users select, .adm-users input { padding: .3rem; border: 1px solid #ccd0d5; border-radius: 5px; }
.adm-inline-form { display: inline-flex; gap: .3rem; margin: 0; }
.adm-you { background: #e50000; color: #fff; font-size: .65rem; padding: 1px 6px; border-radius: 10px; }
.adm-upload { background: #f7f8fa; border: 2px dashed #ccd0d5; border-radius: 10px; padding: 1.1rem; margin-bottom: 1rem; }

/* --- Ajouts v2 : diaporama, réseaux, fonds de sections, couleurs, réordonnancement --- */
.adm-inline2 { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: flex-end; margin-bottom: 1rem; }
.adm-check { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; color: #444; }
.adm-check input { width: auto; }
hr { border: none; border-top: 1px solid #e3e5e8; margin: 1rem 0; }

.adm-insta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 700px) { .adm-insta-grid { grid-template-columns: 1fr; } }

.adm-secbg { border-left: 3px solid #e50000; }
.adm-secbg > strong { display: block; margin-bottom: .6rem; }
.secbg-image, .secbg-video, .secbg-youtube, .secbg-color { margin-top: .4rem; }

.adm-color { display: inline-flex; flex-direction: column; gap: .3rem; font-size: .82rem; color: #555; font-weight: 600; }
.adm-color input[type=color] { width: 60px; height: 36px; border: 1px solid #ccd0d5; border-radius: 6px; padding: 2px; cursor: pointer; }
.adm-color-hex { width: 90px; padding: .35rem; border: 1px solid #ccd0d5; border-radius: 5px; font-family: monospace; font-size: .85rem; background: #f7f8fa; }

.adm-reorder-item { position: relative; padding-left: 2.2rem; }
.adm-reorder-item .adm-drag { position: absolute; left: .6rem; top: .9rem; cursor: grab; color: #b0b6bd; }
.adm-reorder-item.dragging { opacity: .5; }
