/* ==========================================================================
   DIAMOND LUXURY — Admin Styles (complet + responsive)
   ========================================================================== */

:root {
  --cream: #fbf7f0; --cream-2: #f3ecdf; --paper: #ffffff; --ink: #1a1815;
  --ink-2: #2a2620; --muted: #7a7268; --muted-2: #a8a095;
  --gold: #c9a227; --gold-deep: #8a6a1f; --gold-soft: #e8cd82;
  --line: #e8e0d2; --line-2: #f0e9dc; --red: #b33a3a; --green: #2f6b4a;
  --blue: #2f5d8a;
  --shadow: 0 1px 2px rgba(26,24,21,.04), 0 8px 24px rgba(26,24,21,.06);
  --shadow-lg: 0 2px 4px rgba(26,24,21,.05), 0 20px 50px rgba(26,24,21,.10);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: 'Jost', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --sidebar-w: 248px;
  --topbar-h: 60px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; margin: 0; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* Icônes */
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 26px; height: 26px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; border: 1px solid transparent; cursor: pointer; transition: all .2s ease; font-weight: 500; font-family: inherit; text-align: center; line-height: 1.3; }
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.btn-dark { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn-dark:hover { background: var(--ink-2); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-deep); }
.btn-danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 9px 14px; font-size: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.icon-btn { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; transition: all .18s; padding: 0; }
.icon-btn:hover { background: var(--cream-2); color: var(--gold-deep); border-color: var(--gold); }
.eye-btn { background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; display: flex; }

/* ------------------------------ Connexion ------------------------------ */
.login-wrap { max-width: 420px; margin: 0 auto; padding: 60px 20px; }
.login-ornament { text-align: center; color: var(--gold); font-size: 20px; }
.login-card { background: var(--paper); padding: 40px 36px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.login-card h1 { font-size: 32px; text-align: center; margin-bottom: 6px; }
.login-card p { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; line-height: 1.5; }
.login-logo { height: 44px; margin: 0 auto 16px; }
.login-kicker { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-deep); text-align: center; margin-bottom: 8px; }
.login-error { color: var(--red); font-size: 12px; margin: 0 0 12px; display: none; }
.login-error.show { display: block; }
.login-back { display: block; text-align: center; margin-top: 18px; font-size: 11px; color: var(--muted); }
.login-back:hover { color: var(--gold-deep); }
.login-foot { text-align: center; margin-top: 24px; font-size: 11px; color: var(--muted); }
.password-wrap { position: relative; }
.password-wrap input { width: 100%; padding-right: 42px; }
.password-wrap .eye-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.login-card .field { margin-bottom: 14px; }

/* ------------------------------ Layout ------------------------------ */
.admin-app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-content { padding: 8px 32px 48px; min-width: 0; position: relative; overflow: visible; }

/* ------------------------------ Sidebar ------------------------------ */
.sidebar { background: var(--ink); color: var(--cream); padding: 24px 16px 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; z-index: 150; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; padding: 0 8px; color: var(--gold-soft); }
.sidebar-brand img { height: 34px; width: auto; }
.sidebar-badge { display: inline-block; padding: 3px 10px; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; background: var(--gold); color: #fff; border-radius: 10px; }
.sidebar-close { display: none; margin-left: auto; width: 36px; height: 36px; align-items: center; justify-content: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); color: var(--cream); cursor: pointer; padding: 0; }
.sidebar-close:hover { background: rgba(255,255,255,.16); }
.sidebar-overlay { position: fixed; inset: 0; background: rgba(26,24,21,.55); z-index: 140; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.sidebar-overlay.open { opacity: 1; pointer-events: auto; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-label { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-2); padding: 14px 12px 6px; opacity: .8; }
.side-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; margin: 0; background: transparent; border: 0; border-radius: 2px; color: var(--muted-2); font-family: inherit; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-align: left; cursor: pointer; transition: background .18s, color .18s; -webkit-appearance: none; appearance: none; }
.side-link span { flex: 1; min-width: 0; }
.side-link:hover { color: var(--cream); background: rgba(255,255,255,.06); }
.side-link.active { color: var(--gold-soft); background: rgba(201,162,39,.14); box-shadow: inset 2px 0 0 var(--gold); }
.side-link:focus-visible { outline: 1px solid var(--gold); outline-offset: -1px; }
.side-link .icon { width: 17px; height: 17px; }
.side-link-ghost { font-size: 11px; }
.side-pill { display: inline-block; flex: none !important; padding: 2px 8px; font-size: 10px; font-style: normal; letter-spacing: .06em; background: var(--gold); color: #fff; border-radius: 10px; line-height: 1.4; }
.sidebar-bottom { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 2px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 12px; margin-top: 12px; background: rgba(255,255,255,.05); }
.sidebar-user strong { display: block; font-size: 12px; font-weight: 500; color: var(--cream); }
.sidebar-user small { display: block; font-size: 10.5px; color: var(--muted-2); }
.user-avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--gold); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; letter-spacing: .04em; }

/* ------------------------------ Topbar ------------------------------ */
.menu-btn { display: none; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 26px 32px 20px; min-width: 0; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 30px; line-height: 1.15; }
.topbar-title p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.topbar-actions { display: flex; gap: 10px; align-items: center; flex: none; }
.topbar-search { position: relative; }
.topbar-search .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.topbar-search input { padding: 10px 12px 10px 34px; border: 1px solid var(--line); background: var(--paper); font-size: 12.5px; width: 240px; max-width: 100%; color: var(--ink); }
.topbar-search input:focus { outline: none; border-color: var(--gold); }

/* ------------------------------ Tableau de bord ------------------------------ */
.page-greeting { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; margin: 0 0 22px; position: relative; overflow: visible; z-index: 1000; }
.page-greeting h2 { font-size: 34px; line-height: 1.15; }
.page-greeting p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.date-chip { padding: 8px 14px; border: 1px solid var(--line); background: var(--paper); font-size: 11px; letter-spacing: .06em; text-transform: capitalize; color: var(--muted); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--paper); border: 1px solid var(--line); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.stat-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.stat-label { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-family: var(--serif); font-size: 32px; line-height: 1.1; margin-top: 8px; font-weight: 500; overflow-wrap: anywhere; }
.stat-icon { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; background: rgba(201,162,39,.12); color: var(--gold-deep); border-radius: 50%; }
.stat-foot { font-size: 11.5px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line-2); margin-top: auto; }
.stat-foot strong { color: var(--ink); font-weight: 500; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dash-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.panel { background: var(--paper); border: 1px solid var(--line); min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.panel-head h3 { font-size: 22px; line-height: 1.2; }
.panel-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.panel-link { display: inline-flex; align-items: center; gap: 4px; flex: none; background: transparent; border: 0; padding: 4px 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); cursor: pointer; }
.panel-link:hover { color: var(--ink); }
.panel-body { padding: 20px; }
.panel-body.flush { padding: 0; }

.category-bars { display: flex; flex-direction: column; gap: 16px; }
.category-bar-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 6px; }
.category-bar-top span:last-child { color: var(--muted); font-size: 11.5px; }
.category-bar-track { height: 6px; background: var(--cream-2); border-radius: 3px; overflow: hidden; }
.category-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft)); border-radius: 3px; }

.alert-list { display: flex; flex-direction: column; }
.alert-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.alert-row:last-child { border-bottom: 0; }
.alert-row img { width: 40px; height: 50px; flex: none; object-fit: cover; border: 1px solid var(--line); background: var(--cream-2); }
.alert-info { flex: 1; min-width: 0; }
.alert-info strong { display: block; font-size: 13px; font-weight: 500; }
.alert-info small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-action { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; background: var(--cream); border: 1px solid var(--line); color: var(--ink); text-align: left; cursor: pointer; transition: all .18s; font-family: inherit; }
.quick-action:hover { border-color: var(--gold); background: #fff; }
.quick-action .icon { color: var(--gold-deep); margin-bottom: 4px; }
.quick-action strong { font-size: 12.5px; font-weight: 500; }
.quick-action small { font-size: 11px; color: var(--muted); }

/* ------------------------------ Toolbar ------------------------------ */
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-toolbar-left { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-width: 0; }
.admin-toolbar-right { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search-field { position: relative; }
.search-field input { padding: 10px 12px 10px 34px; border: 1px solid var(--line); background: var(--paper); font-size: 12.5px; width: 240px; max-width: 100%; color: var(--ink); }
.search-field .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-field input:focus, .admin-select:focus, .status-select:focus { outline: none; border-color: var(--gold); }
.admin-select { padding: 10px 12px; border: 1px solid var(--line); background: var(--paper); font-size: 12.5px; color: var(--ink); max-width: 100%; }
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab { padding: 9px 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-family: inherit; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: all .18s; }
.filter-tab:hover { border-color: var(--gold); }
.filter-tab.active { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ------------------------------ Tableaux ------------------------------ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.data-table th { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--cream); white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--cream); }
.table-product { display: flex; gap: 10px; align-items: center; min-width: 190px; }
.table-product img { width: 38px; height: 48px; flex: none; object-fit: cover; border: 1px solid var(--line); background: var(--cream-2); }
.table-product strong { display: block; font-weight: 500; font-size: 13px; }
.table-product small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.table-muted { color: var(--muted); font-size: 11.5px; }
.table-nowrap { white-space: nowrap; }
.order-customer strong { display: block; font-weight: 500; font-size: 13px; }
.order-customer small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-actions { display: flex; gap: 6px; }
.row-btn { width: 32px; height: 32px; flex: none; border: 1px solid var(--line); background: var(--paper); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); padding: 0; transition: all .18s; }
.row-btn:hover { color: var(--gold-deep); border-color: var(--gold); }
.row-btn.danger:hover { color: var(--red); border-color: var(--red); }
.row-btn .icon { width: 16px; height: 16px; }
.status-select { padding: 7px 10px; border: 1px solid var(--line); background: var(--paper); font-size: 11.5px; color: var(--ink); }

/* Badges */
.badge-total { font-size: 11px; color: var(--muted); white-space: nowrap; }
.stock-badge { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 2px; white-space: nowrap; }
.stock-badge.ok { background: #eaf3ee; color: var(--green); }
.stock-badge.low { background: #faf3e6; color: var(--gold-deep); }
.stock-badge.out { background: #fdecea; color: var(--red); }
.status-badge { display: inline-block; padding: 4px 10px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; border-radius: 2px; background: var(--cream-2); color: var(--muted); white-space: nowrap; }
.status-badge.nouvelle { background: #faf3e6; color: var(--gold-deep); }
.status-badge.confirmée { background: #e9f0f8; color: var(--blue); }
.status-badge.expédiée { background: #efeaf6; color: #5b4690; }
.status-badge.livrée { background: #eaf3ee; color: var(--green); }
.status-badge.annulée { background: #fdecea; color: var(--red); }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 11px; cursor: pointer; transition: .2s; }
.switch input:checked + span { background: var(--gold); }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span::before { transform: translateX(16px); }

/* ------------------------------ Catégories ------------------------------ */
.category-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.admin-category-card { background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.admin-category-media { position: relative; aspect-ratio: 16/10; background: var(--cream-2); overflow: hidden; }
.admin-category-media img { width: 100%; height: 100%; object-fit: cover; }
.cat-order { position: absolute; top: 10px; left: 10px; background: rgba(26,24,21,.8); color: var(--gold-soft); font-size: 10px; letter-spacing: .12em; padding: 4px 9px; }
.admin-category-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.admin-category-body h3 { font-size: 22px; }
.admin-category-body p { font-size: 12px; color: var(--muted); line-height: 1.5; }
.admin-category-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; font-size: 11.5px; color: var(--muted); }
.admin-category-actions { display: flex; gap: 6px; }

/* ------------------------------ Réglages ------------------------------ */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.form-card { background: var(--paper); border: 1px solid var(--line); padding: 24px; min-width: 0; }
.form-card > h3 { font-size: 24px; margin-bottom: 4px; }
.form-card > p { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; line-height: 1.5; }
.form-card .form-grid { margin-bottom: 20px; }
.form-card .field + .field { margin-top: 12px; }
.backup-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.backup-row strong { display: block; font-size: 13px; font-weight: 500; }
.backup-row span { font-size: 11.5px; color: var(--muted); }
.danger-note { padding: 12px 14px; background: #fffdf7; border: 1px solid #e6d5a9; font-size: 12px; color: var(--gold-deep); line-height: 1.5; }

/* ------------------------------ Modale ------------------------------ */
.admin-modal-overlay { position: fixed; inset: 0; background: rgba(26,24,21,.55); z-index: 200; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .2s; padding: 20px; }
.admin-modal-overlay.open { opacity: 1; pointer-events: auto; }
.admin-modal { position: relative; background: var(--paper); width: 100%; max-width: 620px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 32px; box-shadow: var(--shadow-lg); }
.admin-modal.wide { max-width: 980px; }
.admin-modal-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--paper); border: 1px solid var(--line); cursor: pointer; color: var(--muted); padding: 0; z-index: 2; }
.admin-modal-close:hover { color: var(--ink); border-color: var(--gold); }
.modal-head { padding-right: 44px; }
.modal-head h2 { font-size: 28px; line-height: 1.15; margin-bottom: 4px; }
.modal-head p { color: var(--muted); font-size: 12.5px; }
.modal-body { margin-top: 20px; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ------------------------------ Formulaires ------------------------------ */
.form-section { margin-bottom: 22px; padding: 20px; border: 1px solid var(--line); background: var(--cream); min-width: 0; }
.form-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.form-section-head h3 { font-size: 20px; }
.form-section-head p { font-size: 11.5px; color: var(--muted); margin: 2px 0 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea, .inline-add input[type="text"], .inline-add input[type="number"] { padding: 11px 12px; border: 1px solid var(--line); background: var(--paper); font-size: 13px; color: var(--ink); font-family: inherit; width: 100%; min-width: 0; border-radius: 0; }
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .inline-add input:focus { outline: none; border-color: var(--gold); }
.hint { font-size: 10.5px; color: var(--muted); }
.form-error { color: var(--red); font-size: 12px; margin: 12px 0; display: none; }
.form-error.show { display: block; }
.check-line { display: flex; align-items: center; gap: 10px; font-size: 13px; margin: 10px 0; cursor: pointer; }
.check-line input { width: 17px; height: 17px; accent-color: var(--gold); flex: none; }
.inline-add { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.inline-add input[type="text"] { flex: 1 1 140px; width: auto; }
.inline-add input[type="color"] { width: 42px; height: 40px; padding: 2px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; }
.color-list, .size-list { display: flex; flex-wrap: wrap; }
.color-chip, .size-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: var(--paper); border: 1px solid var(--line); font-size: 12px; margin: 4px 6px 4px 0; }
.color-chip .dot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }
.color-chip button, .size-chip button { background: none; border: none; cursor: pointer; color: var(--muted); padding: 0 0 0 2px; font-size: 16px; line-height: 1; }
.color-chip button:hover, .size-chip button:hover { color: var(--red); }

.image-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.image-tile { position: relative; aspect-ratio: 3/4; background: var(--cream-2); overflow: hidden; border: 1px solid var(--line); }
.image-tile img { width: 100%; height: 100%; object-fit: cover; }
.image-tile .main-tag { position: absolute; bottom: 6px; left: 6px; background: var(--gold); color: #fff; font-size: 9px; padding: 3px 7px; text-transform: uppercase; letter-spacing: .1em; }
.tile-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.tile-actions button { width: 28px; height: 28px; background: rgba(255,255,255,.92); border: 1px solid var(--line); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; color: var(--ink); }
.tile-actions button .icon { width: 14px; height: 14px; }
.upload-zone { border: 2px dashed var(--line); background: var(--paper); padding: 24px 16px; text-align: center; cursor: pointer; color: var(--muted); transition: all .18s; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--gold); color: var(--gold-deep); background: #fffdf7; }
.upload-zone strong { display: block; margin: 8px 0 4px; color: var(--ink); font-weight: 500; font-size: 13px; }
.upload-zone small { font-size: 11px; }
.hero-preview { margin-top: 12px; }
.hero-preview img { max-height: 200px; width: auto; border: 1px solid var(--line); }

/* Matrice de stock */
.variant-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.variant-table { width: 100%; border-collapse: collapse; font-size: 12px; background: var(--paper); }
.variant-table th, .variant-table td { padding: 8px 10px; border: 1px solid var(--line); text-align: center; white-space: nowrap; }
.variant-table th:first-child, .variant-table td:first-child { text-align: left; position: sticky; left: 0; background: var(--paper); z-index: 1; }
.variant-table th { background: var(--cream); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.variant-table th:first-child { background: var(--cream); }
.variant-table input { width: 64px; padding: 7px 6px; border: 1px solid var(--line); text-align: center; background: var(--paper); font-size: 13px; }
.variant-table input.zero { background: #fdecea; }
.variant-table input.low { background: #faf3e6; }
.cell-color { display: flex; align-items: center; gap: 6px; }
.cell-color .dot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }

.variant-type-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.variant-type-tab { padding: 8px 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: all .18s ease; }
.variant-type-tab:hover { border-color: var(--gold); color: var(--gold-deep); }
.variant-type-tab.active { background: var(--gold); color: #fff; border-color: var(--gold); }

.delivery-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.delivery-mode { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: all .18s ease; }
.delivery-mode:hover { border-color: var(--gold); color: var(--gold-deep); }
.delivery-mode.active { background: var(--gold); color: #fff; border-color: var(--gold); }
.field-hint { display: block; font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.field-hint.error { color: var(--red); }
input.invalid { border-color: var(--red) !important; background: #fef2f2 !important; }

/* ------------------------------ Commandes (détail) ------------------------------ */
.order-detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; }
.order-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.order-item img { width: 48px; height: 60px; flex: none; object-fit: cover; border: 1px solid var(--line); }
.order-item-info { flex: 1; min-width: 0; }
.order-item-info strong { font-size: 13px; font-weight: 500; display: block; }
.order-item-info small { font-size: 11px; color: var(--muted); }
.order-item-price { font-size: 13px; font-weight: 500; white-space: nowrap; }
.order-totals { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.order-total-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 4px 0; }
.order-total-row.grand { font-size: 16px; font-weight: 500; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.customer-box { background: var(--cream); border: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; min-width: 0; }
.customer-box strong { font-size: 14px; font-weight: 500; }
.detail-label { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 8px; }
.order-edit-item { border: 1px solid var(--line); padding: 12px; margin-bottom: 10px; background: var(--paper); }
.order-edit-item-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.order-edit-item-head strong { font-size: 12.5px; font-weight: 500; }

/* ------------------------------ États vides ------------------------------ */
.admin-empty { text-align: center; padding: 56px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.admin-empty h3 { font-size: 22px; color: var(--ink); margin: 8px 0 2px; }
.admin-empty p { font-size: 13px; }
.admin-empty .btn { margin-top: 12px; }
.admin-empty svg { color: var(--muted-2); width: 28px; height: 28px; }

/* ------------------------------ Toasts ------------------------------ */
.admin-toasts { position: fixed; bottom: 24px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.admin-toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--cream); padding: 12px 18px; font-size: 12.5px; box-shadow: var(--shadow-lg); border-left: 3px solid var(--green); animation: toastIn .25s ease; transition: opacity .3s, transform .3s; }
.admin-toast.error { border-left-color: var(--red); }
.admin-toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid, .settings-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Tablette & mobile : sidebar en tiroir + barre supérieure fixe */
@media (max-width: 1024px) {
  .admin-app { display: block; }

  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; height: 100vh; height: 100dvh; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .28s ease; z-index: 160; visibility: hidden; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 50px rgba(0,0,0,.4); visibility: visible; }
  .sidebar-overlay { z-index: 150; }
  .sidebar-close { display: inline-flex; }
  .side-link { padding: 13px 12px; }

  .topbar { position: sticky; top: 0; z-index: 100; height: var(--topbar-h); padding: 0 16px; margin: 0; gap: 12px; background: rgba(251,247,240,.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  .menu-btn { display: flex; }
  .topbar-title h1 { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-title p { display: none; }
  .topbar-search { display: none; }

  .admin-content { padding: 20px 20px 40px; }
}

/* Mobile */
@media (max-width: 768px) {
  .admin-content { padding: 16px 14px 40px; }
  .page-greeting h2 { font-size: 26px; }
  .date-chip { font-size: 10.5px; }

  #quickAddProduct { width: 40px; height: 40px; padding: 0; font-size: 0; gap: 0; }
  #quickAddProduct .icon { width: 18px; height: 18px; }

  .stat-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 18px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 28px; }
  .dash-grid, .dash-stack { gap: 16px; }
  .panel-head { padding: 16px; flex-wrap: wrap; }
  .panel-body { padding: 16px; }
  .quick-actions { grid-template-columns: minmax(0, 1fr); }

  .admin-toolbar { flex-direction: column; align-items: stretch; }
  .admin-toolbar-left, .admin-toolbar-right { width: 100%; }
  .admin-toolbar-left { flex-direction: column; align-items: stretch; }
  .admin-toolbar-right { justify-content: space-between; }
  .search-field, .search-field input, .admin-select { width: 100%; }
  .filter-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 14px 4px; margin: 0 -14px; scrollbar-width: none; }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-tab { white-space: nowrap; flex: none; }

  /* Tableaux : défilement horizontal propre */
  .data-table { min-width: 640px; }
  .data-table th, .data-table td { padding: 11px 12px; }

  .category-admin-grid { grid-template-columns: minmax(0, 1fr); }
  .form-card { padding: 18px; }

  /* Formulaires : 1 colonne, champs 16px (évite le zoom iOS) */
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .field input, .field select, .field textarea, .admin-select, .status-select, .search-field input, .inline-add input[type="text"], .inline-add input[type="number"], .login-card input { font-size: 16px; }
  .form-section { padding: 16px; }
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-detail-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .inline-add .btn { flex: 1 1 100%; }

  /* Modale en feuille plein largeur */
  .admin-modal-overlay { padding: 0; align-items: flex-end; }
  .admin-modal, .admin-modal.wide { max-width: 100%; max-height: 94vh; max-height: 94dvh; padding: 22px 16px 20px; }
  .modal-head h2 { font-size: 24px; }
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn { width: 100%; }

  .admin-toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .login-wrap { padding: 28px 14px; }
  .login-card { padding: 28px 20px; }
}

@media (max-width: 400px) {
  .topbar { padding: 0 12px; gap: 10px; }
  .topbar-title h1 { font-size: 20px; }
  .page-greeting h2 { font-size: 23px; }
  .panel-head h3 { font-size: 20px; }
  .delivery-modes { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   Raffinement, animations et boîte de réception
   ========================================================================== */

@keyframes dl-section-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes dl-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes dl-shimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.section-anim > * { animation: dl-section-in .42s cubic-bezier(.22,1,.36,1) both; }
.section-anim > *:nth-child(2) { animation-delay: 60ms; }
.section-anim > *:nth-child(3) { animation-delay: 110ms; }
.section-anim > *:nth-child(4) { animation-delay: 160ms; }
.section-anim > *:nth-child(n+5) { animation-delay: 200ms; }

.stat-grid .stat-card,
.data-table tbody tr,
.message-card,
.promo-row {
  animation: dl-rise .45s cubic-bezier(.22,1,.36,1) both;
}
.stat-grid .stat-card:nth-child(1), .data-table tbody tr:nth-child(1), .message-card:nth-child(1), .promo-row:nth-child(1) { animation-delay: 40ms; }
.stat-grid .stat-card:nth-child(2), .data-table tbody tr:nth-child(2), .message-card:nth-child(2), .promo-row:nth-child(2) { animation-delay: 90ms; }
.stat-grid .stat-card:nth-child(3), .data-table tbody tr:nth-child(3), .message-card:nth-child(3), .promo-row:nth-child(3) { animation-delay: 140ms; }
.stat-grid .stat-card:nth-child(4), .data-table tbody tr:nth-child(4), .message-card:nth-child(4), .promo-row:nth-child(4) { animation-delay: 190ms; }
.data-table tbody tr:nth-child(n+5), .message-card:nth-child(n+5), .promo-row:nth-child(n+5) { animation-delay: 240ms; }

.stat-card, .panel, .form-card, .message-card {
  transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s ease, border-color .28s ease, background-color .28s ease;
}
.stat-card:hover, .panel:hover, .form-card:hover, .message-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201,162,39,.45);
  box-shadow: 0 2px 4px rgba(26,24,21,.04), 0 16px 36px rgba(138,106,31,.11);
}

/* Boutons : coins harmonieux, shimmer doré, enfoncement au clic */
.btn, .filter-tab, .row-btn, .panel-link, .quick-action, .delivery-mode, .promo-toggle {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  transition: color .22s ease, background-color .22s ease, border-color .22s ease, box-shadow .22s ease, transform .22s cubic-bezier(.22,1,.36,1);
}
.btn::after, .filter-tab::after, .quick-action::after, .delivery-mode::after, .promo-toggle::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.28) 48%, rgba(232,205,130,.26) 55%, transparent 82%);
  transform: translateX(-120%);
  transition: transform .55s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}
.btn:hover::after, .filter-tab:hover::after, .quick-action:hover::after, .delivery-mode:hover::after, .promo-toggle:hover::after,
.btn:focus-visible::after, .filter-tab:focus-visible::after { transform: translateX(120%); }
.btn:hover, .filter-tab:hover, .row-btn:hover, .panel-link:hover, .quick-action:hover, .delivery-mode:hover, .promo-toggle:hover {
  box-shadow: 0 6px 16px rgba(138,106,31,.14);
}
.btn:active, .filter-tab:active, .row-btn:active, .panel-link:active, .quick-action:active, .delivery-mode:active, .promo-toggle:active {
  transform: scale(.97);
}
.btn:disabled { transform: none; box-shadow: none; }
.btn-gold:hover { box-shadow: 0 8px 20px rgba(138,106,31,.28); }

/* Sélecteur de période luxe */
.period-picker { position: relative; overflow: visible; flex: none; z-index: 9999; }
.period-picker.open { z-index: 10000; }
.period-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  min-width: 172px; justify-content: space-between;
  padding: 10px 14px; border: 1px solid rgba(201,162,39,.5); border-radius: 8px;
  background: linear-gradient(145deg, #1a1815, #2a2620); color: var(--gold-soft);
  font-family: inherit; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; box-shadow: 0 6px 16px rgba(26,24,21,.12);
  transition: color .3s var(--ease), background-color .3s var(--ease), border-color .3s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
.period-trigger:hover { border-color: var(--gold); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(138,106,31,.24); }
.period-trigger:active { transform: scale(.97); }
.period-trigger .icon { width: 15px; height: 15px; }
.period-trigger .period-chevron { transition: transform .35s var(--ease); }
.period-picker.open .period-chevron { transform: rotate(180deg); }
.period-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 9999;
  width: 236px; padding: 8px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 20px 48px rgba(26,24,21,.18);
  opacity: 0; visibility: hidden; transform: translateY(-10px) scale(.98); transform-origin: top right;
  transition: opacity .3s var(--ease), transform .35s var(--ease), visibility .35s;
}
.period-picker.open .period-menu { opacity: 1; visibility: visible; transform: none; }
.period-option {
  display: flex; align-items: center; width: 100%; padding: 10px 12px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink); font-family: inherit; font-size: 12px; text-align: left; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.period-option:hover { background: #fff8e9; color: var(--gold-deep); transform: translateX(2px); }
.period-option.active { background: rgba(201,162,39,.14); color: var(--gold-deep); box-shadow: inset 2px 0 0 var(--gold); }
.period-custom { margin-top: 6px; padding: 12px 10px 10px; border-top: 1px solid var(--line-2); }
.period-custom-title { display: block; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; font-family: inherit; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; cursor: pointer; transition: color .25s var(--ease); }
.period-custom-title:hover { color: var(--gold-deep); }
.period-custom-fields { display: flex; gap: 8px; margin-bottom: 10px; }
.period-custom-fields label { flex: 1; min-width: 0; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.period-custom-fields input { width: 100%; padding: 7px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); font-family: inherit; font-size: 11px; color-scheme: light; }
.period-custom-fields input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,.12); }
.order-total-row.discount { color: var(--gold-deep); }
.order-total-row.discount span:last-child { font-weight: 500; }

/* Boîte de réception */
.message-list { display: grid; gap: 12px; }
.message-card { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--line); padding: 18px 20px; }
.message-card.unread { border-left-color: var(--gold); background: #fffdf8; }
.message-head { display: flex; align-items: center; gap: 12px; }
.message-avatar {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream-2); color: var(--gold-deep);
  font-family: var(--serif); font-size: 18px;
}
.message-card.unread .message-avatar { background: rgba(201,162,39,.16); }
.message-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.message-who strong { font-size: 13px; font-weight: 500; }
.message-who small { font-size: 10.5px; color: var(--muted); }
.message-state { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 4px 9px; }
.message-state.new { color: var(--gold-deep); border-color: rgba(201,162,39,.45); background: #fffaf0; }
.message-contact { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0 10px 48px; }
.message-contact a { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); text-decoration: none; transition: color .2s; }
.message-contact a:hover { color: var(--gold-deep); }
.message-contact .icon { width: 12px; height: 12px; }
.message-body { margin: 0 0 14px 48px; font-size: 12.5px; line-height: 1.7; color: var(--ink-2); white-space: pre-wrap; }
.message-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: 48px; }

/* Codes promo dans les réglages */
.promo-form-row { display: grid; grid-template-columns: 1fr 116px; gap: 10px; margin-bottom: 10px; }
.promo-percent-field input { text-align: center; }
.promo-list { display: grid; gap: 8px; margin-top: 18px; }
.promo-list .hint { font-size: 11px; color: var(--muted); margin: 0; }
.promo-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 9px 10px;
}
.promo-row.disabled { opacity: .62; background: var(--cream); }
.promo-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.promo-info strong { font-size: 12px; font-weight: 500; letter-spacing: .06em; }
.promo-info small { font-size: 10px; color: var(--muted); }
.promo-toggle {
  width: 28px; height: 28px; flex: none; border: 1px solid var(--line); background: var(--cream);
  color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.promo-toggle.active { border-color: rgba(47,107,74,.4); background: #eaf4ee; color: var(--green); }

/* Logos locaux */
.login-logo { width: 72px; height: 72px; object-fit: contain; }
.sidebar-brand img { width: 44px; height: 44px; object-fit: contain; }
.hero-preview img { object-fit: contain; }

@media (max-width: 700px) {
  .period-picker, .period-trigger { width: 100%; }
  .period-menu { left: 0; right: auto; width: min(300px, 100%); }
  .message-contact, .message-body, .message-actions { margin-left: 0; }
  .promo-form-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Boutons signature & transitions fluides
   ========================================================================== */

.btn, .icon-btn, .filter-tab, .row-btn, .panel-link, .quick-action,
.delivery-mode, .promo-toggle, .chip, .status-select, .admin-select,
.search-field, .side-link, .period-trigger {
  border-radius: 8px;
  transition: color .28s var(--ease), background-color .28s var(--ease), border-color .28s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
.btn:hover, .icon-btn:hover, .filter-tab:hover, .row-btn:hover, .quick-action:hover {
  transform: translateY(-2px);
}
.btn:active, .icon-btn:active, .filter-tab:active, .row-btn:active,
.panel-link:active, .quick-action:active, .promo-toggle:active, .period-trigger:active {
  transform: scale(.97);
}

/* Boutons « + » : carré adouci, fond noir profond, icône dorée */
#quickAddProduct, [data-quick-add-product], [data-quick-add-category],
#addColorBtn, #addSizeBtn, #oeAddItem {
  border-radius: 12px;
  background: linear-gradient(145deg, #1a1815, #2e2a23);
  color: var(--gold-soft);
  border-color: rgba(201,162,39,.45);
  box-shadow: 0 6px 16px rgba(26,24,21,.16);
}
#quickAddProduct:hover, [data-quick-add-product]:hover, [data-quick-add-category]:hover,
#addColorBtn:hover, #addSizeBtn:hover, #oeAddItem:hover {
  background: linear-gradient(145deg, #2a2620, #3a342a);
  color: #fff;
  box-shadow: 0 12px 26px rgba(138,106,31,.26);
}
#quickAddProduct .icon, [data-quick-add-product] .icon, [data-quick-add-category] .icon,
#addColorBtn .icon, #addSizeBtn .icon, #oeAddItem .icon {
  transition: transform .4s var(--ease), color .3s var(--ease);
}
#quickAddProduct:hover .icon, [data-quick-add-product]:hover .icon, [data-quick-add-category]:hover .icon,
#addColorBtn:hover .icon, #addSizeBtn:hover .icon, #oeAddItem:hover .icon {
  transform: rotate(90deg) scale(1.08);
}

/* Menu : bordure dorée discrète et fond subtil */
.menu-btn { border: 1px solid rgba(201,162,39,.45); background: rgba(201,162,39,.08); color: var(--gold-deep); }
.menu-btn:hover { background: rgba(201,162,39,.18); color: var(--gold-deep); border-color: var(--gold); }
.menu-btn .icon { transition: transform .4s var(--ease); }
.menu-btn:hover .icon { transform: scale(1.08); }

/* Fermeture : cercles élégants, rotation au survol */
.sidebar-close, .admin-modal-close, .eye-btn {
  border-radius: 50%; border: 1px solid rgba(201,162,39,.38);
  transition: color .3s var(--ease), background-color .3s var(--ease), border-color .3s var(--ease), transform .35s var(--ease);
}
.sidebar-close { background: rgba(255,255,255,.06); color: var(--cream); }
.admin-modal-close { background: var(--paper); color: var(--muted); }
.eye-btn { background: transparent; color: var(--muted); }
.sidebar-close:hover, .admin-modal-close:hover, .eye-btn:hover {
  color: var(--gold); border-color: var(--gold); background: rgba(201,162,39,.12);
}
.sidebar-close:hover .icon, .admin-modal-close:hover .icon, .eye-btn:hover .icon { transform: rotate(90deg); }
.sidebar-close .icon, .admin-modal-close .icon, .eye-btn .icon { transition: transform .4s var(--ease); }

/* Tiroir latéral et modale : ouverture soyeuse + flou progressif */
.sidebar { transition: transform .55s var(--ease), box-shadow .55s var(--ease), visibility .55s; }
.sidebar-overlay { transition: opacity .4s var(--ease), -webkit-backdrop-filter .4s var(--ease), backdrop-filter .4s var(--ease); }
.sidebar-overlay.open { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sidebar.open .side-link { animation: dl-rise .45s var(--ease) both; }
.sidebar.open .side-link:nth-child(2) { animation-delay: .06s; }
.sidebar.open .side-link:nth-child(3) { animation-delay: .12s; }
.sidebar.open .side-link:nth-child(5) { animation-delay: .18s; }
.sidebar.open .side-link:nth-child(6) { animation-delay: .24s; }
.sidebar.open .side-link:nth-child(8) { animation-delay: .3s; }
.sidebar.open .side-link:nth-child(9) { animation-delay: .34s; }
.sidebar.open .side-link:nth-child(10) { animation-delay: .38s; }
.admin-modal-overlay { transition: opacity .35s var(--ease), -webkit-backdrop-filter .35s var(--ease), backdrop-filter .35s var(--ease); }
.admin-modal-overlay.open { -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.admin-modal { opacity: 0; transform: translateY(16px) scale(.97); transition: opacity .35s var(--ease), transform .4s var(--ease); }
.admin-modal-overlay.open .admin-modal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .section-anim > *, .stat-card, .data-table tbody tr, .message-card, .promo-row,
  .sidebar.open .side-link { animation: none; }
  .btn, .icon-btn, .filter-tab, .row-btn, .panel-link, .quick-action, .delivery-mode,
  .promo-toggle, .period-trigger, .period-custom-title, .sidebar, .sidebar-overlay,
  .admin-modal-overlay, .admin-modal, .side-link, .chip, .status-select,
  .admin-select { transition: none; }
  .btn::after, .filter-tab::after, .quick-action::after, .delivery-mode::after, .promo-toggle::after { display: none; }
  .admin-modal { opacity: 1; transform: none; }
  .sidebar-overlay.open, .admin-modal-overlay.open { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
