/* ============================================================
   rexeldev-design.css
   Design system rexel.dev BS5 — Argon-base + emprunts Material + palette Rexel
   Chargé après style.css dans includes/header.php pour permettre l'override.
   La sidebar et le layout main-panel restent gérés par style.css.
   ============================================================ */

:root {
    --rxl-navy: #0A287D;
    --rxl-navy-dark: #10093C;
    --rxl-cyan: #00B3FF;
    --rxl-cyan-soft: #00C6FA;
    --rxl-light-blue: #EDF6FF;
    --rxl-light-blue-d: #F7FCFF;
    --rxl-success: #009F8C;
    --rxl-orange: #FF9D00;
    --rxl-yellow: #FFDD00;
    --rxl-purple: #75007E;
    --rxl-mauve: #A75CCC;

    --rxl-grey-50: #F7FAFC;
    --rxl-grey-100: #EDF2F7;
    --rxl-grey-200: #E2E8F0;
    --rxl-grey-300: #CBD5E0;
    --rxl-grey-400: #A0AEC0;
    --rxl-grey-500: #718096;
    --rxl-grey-600: #4A5568;
    --rxl-grey-700: #2D3748;
    --rxl-grey-800: #1A202C;

    --rxl-shadow-sm: 0 1px 3px 0 rgba(10, 40, 125, 0.06);
    --rxl-shadow-md: 0 4px 12px 0 rgba(10, 40, 125, 0.08);
    --rxl-shadow-lg: 0 12px 28px -4px rgba(10, 40, 125, 0.12);
    --rxl-shadow-cyan: 0 6px 20px -6px rgba(0, 198, 250, 0.45);
    --rxl-shadow-navy: 0 8px 24px -4px rgba(10, 40, 125, 0.35);
    --rxl-shadow-orange: 0 6px 20px -6px rgba(255, 157, 0, 0.45);
    --rxl-shadow-purple: 0 6px 20px -6px rgba(167, 92, 204, 0.45);
    --rxl-shadow-success: 0 6px 20px -6px rgba(0, 159, 140, 0.45);
    --rxl-radius: 0.75rem;
    --rxl-radius-lg: 1rem;
    --rxl-radius-asym: 0 24px 0 24px;
    --rxl-transition: all 0.2s ease;
}

/* ============================================================
   MATERIAL SYMBOLS — protection cross-browser (Chrome Windows bug)
   Le CSS de rexel.fr / BS peut écraser la font-family sur les <span>
   à l'intérieur de <button>, ce qui empêche les glyphes de se rendre
   (le texte "arrow_upward" apparaît à la place de l'icône).
   On force ici les valeurs essentielles avec !important.
   ============================================================ */
.material-symbols-outlined,
i.material-symbols-outlined,
span.material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal !important;
    font-style: normal !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap !important;
    word-wrap: normal !important;
    direction: ltr !important;
    -webkit-font-feature-settings: 'liga' !important;
    font-feature-settings: 'liga' !important;
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Boutons BS contenant uniquement une icône Material : forcer le centrage flex
   pour neutraliser le décalage baseline (line-height 1.5 de .btn vs 1 de l'icône) */
.rxl-modal .btn .material-symbols-outlined,
.rxl-modal .btn-move .material-symbols-outlined,
.rxl-modal .btn-delete-item .material-symbols-outlined {
    vertical-align: middle;
}
.rxl-modal .btn-move,
.rxl-modal .btn-delete-item,
.rxl-modal .btn-sm.btn-secondary,
.rxl-modal .btn-sm.btn-danger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.rxl-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.rxl-page-head .rxl-breadcrumbs {
    color: var(--rxl-grey-500);
    font-size: 0.85rem;
}
.rxl-page-head .rxl-breadcrumbs span { margin: 0 0.25rem; }
.rxl-page-head h1 {
    margin: 0.25rem 0 0;
    color: var(--rxl-navy);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.rxl-page-head .rxl-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ============================================================
   CARDS
   ============================================================ */
.rxl-card {
    background: white;
    border-radius: var(--rxl-radius);
    box-shadow: var(--rxl-shadow-md);
    border: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.rxl-card-asym { border-radius: var(--rxl-radius-asym); }
.rxl-card .rxl-card-body {
    padding: 1.25rem 1.5rem;
    flex: 1 1 auto;
}
.rxl-card-title {
    color: var(--rxl-navy);
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.rxl-card-title .material-symbols-outlined { font-size: 1.2rem; }

/* ============================================================
   METRIC CARDS (Material-inspired raised icons)
   ============================================================ */
.rxl-metric {
    background: white;
    border-radius: var(--rxl-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--rxl-shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.rxl-metric .rxl-metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: var(--rxl-shadow-cyan);
}
.rxl-metric .rxl-metric-icon .material-symbols-outlined { font-size: 28px; }
.rxl-metric.--navy .rxl-metric-icon { background: linear-gradient(135deg, var(--rxl-navy) 0%, var(--rxl-cyan) 100%); box-shadow: var(--rxl-shadow-navy); }
.rxl-metric.--cyan .rxl-metric-icon { background: linear-gradient(135deg, var(--rxl-cyan-soft) 0%, var(--rxl-cyan) 100%); }
.rxl-metric.--orange .rxl-metric-icon { background: linear-gradient(135deg, var(--rxl-orange) 0%, var(--rxl-yellow) 100%); box-shadow: var(--rxl-shadow-orange); }
.rxl-metric.--purple .rxl-metric-icon { background: linear-gradient(135deg, var(--rxl-purple) 0%, var(--rxl-mauve) 100%); box-shadow: var(--rxl-shadow-purple); }
.rxl-metric.--success .rxl-metric-icon { background: linear-gradient(135deg, var(--rxl-success) 0%, var(--rxl-cyan-soft) 100%); box-shadow: var(--rxl-shadow-success); }
.rxl-metric .rxl-metric-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--rxl-grey-500);
    letter-spacing: 0.04em;
}
.rxl-metric .rxl-metric-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--rxl-navy);
    margin: 0.1rem 0 0.2rem;
    line-height: 1.1;
}
.rxl-metric .rxl-metric-delta { font-size: 0.78rem; color: var(--rxl-grey-500); }
.rxl-metric .rxl-metric-delta.up { color: var(--rxl-success); }
.rxl-metric .rxl-metric-delta.down { color: #e53e3e; }
.rxl-metric .rxl-metric-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: var(--rxl-transition);
}
.rxl-metric .rxl-metric-link:hover {
    color: var(--rxl-cyan);
}

/* ============================================================
   ITEM LIST (5 dernières gammes / marques)
   ============================================================ */
.rxl-item-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.rxl-item-row {
    display: grid;
    grid-template-columns: 100px 140px 1fr 130px 110px;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: white;
    border-radius: 0.6rem;
    border: 1px solid var(--rxl-grey-100);
    transition: var(--rxl-transition);
}
.rxl-item-row:hover {
    box-shadow: var(--rxl-shadow-md);
    border-color: var(--rxl-grey-200);
}
.rxl-item-row.--no-fab {
    grid-template-columns: 100px 1fr 130px 110px;
}
.rxl-pill-date {
    background: linear-gradient(135deg, var(--rxl-cyan-soft), var(--rxl-cyan));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}
.rxl-pill-date.--old {
    background: linear-gradient(135deg, var(--rxl-navy-dark), var(--rxl-navy));
}
.rxl-item-row .rxl-fab {
    color: var(--rxl-grey-500);
    font-weight: 500;
    font-size: 0.9rem;
}
.rxl-item-row .rxl-titre {
    color: var(--rxl-navy);
    font-weight: 600;
}
.rxl-item-row .rxl-auteur {
    color: var(--rxl-grey-600);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.rxl-item-row .rxl-auteur .material-symbols-outlined {
    font-size: 1.05rem;
    color: var(--rxl-grey-400);
}
.rxl-item-row .rxl-row-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
}

/* row-actions générique (utilisable hors .rxl-item-row : admin, etc.) */
.rxl-row-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
}

/* Empty list state */
.rxl-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--rxl-grey-500);
}
.rxl-empty .material-symbols-outlined {
    font-size: 3rem;
    color: var(--rxl-grey-300);
    display: block;
    margin: 0 auto 0.5rem;
}

/* Variante 6 colonnes (gammes : date / fab / titre / auteur / actions) */
.rxl-item-row.--cols-gamme {
    grid-template-columns: 110px 130px minmax(0, 1fr) 140px 280px;
    gap: 1rem;
}
/* Variante marques (date / logo / titre / auteur / actions) */
.rxl-item-row.--cols-marque {
    grid-template-columns: 110px 60px minmax(0, 1fr) 140px 280px;
    gap: 1rem;
}
.rxl-item-row .rxl-logo-thumb {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--rxl-grey-100);
    border-radius: 0.5rem;
    overflow: hidden;
}
.rxl-item-row .rxl-logo-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.rxl-item-row .rxl-logo-thumb .material-symbols-outlined {
    font-size: 1.6rem;
    color: var(--rxl-grey-300);
}
.rxl-item-row .rxl-titre-block { min-width: 0; }
.rxl-item-row .rxl-titre-block .rxl-url {
    display: block;
    font-size: 0.78rem;
    color: var(--rxl-grey-500);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 0.15rem;
}
.rxl-item-row .rxl-titre-block .rxl-url:hover { color: var(--rxl-cyan); }

/* ============================================================
   FILTERS BAR (list pages)
   ============================================================ */
.rxl-filters {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr auto;
    gap: 0.85rem;
    align-items: start;
}
.rxl-filters.--3cols { grid-template-columns: 1.6fr 1fr auto; }
.rxl-filters.--4cols { grid-template-columns: 1.6fr 1fr 1fr auto; }
.rxl-filters .rxl-float { margin-bottom: 0; }
.rxl-filters-reset {
    align-self: stretch;
    display: flex;
    align-items: center;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.rxl-pagination {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    margin-top: 1.5rem;
    list-style: none;
    padding: 0;
}
.rxl-pagination a,
.rxl-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    border-radius: 0.5rem;
    background: white;
    border: 1px solid var(--rxl-grey-200);
    color: var(--rxl-navy);
    font-weight: 500;
    text-decoration: none;
    transition: var(--rxl-transition);
    font-size: 0.88rem;
}
.rxl-pagination a:hover {
    border-color: var(--rxl-cyan);
    background: var(--rxl-light-blue);
}
.rxl-pagination .--active {
    background: linear-gradient(135deg, var(--rxl-navy), var(--rxl-cyan));
    color: white;
    border: 0;
}
.rxl-pagination .--ellipsis {
    border: 0;
    background: transparent;
    color: var(--rxl-muted, #888);
    cursor: default;
    padding: 0 4px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.rxl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: 0.5rem;
    border: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--rxl-transition);
    text-decoration: none;
    line-height: 1.2;
}
.rxl-btn .material-symbols-outlined { font-size: 1.05rem; }
.rxl-btn-primary {
    background: linear-gradient(135deg, var(--rxl-navy) 0%, var(--rxl-cyan) 100%);
    color: white;
    box-shadow: var(--rxl-shadow-cyan);
}
.rxl-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--rxl-shadow-navy);
    color: white;
}
.rxl-btn-success {
    background: linear-gradient(135deg, var(--rxl-cyan-soft) 0%, var(--rxl-success) 100%);
    color: white;
    box-shadow: var(--rxl-shadow-success);
}
.rxl-btn-success:hover { transform: translateY(-1px); color: white; }
.rxl-btn-danger { background: #e53e3e; color: white; }
.rxl-btn-danger:hover { background: #c53030; color: white; }
.rxl-btn-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: 0.5rem;
    background: var(--rxl-light-blue) !important;
    color: var(--rxl-navy) !important;
    border: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: var(--rxl-transition);
    line-height: 1 !important;
}
.rxl-btn-icon:hover { background: var(--rxl-cyan) !important; color: white !important; }
/* Variantes colorées : couleur révélée au survol uniquement (default = bleu clair) */
.rxl-btn-icon.--info:hover    { background: var(--rxl-cyan) !important; color: white !important; }
.rxl-btn-icon.--success:hover { background: var(--rxl-success) !important; color: white !important; }
.rxl-btn-icon.--warning:hover { background: var(--rxl-orange, #FF9D00) !important; color: white !important; }
.rxl-btn-icon.--grey:hover    { background: var(--rxl-grey-500) !important; color: white !important; }
.rxl-btn-icon.--danger-bg:hover,
.rxl-btn-icon.--danger:hover  { background: #e53e3e !important; color: white !important; }
.rxl-btn-icon.--disabled,
.rxl-btn-icon.--disabled:hover {
    background: var(--rxl-grey-100) !important;
    color: var(--rxl-grey-400) !important;
    cursor: not-allowed;
}
.rxl-btn-icon .material-symbols-outlined {
    font-size: 20px !important;
    line-height: 1 !important;
    width: 20px !important;
    height: 20px !important;
    overflow: hidden;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* Lettre stylisée (ex: "A" pour Amplience) — alternative quand pas d'icône adaptée */
.rxl-btn-icon .rxl-icon-letter {
    font-family: 'Roboto', system-ui, sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    letter-spacing: 0;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.rxl-btn-ghost {
    background: transparent;
    color: var(--rxl-navy);
    border: 1px solid var(--rxl-grey-200);
}
.rxl-btn-ghost:hover {
    background: var(--rxl-light-blue);
    border-color: var(--rxl-cyan);
    color: var(--rxl-navy);
}
/* Bouton ghost adapté aux fonds navy (panneau infos) */
.rxl-btn-on-navy {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.25);
}
.rxl-btn-on-navy:hover {
    background: rgba(255,255,255,0.2);
    border-color: var(--rxl-cyan);
    color: white;
}
.rxl-btn-sm { padding: 0.35rem 0.7rem; font-size: 0.82rem; }
.rxl-btn-lg { padding: 0.75rem 1.4rem; font-size: 1rem; }
.rxl-btn-block { width: 100%; }
.rxl-btn-warning {
    background: linear-gradient(135deg, var(--rxl-orange, #FF9D00), #FFBA40);
    color: white;
}
.rxl-btn-warning:hover { transform: translateY(-1px); color: white; filter: brightness(1.05); }

/* ============================================================
   ALERTE DOUBLON (sous champ "Nom de la marque/gamme")
   ============================================================ */
.rxl-duplicate-alert {
    margin-top: 0.6rem;
    padding: 0.75rem 0.85rem;
    background: rgba(255, 157, 0, 0.18);
    border: 1px solid rgba(255, 157, 0, 0.55);
    border-radius: 0 12px 0 12px;
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.35;
}
.rxl-duplicate-alert strong {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #FFDD00;
    font-weight: 600;
}
.rxl-duplicate-alert strong .material-symbols-outlined { font-size: 1.1rem; }
.rxl-duplicate-alert .rxl-duplicate-name {
    margin: 0.3rem 0 0.6rem;
    color: rgba(255,255,255,0.85);
    font-style: italic;
}

/* ============================================================
   SECTION HEADING
   ============================================================ */
.rxl-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.rxl-section-head h2 {
    color: var(--rxl-navy);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}
.rxl-section-head .light { color: var(--rxl-grey-500); font-weight: 400; }

/* ============================================================
   MODAL — Material-inspired colored header
   ============================================================ */
.rxl-modal .modal-content {
    border-radius: var(--rxl-radius);
    border: 0;
    overflow: hidden;
    box-shadow: var(--rxl-shadow-lg);
}
.rxl-modal .modal-header {
    background: linear-gradient(135deg, var(--rxl-navy) 0%, var(--rxl-cyan) 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    border: 0;
    align-items: flex-start;
}
.rxl-modal .modal-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}
.rxl-modal .modal-title .material-symbols-outlined { font-size: 1.3rem; }
.rxl-modal .modal-header .modal-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    opacity: 0.85;
    font-weight: 400;
    color: white;
}
.rxl-modal .modal-header .btn-close {
    background-color: rgba(255,255,255,0.15);
    background-image: none;
    border: 0;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}
.rxl-modal .modal-header .btn-close::before {
    content: '×';
    color: white;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1;
}
.rxl-modal .modal-header .btn-close:hover {
    background-color: rgba(255,255,255,0.25);
}
.rxl-modal .modal-body { padding: 1.5rem; }
/* Toutes les zones de texte multiligne dans les modals : hauteur min 150px */
.rxl-modal textarea,
.rxl-modal .form-control[rows] { min-height: 150px !important; }
.rxl-modal .modal-footer {
    padding: 1rem 1.5rem;
    background: var(--rxl-grey-50);
    border-top: 1px solid var(--rxl-grey-200);
    gap: 0.5rem;
}

/* ============================================================
   FLOATING LABEL FORM (Material-inspired)
   ============================================================ */
.rxl-float {
    position: relative;
    margin-bottom: 1.5rem;
}
.rxl-float input,
.rxl-float textarea,
.rxl-float select {
    width: 100%;
    padding: 1.1rem 0.9rem 0.4rem;
    border: 1px solid var(--rxl-grey-300);
    border-radius: 0.5rem;
    background: white;
    font-size: 0.95rem;
    color: var(--rxl-grey-700);
    box-sizing: border-box;
    transition: var(--rxl-transition);
    font-family: inherit;
    line-height: 1.4;
}
/* Select : flèche custom + plus de place à droite */
.rxl-float select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.2rem;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310093C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 16px 16px;
    cursor: pointer;
}
.rxl-float textarea {
    min-height: 150px;
    resize: vertical;
}
.rxl-float input:focus,
.rxl-float textarea:focus,
.rxl-float select:focus {
    outline: none;
    border-color: var(--rxl-cyan);
    box-shadow: 0 0 0 3px rgba(0,198,250,0.15);
}
.rxl-float label {
    position: absolute;
    left: 0.95rem;
    top: 0.95rem;
    color: var(--rxl-grey-500);
    font-size: 0.95rem;
    pointer-events: none;
    transition: var(--rxl-transition);
    background: white;
    padding: 0 0.25rem;
    font-weight: 400;
}
.rxl-float input:focus + label,
.rxl-float input:not(:placeholder-shown) + label,
.rxl-float textarea:focus + label,
.rxl-float textarea:not(:placeholder-shown) + label,
.rxl-float select + label {
    top: -0.5rem;
    left: 0.7rem;
    font-size: 0.78rem;
    color: var(--rxl-cyan);
    font-weight: 500;
}
.rxl-float .rxl-help {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: var(--rxl-grey-500);
}

/* ============================================================
   MODAL ITEM (carte item dans une modale : lien, cat, gamme…)
   ============================================================ */
.rxl-modal-item {
    position: relative;
    background: white;
    border: 1px solid var(--rxl-grey-200);
    border-radius: 0 14px 0 14px;
    padding: 1rem 1rem 0.5rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--rxl-shadow-sm);
}
.rxl-modal-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    color: var(--rxl-navy);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.rxl-modal-item-remove {
    background: transparent;
    border: 0;
    color: var(--rxl-grey-500);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--rxl-transition);
}
.rxl-modal-item-remove:hover {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}
.rxl-modal-item-remove .material-symbols-outlined { font-size: 1.1rem; }

/* Section avec toggle (case à cocher en en-tête) — outils */
.rxl-toggle-section {
    background: white;
    border: 1px solid var(--rxl-grey-200);
    border-radius: 0 14px 0 14px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--rxl-shadow-sm);
}
.rxl-toggle-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
}
.rxl-toggle-head input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--rxl-cyan);
    cursor: pointer;
}
.rxl-toggle-head .rxl-toggle-label {
    font-weight: 600;
    color: var(--rxl-navy);
    font-size: 0.95rem;
}
.rxl-toggle-body {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--rxl-grey-200);
}

/* Checkbox simple (intro lire-suite, video afficher…) */
.rxl-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    cursor: pointer;
    user-select: none;
    color: var(--rxl-grey-700);
    font-size: 0.92rem;
}
.rxl-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--rxl-cyan);
    cursor: pointer;
}

/* Ligne 2 colonnes pour input-group (titre + url) */
.rxl-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr 36px;
    gap: 0.6rem;
    align-items: start;
    margin-bottom: 0.5rem;
}
.rxl-row2 .rxl-float { margin-bottom: 0; }
.rxl-row2 .rxl-modal-item-remove { margin-top: 0.5rem; }

/* Bouton "+ Ajouter" dans modal */
.rxl-btn-add {
    background: rgba(0,198,250,0.1);
    color: var(--rxl-cyan);
    border: 1px dashed var(--rxl-cyan);
    border-radius: 0.5rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--rxl-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: inherit;
}
.rxl-btn-add:hover {
    background: var(--rxl-cyan);
    color: white;
}
.rxl-btn-add .material-symbols-outlined { font-size: 1.1rem; }

/* Bouton danger (suppression bloc entier) */
.rxl-btn-danger-outline {
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 0.5rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--rxl-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: inherit;
}
.rxl-btn-danger-outline:hover {
    background: #dc3545;
    color: white;
}
.rxl-btn-danger-outline .material-symbols-outlined { font-size: 1.1rem; }

/* ============================================================
   INFO PANEL NAVY (panel sticky add-gamme/edit-gamme)
   ============================================================ */
.rxl-info-navy {
    background: linear-gradient(160deg, var(--rxl-navy-dark) 0%, var(--rxl-navy) 100%);
    color: white;
    border-radius: var(--rxl-radius);
    padding: 1.5rem;
    box-shadow: var(--rxl-shadow-navy);
}
.rxl-info-navy .rxl-info-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.rxl-info-navy .rxl-info-title .material-symbols-outlined { font-size: 1.2rem; }
.rxl-info-navy .rxl-field { margin-bottom: 1rem; }
.rxl-info-navy .rxl-field:last-child { margin-bottom: 0; }
.rxl-info-navy .rxl-field label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.65);
    margin-bottom: 0.3rem;
}
.rxl-info-navy .rxl-field input,
.rxl-info-navy .rxl-field textarea,
.rxl-info-navy .rxl-field select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    border-radius: 0.4rem;
    color: white;
    font-size: 0.92rem;
    box-sizing: border-box;
    font-family: inherit;
}
.rxl-info-navy .rxl-field input::placeholder,
.rxl-info-navy .rxl-field textarea::placeholder { color: rgba(255,255,255,0.45); }
.rxl-info-navy .rxl-field input:focus,
.rxl-info-navy .rxl-field textarea:focus,
.rxl-info-navy .rxl-field select:focus {
    outline: none;
    border-color: var(--rxl-cyan);
    background: rgba(255,255,255,0.15);
}
.rxl-info-navy .rxl-field-static {
    font-size: 0.92rem;
    color: rgba(255,255,255,0.95);
}
.rxl-info-navy .rxl-divider {
    border-top: 1px solid rgba(255,255,255,0.15);
    margin: 1.25rem 0;
}

/* ============================================================
   EDIT CHIPS (preview overlay)
   ============================================================ */
.rxl-edit-chip {
    position: absolute;
    background: white;
    border-radius: 999px;
    padding: 0.35rem 0.8rem 0.35rem 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: var(--rxl-navy);
    box-shadow: var(--rxl-shadow-md);
    cursor: pointer;
    border: 0;
    transition: var(--rxl-transition);
    z-index: 5;
    font-family: inherit;
    text-decoration: none;
}
.rxl-edit-chip:hover {
    background: var(--rxl-navy);
    color: white;
}
.rxl-edit-chip .material-symbols-outlined { font-size: 1.05rem; }

/* ============================================================
   PREVIEW STAGE
   ============================================================ */
.rxl-preview-stage {
    background: var(--rxl-grey-50);
    border-radius: var(--rxl-radius);
    padding: 1.5rem;
    min-height: 600px;
    position: relative;
}

/* ============================================================
   GRID HELPERS
   ============================================================ */
.rxl-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.rxl-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.rxl-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 992px) {
    .rxl-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .rxl-grid-4, .rxl-grid-3, .rxl-grid-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   CHART WRAP
   ============================================================ */
.rxl-chart-wrap {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.rxl-chart-wrap .rxl-chart-title {
    color: var(--rxl-navy);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.rxl-chart-wrap canvas { max-width: 220px; margin: 0 auto; }
.rxl-chart-wrap .rxl-legend {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    text-align: left;
}
.rxl-chart-wrap .rxl-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.rxl-chart-wrap .rxl-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}
.rxl-chart-wrap .rxl-legend-count {
    margin-left: auto;
    color: var(--rxl-grey-500);
}

/* ============================================================
   STATS GRID
   ============================================================ */
.rxl-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.85rem;
}
.rxl-stat-tile {
    background: var(--rxl-light-blue);
    padding: 0.6rem 0.75rem;
    border-radius: 0.4rem;
}
.rxl-stat-tile-value {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--rxl-navy);
    line-height: 1.1;
}
.rxl-stat-tile-label {
    color: var(--rxl-grey-500);
    font-size: 0.78rem;
}
.rxl-stat-tile.--full { grid-column: span 2; }
.rxl-stat-tile-info {
    color: var(--rxl-navy);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ============================================================
   MISC
   ============================================================ */
.rxl-divider {
    border-top: 1px solid var(--rxl-grey-200);
    margin: 1rem 0;
}
.rxl-txt-muted {
    color: var(--rxl-grey-500);
    font-size: 0.85rem;
}

/* ============================================================
   PREVIEW EDITABLE (markup généré par gamme-generator.js / marque-generator.js)
   Override le rendu pour matcher le design system rexel.dev
   ============================================================ */

/* Wrapper preview : fond gris clair, padding, comme la card preview-stage du mockup */
#preview-gamme,
#preview-marque {
    background: var(--rxl-grey-50);
    border-radius: var(--rxl-radius);
    padding: 1.5rem;
    min-height: 600px;
}

/* Boutons d'édition transformés en chips modernes (gamme + marque) */
.template-editable .btn-edit,
.template-editable .btn-edit-category-block,
.template-editable .btn-edit-gamme-block,
#mkt-gamme .btn-edit,
#mkt-page .btn-edit,
#mkt-page .btn-edit-category-block,
#mkt-page .btn-edit-gamme-block {
    position: absolute;
    background: white !important;
    border-radius: 999px !important;
    padding: 0.4rem 0.7rem !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    color: var(--rxl-navy) !important;
    box-shadow: var(--rxl-shadow-md) !important;
    border: 0 !important;
    transition: var(--rxl-transition) !important;
    z-index: 5;
    font-family: inherit !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    cursor: pointer;
    line-height: 1;
}
.template-editable .btn-edit:hover,
.template-editable .btn-edit-category-block:hover,
.template-editable .btn-edit-gamme-block:hover,
#mkt-gamme .btn-edit:hover,
#mkt-page .btn-edit:hover,
#mkt-page .btn-edit-category-block:hover,
#mkt-page .btn-edit-gamme-block:hover {
    background: var(--rxl-navy) !important;
    color: white !important;
    transform: scale(1.05);
}
.template-editable .btn-edit .material-symbols-outlined,
.template-editable .btn-edit-category-block .material-symbols-outlined,
.template-editable .btn-edit-gamme-block .material-symbols-outlined,
#mkt-gamme .btn-edit .material-symbols-outlined,
#mkt-page .btn-edit .material-symbols-outlined,
#mkt-page .btn-edit-category-block .material-symbols-outlined,
#mkt-page .btn-edit-gamme-block .material-symbols-outlined {
    font-size: 1.05rem !important;
    color: inherit !important;
    margin: 0 !important;
}

/* Cards produits / argumentaires dans la preview : ombres et bordures harmonisées */
#preview-gamme .card,
#preview-marque .card {
    box-shadow: var(--rxl-shadow-sm);
}

/* ============================================================
   SIDEBAR USER ZONE (override des styles globaux .sidebar .user)
   ============================================================ */
.sidebar .user.rxl-sidebar-user {
    padding: 5px 15px !important;
}
.sidebar .user.rxl-sidebar-user .rxl-sidebar-user-inner {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 11px;
}
.sidebar .user.rxl-sidebar-user .rxl-sidebar-user-icon {
    display: inline-flex !important;
    padding: 0 !important;
    align-items: center;
    line-height: 1;
}
.sidebar .user.rxl-sidebar-user .rxl-sidebar-user-name {
    display: inline !important;
    padding: 0 !important;
    color: white;
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    line-height: 1;
}

/* Sub-label "(béta)" sur les entrées sidebar */
.sidebar .rxl-sidebar-beta {
    opacity: 0.7;
    font-weight: 400;
    font-size: 70%;
    letter-spacing: 0.05em;
}

/* ============================================================
   ADMIN — ligne utilisateur + badges
   ============================================================ */
#mkt-page .rxl-admin-row {
    display: grid;
    grid-template-columns: 110px 1fr 1.4fr 100px 100px 220px;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: white;
    border-radius: 0.6rem;
    border: 1px solid var(--rxl-grey-100);
    transition: var(--rxl-transition);
}
#mkt-page .rxl-admin-row:hover {
    box-shadow: var(--rxl-shadow-md);
    border-color: var(--rxl-grey-200);
}
#mkt-page .rxl-admin-row .rxl-user-name {
    color: var(--rxl-navy);
    font-weight: 600;
}
#mkt-page .rxl-admin-row .rxl-user-email {
    color: var(--rxl-grey-600);
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badges génériques (réutilisables : rôle, statut, état) */
#mkt-page .rxl-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}
#mkt-page .rxl-badge .material-symbols-outlined { font-size: 0.95rem; }
#mkt-page .rxl-badge.--admin { background: rgba(255,157,0,0.15); color: var(--rxl-orange, #FF9D00); }
#mkt-page .rxl-badge.--user  { background: rgba(0,198,250,0.15); color: var(--rxl-cyan); }
#mkt-page .rxl-badge.--actif { background: rgba(0,159,140,0.15); color: var(--rxl-success); }
#mkt-page .rxl-badge.--off   { background: var(--rxl-grey-100); color: var(--rxl-grey-500); }
