/* screenz · admin
   Mise en page : barre latérale fixe (clients), contenu en grille ; surfaces sombres en couches,
   un seul accent bleu, typo Raleway pour la voix, chasse fixe pour les repères. */
:root {
	--bg: #0a0a0d;
	--s1: #111116;          /* surface */
	--s2: #17171e;          /* surface relevée */
	--s3: #1f1f28;          /* survol */
	--line: rgba(255, 255, 255, .07);
	--line-2: rgba(255, 255, 255, .12);
	--text: #eeece7;
	--dim: #8d8a96;
	--faint: #5d5a66;
	--accent: #51c1f1;
	--accent-ink: #04202c;
	--danger: #f2555a;
	--r-lg: 18px; --r: 12px; --r-sm: 8px;
	--f-display: "Raleway", "Helvetica Neue", Arial, sans-serif;
	--f-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--f-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
	--ease: cubic-bezier(.2, .8, .2, 1);
	--shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 48px -28px rgba(0, 0, 0, .8);
	color-scheme: dark;
}
@font-face { font-family: "Raleway"; src: url(../fonts/raleway-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Raleway"; src: url(../fonts/raleway-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 2.6vw, 2.6rem); line-height: 1.05; }
h2 { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 1.08rem; }
.eyebrow { font: 600 10.5px var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin: 0 0 8px; }
.dim { color: var(--dim); margin: 0; }
.small { font-size: 12.5px; }
.meta { color: var(--faint); font: 12px var(--f-mono); margin: 0; }
code, kbd { font: 11.5px var(--f-mono); }
.ico { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--s2); color: var(--text); font: 600 13px var(--f-ui); cursor: pointer; white-space: nowrap; transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease); }
.btn:hover { background: var(--s3); border-color: rgba(255, 255, 255, .2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn.primary:hover { background: #7ad2f6; }
.btn.lg { height: 46px; font-size: 14px; justify-content: center; }
.btn.danger-btn { color: var(--danger); border-color: rgba(242, 85, 90, .35); background: transparent; }
.btn.danger-btn.armed { background: var(--danger); color: #fff; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--dim); cursor: pointer; transition: all .2s var(--ease); }
.icon-btn:hover { color: var(--text); background: var(--s3); border-color: var(--line-2); }

input, select, textarea { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font: 14px var(--f-ui); transition: border-color .2s; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(81, 193, 241, .15); }
label { display: flex; flex-direction: column; gap: 6px; color: var(--dim); font-size: 12.5px; }

/* ---------- Connexion ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-card { align-self: center; justify-self: center; width: min(400px, 100%); padding: 32px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 16px; }
.auth-card h1 { font-size: 2.6rem; }
.auth-card .dot, .logo span { color: var(--accent); }
.auth-card .err { color: var(--danger); margin: 0; }
.auth-art { position: relative; overflow: hidden; background: #0e0e13; border-right: 1px solid var(--line); }
.auth-art .sq { position: absolute; inset: 50% auto auto 50%; width: min(42vh, 30vw); aspect-ratio: 1; transform: translate(-50%, -50%); display: grid; grid-template-columns: 1fr 1fr; animation: float 12s var(--ease) infinite alternate; }
.auth-art .sq i { background: var(--accent); transition: background 1s; }
.auth-art .sq .b { background: #110011; }
.auth-art .sq .w { background: #f2efe9; }
.auth-art .sq .t { background: linear-gradient(to bottom right, #f2efe9 calc(50% - .5px), var(--accent) calc(50% + .5px)); }
.auth-art .ln { position: absolute; left: -20%; width: 140%; height: 2px; background: var(--accent); transform: rotate(-32deg); opacity: .55; animation: slide 9s linear infinite; }
.auth-art .l1 { top: 30%; } .auth-art .l2 { top: 62%; animation-duration: 13s; animation-delay: -4s; height: 1px; } .auth-art .l3 { top: 84%; animation-duration: 7s; animation-delay: -2s; opacity: .3; }
@keyframes slide { from { translate: -30% 0; } to { translate: 30% 0; } }
@keyframes float { to { transform: translate(-50%, -52%) rotate(1.5deg); } }
@media (max-width: 820px) { .auth { grid-template-columns: 1fr; } .auth-art { height: 34vh; border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---------- Coque : barre latérale + contenu ---------- */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 20px 14px; border-right: 1px solid var(--line); background: linear-gradient(180deg, #0e0e12, #0a0a0d); }
.logo { font: 700 1.35rem var(--f-display); letter-spacing: -.02em; padding: 4px 10px 6px; }
.search { position: relative; flex-direction: row; align-items: center; gap: 0; color: var(--faint); }
.search .ico { position: absolute; left: 11px; }
.search input { height: 36px; padding: 0 64px 0 34px; background: var(--s1); border-color: var(--line); font-size: 13px; }
.search kbd { position: absolute; right: 8px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--faint); }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 10px; color: var(--dim); font: 500 13.5px var(--f-ui); background: none; border: 0; cursor: pointer; text-align: left; transition: background .2s var(--ease), color .2s; width: 100%; }
.nav-item:hover { background: var(--s2); color: var(--text); }
.nav-item.on { background: var(--s2); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.nav-item.add { color: var(--accent); margin-top: 6px; }
.nav-item.foot { margin-top: auto; }
.nav-title { display: flex; justify-content: space-between; margin: 18px 10px 6px; font: 600 10.5px var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.nav-clients { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.nav-clients .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-clients .ct { font: 11px var(--f-mono); color: var(--faint); }
.dot3 { display: inline-flex; width: 18px; height: 18px; border-radius: 6px; overflow: hidden; flex-shrink: 0; box-shadow: 0 0 0 1px var(--line-2); }
.dot3 i { flex: 1; }

.main { min-width: 0; padding: 32px clamp(16px, 4vw, 48px) 80px; display: flex; flex-direction: column; gap: 28px; max-width: 1440px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

/* ---------- Chiffres ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 18px 20px; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.kpi span { font: 600 10.5px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.kpi strong { font: 700 2.1rem/1 var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------- Cartes de campagne ---------- */
.camps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.camp { position: relative; display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; transition: transform .35s var(--ease), border-color .35s var(--ease); min-width: 0; }
.camp:hover { transform: translateY(-3px); border-color: var(--line-2); }
.camp-visual { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.mosaic { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--bg); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.camp:hover .mosaic img { transform: scale(1.06); }
.mosaic i { display: block; }
.mosaic .m0 { background: var(--c1); }
.mosaic .m1 { background: linear-gradient(to bottom left, var(--c2) calc(50% - .5px), var(--c1) calc(50% + .5px)); }
.mosaic .m2 { background: var(--c3); }
.mosaic .m3 { background: var(--c2); }
.camp-format { position: absolute; top: 10px; left: 10px; padding: 3px 8px; border-radius: 999px; background: rgba(10, 10, 13, .72); backdrop-filter: blur(6px); font: 600 11px var(--f-mono); }
.camp-body { padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.camp-body h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camp-client { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.camp-client i { width: 8px; height: 8px; border-radius: 3px; }
.camp-actions { display: flex; gap: 6px; padding: 10px 16px 16px; margin-top: auto; }
.camp-actions .btn { flex: 1; justify-content: center; }
.camp-new { align-items: center; justify-content: center; gap: 10px; min-height: 280px; border-style: dashed; background: transparent; color: var(--dim); cursor: pointer; font: 600 13px var(--f-ui); }
.camp-new:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Vide ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 64px 16px; border-radius: var(--r-lg); border: 1px dashed var(--line-2); }
.empty p { max-width: 52ch; }
.empty-art { width: 88px; height: 88px; display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 6px; border-radius: 6px; overflow: hidden; }
.empty-art i:nth-child(1) { background: var(--accent); } .empty-art i:nth-child(2) { background: #f2efe9; }
.empty-art i:nth-child(3) { background: linear-gradient(to top right, #f2efe9 calc(50% - .5px), var(--accent) calc(50% + .5px)); } .empty-art i:nth-child(4) { background: #22202a; }

/* ---------- Fiche client ---------- */
.client-head { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 28px; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); }
.client-band { position: absolute; inset: 0 0 auto 0; height: 4px; display: flex; }
.client-band i { flex: 1; } .client-band i:nth-child(1) { background: var(--c1); } .client-band i:nth-child(2) { background: var(--c2); } .client-band i:nth-child(3) { background: var(--c3); }
.client-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.client-logo { width: 72px; height: 72px; border-radius: 16px; background: var(--c3); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; box-shadow: 0 0 0 1px var(--line-2); }
.client-logo img { width: 70%; height: 70%; object-fit: contain; }
.client-logo span { font: 700 1.4rem var(--f-display); color: var(--c1); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { position: relative; padding: 10px 14px; color: var(--dim); font-weight: 600; font-size: 13.5px; }
.tab span { font: 11px var(--f-mono); color: var(--faint); margin-left: 4px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); }
.tab.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }

.panel { padding: 20px; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.charte { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.charte .wide, .charte > p { grid-column: 1 / -1; }
.charte a, .access a { color: var(--accent); }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.swatch { display: flex; flex-direction: column; gap: 6px; padding: 0 0 10px; border-radius: var(--r); border: 1px solid var(--line); background: var(--s2); cursor: pointer; overflow: hidden; color: var(--text); text-align: left; font: 600 12.5px var(--f-ui); }
.swatch i { height: 64px; display: block; }
.swatch span, .swatch code { padding: 0 10px; } .swatch code { color: var(--dim); }
.phrases { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.phrases li { font: 700 1.05rem var(--f-display); padding: 8px 12px; border-radius: var(--r-sm); background: var(--s2); }
.kit-files { display: flex; flex-wrap: wrap; gap: 10px; }
.kf { margin: 0; width: 120px; display: flex; flex-direction: column; gap: 6px; }
.kf img, .kf span { width: 120px; height: 90px; border-radius: var(--r-sm); background: var(--s2); object-fit: contain; padding: 10px; display: grid; place-items: center; font: 700 2rem var(--f-display); }
.kf figcaption { font: 11px var(--f-mono); color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notes { white-space: pre-wrap; margin: 0; color: var(--text); }

.access { display: flex; flex-direction: column; gap: 14px; max-width: 980px; }
.copyfield { display: flex; gap: 8px; }
.copyfield input { font: 12.5px var(--f-mono); color: var(--dim); }
.screen-panel { flex-direction: row; justify-content: space-between; align-items: center; gap: 20px; }
.screen-panel > div { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.qr { border-radius: 10px; flex-shrink: 0; }
.danger { border-color: rgba(242, 85, 90, .22); }
.danger h2 { color: var(--danger); }

/* ---------- Fenêtres et notifications ---------- */
.dlg { width: min(460px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--s1); color: var(--text); box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .8); }
.dlg::backdrop { background: rgba(5, 5, 8, .6); backdrop-filter: blur(6px); }
.dlg[open] { animation: pop .25s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg form { display: flex; flex-direction: column; gap: 16px; padding: 22px; }
.dlg header, .dlg footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dlg footer { justify-content: flex-end; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 13px; transition: all .3s var(--ease); z-index: 50; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Petits écrans ---------- */
@media (max-width: 960px) {
	.shell { grid-template-columns: 1fr; }
	.side { position: static; height: auto; flex-direction: column; border-right: 0; border-bottom: 1px solid var(--line); }
	.nav-clients { max-height: 30vh; }
	.kpis { grid-template-columns: repeat(2, 1fr); }
	.charte { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .screen-panel { flex-direction: column; align-items: flex-start; } .swatches { grid-template-columns: 1fr 1fr 1fr; } .client-head { padding: 20px; } }
@media (max-width: 960px) { .camp-new { min-height: 120px; } }

/* ---------- Marques ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mg { margin: 0; border-radius: var(--r); overflow: hidden; background: var(--s1); border: 1px solid var(--line); }
.mg img, .mg span { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #0e0e12; }
.mg span { display: grid; place-items: center; font: 11px var(--f-mono); color: var(--dim); padding: 8px; word-break: break-all; }
.mg figcaption { padding: 6px 8px; font: 11px var(--f-mono); color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-pick { display: flex; flex-direction: column; gap: 16px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.brand-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line); cursor: pointer; color: var(--text); font-size: 13px; transition: border-color .2s var(--ease), transform .25s var(--ease); }
.brand-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.brand-card input { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; accent-color: var(--accent); }
.brand-card.on, .brand-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.bc-logo { width: 56px; height: 56px; border-radius: 14px; background: var(--c3); display: grid; place-items: center; overflow: hidden; color: var(--c1); font: 700 1.1rem var(--f-display); }
.bc-logo img { width: 72%; height: 72%; object-fit: contain; }
.brand-card.add { align-items: center; justify-content: center; border-style: dashed; background: transparent; color: var(--dim); min-height: 140px; font: 600 13px var(--f-ui); }
.brand-card.add:hover { color: var(--accent); border-color: var(--accent); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--s2); border: 1px solid var(--line); color: var(--text) !important; }
.chip-link i { width: 10px; height: 10px; border-radius: 3px; }

/* ---------- Banque de modèles ---------- */
.bank-sec { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.bank-sec .ct, .nav-item .ct { font: 500 11px var(--f-mono); color: var(--faint); margin-left: auto; }
.bank-sec h2 .ct { margin-left: 6px; }
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.bank-card { position: relative; padding: 14px 14px 12px 18px; border-radius: var(--r); background: var(--s1); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; overflow: hidden; transition: border-color .2s var(--ease); }
.bank-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ph, var(--faint)); }
.bank-card:hover { border-color: var(--line-2); }
.bank-name { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.bank-name input { font-weight: 600; background: transparent; border-color: transparent; padding: 4px 6px; margin-left: -6px; }
.bank-name input:hover, .bank-name input:focus { border-color: var(--line-2); }
.bank-name select { font-size: 12px; padding: 4px 6px; }
.bank-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.bank-acts form { margin: 0; }
.btn.sm { padding: 5px 9px; font-size: 12px; gap: 5px; }
.notice { padding: 10px 14px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.trash summary { list-style: none; cursor: pointer; }
.trash summary::-webkit-details-marker { display: none; }
.trash .bank-card { opacity: .7; }
[data-ph=logo], [data-ph=infos] { --ph: #51c1f1; } [data-ph=photos] { --ph: #f2b84b; } [data-ph=produits] { --ph: #c6f04a; }
[data-ph=promo] { --ph: #ff5a4e; } [data-ph=video] { --ph: #e9e6df; } [data-ph=fx] { --ph: #f06fa8; } [data-ph=free] { --ph: #a99ff0; }
.import-form { margin: 0; }
.bank-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.bank-name { grid-template-columns: 1fr; gap: 4px; }
.bank-name select { justify-self: start; width: auto; }
.import-form label.btn { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; cursor: pointer; }
.page-head .dim { max-width: 72ch; margin-top: 6px; }
