/* ========================================================
   STUDIO24TV — Admin CSS
   ======================================================== */

:root {
    --adm-bg-0: #0a0a0a;
    --adm-bg-1: #0f0f0f;
    --adm-bg-2: rgba(255, 255, 255, 0.03);
    --adm-bg-3: rgba(255, 255, 255, 0.06);
    --adm-red: #e50914;
    --adm-red-soft: rgba(229, 9, 20, 0.15);
    --adm-red-border: rgba(229, 9, 20, 0.4);
    --adm-text-1: rgba(255, 255, 255, 0.92);
    --adm-text-2: rgba(255, 255, 255, 0.68);
    --adm-text-3: rgba(255, 255, 255, 0.45);
    --adm-border: rgba(255, 255, 255, 0.08);
    --adm-green: #2ecc71;
    --adm-yellow: #f1c40f;
    --adm-gray: rgba(255, 255, 255, 0.4);
    --eq-blue: #3b82f6;
    --eq-blue-soft: rgba(59, 130, 246, 0.15);
    --eq-blue-border: rgba(59, 130, 246, 0.4);
    --eq-bg-0: #0a1220;
}

* { box-sizing: border-box; }
body.admin-body {
    margin: 0;
    background:
        radial-gradient(ellipse at top, rgba(229, 9, 20, 0.05), transparent 60%),
        var(--adm-bg-0);
    color: var(--adm-text-1);
    font-family: 'Helvetica Neue', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* garde-fou : empêche tout élément trop large de faire défiler toute la page sur le côté (fond noir "dans le vide") */
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ================ HEADER ================ */
.adm-header {
    background: #000;
    border-bottom: 1px solid var(--adm-red-border);
    padding: 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
}

.adm-logo {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    padding: 14px 0;
}
.adm-logo .accent { color: var(--adm-red); }
.adm-logo .badge {
    background: var(--adm-red-soft);
    color: #ff6b6b;
    padding: 3px 9px;
    border-radius: 3px;
    font-size: 10px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.adm-nav {
    display: flex;
    gap: 4px;
    height: 100%;
    align-items: center;
    min-width: 0; /* laisse le flex-wrap fonctionner dans la cellule de grille du header, sinon le contenu déborde au lieu de passer à la ligne */
}
.adm-nav a {
    color: var(--adm-text-2);
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    transition: color 0.15s, background 0.15s;
}
.adm-nav a:hover { color: #fff; background: var(--adm-bg-2); }
.adm-nav a.active {
    color: var(--adm-red);
    background: var(--adm-red-soft);
    font-weight: 500;
}

.adm-nav-dropdown { position: relative; }
.adm-nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--adm-text-2);
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
}
.adm-nav-dropdown-trigger::after {
    content: '▾';
    font-size: 9px;
    opacity: 0.7;
}
.adm-nav-dropdown-trigger:hover { color: #fff; background: var(--adm-bg-2); }
.adm-nav-dropdown-trigger.active {
    color: var(--adm-red);
    background: var(--adm-red-soft);
    font-weight: 500;
}
.adm-nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 180px;
    background: var(--adm-bg-1);
    border: 1px solid var(--adm-border);
    border-radius: 6px;
    padding: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 50;
}
.adm-nav-dropdown.open .adm-nav-dropdown-menu { display: block; }
.adm-nav-dropdown-menu a {
    display: block;
    color: var(--adm-text-2);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
}
.adm-nav-dropdown-menu a:hover { color: #fff; background: var(--adm-bg-2); }
.adm-nav-dropdown-menu a.active {
    color: var(--adm-red);
    background: var(--adm-red-soft);
    font-weight: 500;
}

.adm-user {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--adm-text-2);
    font-size: 12px;
}
.adm-user a {
    color: var(--adm-red);
    font-size: 12px;
}
.adm-user a:hover { text-decoration: underline; }

/* ================ MAIN ================ */
.adm-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ================ TOOLBAR ================ */
.adm-toolbar {
    background: var(--adm-bg-2);
    padding: 12px 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    border-radius: 6px;
    border: 1px solid var(--adm-border);
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.adm-btn-primary {
    background: var(--adm-red);
    color: #fff;
    border: 0;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}
.adm-btn-primary:hover { background: #c0070f; }
.adm-btn-large { padding: 11px 22px; font-size: 13px; }

.adm-btn-secondary {
    background: var(--adm-bg-3);
    color: var(--adm-text-1);
    border: 1px solid var(--adm-border);
    padding: 8px 14px;
    border-radius: 5px;
    font-size: 12px;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.adm-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
}

.adm-btn-small {
    background: var(--adm-bg-3);
    color: var(--adm-text-1);
    border: 1px solid var(--adm-border);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
}
.adm-btn-small:hover { background: rgba(255, 255, 255, 0.1); }
.adm-btn-danger {
    background: transparent;
    border-color: var(--adm-red-border);
    color: #ff6b6b;
}
.adm-btn-danger:hover { background: var(--adm-red-soft); }

.adm-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}
.adm-filters input,
.adm-filters select {
    background: var(--adm-bg-3);
    border: 1px solid var(--adm-border);
    color: #fff;
    padding: 7px 10px;
    border-radius: 5px;
    font-size: 12px;
}
.adm-filters input:focus,
.adm-filters select:focus {
    outline: 0;
    border-color: var(--adm-red);
}
.adm-filters input { min-width: 180px; }
.adm-filters button {
    background: transparent;
    border: 1px solid var(--adm-red-border);
    color: #fff;
    padding: 7px 14px;
    border-radius: 5px;
    font-size: 12px;
}
.adm-filters button:hover { background: var(--adm-red-soft); }

.adm-count {
    color: var(--adm-text-3);
    font-size: 11px;
    margin-left: auto;
}

/* ================ TABLE ================ */
.adm-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--adm-bg-1);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--adm-border);
}
.adm-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--adm-text-2);
    font-weight: 500;
    font-size: 11px;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--adm-border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.adm-table th a {
    color: inherit;
    display: inline-flex;
    gap: 4px;
    align-items: center;
}
.adm-table th a:hover { color: #fff; }
.adm-table th a.active { color: var(--adm-red); }

.adm-row {
    border-bottom: 1px solid var(--adm-border);
    cursor: pointer;
    transition: background 0.1s;
}
.adm-row:hover { background: rgba(255, 255, 255, 0.025); }
.adm-row td {
    padding: 12px;
    font-size: 14px;
    color: var(--adm-text-1);
    vertical-align: middle;
}
.adm-row.is-expanded { background: var(--adm-red-soft); }

.adm-thumb-mini {
    width: 96px;
    height: 54px;
    background: linear-gradient(135deg, #2a1a1a, #1a1a2a);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--adm-border);
    overflow: hidden;
}
.adm-thumb-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.adm-thumb-mini:hover img {
    transform: scale(1.08);
}
.adm-thumb-mini.live {
    border-color: var(--adm-red-border);
    background: linear-gradient(135deg, #3a0a0a, #1a0505);
}

.adm-title-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.adm-title-main {
    color: #fff;
    font-weight: 500;
    font-size: 15px;
}
.adm-title-slug {
    color: var(--adm-text-3);
    font-size: 11px;
    font-family: ui-monospace, monospace;
}

.adm-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--adm-bg-3);
    border-radius: 4px;
    font-size: 14px;
}

.adm-date {
    color: var(--adm-text-1);
    font-variant-numeric: tabular-nums;
}
.adm-date-time {
    color: var(--adm-text-3);
    font-variant-numeric: tabular-nums;
}

.adm-status {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.adm-status .status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}
.status-published {
    background: rgba(46, 204, 113, 0.15);
    color: var(--adm-green);
}
.status-draft {
    background: rgba(255, 255, 255, 0.08);
    color: var(--adm-text-2);
}
.status-scheduled {
    background: rgba(241, 196, 15, 0.15);
    color: var(--adm-yellow);
}
@keyframes admLiveBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}
.status-live {
    background: rgba(229, 9, 20, 0.22);
    color: #ff6b6b;
    animation: admLiveBlink 1.5s ease-in-out infinite;
}

/* ================ ACTIONS ================ */
.adm-actions {
    display: flex;
    gap: 4px;
}
.adm-icon-btn {
    background: var(--adm-bg-2);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-2);
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.adm-icon-btn:hover {
    background: var(--adm-red-soft);
    color: #ff6b6b;
    border-color: var(--adm-red-border);
}
.adm-icon-btn.copied {
    background: rgba(46, 204, 113, 0.2);
    color: var(--adm-green);
    border-color: rgba(46, 204, 113, 0.4);
}

/* ================ LIGNE DÉPLIANTE ================ */
.adm-row-expanded td {
    padding: 0;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--adm-red-border);
}
.adm-expanded {
    padding: 16px 18px;
}
.adm-expanded-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 14px;
}
.adm-expanded-grid h5 {
    color: var(--adm-red);
    font-size: 10px;
    font-weight: 500;
    margin: 0 0 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.adm-expanded-grid p {
    color: var(--adm-text-1);
    font-size: 12px;
    margin: 0;
    line-height: 1.5;
}
.adm-tag-list {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.adm-tag {
    background: var(--adm-bg-3);
    color: var(--adm-text-2);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
}
.adm-expanded-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--adm-border);
    flex-wrap: wrap;
}
.adm-exp-btn {
    background: var(--adm-bg-2);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-1);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: background 0.1s, border-color 0.1s;
}
.adm-exp-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}
.adm-exp-btn.primary {
    background: var(--adm-red);
    border-color: var(--adm-red);
    color: #fff;
}
.adm-exp-btn.primary:hover { background: #c0070f; }
.adm-exp-btn.danger {
    background: transparent;
    border-color: var(--adm-red-border);
    color: #ff6b6b;
    margin-left: auto;
}
.adm-exp-btn.danger:hover { background: var(--adm-red-soft); }
.adm-exp-btn.copied {
    background: rgba(46, 204, 113, 0.2);
    border-color: rgba(46, 204, 113, 0.4);
    color: var(--adm-green);
}
.inline-form { display: inline; margin-left: auto; }

.adm-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--adm-text-3);
}

/* ================ FOOTER PAGINATION ================ */
.adm-footer {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--adm-border);
    border-top: 0;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 6px 6px;
    margin-top: -1px;
    flex-wrap: wrap;
    gap: 10px;
}
.adm-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--adm-text-2);
    font-size: 11px;
}
.adm-per-page select {
    background: var(--adm-bg-3);
    border: 1px solid var(--adm-border);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin: 0 4px;
}
.adm-pages {
    display: flex;
    gap: 4px;
}
.adm-page {
    background: var(--adm-bg-2);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-2);
    min-width: 30px;
    height: 30px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-decoration: none;
    padding: 0 8px;
}
.adm-page:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.adm-page.current {
    background: var(--adm-red);
    border-color: var(--adm-red);
    color: #fff;
}
.adm-page-sep {
    color: var(--adm-text-3);
    padding: 0 4px;
    align-self: center;
}

/* ================ FORMULAIRES ================ */
.adm-form-page {
    background: var(--adm-bg-1);
    border: 1px solid var(--adm-border);
    border-radius: 8px;
    padding: 24px;
}
.adm-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--adm-border);
    gap: 16px;
    flex-wrap: wrap;
}
.adm-form-header h1 {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 500;
    flex: 1;
}
.adm-back-link {
    color: var(--adm-text-2);
    font-size: 12px;
    text-decoration: none;
}
.adm-back-link:hover { color: var(--adm-red); }

/* Miniature dans l'en-tête du formulaire de publication */
.adm-header-thumb {
    width: 96px;
    height: 54px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Player vidéo chapitrage */
.adm-chapter-player-wrap {
    margin-bottom: 16px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
}
.adm-chapter-player-wrap .plyr {
    border-radius: 8px 8px 0 0;
    --plyr-color-main: #e50914;
}
.adm-chapter-player-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.04);
    flex-wrap: wrap;
}
.adm-chapter-player-label {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}
.adm-chapter-player-time {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    min-width: 52px;
    display: inline-block;
    font-variant-numeric: tabular-nums;
}
.adm-btn-sm {
    font-size: 12px !important;
    padding: 5px 12px !important;
}

/* ── Admin map ── */
.adm-admin-map {
    height: 340px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    background: #12121a;
    margin-bottom: 4px;
}
.adm-map-search-results {
    margin-top: 4px;
    background: #16161c;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    overflow: hidden;
    display: none;
}
.adm-map-search-results:has(.adm-map-sr-item),
.adm-map-search-results:has(.adm-map-sr-empty) { display: block; }
.adm-map-sr-item {
    padding: 8px 12px;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.1s;
}
.adm-map-sr-item:last-child { border-bottom: none; }
.adm-map-sr-item:hover { background: rgba(229,9,20,0.15); color: #fff; }
.adm-map-sr-empty { padding: 8px 12px; font-size: 12px; color: rgba(255,255,255,0.4); }
.adm-map-coord { flex: 0 0 110px !important; width: 110px !important; font-size: 12px !important; }
.adm-map-point-row { transition: outline 0.2s; }
.adm-admin-map .map-pin-main,
.adm-admin-map .map-pin-pt { cursor: grab; }
.adm-admin-map .map-pin-main:active,
.adm-admin-map .map-pin-pt:active { cursor: grabbing; }

.adm-form-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--adm-border);
}
.adm-form-section:last-of-type { border-bottom: 0; }
.adm-form-section h2 {
    color: var(--adm-red);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.adm-form-section h3 {
    color: var(--adm-text-1);
    font-size: 13px;
    font-weight: 500;
    margin: 20px 0 12px;
}
.adm-form-section h4 {
    color: var(--adm-text-2);
    font-size: 12px;
    font-weight: 500;
    margin: 14px 0 6px;
}

.adm-form-row {
    margin-bottom: 16px;
}
.adm-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.adm-form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}
@media (max-width: 720px) {
    .adm-form-row-2, .adm-form-row-3 { grid-template-columns: 1fr; }
}

.adm-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.adm-field > span {
    color: var(--adm-text-2);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.adm-field > span em {
    color: var(--adm-red);
    font-style: normal;
    margin-left: 2px;
}
.adm-field > span small {
    text-transform: none;
    color: var(--adm-text-3);
    font-weight: 400;
    margin-left: 4px;
}
.adm-field input[type="text"],
.adm-field input[type="url"],
.adm-field input[type="number"],
.adm-field input[type="search"],
.adm-field input[type="datetime-local"],
.adm-field input[type="password"],
.adm-field textarea,
.adm-field select {
    background: var(--adm-bg-3);
    border: 1px solid var(--adm-border);
    color: #fff;
    padding: 9px 11px;
    border-radius: 5px;
    font-size: 13px;
    width: 100%;
}
.adm-field input:focus,
.adm-field textarea:focus,
.adm-field select:focus {
    outline: 0;
    border-color: var(--adm-red);
    background: rgba(229, 9, 20, 0.05);
}
.adm-field input[type="file"] {
    background: var(--adm-bg-3);
    border: 1px dashed var(--adm-border);
    padding: 8px;
    border-radius: 5px;
    font-size: 12px;
    color: var(--adm-text-2);
    width: 100%;
}
.adm-hint {
    color: var(--adm-text-3);
    font-size: 11px;
}
.adm-hint code {
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 6px;
    border-radius: 3px;
    font-family: ui-monospace, monospace;
    color: var(--adm-text-2);
}
.adm-current-file {
    color: var(--adm-text-2);
    font-size: 11px;
    padding: 4px 8px;
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.2);
    border-radius: 3px;
    display: inline-block;
}

.adm-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
    background: var(--adm-bg-3);
    border: 1px solid var(--adm-border);
    padding: 10px;
    border-radius: 5px;
}
.adm-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--adm-text-1);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
}
.adm-checkbox:hover { background: rgba(255, 255, 255, 0.05); }
.adm-checkbox input { accent-color: var(--adm-red); }
.adm-checkbox-big {
    align-self: flex-end;
    padding: 9px 12px;
    background: var(--adm-bg-3);
    border: 1px solid var(--adm-border);
    border-radius: 5px;
    font-size: 13px;
    width: fit-content;
}
.adm-checkbox-danger {
    color: #ff6b6b;
    font-size: 11px;
}
.adm-checkbox-danger input { accent-color: var(--adm-red); }

.adm-preview-img {
    margin-bottom: 8px;
}
.adm-preview-img img {
    max-width: 200px;
    max-height: 120px;
    border-radius: 4px;
    border: 1px solid var(--adm-border);
    display: block;
}
.adm-preview-img small {
    color: var(--adm-text-3);
    font-size: 11px;
    display: block;
    margin-top: 4px;
}

.adm-photos-existing {
    margin-bottom: 18px;
    padding: 12px;
    background: var(--adm-bg-2);
    border-radius: 5px;
    border: 1px solid var(--adm-border);
}
.adm-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.adm-photo-card {
    background: var(--adm-bg-3);
    border: 1px solid var(--adm-border);
    border-radius: 5px;
    overflow: hidden;
}
.adm-photo-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}
.adm-photo-meta {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.adm-photo-meta small {
    color: var(--adm-text-3);
    font-size: 11px;
    line-height: 1.3;
}
.adm-photo-upload {
    margin-bottom: 12px;
    padding: 12px;
    background: var(--adm-bg-2);
    border: 1px dashed var(--adm-border);
    border-radius: 5px;
}

.adm-tracks-list {
    background: var(--adm-bg-2);
    border-radius: 5px;
    border: 1px solid var(--adm-border);
    padding: 4px;
    margin-bottom: 16px;
}
.adm-track-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--adm-border);
    font-size: 12px;
}
.adm-track-row:last-child { border-bottom: 0; }
.adm-track-type {
    background: var(--adm-bg-3);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--adm-text-2);
}
.adm-track-lang {
    background: var(--adm-red-soft);
    color: #ff6b6b;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
}
.adm-track-label { color: var(--adm-text-1); flex: 1; }
.adm-track-default {
    color: var(--adm-green);
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 3px;
}

.adm-chapters-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}
.adm-chapter-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.adm-chapter-time {
    background: var(--adm-bg-3);
    border: 1px solid var(--adm-border);
    color: #fff;
    padding: 7px 10px;
    border-radius: 4px;
    font-family: ui-monospace, monospace;
    width: 110px;
    font-size: 12px;
}
.adm-chapter-title {
    background: var(--adm-bg-3);
    border: 1px solid var(--adm-border);
    color: #fff;
    padding: 7px 10px;
    border-radius: 4px;
    flex: 1;
    font-size: 13px;
}
.adm-chapter-time:focus,
.adm-chapter-title:focus {
    outline: 0;
    border-color: var(--adm-red);
}
.adm-chapter-remove {
    background: transparent;
    border: 1px solid var(--adm-red-border);
    color: #ff6b6b;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
}
.adm-chapter-remove:hover { background: var(--adm-red-soft); }

.adm-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--adm-border);
}

.adm-flash {
    padding: 10px 14px;
    border-radius: 5px;
    margin-bottom: 18px;
    font-size: 13px;
}
.adm-flash-success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: var(--adm-green);
}
.adm-flash-error {
    background: var(--adm-red-soft);
    border: 1px solid var(--adm-red-border);
    color: #ff6b6b;
}
.adm-flash p { margin: 4px 0; }

.adm-inline-form {
    background: var(--adm-bg-2);
    padding: 14px;
    border-radius: 5px;
    border: 1px solid var(--adm-border);
    margin-bottom: 20px;
}

.adm-table-compact td {
    padding: 8px 10px;
}
.adm-table-compact input[type="text"],
.adm-table-compact input[type="number"] {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--adm-border);
    color: #fff;
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 12px;
    width: 100%;
}
.adm-inline-row-form { display: contents; }

/* ================ LOGIN ================ */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background:
        radial-gradient(ellipse at center, rgba(229, 9, 20, 0.08), transparent 60%),
        var(--adm-bg-0);
}
.login-box {
    background: var(--adm-bg-1);
    border: 1px solid var(--adm-border);
    border-radius: 10px;
    padding: 32px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.login-logo {
    color: #fff;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-align: center;
    margin-bottom: 30px;
}
.login-logo .accent { color: var(--adm-red); }
.login-logo small {
    display: block;
    font-size: 11px;
    color: var(--adm-text-3);
    font-weight: 400;
    letter-spacing: 1px;
    margin-top: 4px;
    text-transform: uppercase;
}
.login-error {
    background: var(--adm-red-soft);
    border: 1px solid var(--adm-red-border);
    color: #ff6b6b;
    padding: 10px 14px;
    border-radius: 5px;
    font-size: 12px;
    margin-bottom: 16px;
}
.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.login-form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.login-form label span {
    color: var(--adm-text-2);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.login-form input {
    background: var(--adm-bg-3);
    border: 1px solid var(--adm-border);
    color: #fff;
    padding: 10px 12px;
    border-radius: 5px;
    font-size: 13px;
}
.login-form input:focus {
    outline: 0;
    border-color: var(--adm-red);
}
.login-form button {
    background: var(--adm-red);
    color: #fff;
    border: 0;
    padding: 11px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 6px;
    transition: background 0.15s;
}
.login-form button:hover { background: #c0070f; }
.login-back {
    display: block;
    text-align: center;
    margin-top: 22px;
    color: var(--adm-text-3);
    font-size: 12px;
    text-decoration: none;
}
.login-back:hover { color: var(--adm-red); }

/* ================ RESPONSIVE ================ */
@media (max-width: 900px) {
    .adm-header { grid-template-columns: 1fr; padding: 10px; gap: 8px; }
    /* Ligne d'onglets qui défile horizontalement (comme un ascenseur), contenue dans
       sa propre boîte — plutôt que de faire passer les items à la ligne ou déborder
       et entraîner toute la page dans un défilement horizontal indésirable.
       Les menus déroulants (Contenu/Technique) sont réancrés en position:fixed par
       JS (admin.js) au moment de l'ouverture sur mobile, pour échapper à ce
       conteneur défilant sans quoi ils seraient rognés par son overflow-y forcé. */
    .adm-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    .adm-nav > a,
    .adm-nav > .adm-nav-dropdown { flex-shrink: 0; }
    .adm-expanded-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   UI Refresh — sections repliables + toggle live + tailles vidéo
   ===================================================================== */

/* Titres des sections — plus gros et plus lisibles */
.adm-form-section h2 {
    color: var(--adm-text-1);
    font-size: 18px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
    flex: 1;
}

/* Sections repliables (basées sur <details>) */
.adm-collapsible {
    border-bottom: 1px solid var(--adm-border);
    padding: 0;
    margin: 0 0 18px;
    overflow: hidden;
}
.adm-collapsible:last-of-type {
    border-bottom: 0;
}
.adm-collapsible > summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
    transition: background 0.12s;
    margin: 0;
    border-bottom: 1px solid transparent;
}
.adm-collapsible > summary::-webkit-details-marker { display: none; }
.adm-collapsible > summary:hover {
    background: var(--adm-bg-2);
}
/* En-tête statique (section fusionnée, non repliable) — même gabarit qu'un summary sans interaction */
.adm-static-header {
    padding: 16px 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--adm-border);
}
.adm-collapsible[open] > summary {
    border-bottom-color: var(--adm-border);
}
.adm-collapse-arrow {
    font-size: 10px;
    color: var(--adm-text-3);
    transition: transform 0.15s;
    flex-shrink: 0;
}
.adm-collapsible[open] > summary .adm-collapse-arrow {
    transform: rotate(0deg);
}
.adm-collapsible:not([open]) > summary .adm-collapse-arrow {
    transform: rotate(-90deg);
}
.adm-collapse-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--adm-bg-3);
    color: var(--adm-text-2);
    border: 1px solid var(--adm-border);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    flex-shrink: 0;
}
.adm-collapse-badge-status {
    background: var(--adm-red-soft);
    color: #ff6b6b;
    border-color: var(--adm-red-border);
}
.adm-section-body {
    padding: 16px 8px 24px;
    animation: admSectionFade 0.2s ease-out;
}
@keyframes admSectionFade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
/* API method badges */
.tech-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.badge-blue  { background: rgba(59,130,246,0.2); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.badge-green { background: rgba(34,197,94,0.2);  color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }

/* Mise en page titre + toggle "Émission en direct" sur la même ligne */
.adm-title-with-live {
    display: flex !important;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}
.adm-title-with-live .adm-field {
    margin-bottom: 0;
}
.adm-checkbox-live {
    padding: 9px 14px;
    background: var(--adm-red-soft);
    border: 1px solid var(--adm-red-border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--adm-text-1);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    margin-bottom: 0 !important;
}
.adm-checkbox-live:hover {
    background: rgba(229, 9, 20, 0.25);
    border-color: rgba(229, 9, 20, 0.6);
}
.adm-checkbox-live input { accent-color: var(--adm-red); }
.adm-checkbox-live input:checked + span {
    text-shadow: 0 0 8px rgba(229, 9, 20, 0.5);
}

/* Taille de fichier vidéo à côté du label */
.adm-size-info {
    color: var(--adm-text-3);
    font-size: 11px;
    font-weight: 400;
    margin-left: 4px;
}

/* Responsive : sur mobile, le toggle live passe sous le titre */
@media (max-width: 640px) {
    .adm-title-with-live {
        flex-direction: column;
        align-items: stretch;
    }
    .adm-checkbox-live {
        width: 100%;
        text-align: center;
    }
    .adm-form-section h2 {
        font-size: 16px;
    }
}

/* ================ STICKY PUBLICATION BAR ================ */
.adm-pub-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(8,8,8,0.97);
    border-top: 1px solid var(--adm-red-border);
    backdrop-filter: blur(8px);
    z-index: 200;
    padding: 10px 20px;
}
.adm-pub-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.adm-pub-bar-field {
    display: flex;
    align-items: center;
    gap: 7px;
}
.adm-pub-bar-field > span {
    color: var(--adm-text-3);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
.adm-pub-bar select,
.adm-pub-bar input[type="datetime-local"] {
    background: var(--adm-bg-3);
    border: 1px solid var(--adm-border);
    color: #fff;
    padding: 7px 9px;
    border-radius: 5px;
    font-size: 12px;
    font-family: inherit;
}
.adm-pub-bar select:focus,
.adm-pub-bar input[type="datetime-local"]:focus {
    outline: 0;
    border-color: var(--adm-red);
}
.adm-pub-bar-sep {
    color: var(--adm-border);
    font-size: 18px;
    line-height: 1;
}
.adm-pub-bar-link {
    color: var(--adm-text-3);
    font-size: 11px;
    text-decoration: none;
    margin-left: auto;
    white-space: nowrap;
}
.adm-pub-bar-link:hover { color: var(--adm-red); }
.adm-form-page { padding-bottom: 76px; }

@media (max-width: 720px) {
    .adm-pub-bar-dates-wrap { display: none; }
    .adm-pub-bar-link { display: none; }
    .adm-pub-bar-sep { display: none; }
}

/* ================ MEDIA TYPE CARDS ================ */
.adm-media-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
@media (max-width: 580px) {
    .adm-media-cards { grid-template-columns: repeat(2, 1fr); }
}
.adm-media-card { position: relative; }
.adm-media-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.adm-media-card label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: var(--adm-bg-3);
    border: 2px solid var(--adm-border);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-size: 12px;
    color: var(--adm-text-2);
    transition: all 0.15s;
    user-select: none;
    min-height: 72px;
    justify-content: center;
}
.adm-mc-icon { font-size: 20px; line-height: 1; }
.adm-media-card label:hover {
    border-color: rgba(255,255,255,0.2);
    color: #fff;
    background: rgba(255,255,255,0.06);
}
.adm-media-card input[type="radio"]:checked + label {
    border-color: var(--adm-red);
    background: var(--adm-red-soft);
    color: #fff;
}

/* ================ MEDIA SUB-PANELS ================ */
.adm-media-panel { display: none; }
.adm-media-panel.active { display: block; }
.adm-media-panel-inner {
    border: 1px solid var(--adm-border);
    border-radius: 8px;
    padding: 16px;
    background: var(--adm-bg-2);
}

/* ================ MEDIA SUB-TABS ================ */
.adm-sub-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--adm-border);
}
.adm-sub-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--adm-text-3);
    padding: 8px 16px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}
.adm-sub-tab:hover { color: var(--adm-text-1); }
.adm-sub-tab.active {
    color: var(--adm-red);
    border-bottom-color: var(--adm-red);
    font-weight: 500;
}
.adm-sub-panel { display: none; }
.adm-sub-panel.active { display: block; }

/* ================ DROP ZONE PHOTOS ================ */
.adm-drop-zone {
    border: 2px dashed var(--adm-border);
    border-radius: 8px;
    padding: 26px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: var(--adm-bg-2);
    position: relative;
}
.adm-drop-zone:hover,
.adm-drop-zone.dragging {
    border-color: var(--adm-red);
    background: var(--adm-red-soft);
}
.adm-drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.adm-drop-zone-icon { font-size: 26px; margin-bottom: 6px; }
.adm-drop-zone-text { color: var(--adm-text-1); font-size: 13px; }
.adm-drop-zone-hint { color: var(--adm-text-3); font-size: 11px; margin-top: 4px; }

.adm-photo-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.adm-ppc {
    background: var(--adm-bg-3);
    border: 1px solid var(--adm-border);
    border-radius: 6px;
    overflow: hidden;
}
.adm-ppc-thumb {
    aspect-ratio: 4/3;
    background: var(--adm-bg-2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 26px;
    color: var(--adm-text-3);
}
.adm-ppc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.adm-ppc-body {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.adm-ppc-name {
    color: var(--adm-text-2);
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.adm-ppc-body input[type="text"],
.adm-ppc-body select {
    background: var(--adm-bg-2);
    border: 1px solid var(--adm-border);
    color: #fff;
    padding: 5px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-family: inherit;
    width: 100%;
}
.adm-ppc-body input:focus,
.adm-ppc-body select:focus { outline: 0; border-color: var(--adm-red); }
.adm-ppc-remove {
    background: transparent;
    border: 1px solid var(--adm-red-border);
    color: #ff6b6b;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
    margin-top: 2px;
}
.adm-ppc-remove:hover { background: var(--adm-red-soft); }

/* ================ TRANSCODAGE PANEL ================ */
.adm-transcode-drop {
    border: 2px dashed var(--adm-border);
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: var(--adm-bg-2);
    position: relative;
}
.adm-transcode-drop:hover,
.adm-transcode-drop.dragging {
    border-color: var(--adm-red);
    background: var(--adm-red-soft);
}
.adm-transcode-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.adm-transcode-status {
    margin-top: 12px;
    background: var(--adm-bg-2);
    border: 1px solid var(--adm-border);
    border-radius: 6px;
    padding: 12px 14px;
}
.adm-transcode-status h4 {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--adm-text-2);
    font-weight: 500;
}
.adm-progress-row { margin-bottom: 8px; }
.adm-progress-row:last-child { margin-bottom: 0; }
.adm-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--adm-text-2);
    margin-bottom: 3px;
}
.adm-progress-bar-wrap {
    background: var(--adm-bg-3);
    border-radius: 4px;
    height: 5px;
    overflow: hidden;
}
.adm-progress-bar {
    height: 100%;
    background: var(--adm-red);
    border-radius: 4px;
    transition: width 0.4s ease;
    width: 0%;
}
.adm-progress-bar.done { background: var(--adm-green); }
.adm-progress-bar.error { background: #ff4444; }
.adm-transcode-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ================ LIVE PANEL ================ */
.adm-live-section {
    margin-top: 16px;
    border-top: 1px solid var(--adm-border);
    padding-top: 16px;
}
.adm-live-section h3 {
    font-size: 12px;
    color: #ff6b6b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px;
    font-weight: 500;
}

/* ================ VIDEO EXISTING CARD ================ */
.adm-video-existing {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(46,204,113,0.06);
    border: 1px solid rgba(46,204,113,0.2);
    border-radius: 5px;
    margin-bottom: 8px;
}
.adm-video-existing span { color: var(--adm-text-1); font-size: 12px; flex: 1; }
.adm-video-existing small { color: var(--adm-text-3); font-size: 11px; }

/* Toolbar Markdown description */
.adm-md-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    background: var(--adm-bg-2);
    border: 1px solid var(--adm-border);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    flex-wrap: wrap;
}
.adm-md-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--adm-text-2);
    border-radius: 4px;
    padding: 3px 9px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    line-height: 1;
}
.adm-md-btn:hover { background: var(--adm-bg-3); border-color: var(--adm-border); color: var(--adm-text-1); }
.adm-md-btn strong { font-weight: 700; font-size: 13px; }
.adm-md-btn em { font-style: italic; }
.adm-md-sep { width: 1px; height: 16px; background: var(--adm-border); margin: 0 4px; }
.adm-md-help { font-size: 11px; color: var(--adm-text-3); margin-left: 4px; }
.adm-md-help code { font-size: 10px; background: var(--adm-bg-3); padding: 1px 4px; border-radius: 3px; }
#descriptionTextarea { border-radius: 0 0 6px 6px; }

/* ── Espace Équipe : vue Kanban des idées ─────────────────────────── */
.eq-view-toggle button.active {
    background: var(--adm-red-soft);
    color: var(--adm-red);
    border-color: var(--adm-red-border);
}
.eq-kanban {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
}
.eq-kanban-col {
    flex: 1 1 260px;
    min-width: 240px;
    background: var(--adm-bg-2);
    border: 1px solid var(--adm-border);
    border-radius: 8px;
    padding: 12px;
}
.eq-kanban-col h3 {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--adm-text-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.eq-kanban-count {
    background: var(--adm-bg-3);
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 11px;
}
.eq-kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 60px;
}
.eq-kanban-cards.drag-over {
    background: var(--adm-red-soft);
    border-radius: 6px;
}
.eq-kanban-card {
    background: var(--adm-bg-1);
    border: 1px solid var(--adm-border);
    border-radius: 6px;
    padding: 10px;
    cursor: grab;
    font-size: 13px;
}
.eq-kanban-card.dragging { opacity: 0.4; }
.eq-kanban-card strong { display: block; margin-bottom: 4px; }
.eq-kanban-card p { margin: 0 0 6px; color: var(--adm-text-2); font-size: 12px; }
.eq-kanban-meta { color: var(--adm-text-3); font-size: 11px; margin-bottom: 8px; }
.eq-kanban-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.eq-kanban-card-actions select {
    background: var(--adm-bg-2);
    color: var(--adm-text-1);
    border: 1px solid var(--adm-border);
    border-radius: 4px;
    font-size: 11px;
    padding: 3px 4px;
}
@media (max-width: 700px) {
    .eq-kanban { flex-direction: column; }
    .eq-kanban-col { width: 100%; }
}
.eq-badge {
    display: inline-block;
    background: var(--adm-bg-3);
    color: var(--adm-text-2);
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 10px;
    margin-left: 6px;
    vertical-align: middle;
}
.eq-votes { display: flex; gap: 6px; margin: 6px 0; }
.eq-vote-btn {
    background: var(--adm-bg-1);
    border: 1px solid var(--adm-border);
    border-radius: 5px;
    color: var(--adm-text-2);
    font-size: 12px;
    padding: 3px 8px;
    cursor: pointer;
}
.eq-vote-btn:hover { background: var(--adm-bg-3); }
.eq-vote-btn.active {
    background: var(--adm-red-soft);
    border-color: var(--adm-red-border);
    color: #fff;
}
.eq-event-card {
    border: 1px solid var(--adm-border);
    border-radius: 8px;
    padding: 12px 14px;
    background: var(--adm-bg-2);
}
.eq-event-past {
    margin-left: 22px;
    opacity: 0.55;
    background: transparent;
    border-color: transparent;
    border-left: 2px solid var(--adm-border);
    border-radius: 0;
    padding-left: 12px;
}

.eq-tree-group { margin-bottom: 16px; max-width: 900px; }
.eq-tree-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
.eq-tree-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--adm-text-1);
    user-select: none;
}
.eq-tree-header:hover { color: #fff; }
.eq-tree-caret { display: inline-block; transition: transform 0.15s; color: var(--adm-text-3); }
.eq-tree-header.collapsed .eq-tree-caret { transform: rotate(-90deg); }
.eq-tree-count {
    background: var(--adm-bg-3);
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 11px;
    color: var(--adm-text-3);
}
/* .eq-tree-thumb-cell = la cellule de tableau (largeur/padding).
   .eq-tree-thumb = la vignette elle-même (l'élément <a>/<span> qui porte l'image),
   posée directement sur cet élément — et non plus sur ses descendants, erreur qui
   faisait que la règle ne matchait jamais un <a class="eq-tree-thumb"><img></a>
   (pas de <a>/<span> imbriqué à l'intérieur d'un <a>) et laissait les photos
   s'afficher à leur taille naturelle malgré les tailles réduites côté CSS. */
.eq-tree-thumb-cell {
    width: 26px;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}
.eq-tree-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    overflow: hidden;
    background: var(--adm-bg-1);
    font-size: 8px;
    color: var(--adm-text-3);
    position: relative;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}
.eq-tree-thumb:hover {
    transform: scale(4.2);
    z-index: 50;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
}
.eq-tree-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.eq-edit textarea, .eq-edit input[type="text"], .eq-edit select {
    background: var(--adm-bg-1);
    border: 1px solid var(--adm-border);
    border-radius: 6px;
    color: #fff;
    padding: 6px 8px;
    font-size: 12px;
    width: 100%;
}

/* ── Espace Équipe : header distinct (bleu) pour ne pas le confondre avec l'admin ── */
body.equipe-body .adm-header {
    background:
        radial-gradient(ellipse at top, var(--eq-blue-soft), transparent 60%),
        var(--eq-bg-0);
    border-bottom: 1px solid var(--eq-blue-border);
}
body.equipe-body .adm-logo .badge {
    background: var(--eq-blue-soft);
    color: #8ab4ff;
}
body.equipe-body .adm-nav a:hover,
body.equipe-body .adm-nav-dropdown-trigger:hover { background: var(--eq-blue-soft); }
body.equipe-body .adm-nav a.active {
    color: #8ab4ff;
    background: var(--eq-blue-soft);
}
.eq-nav-admin-link { margin-left: auto; }

.eq-nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--adm-border);
    color: #fff;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 900px) {
    body.equipe-body .adm-header {
        position: relative;
        grid-template-columns: auto auto 1fr;
        padding: 8px 12px;
    }
    body.equipe-body .eq-nav-toggle { display: inline-flex; }
    body.equipe-body .adm-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        align-items: stretch;
        background: var(--eq-bg-0);
        border-bottom: 1px solid var(--eq-blue-border);
        padding: 6px;
        z-index: 100;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
    }
    body.equipe-body .adm-nav.open { display: flex; }
    body.equipe-body .adm-nav a { padding: 10px 12px; flex-shrink: 0; white-space: nowrap; }
    body.equipe-body .eq-nav-admin-link { margin-left: 0; }
    body.equipe-body .adm-user {
        font-size: 11px;
        gap: 6px;
        max-width: 140px;
        overflow: hidden;
    }
    body.equipe-body .adm-user span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ── Carnet de terrain : boutons photo / audio (même couleur, jaune) / enregistrer (rouge) ── */
.eq-photo-btn, .eq-audio-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: var(--adm-yellow);
    border: none;
    color: #1a1400;
    border-radius: 8px;
    padding: 13px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.eq-photo-btn:hover, .eq-audio-btn:hover { background: #d4af0e; }
.eq-audio-btn.recording { background: var(--adm-red); color: #fff; }
.eq-photo-btn-icon, .eq-audio-btn-icon { font-size: 18px; }

.eq-photo-btn-compact, .eq-audio-btn-compact {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    gap: 4px;
    padding: 9px 4px;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.eq-photo-btn-compact .eq-photo-btn-icon,
.eq-audio-btn-compact .eq-audio-btn-icon { font-size: 14px; flex-shrink: 0; }

.eq-selection-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    bottom: 16px;
    max-width: 640px;
    margin-top: 16px;
    background: var(--adm-bg-1);
    border: 1px solid var(--eq-blue-border);
    border-radius: 8px;
    padding: 10px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    font-size: 13px;
}

/* Card layout du carnet — display sur une classe CSS (pas en inline) pour que
   le JS générique .eq-editable (qui vide style.display à l'annulation) retombe
   sur "flex" plutôt que sur le display block par défaut d'une <div>. */
.eq-carnet-view { display: flex; gap: 14px; }

/* ── Médiathèque : zone de dépôt (drag & drop / coller / parcourir) ── */
.eq-dropzone {
    border: 2px dashed var(--adm-border);
    border-radius: 10px;
    padding: 28px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.eq-dropzone:hover { border-color: var(--eq-blue-border); }
.eq-dropzone.eq-dropzone-over {
    border-color: var(--eq-blue);
    background: var(--eq-blue-soft);
}
.eq-dropzone.eq-dropzone-busy { opacity: 0.55; pointer-events: none; }
.eq-dropzone-icon { display: block; font-size: 26px; margin-bottom: 8px; }
.eq-dropzone-text { margin: 0; color: var(--adm-text-3); font-size: 12.5px; line-height: 1.5; }

/* ── Médiathèque : silos par catégorie, cartes plutôt que lignes ── */
.eq-media-silos {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
}
.eq-media-silo {
    flex: 1 1 220px;
    max-width: 300px;
    min-width: 190px;
    background: var(--adm-bg-2);
    border: 1px solid var(--adm-border);
    border-radius: 10px;
    padding: 12px;
}
.eq-media-silo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    color: var(--adm-text-1);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--adm-border);
}
.eq-media-silo-body {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;
    max-height: 560px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.eq-media-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 8px;
    background: var(--adm-bg-1);
}
.eq-media-card-check {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    z-index: 2;
}
.eq-media-card-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--adm-bg-3);
    font-size: 20px;
}
.eq-media-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eq-media-card-name {
    width: 100%;
    font-size: 10.5px;
    color: var(--adm-text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.eq-media-card-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    color: var(--adm-text-3);
}
.eq-media-card-delete-form { display: inline-flex; margin: 0; }
.eq-media-card-del {
    background: none;
    border: none;
    color: var(--adm-text-3);
    cursor: pointer;
    font-size: 10px;
    padding: 0;
    line-height: 1;
}
.eq-media-card-del:hover { color: var(--adm-red); }

/* ── Carnet de terrain : cartes compactes, identité masquée par défaut (confidentialité) ── */
.eq-carnet-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}
.eq-carnet-card {
    width: 86px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 10px 6px;
    border-radius: 10px;
    background: var(--adm-bg-2);
    border: 1px solid var(--adm-border);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.eq-carnet-card:hover { border-color: var(--eq-blue-border); background: var(--eq-blue-soft); }
.eq-carnet-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--adm-bg-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--adm-text-2);
    flex-shrink: 0;
}
.eq-carnet-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eq-carnet-card-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.15s, opacity 0.15s;
}
.eq-carnet-card:hover .eq-carnet-card-info,
.eq-carnet-card:focus .eq-carnet-card-info { max-height: 44px; opacity: 1; }
.eq-carnet-card-info strong { font-size: 10.5px; color: var(--adm-text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 78px; }
.eq-carnet-card-info span { font-size: 9px; color: var(--adm-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 78px; }

.eq-carnet-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.eq-carnet-modal.open { display: flex; }
.eq-carnet-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}
.eq-carnet-modal-content {
    position: relative;
    background: var(--adm-bg-2);
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.eq-carnet-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--adm-text-3);
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}
.eq-carnet-modal-close:hover { color: #fff; }

/* ── Calendrier : deux colonnes (à venir / passés) sur écran large ── */
.eq-calendar-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 980px;
}
@media (min-width: 860px) {
    .eq-calendar-columns { grid-template-columns: 1.3fr 1fr; align-items: start; }
}
