/* DrmLess — style web années 2000 */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-size: 11px;
    line-height: 1.4;
    color: #000;
    background: #808080 url("data:image/svg+xml,%3Csvg width='4' height='4' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='2' height='2' fill='%23707070'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%23707070'/%3E%3C/svg%3E");
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #0000cc; }
a:visited { color: #660099; }
a:hover { color: #ff0000; }

.banner {
    background: linear-gradient(90deg, #0a246a, #3a6ea5);
    border-bottom: 2px inset #000040;
    padding: 12px;
    text-align: center;
    position: relative;
}

.logo-lockup { display: inline-block; text-decoration: none; }
.logo-text {
    font-family: "Arial Black", Gadget, sans-serif;
    font-size: 32px;
    font-style: italic;
    letter-spacing: -0.5px;
    line-height: 1;
}
.logo-drm { color: #fff; }
.logo-less { color: #ffcc66; }
.logo-plat { color: #fff; }
.logo-ine { color: #ffcc66; }

.lang-menu {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    z-index: 20;
}
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ece9d8;
    border: 2px outset #fff;
    padding: 3px 8px;
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    color: #000;
}
.lang-btn:active { border-style: inset; }
.lang-flag { font-size: 14px; line-height: 1; }
.lang-caret { font-size: 8px; opacity: 0.7; }
.lang-list {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 2px;
    list-style: none;
    background: #ece9d8;
    border: 2px outset #fff;
    min-width: 140px;
    text-align: left;
}
.lang-list button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: none;
    background: transparent;
    padding: 5px 8px;
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-size: 11px;
    cursor: pointer;
    color: #000;
    text-align: left;
}
.lang-list button:hover { background: #cce0ff; }
.lang-list span { font-size: 14px; }

.navbar {
    background: #ece9d8;
    border-bottom: 1px solid #808080;
    padding: 4px 8px;
    text-align: center;
    font-size: 11px;
}
.navbar a { font-weight: bold; text-decoration: none; }
.navbar span { color: #808080; margin: 0 4px; }

.marquee-bar {
    background: #000080;
    color: #ffff00;
    font-size: 10px;
    font-weight: bold;
    border-bottom: 2px inset #000040;
    padding: 2px 0;
}
marquee { display: block; }

.site-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    width: 100%;
}
.site-main.single { grid-template-columns: 1fr; max-width: 900px; margin: 0 auto; }
.site-main.wide { grid-template-columns: 1fr; max-width: 1100px; margin: 0 auto; }

.col-left, .col-right { min-width: 0; }
.col-right { display: flex; flex-direction: column; }

.box {
    background: #ece9d8;
    border: 2px outset #fff;
    margin-bottom: 8px;
}
.box:last-child { margin-bottom: 0; }
.box-title {
    background: linear-gradient(90deg, #0a246a, #3a6ea5);
    color: #fff;
    font-weight: bold;
    font-size: 11px;
    padding: 3px 6px;
    border-bottom: 1px solid #000;
}
.box-body { padding: 8px; }
.box-body p { margin-bottom: 6px; }
.box-body p:last-child { margin-bottom: 0; }

.btn-bevel {
    display: inline-block;
    background: #ece9d8;
    border: 2px outset #fff;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: bold;
    color: #000;
    text-decoration: none;
    cursor: pointer;
    margin-right: 4px;
    font-family: Tahoma, Verdana, Arial, sans-serif;
}
.btn-bevel:hover { color: #000; }
.btn-bevel:active, .btn-bevel.btn-go:active { border-style: inset; }
.btn-go { background: #ffffcc; color: #003399; }
.btn-danger { background: #ffcccc; color: #990000; }
.btn-ok { background: #ccffcc; color: #006600; }

.box-catalog { flex: 1; margin-bottom: 0; display: flex; flex-direction: column; }
.box-catalog .box-body { flex: 1; padding: 4px; overflow-y: auto; }

.games-table, .data-table {
    width: 100%;
    background: #808080;
    font-size: 10px;
    border-collapse: separate;
    border-spacing: 1px;
}
.games-table th, .data-table th {
    background: #003399;
    color: #fff;
    font-weight: bold;
    text-align: left;
    padding: 3px 5px;
}
.games-table td, .data-table td {
    background: #fff;
    padding: 3px 5px;
}
.games-table tr.row-a td { background: #d4edda; }
.games-table tr.row-b td { background: #cce0ff; }
.games-table tr.row-c td { background: #fff3cd; }
.games-table tr:hover td, .data-table tr:hover td { background: #cce0ff !important; }

.badge {
    display: inline-block;
    padding: 1px 5px;
    border: 1px solid #808080;
    font-size: 9px;
    font-weight: bold;
}
.badge-a { background: #d4edda; color: #155724; }
.badge-b { background: #cce0ff; color: #004085; }
.badge-c { background: #fff3cd; color: #856404; }
.badge-pending { background: #fff3cd; }
.badge-approved { background: #d4edda; }
.badge-rejected { background: #f8d7da; }

.form-group { margin-bottom: 8px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 2px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 3px 4px;
    border: 2px inset #fff;
    background: #fff;
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-size: 11px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-help { font-size: 9px; color: #404040; margin-top: 2px; }

.alert {
    padding: 6px 8px;
    margin-bottom: 8px;
    border: 2px outset #fff;
    font-weight: bold;
}
.alert-error { background: #ffcccc; color: #990000; }
.alert-success { background: #ccffcc; color: #006600; }

.auth-box { max-width: 420px; margin: 16px auto; }

/* Login page */
body.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.login-banner {
    padding: 20px;
    flex-shrink: 0;
}
.login-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.login-box {
    width: 100%;
    max-width: 400px;
    margin: 0;
}
.login-box .box-title {
    font-size: 14px;
    padding: 10px 14px;
    text-align: center;
}
.login-box .box-body {
    padding: 24px 28px;
}
.login-form .form-group {
    margin-bottom: 16px;
}
.login-form .form-group label {
    font-size: 12px;
    margin-bottom: 6px;
}
.login-form .form-group input {
    font-size: 14px;
    padding: 8px 10px;
    width: 100%;
}
.login-btn {
    width: 100%;
    text-align: center;
    font-size: 14px;
    padding: 10px;
    margin: 8px 0 0;
    display: block;
}
.login-footer {
    flex-shrink: 0;
}

.footer {
    background: #ece9d8;
    border-top: 2px inset #808080;
    padding: 6px 12px;
    font-size: 9px;
    color: #404040;
}
.footer a { font-size: 9px; }
.footer table { width: 100%; }

/* —— Admin login —— */
.admin-login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.admin-login-banner {
    padding: 18px 12px;
}
.admin-login-banner .logo-text {
    font-size: 42px;
}
.admin-login-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
}
.admin-login-box {
    width: 100%;
    max-width: 480px;
    margin: 0;
}
.admin-login-box .box-title {
    font-size: 13px;
    padding: 8px 12px;
}
.admin-login-box .box-body {
    padding: 20px 22px 18px;
}
.admin-login-form .form-group {
    margin-bottom: 14px;
}
.admin-login-form .form-group label {
    font-size: 12px;
    margin-bottom: 4px;
}
.admin-login-form .form-group input {
    font-size: 14px;
    padding: 8px 10px;
}
.admin-login-btn {
    width: 100%;
    text-align: center;
    font-size: 14px;
    padding: 10px 14px;
    margin-right: 0;
    margin-top: 4px;
}
.admin-login-back {
    text-align: center;
    margin-top: 14px;
    font-size: 11px;
}

/* —— Admin shell —— */
.admin-body {
    display: flex;
    min-height: 100vh;
    background: #6a6a6a url("data:image/svg+xml,%3Csvg width='4' height='4' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='2' height='2' fill='%235a5a5a'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%235a5a5a'/%3E%3C/svg%3E");
}
.admin-sidebar {
    width: 220px;
    background: #ece9d8;
    border-right: 2px outset #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 10;
}
.admin-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px 12px;
    background: linear-gradient(90deg, #0a246a, #3a6ea5);
    border-bottom: 2px inset #000040;
    text-decoration: none;
}
.admin-brand:hover { text-decoration: none; }
.admin-brand-logo {
    font-size: 26px;
    line-height: 1;
}
.admin-brand-badge {
    display: inline-block;
    background: #ffffcc;
    color: #003399;
    border: 2px outset #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 1px 8px;
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-style: normal;
}
.admin-nav {
    flex: 1;
    padding: 6px 0;
}
.admin-nav a {
    display: block;
    padding: 8px 12px;
    color: #000;
    font-weight: bold;
    font-size: 12px;
    text-decoration: none;
    border-left: 4px solid transparent;
}
.admin-nav a:hover {
    background: #cce0ff;
    color: #000;
}
.admin-nav a.active {
    background: #0a246a;
    color: #fff;
    border-left-color: #ffcc66;
}
.admin-nav a.active:hover {
    background: #0a246a;
    color: #fff;
}
.admin-sidebar-footer {
    padding: 10px;
    border-top: 2px inset #808080;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #dcd9c8;
}
.admin-sidebar-footer .btn-bevel {
    width: 100%;
    text-align: center;
    margin-right: 0;
    font-size: 11px;
    padding: 6px 8px;
    box-sizing: border-box;
}
.admin-main {
    margin-left: 220px;
    flex: 1;
    padding: 12px;
    width: calc(100% - 220px);
    max-width: none;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 10px;
}
.admin-header h1 {
    font-size: 13px;
    background: linear-gradient(90deg, #0a246a, #3a6ea5);
    color: #fff;
    padding: 8px 12px;
    border: 2px outset #fff;
    flex: 1;
    margin: 0;
    font-family: Tahoma, Verdana, Arial, sans-serif;
}
.admin-header .btn-bevel {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    margin-right: 0;
}
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}
.stat-box {
    background: #ece9d8;
    border: 2px outset #fff;
    padding: 12px 8px;
    text-align: center;
}
.stat-box .num {
    font-size: 22px;
    font-weight: bold;
    color: #0a246a;
    font-family: "Arial Black", Gadget, sans-serif;
}
.stat-box .lbl {
    font-size: 10px;
    color: #404040;
    margin-top: 4px;
    font-weight: bold;
}
.stat-box a { text-decoration: none; color: inherit; display: block; }
.stat-box a:hover .num { color: #c00; }

.admin-main .box {
    margin-bottom: 10px;
}
.admin-main .box-title {
    font-size: 12px;
    padding: 5px 8px;
}
.admin-main .box-body {
    padding: 10px;
}
.admin-main .data-table {
    font-size: 11px;
}
.admin-main .data-table th,
.admin-main .data-table td {
    padding: 5px 7px;
}
.admin-main .form-group label {
    font-size: 11px;
}
.admin-main .form-group input,
.admin-main .form-group select,
.admin-main .form-group textarea {
    font-size: 12px;
    padding: 5px 6px;
}

.inline-form { display: inline; }
.btn-sm { padding: 2px 6px; font-size: 10px; }
.table-wrap { overflow-x: auto; }
.pager { margin-top: 8px; text-align: center; }
.pager a, .pager span { margin: 0 4px; font-weight: bold; }
.db-cols { display: grid; grid-template-columns: 180px 1fr; gap: 8px; }
.db-tables a {
    display: block;
    padding: 5px 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 11px;
}
.db-tables a:hover, .db-tables a.active { background: #cce0ff; }
.code {
    font-family: "Courier New", monospace;
    font-size: 10px;
    background: #fff;
    padding: 1px 3px;
    border: 1px inset #808080;
}

@media (max-width: 700px) {
    .site-main { grid-template-columns: 1fr; }
    .lang-btn .lang-code { display: none; }
    .admin-sidebar { width: 100%; position: relative; height: auto; }
    .admin-main { margin-left: 0; width: 100%; }
    .form-row, .db-cols { grid-template-columns: 1fr; }
    .admin-login-banner .logo-text { font-size: 32px; }
}

/* Platine — boîtier CD jewel case réaliste */
.jewel-wrap {
    display: inline-block;
    text-decoration: none;
    color: #000;
    vertical-align: top;
    flex-shrink: 0;
}
.jewel-wrap:hover { color: #000; }

.jewel-case {
    position: relative;
    transform-style: preserve-3d;
    perspective: 600px;
    transition: transform 0.25s ease;
}
.jewel-wrap:hover .jewel-case {
    transform: rotateY(-12deg) rotateX(3deg);
}

.jewel-sm .jewel-case { width: 52px; height: 52px; }
.jewel-md .jewel-case { width: 90px; height: 90px; }
.jewel-lg .jewel-case { width: 140px; height: 140px; }

.jewel-spine {
    position: absolute;
    left: 0;
    top: 8%;
    width: 14%;
    height: 84%;
    background: linear-gradient(90deg, #555 0%, #999 40%, #bbb 60%, #888 100%);
    border: 1px solid #444;
    border-radius: 1px 0 0 1px;
    transform: rotateY(-25deg) translateZ(-2px);
    z-index: 1;
}

.jewel-back {
    position: absolute;
    left: 10%;
    top: 5%;
    width: 82%;
    height: 90%;
    background: #1a1a1a;
    border: 1px solid #333;
    z-index: 2;
}

.jewel-booklet {
    position: absolute;
    left: 12%;
    top: 7%;
    width: 76%;
    height: 82%;
    background: #2a2a4a center/cover no-repeat;
    border: 1px solid #111;
    z-index: 3;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.jewel-tray {
    position: absolute;
    left: 14%;
    top: 10%;
    width: 72%;
    height: 76%;
    background: #111;
    border: 1px solid #333;
    border-radius: 2px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jewel-hub {
    position: absolute;
    width: 18%;
    height: 18%;
    background: radial-gradient(circle, #333 30%, #111 70%);
    border-radius: 50%;
    z-index: 6;
    border: 1px solid #444;
}

.jewel-disc {
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #c0c0c0, #e8e8e8, #a0a0a0, #d0d0d0,
        #b0b0b0, #e0e0e0, #909090, #c8c8c8
    );
    z-index: 5;
    box-shadow: 0 1px 4px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.jewel-disc-shine {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, transparent 40%, transparent 60%, rgba(255,255,255,0.2) 100%);
    z-index: 7;
}

.jewel-disc-label {
    width: 35%;
    height: 35%;
    border-radius: 50%;
    background: center/cover no-repeat;
    border: 1px solid rgba(0,0,0,0.3);
    z-index: 8;
}

.jewel-plastic {
    position: absolute;
    left: 8%;
    top: 3%;
    width: 86%;
    height: 94%;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(200,220,255,0.08) 50%, rgba(255,255,255,0.12) 100%);
    border: 1px solid rgba(255,255,255,0.3);
    z-index: 10;
    pointer-events: none;
    box-shadow: inset 0 0 8px rgba(255,255,255,0.2), 2px 2px 6px rgba(0,0,0,0.3);
}

.jewel-plastic-shine {
    position: absolute;
    top: 5%;
    left: 10%;
    width: 30%;
    height: 60%;
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
    transform: skewX(-10deg);
}

.jewel-label {
    font-size: 9px;
    font-weight: bold;
    text-align: center;
    margin-top: 4px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jewel-lg + .jewel-label, .jewel-wrap.jewel-lg .jewel-label { max-width: 150px; font-size: 10px; }

/* ancien crystal-case - gardé pour compat */
.crystal-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

#graph-container {
    width: 100%;
    height: 600px;
    background: #0d1117;
    border: 2px inset #fff;
    overflow: hidden;
    position: relative;
}
.graph-node-playlist { fill: #3a6ea5; }
.graph-node-track { fill: #ffcc66; }

.context-menu {
    position: fixed;
    background: #ece9d8;
    border: 2px outset #fff;
    z-index: 1000;
    min-width: 160px;
    display: none;
}
.context-menu button {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    padding: 5px 10px;
    text-align: left;
    font-size: 11px;
    cursor: pointer;
}
.context-menu button:hover { background: #cce0ff; }

.sync-progress {
    background: #fff;
    border: 2px inset #fff;
    height: 16px;
    margin: 8px 0;
}
.sync-progress-bar {
    background: #003399;
    height: 100%;
    width: 0%;
    transition: width 0.3s;
}

.youtube-embed {
    width: 100%;
    aspect-ratio: 16/9;
    border: 2px inset #fff;
}
