/* Espace client : compléments de theme.css */
body[data-page^="espace"] .pack-btn { display: none; }
body[data-page^="espace"] .menu-btn { margin-left: auto; }
@media (min-width: 781px) { body[data-page^="espace"] .menu-btn { margin-left: 0; } }

.status[data-kind="info"] { color: var(--ink-soft); }
.hint { color: var(--ink-soft); font-size: .9rem; }
.panel { background: #fff; border-radius: 24px; box-shadow: inset 0 0 0 1.5px var(--line); padding: clamp(20px, 4vw, 32px); }
.auth { width: min(100% - 2 * var(--pad), 440px); margin: clamp(40px, 8vw, 96px) auto; }
.auth h1, .esp-head h1 { font: 600 clamp(1.6rem, 3vw, 2.2rem)/1.15 var(--font-display); letter-spacing: -.02em; margin: 0 0 .5rem; }
.auth .panel { display: grid; gap: 1rem; }
.auth p { margin: 0; }
.link-btn { background: none; border: 0; padding: .4rem 0; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; color: var(--ink); justify-self: start; }

.esp-head { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: flex-end; padding: clamp(32px, 6vw, 64px) 0 24px; }
.esp-head .actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.esp-body { padding-bottom: clamp(56px, 8vw, 100px); }
.notice { background: #E7F4EC; color: #0B5B2E; border-radius: 16px; padding: 14px 18px; margin-bottom: 20px; font-weight: 500; }

.cards-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.card-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; background: #fff; border-radius: 22px; box-shadow: inset 0 0 0 1.5px var(--line); padding: 18px 20px; }
.card-item .dot { width: 48px; height: 48px; border-radius: 14px; background: var(--dot, var(--accent)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.card-item .info { display: grid; gap: .15rem; min-width: 0; }
.card-item .info a { overflow-wrap: anywhere; }
.item-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.pill { justify-self: start; display: inline-block; padding: .1rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.pill[data-s="demande"] { background: #FFF1CC; color: #6B4A00; }
.pill[data-s="active"] { background: #D9F2E3; color: #0B5B2E; }
.pill[data-s="suspendue"] { background: #E8EAF0; color: #4A5062; }
@media (max-width: 640px) { .card-item { grid-template-columns: auto 1fr; } .item-actions { grid-column: 1 / -1; justify-content: flex-start; } }

/* Éditeur */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: clamp(24px, 4vw, 48px); align-items: start; }
.editor form { display: grid; gap: 20px; }
.group { border: 0; margin: 0; padding: clamp(18px, 3vw, 28px); background: #fff; border-radius: 24px; box-shadow: inset 0 0 0 1.5px var(--line); }
.group legend { font: 600 1.05rem var(--font-display); padding: 0 .4rem; margin-left: -.4rem; }
.group .field:last-child { margin-bottom: 0; }
.field select { font: inherit; padding: .8rem .95rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); min-height: 48px; width: 100%; }
.field input[type="color"] { padding: 4px; height: 48px; cursor: pointer; }
.field input[type="file"] { padding: .55rem; min-height: 0; }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.check input { width: 20px; height: 20px; min-height: 0; }
.field textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95rem; min-height: 150px; }
.save-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(to top, var(--paper) 70%, transparent); }
.preview { position: sticky; top: 88px; }
.preview h2 { font: 600 1rem var(--font-body); margin: 0 0 10px; color: var(--ink-soft); }
.frame { border: 8px solid #12141B; border-radius: 36px; overflow: hidden auto; height: min(740px, calc(100dvh - 150px)); background: #000; }
.frame .card-page { min-height: 100%; }
@media (max-width: 980px) { .editor { grid-template-columns: 1fr; } .preview { position: static; } .frame { height: 720px; } }

/* Administration */
.tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 18px; }
.tab { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: .45rem 1rem; font: 600 .95rem var(--font-body); cursor: pointer; color: var(--ink); }
.tab[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.table-wrap { overflow-x: auto; background: #fff; border-radius: 22px; box-shadow: inset 0 0 0 1.5px var(--line); }
table.admin { width: 100%; border-collapse: collapse; min-width: 720px; }
table.admin th, table.admin td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.admin th { font-size: .9rem; color: var(--ink-soft); font-weight: 600; }
table.admin tr:last-child td { border-bottom: 0; }
table.admin select { font: inherit; padding: .4rem .6rem; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; }

/* Galerie photo dans l'éditeur */
.gthumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.gthumbs:empty { display: none; }
.gthumb { position: relative; width: 74px; height: 74px; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1.5px var(--line); }
.gthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gthumb .gremove {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: rgba(23,26,36,.72); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
