/* ============================================================
   ADMIN - Styles spécifiques
   ============================================================ */

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
}

/* ---- Navigation latérale ---- */
.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.5rem;
    background: white;
    border-radius: var(--radius-md);
    border: 0.5px solid var(--gray-200);
    height: fit-content;
    position: sticky;
    top: 1rem;
}
.nav-btn {
    text-align: left;
    background: transparent;
    border: none;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.15s;
}
.nav-btn:hover { background: var(--gray-50); color: var(--anthracite); }
.nav-btn.active {
    background: var(--blue);
    color: white;
    font-weight: 500;
}

/* ---- Contenu tab ---- */
.tab-content {
    display: none;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 0.5px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}
.tab-content.active { display: block; }

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 0.5px solid var(--gray-100);
}
.tab-header h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    color: var(--anthracite);
}
.tab-header-controls { display: flex; gap: 8px; align-items: flex-end; }

/* ---- Grille 2D pour l'édition prix ---- */
.grid-editor {
    overflow-x: auto;
    margin-bottom: 1rem;
}
.grid-editor table {
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    min-width: 100%;
}
.grid-editor th,
.grid-editor td {
    padding: 0;
    border: 0.5px solid var(--gray-200);
    text-align: center;
    font-size: 13px;
    background: white;
}
.grid-editor th {
    background: var(--gray-50);
    font-weight: 500;
    padding: 8px 12px;
    color: var(--gray-600);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
    position: sticky;
    top: 0;
}
.grid-editor th.row-header {
    font-family: var(--font-mono);
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    color: var(--anthracite);
    background: var(--gray-50);
    padding: 8px 16px;
    min-width: 100px;
}
.grid-editor input.grid-cell {
    width: 100%;
    border: none;
    padding: 10px 8px;
    text-align: center;
    font-size: 13px;
    font-family: var(--font-mono);
    background: transparent;
    color: var(--anthracite);
    border-radius: 0;
}
.grid-editor input.grid-cell:focus {
    outline: 2px solid var(--blue);
    outline-offset: -2px;
    background: var(--blue-light);
    box-shadow: none;
}
.grid-editor input.grid-cell.modified {
    background: #FEF9E7;
}

/* Contrôles autour de la grille */
.grid-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
}
.grid-controls .spacer { flex: 1; }

/* ---- Axe fixe (brochures 3D) ---- */
.axis-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--blue-light);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 13px;
    color: var(--blue-dark);
}
.axis-selector label {
    margin: 0;
    text-transform: none;
    font-size: 13px;
    color: var(--blue-dark);
    font-weight: 500;
}
.axis-selector select {
    width: auto;
    min-width: 120px;
    padding: 5px 10px;
}

/* ---- Badges/chips ---- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 12px;
    font-family: var(--font-mono);
}
.chip-delete {
    background: transparent;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
}
.chip-delete:hover { color: var(--red); }

/* ---- Dimensions list ---- */
.dim-row {
    display: grid;
    grid-template-columns: 1fr 1fr 140px 100px auto;
    gap: 10px;
    padding: 10px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    align-items: end;
}
.dim-row .form-group { margin: 0; }

.toggle-actif {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
}
