@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

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

:root {
  --vert:    #2d6a4f;
  --vert-l:  #40916c;
  --vert-xl: #b7e4c7;
  --vert-xs: #d8f3dc;
  --jaune:   #e9c46a;
  --jaune-d: #c9a227;
  --noir:    #1a1a1a;
  --gris-d:  #2e2e2e;
  --gris:    #6b6b6b;
  --gris-l:  #e8e8e8;
  --blanc:   #fafaf7;
  --surface: #ffffff;
  --danger:  #c1121f;
  --radius:  10px;
  --shadow:  0 2px 20px rgba(0,0,0,.08);
}

html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--blanc); color: var(--noir); min-height: 100vh; }

/* ─── LANDING ─── */
#landing { display: flex; flex-direction: column; min-height: 100vh; }

.hero {
  position: relative; overflow: hidden;
  background: var(--noir);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(255,255,255,.04) 59px, rgba(255,255,255,.04) 60px),
    repeating-linear-gradient(0deg,  transparent, transparent 59px, rgba(255,255,255,.04) 59px, rgba(255,255,255,.04) 60px),
    linear-gradient(135deg, #1a1a1a 0%, #2d6a4f 60%, #1a1a1a 100%);
  opacity: .7;
}

.hero-oval {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  border: 1px solid rgba(233,196,106,.15);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hero-oval:nth-child(2) { width: 800px; height: 800px; border-color: rgba(233,196,106,.07); }
.hero-oval:nth-child(3) { width: 1100px; height: 1100px; border-color: rgba(233,196,106,.04); }

.hero-content {
  position: relative; z-index: 2;
  display: flex; gap: 80px; align-items: center; justify-content: center;
  padding: 60px 40px;
  max-width: 1100px; width: 100%;
  flex-wrap: wrap;
}

.hero-text { flex: 1; min-width: 300px; }

.hero-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--jaune); margin-bottom: 20px;
  font-weight: 500;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(42px, 6vw, 80px);
  font-weight: 900; line-height: 1;
  color: #fff;
  margin-bottom: 8px;
}
.hero-title span { color: var(--jaune); }

.hero-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: clamp(18px, 2.5vw, 28px);
  color: rgba(255,255,255,.5);
  font-weight: 700; font-style: italic;
  margin-bottom: 32px;
}

.hero-desc {
  font-size: 15px; line-height: 1.8;
  color: rgba(255,255,255,.65);
  max-width: 440px;
  font-weight: 300;
}
.hero-desc strong { color: var(--jaune); font-weight: 500; }

/* ─── LOGIN CARD ─── */
.login-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 40px 36px;
  width: 340px;
  box-shadow: 0 24px 80px rgba(0,0,0,.4);
  flex-shrink: 0;
}

.login-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700;
  color: var(--noir);
  margin-bottom: 6px;
}

.login-card .login-sub {
  font-size: 13px; color: var(--gris);
  margin-bottom: 28px;
}

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 500;
  letter-spacing: .5px; text-transform: uppercase;
  color: var(--gris); margin-bottom: 6px;
}

.form-group input, .form-group select {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--gris-l);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; color: var(--noir);
  background: var(--blanc);
  transition: border-color .2s;
  outline: none;
}
.form-group input:focus, .form-group select:focus { border-color: var(--vert-l); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  cursor: pointer; border: none; transition: all .2s;
  text-decoration: none;
}
.btn-primary { background: var(--vert); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--vert-l); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(45,106,79,.3); }
.btn-secondary { background: var(--gris-l); color: var(--noir); }
.btn-secondary:hover { background: #d5d5d0; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a00d18; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-outline { background: transparent; border: 1.5px solid var(--vert); color: var(--vert); }
.btn-outline:hover { background: var(--vert); color: #fff; }

.error-msg { color: var(--danger); font-size: 13px; margin-top: 12px; display: none; }
.error-msg.show { display: block; }

/* ─── APP LAYOUT ─── */
#app { display: none; min-height: 100vh; flex-direction: row; }

.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--noir);
  display: flex; flex-direction: column;
  padding: 0;
  position: sticky; top: 0; height: 100vh;
}

.sidebar-logo {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo .logo-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 900;
  color: #fff; line-height: 1.1;
}
.sidebar-logo .logo-title span { color: var(--jaune); }
.sidebar-logo .logo-user {
  font-size: 12px; color: rgba(255,255,255,.4);
  margin-top: 6px; font-weight: 300;
}

.sidebar-nav { flex: 1; padding: 16px 0; }
.nav-separator {
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: 8px 24px;
}

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 24px;
  font-size: 14px; font-weight: 400;
  color: rgba(255,255,255,.55);
  cursor: pointer; transition: all .15s;
  border-left: 3px solid transparent;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item.active { color: var(--jaune); border-left-color: var(--jaune); background: rgba(233,196,106,.07); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-user-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 6px;
}
.sidebar-user-row .logo-user { margin-top: 0; flex: 1; }
.header-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  color: rgba(255,255,255,.55); cursor: pointer; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.12);
  transition: color .15s, background .15s, border-color .15s;
}
.header-icon-btn:hover { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); }
.header-icon-btn.danger:hover { color: #e74c3c; border-color: rgba(231,76,60,.4); background: rgba(231,76,60,.08); }
.header-icon-btn.active { color: var(--jaune); border-color: rgba(233,196,106,.4); background: rgba(233,196,106,.07); }
.nav-item.danger {
  display: flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.45);
  padding: 5px 8px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  font-size: 12px; cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
  white-space: nowrap; flex-shrink: 0;
}
.nav-item.danger:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.28);
}

.sidebar-footer { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,.08); }

/* ─── MAIN CONTENT ─── */
.main { flex: 1; overflow-y: auto; background: var(--blanc); }

.page { display: none; padding: 40px 48px; max-width: 1200px; }
.page.active { display: block; }

.page-header { margin-bottom: 36px; }
.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 32px; font-weight: 900;
  color: var(--noir);
}
.page-header p { font-size: 14px; color: var(--gris); margin-top: 4px; font-weight: 300; }

/* ─── RAQUETTES GRID ─── */
.raquettes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px; margin-bottom: 32px;
}

.raquette-card {
  background: var(--surface); border-radius: 14px;
  border: 1.5px solid var(--gris-l);
  padding: 24px;
  cursor: pointer; transition: all .2s;
  position: relative; overflow: hidden;
}
.raquette-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: linear-gradient(90deg, var(--vert), var(--jaune));
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s;
}
.raquette-card:hover { border-color: var(--vert-l); transform: translateY(-3px); box-shadow: 0 12px 40px rgba(45,106,79,.12); }
.raquette-card:hover::before { transform: scaleX(1); }

.raquette-card-brand {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--vert-l); font-weight: 500; margin-bottom: 4px;
}
.raquette-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700; color: var(--noir);
  margin-bottom: 16px;
}
.raquette-card-subname {
  font-size: 13px; color: var(--vert-l);
  margin-top: -10px; margin-bottom: 12px;
  font-weight: 500;
}

.raquette-card-meta {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.tag {
  background: var(--vert-xs); color: var(--vert);
  border-radius: 20px; padding: 3px 10px;
  font-size: 12px; font-weight: 500;
}
.tag.jaune { background: #fef9e7; color: var(--jaune-d); }
.raquette-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px; border-top: 1px solid var(--gris-l);
  font-size: 12px; color: var(--gris);
}

/* ─── DETAIL PAGE ─── */
.detail-layout {
  display: flex; gap: 24px; min-height: 600px;
}

.detail-left {
  width: 320px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 20px;
}

.detail-photo-zone {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg2);
  border: 1.5px dashed var(--gris-l);
  min-height: 180px;
  cursor: pointer;
  transition: border-color .2s;
}
.detail-photo-zone:hover { border-color: var(--vert); }
.detail-photo-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 180px; padding: 20px;
  color: var(--gris); font-size: 13px; text-align: center;
  cursor: pointer;
}
.detail-photo-img {
  width: 100%; display: block;
  max-height: 280px; object-fit: cover;
  cursor: pointer;
}
.detail-photo-delete {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.55); border: none; border-radius: 50%;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer;
  transition: background .15s;
}
.detail-photo-delete:hover { background: var(--danger); }

.detail-card {
  background: var(--surface); border-radius: 14px;
  border: 1.5px solid var(--gris-l);
  padding: 28px;
  box-shadow: var(--shadow);
}
.detail-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 16px; font-weight: 700;
  color: var(--noir); margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--gris-l);
}

.detail-section-sep { height: 1px; background: var(--gris-l); margin: 16px 0; }
.detail-field { margin-bottom: 14px; }
.detail-field label {
  display: block; font-size: 11px; font-weight: 500;
  letter-spacing: .5px; text-transform: uppercase;
  color: var(--gris); margin-bottom: 2px;
}
.detail-field span {
  font-size: 15px; color: var(--noir); font-weight: 400;
}

.detail-right { flex: 1; min-width: 0; }
.historique-body { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
#historique-list { flex: 1; min-width: 260px; }

/* ─── HISTORIQUE ─── */
.historique-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.historique-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700; color: var(--noir);
}

.cordage-entry {
  background: var(--surface); border-radius: 12px;
  border: 1.5px solid var(--gris-l);
  padding: 16px 20px; margin-bottom: 12px;
  transition: border-color .2s, box-shadow .2s;
  cursor: pointer;
}
.cordage-entry:hover { border-color: var(--vert-xl); }
.cordage-entry-active { border-color: var(--jaune) !important; box-shadow: 0 0 0 2px rgba(250,204,21,.25); }
.cordage-entry-main { display: flex; justify-content: space-between; align-items: flex-start; }

/* Panneau détail cordage */
.cordage-detail-panel { max-width: 100%;
  width: 240px; flex-shrink: 0;
  background: var(--surface); border: 1.5px solid var(--jaune);
  border-radius: 12px; padding: 18px;
  position: sticky; top: 20px;
}
.cdp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cdp-date { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--gris); }
.cdp-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--gris); line-height: 1; padding: 0; }
.cdp-close:hover { color: var(--noir); }
.cdp-name { font-size: 15px; font-weight: 700; color: var(--noir); margin-bottom: 14px; }
.cdp-fields { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cdp-field label { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--gris); }
.cdp-field span { font-size: 14px; color: var(--noir); }
.cdp-specs { display: flex; flex-wrap: wrap; gap: 4px; }

/* Preview stock dans le modal cordage */
.stock-preview-box {
  background: var(--bg); border: 1px solid var(--gris-l);
  border-radius: 8px; padding: 12px; margin-top: 8px;
}
.sp-name { font-size: 14px; font-weight: 700; color: var(--noir); margin-bottom: 6px; }
.sp-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.cordage-date {
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--vert-l); font-weight: 500; margin-bottom: 8px;
}
.cordage-title {
  font-size: 16px; font-weight: 500; color: var(--noir);
  margin-bottom: 12px;
}
.cordage-specs {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.spec-pill {
  background: var(--blanc); border: 1px solid var(--gris-l);
  border-radius: 20px; padding: 4px 12px;
  font-size: 12px; color: var(--gris-d);
}
.spec-pill strong { color: var(--vert); }

.cordage-del {
  flex-shrink: 0; margin-left: 10px;
  opacity: 0; transition: opacity .2s;
}
.cordage-entry:hover .cordage-del { opacity: 1; }

.admin-cordage-2col {
  display: flex; align-items: flex-start; gap: 16px;
}
.admin-cordage-left {
  flex: 1; min-width: 0;
}
.admin-cordage-notes-col {
  width: 200px; flex-shrink: 0;
  background: var(--bg); border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid var(--gris-l);
  display: flex; flex-direction: column; gap: 5px;
}
.admin-cordage-note-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.admin-cordage-note-label {
  font-size: 11px; color: var(--gris); font-weight: 500; white-space: nowrap;
}
.admin-cordage-note-stars {
  font-size: 13px; color: var(--jaune); letter-spacing: 1px; white-space: nowrap;
}
.admin-cordage-note-comment {
  font-size: 11px; color: var(--gris); font-style: italic;
  margin-top: 4px; padding-top: 5px;
  border-top: 1px solid var(--gris-l);
  line-height: 1.4;
}

/* ─── MODAL ─── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 100;
  align-items: center; justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface); border-radius: 16px;
  padding: 36px; width: 480px; max-width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
  animation: modalIn .2s ease;
  margin: auto;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px); } }
.modal h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700;
  margin-bottom: 24px; color: var(--noir);
}
.form-section-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--gris); border-top: 1px solid var(--gris-l);
  padding-top: 16px; margin: 16px 0 12px;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }
.modal-hint { font-size: 12px; color: var(--gris); margin-bottom: 14px; font-style: italic; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ─── SETTINGS ─── */
.settings-section {
  background: var(--surface); border-radius: 14px;
  border: 1.5px solid var(--gris-l);
  padding: 32px; margin-bottom: 24px;
  max-width: 560px;
}
.settings-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 700; color: var(--noir);
  margin-bottom: 20px;
}

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--gris);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: .4; }
.empty-state p { font-size: 15px; margin-bottom: 20px; }

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 28px; right: 28px;
  background: var(--noir); color: #fff;
  padding: 12px 20px; border-radius: 10px;
  font-size: 14px; z-index: 200;
  transform: translateY(80px); opacity: 0;
  transition: all .3s; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--vert); }
.toast.error { background: var(--danger); }

/* ─── BACK BUTTON ─── */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--gris); cursor: pointer;
  margin-bottom: 24px; transition: color .2s;
  background: none; border: none; font-family: inherit;
}
.back-btn:hover { color: var(--vert); }
.clients-mobile-back { display: none; }

/* ─── STOCK ─── */
#page-stock, #page-mes-fournitures, #page-reservation {
  padding: 0;
  max-width: 100%;
  height: 100vh;
  overflow: hidden;
}
#page-stock.active, #page-mes-fournitures.active, #page-reservation.active { display: flex; flex-direction: column; }

.stock-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.stock-subnav {
  width: 200px;
  flex-shrink: 0;
  background: var(--noir);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stock-subnav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  transition: all .15s;
  border-left: 3px solid transparent;
}
.stock-subnav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.stock-subnav-item.active { color: var(--jaune); border-left-color: var(--jaune); background: rgba(233,196,106,.07); }
.stock-subnav-item svg { flex-shrink: 0; }
.stock-subnav-sub {
  padding-left: 32px;
  font-size: 12px;
}
#mf-maison-subnav { display: none; }
#mf-maison-subnav.visible { display: block; }
#mf-magasin-subnav { display: none; }
#mf-magasin-subnav.visible { display: block; }

.stock-content {
  flex: 1;
  overflow-y: auto;
  padding: 36px 48px;
}

.stock-content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.stock-content-header .btn { width: auto; }
.stock-content-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 900; color: var(--noir);
}

/* ─── FILTRES STOCK ─── */
.stock-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--bg); border: 1px solid var(--gris-l);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 20px;
}
.stock-filter-input, .stock-filter-select {
  height: 34px; padding: 0 10px; border: 1.5px solid var(--gris-l);
  border-radius: 6px; font-size: 13px; font-family: inherit;
  background: var(--surface); color: var(--noir);
  transition: border-color .15s;
}
.stock-filter-input { width: 140px; }
.stock-filter-select { min-width: 140px; }
.stock-filter-input:focus, .stock-filter-select:focus { border-color: var(--jaune); outline: none; }

.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.stock-card {
  background: var(--surface);
  border: 1.5px solid var(--gris-l);
  border-radius: 14px;
  padding: 20px 22px;
  transition: border-color .2s, box-shadow .2s;
}
.stock-card:hover { border-color: var(--vert-l); box-shadow: 0 4px 20px rgba(45,106,79,.08); }

.stock-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.stock-card-brand {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--vert-l); font-weight: 500; margin-bottom: 2px;
}
.stock-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 17px; font-weight: 700; color: var(--noir);
}
.stock-card-actions { display: flex; gap: 6px; flex-shrink: 0; }

.stock-card-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}

.stock-tag-cond {
  border-radius: 20px; padding: 3px 10px;
  font-size: 12px; font-weight: 500;
}
.stock-tag-cond.bobine { background: #e8f4fd; color: #1a6fa8; }
.stock-tag-cond.jartiere { background: #f3e8fd; color: #7c3aed; }

.stock-card-qty {
  padding-top: 12px;
  border-top: 1px solid var(--gris-l);
  font-size: 14px; font-weight: 500; color: var(--noir);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.stock-card-duree {
  font-size: 12px; font-weight: 500;
  color: #92400e; background: #fef3c7;
  padding: 2px 7px; border-radius: 20px; white-space: nowrap;
}
.stock-group-header {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 14px; padding-bottom: 10px;
  border-bottom: 2px solid var(--primaire);
}
.stock-group-header span:first-child {
  font-size: 15px; font-weight: 700; color: var(--texte);
  letter-spacing: .01em;
}
.stock-group-count {
  font-size: 11px; font-weight: 600; color: var(--gris);
  background: var(--gris-l); padding: 2px 8px; border-radius: 20px;
}
.stock-group-epuise {
  border-bottom-color: var(--gris);
  opacity: .6;
}
.stock-group-epuise span:first-child {
  color: var(--gris);
}
.stock-grid-epuise .stock-card {
  opacity: .5;
}
.stock-card-footer {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--gris-l);
}
.stock-prix {
  font-size: 12px; font-weight: 600; padding: 3px 8px;
  border-radius: 6px; white-space: nowrap;
}
.stock-prix.achat { background: #dbeafe; color: #1d4ed8; }
.stock-prix.normal { background: #f3f4f6; color: #6b7280; text-decoration: line-through; }
.stock-prix.actuel { background: #fef9c3; color: #854d0e; }
.stock-prix.actuel small { font-weight: 400; font-size: 10px; margin-left: 2px; }
.stock-prix-actuel-wrap { display: inline-flex; align-items: center; gap: 4px; }
.btn-edit-prix {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--gris-l); background: var(--blanc);
  color: var(--gris); cursor: pointer; transition: all .15s; padding: 0;
}
.btn-edit-prix:hover { border-color: var(--primaire); color: var(--primaire); }
.prix-inline { display: inline-flex; align-items: center; gap: 4px; }
.prix-input {
  border: 1.5px solid var(--primaire); border-radius: 6px;
  padding: 2px 6px; font-size: 13px; font-family: 'DM Sans', sans-serif;
  outline: none; background: #f0fdf4;
}
.stock-card-url {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-radius: 6px; border: 1px solid var(--gris-l);
  font-size: 12px; font-weight: 500; color: var(--gris);
  text-decoration: none; transition: all .15s;
}
.stock-card-url:hover { border-color: var(--primaire); color: var(--primaire); background: #f0fdf4; }
.stock-group-separator {
  height: 1px; background: var(--gris-l); margin: 28px 0;
}
.stock-section-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0 16px; color: var(--gris); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
}
.stock-section-divider::before,
.stock-section-divider::after { content: ''; flex: 1; height: 1px; background: var(--gris-l); }
.stock-card-empty { opacity: .55; }
.stock-card-empty .stock-card-qty { color: var(--gris); }
.stock-card-client { border-left: 3px solid #6366f1; }
.stock-card-owner {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: #6366f1;
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 8px;
}
.stock-section-divider-client span { color: #6366f1; }
.stock-card-cordages-dispo {
  font-size: 12px; font-weight: 500;
  color: #065f46; background: #d1fae5;
  padding: 2px 7px; border-radius: 20px; white-space: nowrap;
}
.stock-card-reserved-badge {
  font-size: 11px; font-weight: 600;
  color: #92400e; background: #fef3c7;
  padding: 2px 7px; border-radius: 20px; margin-top: 5px; display: inline-block;
}
/* Stepper jartière */
.qty-stepper { display: flex; align-items: center; gap: 6px; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--gris-l);
  background: var(--surface); font-size: 16px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
}
.qty-btn:hover { background: var(--gris-l); border-color: var(--gris); }
.qty-val { min-width: 24px; text-align: center; }
.qty-label { color: var(--gris); font-size: 13px; }
/* Édition inline */
.qty-display { cursor: pointer; border-bottom: 1px dashed var(--gris); }
.qty-display:hover { color: var(--jaune-d); }
.qty-inline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.qty-inline-input {
  width: 72px; padding: 4px 8px; border: 1.5px solid var(--jaune);
  border-radius: 6px; font-size: 14px; font-weight: 500;
}
.qty-inline-unit { font-size: 13px; color: var(--gris); }

.ean-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ean-row input { flex: 1; }
.ean-btn { flex-shrink: 0; width: auto; display: flex; align-items: center; gap: 6px; }

.lookup-result {
  font-size: 12px;
  margin-top: 6px;
  min-height: 16px;
  border-radius: 6px;
  padding: 0;
  transition: all .2s;
}
.lookup-result:not(:empty) { padding: 7px 12px; }
.lookup-found    { background: var(--vert-xs); color: var(--vert); font-weight: 500; }
.lookup-notfound { background: #fef2f2; color: var(--danger); }

.spec-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.spec-toggle {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--gris-l);
  background: var(--blanc);
  color: var(--gris);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.spec-toggle:hover { border-color: var(--vert-l); color: var(--vert); }
.spec-toggle.active { background: var(--vert); border-color: var(--vert); color: #fff; font-weight: 500; }
.spec-score-wrap { display: inline-flex; align-items: center; }
.spec-score-wrap .spec-toggle { border-radius: 20px 0 0 20px; }
.spec-score-wrap .spec-toggle:not(.active) { border-radius: 20px; }
.spec-score-input {
  display: none; width: 38px; height: 31px;
  border: 1.5px solid var(--vert); border-left: none;
  border-radius: 0 20px 20px 0;
  background: #f0fdf4; color: var(--vert);
  font-size: 13px; font-weight: 600; font-family: 'DM Sans', sans-serif;
  text-align: center; padding: 0;
  -moz-appearance: textfield;
}
.spec-score-input::-webkit-inner-spin-button,
.spec-score-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.spec-score-input.visible { display: block; }
.spec-badge-score {
  font-size: 10px; font-weight: 700; opacity: .85;
  margin-left: 3px;
}

.stock-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.spec-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.stock-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gris);
  display: flex; flex-direction: column; align-items: center;
  font-size: 14px; line-height: 1.6;
}

/* ─── GESTION CLIENTS ─── */
#page-clients {
  padding: 0;
  max-width: 100%;
  height: 100vh;
  overflow: hidden;
}

#page-clients.active { display: flex; flex-direction: column; }

.clients-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Colonne gauche */
.clients-list-panel {
  width: 280px;
  flex-shrink: 0;
  border-right: 1.5px solid var(--gris-l);
  display: flex;
  flex-direction: column;
  padding: 32px 20px;
  overflow: hidden;
}

.clients-list-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700; color: var(--noir);
  margin-bottom: 20px;
  flex-shrink: 0;
}

.clients-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  margin-top: 12px;
  border: 1.5px dashed var(--vert-l);
  border-radius: 10px;
  background: transparent;
  color: var(--vert);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}
.clients-add-btn:hover {
  background: var(--vert-xs);
  border-style: solid;
  border-color: var(--vert);
}

.clients-empty {
  text-align: center;
  padding: 32px 12px;
  color: var(--gris);
  font-size: 13px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#clients-list {
  flex: 1;
  overflow-y: auto;
}

.client-item {
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
  border: 1.5px solid transparent;
  margin-bottom: 4px;
}

.client-item:hover { background: var(--vert-xs); border-color: var(--vert-xl); }
.client-item.active { background: var(--vert-xs); border-color: var(--vert-l); }

.client-item-name { font-weight: 500; font-size: 14px; color: var(--noir); }
.client-item-email { font-size: 12px; color: var(--gris); margin-top: 2px; }

.client-resa-badge {
  display: inline-block;
  background: #f97316;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  padding: 1px 7px;
  white-space: nowrap;
  line-height: 1.6;
}

/* Colonne droite */
.clients-detail-panel {
  flex: 1;
  overflow-y: auto;
  padding: 36px 48px;
}

.clients-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gris);
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  padding-bottom: 80px;
}

/* En-tête client */
.client-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1.5px solid var(--gris-l);
}

.client-detail-name {
  font-family: 'Playfair Display', serif;
  font-size: 30px; font-weight: 900; color: var(--noir);
}

.client-detail-actions { display: flex; gap: 8px; }

/* Infos client */
.client-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.client-info-field label {
  display: block;
  font-size: 11px; font-weight: 500;
  letter-spacing: .5px; text-transform: uppercase;
  color: var(--gris); margin-bottom: 4px;
}

.client-info-field span { font-size: 15px; color: var(--noir); }

/* Mot de passe admin */
.client-pwd-section {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1.5px solid var(--gris-l);
}

/* Raquettes en vue admin */
.admin-raquettes-section { }

/* Bobines client */
.admin-bobines-section {
  margin-bottom: 28px;
}
.admin-bobines-section h3 {
  font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--noir);
}
.admin-fournitures-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--gris); margin: 12px 0 6px;
}
.admin-bobine-item {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px 16px; border-radius: 10px;
  border: 1.5px solid var(--gris-l); background: var(--surface);
  margin-bottom: 8px;
}
.admin-bobine-name { font-weight: 600; font-size: 14px; color: var(--noir); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fourni-loc-badge { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 10px; letter-spacing: .03em; }
.fourni-loc-badge.maison  { background: #dbeafe; color: #1d4ed8; }
.fourni-loc-badge.magasin { background: #f3e8ff; color: #7c3aed; }
.fourni-loc-btn { font-size: 11px; margin-top: 6px; padding: 2px 8px; }
.admin-bobine-meta { font-size: 12px; color: var(--gris); margin-top: 2px; }
.admin-bobine-stock { text-align: right; min-width: 120px; }
.admin-bobine-metres { font-size: 13px; font-weight: 600; color: var(--vert); margin-bottom: 2px; }
.admin-bobine-cordages { font-size: 11px; color: var(--gris); margin-bottom: 6px; }
.admin-bobine-bar {
  height: 5px; border-radius: 3px; background: var(--gris-l); overflow: hidden;
}
.admin-bobine-bar-fill {
  height: 100%; border-radius: 3px; background: var(--vert);
  transition: width .3s;
}

.admin-raquettes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.admin-raquettes-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700; color: var(--noir);
}

.admin-raquette-item {
  border: 1.5px solid var(--gris-l);
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color .2s;
}

.admin-raquette-item.open { border-color: var(--vert-l); }

.admin-raquette-archived {
  border-color: var(--gris-l);
  opacity: .75;
  background: var(--blanc);
}

.admin-raquette-archived-msg {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--danger);
  font-weight: 500;
  margin-top: 4px;
}

.admin-raquette-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  cursor: pointer;
  transition: background .15s;
}

.admin-raquette-toggle:hover { background: var(--blanc); }
.admin-raquette-item.open .admin-raquette-toggle { background: var(--vert-xs); }

.admin-raquette-toggle-left { display: flex; flex-direction: column; gap: 3px; }

.admin-raquette-brand {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--vert-l); font-weight: 500;
}

.admin-raquette-name { font-size: 15px; font-weight: 500; color: var(--noir); }
.admin-raquette-meta { font-size: 12px; color: var(--gris); }

.admin-raquette-chevron { transition: transform .25s; flex-shrink: 0; }
.admin-raquette-item.open .admin-raquette-chevron { transform: rotate(90deg); }

.admin-raquette-content {
  display: none;
  border-top: 1px solid var(--gris-l);
  padding: 20px 22px;
  background: var(--blanc);
}

.admin-raquette-item.open .admin-raquette-content { display: block; }

.admin-cordage-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}
.admin-resa-stock-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--bord);
  transition: background .15s;
}
.admin-resa-stock-item:last-child { border-bottom: none; }
.admin-resa-stock-item:hover { background: var(--bg2); }
.admin-resa-stock-item.selected { background: var(--vert-xs); border-left: 3px solid var(--vert); }

/* ─── MOBILE TOP BAR ─── */
.mobile-topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 54px; background: var(--noir);
  align-items: center; gap: 14px; padding: 0 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.mobile-hamburger {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px; padding: 4px;
}
.mobile-hamburger span {
  display: block; width: 22px; height: 2px;
  background: #fff; border-radius: 2px; transition: .2s;
}

/* Overlay sombre derrière la sidebar ouverte */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 299;
  background: rgba(0,0,0,.45);
}
.sidebar-overlay.sidebar-overlay-open { display: block; }

/* ─── RESPONSIVE (règles communes, complétées en bas du fichier) ─── */
@media (max-width: 768px) {
  .mobile-topbar { display: flex; }
  .hero-content { flex-direction: column; align-items: stretch; }
  .login-card { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .stock-filter-input, .stock-filter-select { width: 100%; min-width: unset; }
  .stock-filters { flex-direction: column; }
  .detail-columns { flex-direction: column; }
  .page-header > div { width: 100%; }
  #btn-compare-toggle { align-self: flex-start; }
  .stock-card-footer { flex-wrap: wrap; gap: 6px; }

  /* ─── Landing / Login mobile ─── */
  .hero {
    min-height: 100svh;
    overflow: visible;
    align-items: flex-start;
    padding: 40px 20px 40px;
  }
  .hero-content {
    flex-direction: column;
    gap: 32px;
    width: 100%;
    max-width: 100%;
    padding: 0;
  }
  .hero-text {
    min-width: unset;
    width: 100%;
  }
  .login-card {
    width: 100%;
    padding: 32px 24px;
    margin: 0;
    box-shadow: 0 8px 40px rgba(0,0,0,.3);
  }
}

/* ── Gestion Prix ── */
.prix-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  background: var(--blanc); border: 1px solid var(--gris-l); border-radius: 12px;
  padding: 14px 20px; margin-bottom: 24px;
}
.prix-marge-ctrl { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.prix-marge-ctrl label { color: var(--gris); white-space: nowrap; }
.prix-marge-ctrl input[type=range] { width: 140px; accent-color: var(--primaire); }
.prix-marge-ctrl input[type=number] {
  border: 1.5px solid var(--gris-l); border-radius: 8px;
  padding: 4px 8px; font-size: 14px; font-family: 'DM Sans',sans-serif;
  text-align: center; outline: none;
}
.prix-marge-ctrl input[type=number]:focus { border-color: var(--primaire); }
.prix-toolbar-hint { font-size: 12px; color: var(--gris); margin: 0; }
.prix-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.prix-table thead th {
  text-align: left; font-size: 11px; font-weight: 600; color: var(--gris);
  text-transform: uppercase; letter-spacing: .05em;
  padding: 10px 14px; border-bottom: 2px solid var(--gris-l);
  white-space: nowrap;
}
.prix-table tbody tr { border-bottom: 1px solid var(--gris-l); transition: background .1s; }
.prix-table tbody tr:hover { background: #f9fafb; }
.prix-table tbody tr.prix-row-missing { background: #fff5f5; }
.prix-table tbody tr.prix-row-missing:hover { background: #ffe8e8; }
.prix-table tbody tr.prix-row-changed { background: #fffbeb; }
.prix-table tbody tr.prix-row-changed:hover { background: #fef3c7; }
.prix-alert-badge { display: inline-block; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 10px; margin-left: 6px; vertical-align: middle; }
.prix-alert-badge.missing { background: #fee2e2; color: #dc2626; }
.prix-alert-badge.changed { background: #fef3c7; color: #b45309; }
.prix-table tbody td { padding: 12px 14px; vertical-align: middle; }
.prix-row-name { font-weight: 600; color: var(--texte); }
.prix-row-name span { font-weight: 400; color: var(--gris); }
.prix-row-sub { font-size: 11px; color: var(--gris); margin-top: 2px; }
.prix-cond { font-weight: 600; }
.prix-cell { white-space: nowrap; }
.prix-cell-link { white-space: nowrap; }
.prix-nd { color: var(--gris); font-size: 12px; }
.prix-sugg { font-weight: 700; color: var(--primaire); font-size: 14px; }
.prix-sugg.plafonne { color: #b45309; }
.prix-marge-badge {
  display: inline-block; margin-left: 6px;
  font-size: 11px; font-weight: 600;
  background: #dcfce7; color: #166534;
  padding: 2px 6px; border-radius: 20px;
}
.prix-sugg.plafonne + .prix-marge-badge { background: #fef9c3; color: #854d0e; }
.prix-group-header {
  display: flex; align-items: baseline; gap: 10px;
  margin: 24px 0 10px; padding-bottom: 8px;
  border-bottom: 2px solid var(--primaire);
}
.prix-group-header span { font-size: 15px; font-weight: 700; color: var(--texte); }
.prix-group-header small { font-size: 12px; color: var(--gris); }
.prix-group-sep { height: 1px; background: var(--gris-l); margin: 32px 0; }
.prix-row-sub em { font-style: normal; color: var(--primaire); font-weight: 500; }
.prix-filter-btns { display: flex; gap: 6px; }
.prix-filter-btn {
  padding: 5px 14px; border-radius: 20px; border: 1.5px solid var(--gris-l);
  background: var(--blanc); color: var(--gris); font-family: 'DM Sans',sans-serif;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s;
}
.prix-filter-btn:hover { border-color: var(--primaire); color: var(--primaire); }
.prix-filter-btn.active { background: var(--primaire); border-color: var(--primaire); color: #fff; }
.btn-save-prix-final {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px; margin-left: 4px;
  border: 1.5px solid var(--primaire); background: var(--blanc);
  color: var(--primaire); cursor: pointer; transition: all .15s; padding: 0;
  vertical-align: middle;
}
.btn-save-prix-final:hover { background: var(--primaire); color: #fff; }
.prix-final-val { font-weight: 700; color: #7c3aed; font-size: 14px; }

/* ── Comparaison raquettes ── */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.raquette-card.compare-selectable { cursor: pointer; position: relative; }
.raquette-card.compare-selected { border: 2px solid var(--primaire); background: #f0f6ff; }
.compare-check {
  position: absolute; top: 10px; right: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--gris-l); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: #fff; transition: all .15s;
}
.compare-selected .compare-check { background: var(--primaire); border-color: var(--primaire); }
.compare-bar {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 8px; padding: 12px 18px; border-radius: var(--radius);
  background: var(--gris-d); color: #fff; font-size: 14px;
}
.compare-bar #compare-bar-label { flex: 1; font-weight: 500; }
.modal-wide { max-width: 860px; width: 95vw; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th {
  background: var(--vert-xs); color: var(--noir); font-weight: 600;
  padding: 12px 14px; text-align: center; border-bottom: 2px solid var(--vert-xl);
  vertical-align: bottom; line-height: 1.4;
}
.compare-table th:first-child { text-align: left; background: var(--gris-l); }
.compare-label { color: var(--gris); font-size: 13px; padding: 9px 14px; white-space: nowrap; }
.compare-val { padding: 9px 14px; text-align: center; font-weight: 500; }
.compare-table tbody tr:nth-child(even) td { background: #fafaf7; }
.compare-table tbody tr:hover td { background: var(--vert-xs); }
.compare-diff { background: #fff7ed !important; color: #c2410c; }
.compare-sep td { height: 4px; background: var(--gris-l); padding: 0; }

/* ── Système de notation cordage ── */
.cordage-global-note { margin-top: 6px; }
.note-globale-mini { color: var(--jaune-d); font-size: 14px; letter-spacing: 1px; }

.cdp-notation { border-top: 1px solid var(--gris-l); margin-top: 14px; padding-top: 12px; }
.cdp-notation-title {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .6px; color: var(--gris); margin-bottom: 10px;
}
.notation-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.notation-label { font-size: 12px; color: var(--noir); flex-shrink: 0; }
.notation-globale { border-top: 1px solid var(--gris-l); margin-top: 6px; padding-top: 6px; }
.star-group { display: flex; gap: 2px; }
.star {
  font-size: 18px; cursor: pointer; color: var(--gris-l);
  transition: color .1s, transform .1s; line-height: 1; user-select: none;
}
.star:hover, .star-group:hover .star { color: var(--jaune); }
.star-group .star:hover ~ .star { color: var(--gris-l); }
.star.star-on { color: var(--jaune-d); }
.notation-comment {
  width: 100%; box-sizing: border-box; margin-top: 10px;
  border: 1.5px solid var(--gris-l); border-radius: 8px;
  padding: 8px; font-family: 'DM Sans', sans-serif; font-size: 13px;
  resize: vertical; color: var(--noir);
}
.notation-comment:focus { outline: none; border-color: var(--primaire); }

/* ── Panneau notation séparé ── */
.cordage-notation-panel {
  width: 200px; flex-shrink: 0; max-width: 100%;
  background: var(--surface); border: 1.5px solid var(--jaune);
  border-radius: 12px;
  padding: 18px 16px;
  position: sticky; top: 20px;
}
@media (max-width: 900px) {
  .cordage-notation-panel { width: 100%; position: static; }
}

/* ── Aide notation ── */
.notation-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gris-l); color: var(--gris);
  font-size: 9px; font-weight: 700; cursor: default;
  margin-left: 4px; vertical-align: middle;
  position: relative; flex-shrink: 0;
}
.notation-help::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: var(--gris-d); color: #fff;
  font-size: 11px; font-weight: 400; line-height: 1.4;
  padding: 8px 10px; border-radius: 8px;
  width: 200px; white-space: normal; text-align: left;
  pointer-events: none; opacity: 0; transition: opacity .15s;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.notation-help::before {
  content: '';
  position: absolute; bottom: calc(100% + 2px); left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--gris-d);
  pointer-events: none; opacity: 0; transition: opacity .15s;
  z-index: 100;
}
.notation-help:hover::after,
.notation-help:hover::before { opacity: 1; }

/* ══ Très petits écrans (≤ 480px — iPhone SE, anciens Android) ══ */
@media (max-width: 480px) {
  .page { padding: 14px 12px; }

  /* Grilles en 1 colonne forcée */
  .raquettes-grid { grid-template-columns: 1fr; }
  .stock-grid { grid-template-columns: 1fr; }

  /* Modales : réduire les paddings */
  .modal { padding: 20px 16px; max-height: 92vh; }
  .modal h2 { font-size: 18px; }

  /* Boutons dans les modales empilés */
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; justify-content: center; }

  /* Cards raquette plus compactes */
  .raquette-card { padding: 16px; }
  .raquette-card-brand { font-size: 11px; }
  .raquette-card-name { font-size: 17px; }

  /* Stock cards */
  .stock-card { padding: 14px; }
  .stock-card-header { gap: 8px; }
  .stock-card-actions { flex-direction: column; gap: 4px; }
  .stock-card-actions .btn-sm { width: 100%; justify-content: center; }

  /* Historique */
  .cordage-entry { padding: 12px 14px; }
  .cordage-entry-main { flex-direction: column; gap: 8px; align-items: flex-start; }
  .cordage-del { width: 100%; justify-content: center; }

  /* Panneau détail cordage */
  .cdp-fields { gap: 6px; }

  /* Notation */
  .notation-row { gap: 4px; }
  .notation-label { font-size: 11px; }
  .star { font-size: 20px; }

  /* Section admin Gestion Prix */
  .prix-table { min-width: 480px; font-size: 12px; }
  .prix-table thead th, .prix-table tbody td { padding: 8px 10px; }

  /* Compare bar */
  .compare-bar { flex-direction: column; align-items: stretch; }
  .compare-bar .btn { width: 100%; justify-content: center; }

  /* Page header */
  h1 { font-size: 22px; }
  .page-header p { font-size: 13px; }

  /* Form */
  .form-group label { font-size: 12px; }
  input, select, textarea { font-size: 16px; } /* évite le zoom auto iOS */
}

/* ─── Page Réservation ─── */
.resa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.resa-card {
  background: var(--surface); border-radius: 14px;
  border: 1.5px solid var(--gris-l); padding: 20px;
  cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.resa-card:hover { border-color: var(--vert-xl); box-shadow: var(--shadow); }
.resa-card-full { opacity: .6; }
.resa-card-brand { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--gris); margin-bottom: 2px; }
.resa-card-name { font-size: 18px; font-weight: 700; color: var(--noir); margin-bottom: 10px; }
.resa-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.resa-card-specs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.spec-badge-sm {
  font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 20px;
  background: var(--vert-xs); color: var(--vert); border: 1px solid var(--vert-xl);
}
.resa-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.resa-card-qty { font-size: 13px; font-weight: 500; }
.resa-card-prix { font-size: 15px; font-weight: 700; color: var(--vert); white-space: nowrap; }
.resa-qty-ok { color: var(--vert); }
.resa-qty-none { color: var(--danger); }
.resa-reserved { color: var(--jaune-d); font-weight: 600; }

/* Bobine personnelle */
/* Modal cordage client */
.cdc-match-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-radius: 10px;
  border: 1.5px solid var(--gris-l); margin-bottom: 8px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.cdc-match-item:hover { border-color: var(--vert); background: var(--vert-xs); }
.cdc-match-empty { opacity: .5; cursor: not-allowed; }
.cdc-match-empty:hover { border-color: var(--gris-l); background: transparent; }

/* ─── Tensions info (modal client) ─── */
.tension-info-toggle {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--primaire);
  cursor: pointer; margin-bottom: 12px;
  user-select: none;
}
.tension-info-toggle:hover { text-decoration: underline; }

.tension-info-content {
  display: none;
  background: #f5f9f6;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 12px; line-height: 1.6;
  border-left: 3px solid var(--primaire);
}
.tension-info-content.open { display: block; }
.tension-info-item { margin-bottom: 10px; }
.tension-info-item:last-child { margin-bottom: 0; }
.tension-info-item p { color: var(--gris-d); margin-top: 2px; }

/* ─── Badge réservations en attente (carte stock) ─── */
.stock-resa-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 20px;
  padding: 2px 8px;
}

/* ─── Page Mes réservations (client) ─── */
.mresa-section-header {
  font-size: 12px; font-weight: 700; color: var(--gris);
  text-transform: uppercase; letter-spacing: .06em;
  padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.mresa-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  border: 1px solid var(--gris-l);
}
.mresa-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 12px;
}
.mresa-cordage {
  font-weight: 700;
  font-size: 15px;
  color: var(--noir);
}
.mresa-raquette {
  font-size: 13px;
  color: var(--gris-d);
  margin-top: 2px;
}
.mresa-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.mresa-tensions {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}
.mresa-tensions span {
  font-size: 12px;
  font-weight: 600;
  color: var(--primaire);
  background: #f0faf5;
  padding: 2px 8px;
  border-radius: 20px;
}
.mresa-date {
  font-size: 12px;
  color: var(--gris);
  margin-bottom: 12px;
}
.mresa-prix {
  background: var(--surface-2, #f7f7f7);
  border-radius: 8px;
  padding: 10px 12px;
}
.mresa-prix-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--gris-d);
  padding: 2px 0;
}
.mresa-prix-total {
  border-top: 1px solid var(--gris-l);
  margin-top: 6px;
  padding-top: 6px;
  font-weight: 700;
  color: var(--noir);
  font-size: 14px;
}

/* ─── Lien cordage cliquable (liste admin réservations) ─── */
.resa-cordage-link {
  cursor: pointer;
  color: var(--primaire);
  font-weight: 600;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.resa-cordage-link:hover { color: var(--primaire-d, #1b5e3b); }

/* ─── Bouton re-commande historique ─── */
.cordage-reorder-btn {
  margin-top: 8px;
  display: inline-flex; align-items: center; gap: 5px;
}

/* Banner "Je fournis mon propre cordage" */
.resa-own-cordage-banner {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  color: #fff; border-radius: 16px; padding: 20px 24px;
  cursor: pointer; margin-bottom: 20px;
  transition: opacity .15s, transform .15s;
  user-select: none;
}
.resa-own-cordage-banner:hover { opacity: .92; transform: translateY(-1px); }
.resa-own-cordage-icon {
  background: rgba(255,255,255,.15); border-radius: 12px;
  padding: 10px; display: flex; flex-shrink: 0;
}
.resa-own-cordage-title { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.resa-own-cordage-sub { font-size: 13px; opacity: .8; }

.resa-own-cordage-option {
  display: flex; flex-direction: column; gap: 3px;
  border: 2px solid var(--border, #e5e7eb); border-radius: 12px;
  padding: 14px 16px; cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.resa-own-cordage-option:hover { border-color: var(--primaire); background: var(--surface-2, #f7f7f7); }
.resa-own-cordage-option.selected { border-color: var(--primaire); background: #eff6ff; }
.resa-own-cordage-option strong { font-size: 14px; color: var(--noir); }
.resa-own-cordage-option span { font-size: 12px; color: var(--gris); }
.resa-own-cordage-option.option-not-in-stock strong { color: var(--gris); }

/* Layout browse réservation : sidebar filtres + grille */
.resa-browse-layout {
  display: flex; gap: 24px; align-items: flex-start;
}
.resa-filters {
  flex: 0 0 200px;
  background: var(--surface); border: 1.5px solid var(--gris-l);
  border-radius: 14px; padding: 18px 16px;
  display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: 16px;
}
.resa-browse-results { flex: 1; min-width: 0; }
.resa-filter-group { display: flex; flex-direction: column; gap: 6px; }
.resa-filter-group label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--gris); }
.resa-filter-group select {
  padding: 7px 10px; border-radius: 8px; border: 1.5px solid var(--gris-l);
  font-size: 13px; background: #fff; color: var(--noir); cursor: pointer; width: 100%;
}
.resa-filter-prix-wrap { display: flex; flex-direction: column; gap: 4px; }
.resa-filter-prix-wrap input[type=range] { width: 100%; accent-color: var(--vert); cursor: pointer; }
.resa-filter-prix-wrap span { font-size: 13px; font-weight: 600; color: var(--vert); }
.resa-filter-specs { display: flex; flex-direction: column; gap: 6px; }
.resa-spec-check {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12px; font-weight: 500; padding: 5px 10px;
  border-radius: 8px; border: 1.5px solid var(--gris-l);
  background: #fff; transition: border-color .15s, background .15s;
  user-select: none;
}
.resa-spec-check:has(input:checked) { border-color: var(--vert); background: var(--vert-xs); color: var(--vert); }
.resa-spec-check input { display: none; }

@media (max-width: 768px) {
  .resa-browse-layout { flex-direction: column; }
  .resa-filters { flex: none; width: 100%; position: static; flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .resa-filter-group { min-width: 140px; flex: 1; }
}

.resa-section-mine {
  background: var(--vert-xs); border: 1.5px solid var(--vert-xl);
  border-radius: 16px; padding: 20px; margin-bottom: 8px;
}
.resa-section-mine .resa-grid { margin-bottom: 0; }
.resa-card-mine { border-color: var(--vert-xl); background: #fff; }
.resa-card-mine:hover { border-color: var(--vert); }
.resa-section-maison {
  background: rgba(233,196,106,.06); border-color: rgba(233,196,106,.35);
}
.resa-card-maison { border-color: rgba(233,196,106,.4); }
.resa-card-maison:hover { border-color: var(--jaune); }
.resa-section-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: var(--vert); margin-bottom: 14px;
}
.resa-section-title-neutral { color: var(--gris); }

/* Modale détail réservation */
.modal-resa { max-width: 860px; width: 95vw; overflow-x: hidden; }

/* Modale succès réservation */
.modal-resa-success {
  max-width: 400px; text-align: center;
  padding: 40px 32px;
}
.resa-success-icon {
  display: flex; justify-content: center; margin-bottom: 16px;
  animation: pop-in .35s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes pop-in {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.modal-resa-layout {
  display: flex; gap: 24px; align-items: flex-start;
  flex-wrap: wrap;
}
.modal-resa-radar { flex: 0 0 200px; min-width: 0; }
.modal-resa-radar svg { width: 100%; height: auto; }
.modal-resa-info { flex: 1; min-width: 220px; }

/* Récapitulatif confirmation réservation */
.resa-recap-table { border:1px solid var(--gris-l); border-radius:10px; overflow:hidden; margin:0 auto; max-width:360px; font-size:13px; }
.resa-recap-row { display:flex; justify-content:space-between; align-items:center; padding:8px 14px; border-bottom:1px solid var(--gris-l); gap:12px; }
.resa-recap-row:last-child { border-bottom:none; }
.resa-recap-row span:first-child { color:var(--gris-d); }
.resa-recap-row span:last-child { font-weight:600; white-space:nowrap; }
.resa-recap-total { background:var(--vert-xs); }
.resa-recap-total span { color:var(--vert) !important; font-size:14px; }

/* Sélection raquette */
.resa-racket-item {
  padding: 14px 16px; border-radius: 10px;
  border: 1.5px solid var(--gris-l); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.resa-racket-item:hover { border-color: var(--vert-xl); }
.resa-racket-item.selected { border-color: var(--vert); background: var(--vert-xs); }
.resa-racket-disabled { cursor: default; opacity: .6; background: #fafafa; }
.resa-racket-disabled:hover { border-color: var(--gris-l); }
.resa-extra-link { font-size:12px; color:var(--primaire); cursor:pointer; text-decoration:underline dotted; }
.resa-extra-link:hover { color:var(--vert); }

/* Settings notification section */
.form-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--gris); margin-bottom: 12px;
}

@media (max-width: 600px) {
  .modal-resa-layout { flex-direction: column; gap: 16px; }
  .modal-resa-radar { flex: none; width: 100%; max-width: 200px; margin: 0 auto; }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE ENHANCEMENTS (≤ 768px) — ne pas modifier le desktop
   ═══════════════════════════════════════════════════════════════ */

/* ── Bottom nav (toujours déclaré, caché en desktop) ── */
#mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {

  /* ── Layout de base ── */
  html, body { height: 100%; overflow: hidden; }

  /* Landing login : scrollable sur mobile */
  #landing {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
  }

  #app {
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-top: 54px; /* topbar height */
  }

  .main {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .page {
    display: none;
    height: calc(100dvh - 54px - 60px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    max-width: 100%;
  }

  .page.active { display: block; }

  /* Pages avec layout interne fixe (stock, clients) */
  #page-stock, #page-mes-fournitures, #page-reservation {
    height: calc(100dvh - 54px - 60px - env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    padding: 0;
  }
  #page-stock .stock-content, #page-mes-fournitures .stock-content, #page-reservation .stock-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
  }

  #page-clients {
    height: calc(100dvh - 54px - 60px - env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    padding: 0;
  }
  .clients-list-panel { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .clients-detail-panel { overflow-y: auto; -webkit-overflow-scrolling: touch; }

  /* ── Topbar mobile : cacher le hamburger (remplacé par bottom nav) ── */
  .mobile-hamburger { display: none; }
  .mobile-topbar { justify-content: center; }

  /* ── Sidebar : cacher sur mobile (bottom nav à la place) ── */
  .sidebar { display: none !important; }
  .sidebar-overlay { display: none !important; }

  /* ── Bottom nav ── */
  #mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    background: var(--noir);
    z-index: 150;
    align-items: stretch;
    border-top: 1px solid rgba(255,255,255,.1);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mbn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: rgba(255,255,255,.45);
    cursor: pointer;
    transition: color .15s;
    min-height: 44px;
    padding: 4px 2px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .2px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mbn-item svg {
    width: 22px; height: 22px;
    stroke-width: 1.7;
  }

  .mbn-item span {
    font-size: 10px;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
  }

  .mbn-item:hover,
  .mbn-item.active {
    color: var(--jaune);
  }

  .mbn-logout {
    color: rgba(255, 100, 100, 0.7);
  }
  .mbn-logout:hover {
    color: #ff6464;
  }

  /* ── Toast : remonter au-dessus de la bottom nav ── */
  .toast {
    bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 16px);
  }

  /* ── Page header ── */
  .page-header {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
  }
  .page-header h1 {
    font-size: 20px;
  }
  .page-header p { font-size: 13px; }

  /* ── Raquettes grid ── */
  .raquettes-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
  }

  /* ── Boutons touch targets ── */
  .btn-sm {
    min-height: 40px;
    padding: 8px 14px;
  }

  /* ── Items de liste cliquables ── */
  .client-item { padding: 14px 14px; }
  .admin-raquette-toggle { padding: 14px 16px; }
  .cordage-entry { padding: 14px 16px; }
  .admin-cordage-2col { flex-direction: column; }
  .admin-cordage-notes-col { width: 100%; }
  .cdc-match-item { padding: 12px 14px; }

  /* ── Tables : scroll horizontal ── */
  #prix-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .prix-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }

  /* ── Inputs : font-size 16px pour éviter zoom iOS ── */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* ── Modals bottom sheet ── */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
    padding: 28px 20px 20px;
    margin: 0;
    overflow-y: auto;
    position: relative;
  }

  /* Handle visuel (barre grise) */
  .modal::before {
    content: '';
    display: block;
    width: 40px; height: 4px;
    background: var(--gris-l);
    border-radius: 2px;
    margin: 0 auto 20px;
  }

  /* Modal wide (comparaison) reste full */
  .modal-wide { max-width: 100%; border-radius: 20px 20px 0 0; }

  /* Modal resa layout */
  .modal-resa { max-width: 100%; width: 100%; }

  /* ── Detail layout : colonne ── */
  .detail-layout { flex-direction: column; gap: 16px; }
  .detail-left { width: 100%; }
  .detail-card { padding: 16px; }

  /* ── Historique body ── */
  .historique-body { flex-direction: column; }
  .cordage-detail-panel { width: 100%; position: static; }
  .cordage-notation-panel { width: 100%; position: static; border-radius: 12px; }

  /* ── Stock layout ── */
  .stock-layout { flex-direction: column; overflow: auto; }
  .stock-subnav {
    width: 100%; flex-direction: row;
    overflow-x: auto; padding: 0;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
  }
  .stock-subnav-item { padding: 10px 14px; white-space: nowrap; }
  .stock-content { padding: 16px; }
  .stock-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }

  /* ── Clients layout ── */
  .clients-layout { flex-direction: column; overflow: visible; }
  .clients-list-panel { width: 100%; border-right: none; border-bottom: 1.5px solid var(--gris-l); }
  .clients-detail-panel { display: none; padding: 16px; }
  #page-clients.clients-showing-detail .clients-list-panel { display: none; }
  #page-clients.clients-showing-detail .clients-detail-panel { display: block; }
  .clients-mobile-back { display: flex !important; margin-bottom: 16px; }

  /* ── Resa browse layout ── */
  .resa-browse-layout { flex-direction: column; }
  .resa-filters {
    flex: none; width: 100%;
    position: static;
    flex-direction: row; flex-wrap: wrap; gap: 12px;
  }
  .resa-filter-group { min-width: 140px; flex: 1; }

  /* ── Settings ── */
  .settings-section { padding: 20px 16px; }

  /* ── Compare bar ── */
  .compare-bar { flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .compare-bar #compare-bar-label { width: 100%; }
  .compare-table { font-size: 12px; }
  .compare-label, .compare-val { padding: 8px 10px; }

  /* ── Notation stars ── */
  .star { font-size: 22px; }

  /* ── Prix toolbar ── */
  .prix-marge-ctrl input[type=range] { flex: 1; width: auto; }
  .prix-filter-btns { flex-wrap: wrap; }
  .prix-table { min-width: 560px; }
}

/* ── Très petits écrans (≤ 480px) ── */
@media (max-width: 480px) {
  .page { padding: 12px; }

  .raquettes-grid { grid-template-columns: 1fr; }
  .stock-grid { grid-template-columns: 1fr; }

  .modal { padding: 24px 16px 16px; }
  .modal h2 { font-size: 18px; margin-bottom: 16px; }

  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; justify-content: center; }

  .raquette-card { padding: 14px; }
  .raquette-card-name { font-size: 17px; }

  .stock-card { padding: 12px; }
  .stock-card-actions { flex-direction: column; gap: 4px; }
  .stock-card-actions .btn-sm { width: 100%; justify-content: center; }

  .cordage-entry { padding: 12px 12px; }
  .cordage-entry-main { flex-direction: column; gap: 8px; align-items: flex-start; }
  .cordage-del { width: 100%; justify-content: center; }

  .notation-row { gap: 4px; }
  .notation-label { font-size: 11px; }
  .star { font-size: 20px; }

  .prix-table { min-width: 480px; font-size: 12px; }
  .prix-table thead th, .prix-table tbody td { padding: 8px 10px; }

  .compare-bar { flex-direction: column; align-items: stretch; }
  .compare-bar .btn { width: 100%; justify-content: center; }

  .page-header h1 { font-size: 18px; }
  .page-header p { font-size: 12px; }

  .form-group label { font-size: 12px; }
}

/* ══════════════════ ALERTES PRIX ══════════════════ */

#price-alerts-panel {
  position: fixed;
  bottom: 80px;
  right: 16px;
  z-index: 1200;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1.5px solid #f97316;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.16);
  flex-direction: column;
  overflow: hidden;
  max-height: 70vh;
}

.price-alerts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  gap: 8px;
}

.price-alerts-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
  color: #c2410c;
}

.price-alerts-title svg { stroke: #c2410c; flex-shrink: 0; }

.price-alerts-dismiss-all {
  background: #f97316;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.price-alerts-dismiss-all:hover { background: #ea6c0a; }

#price-alerts-list {
  overflow-y: auto;
  max-height: calc(70vh - 48px);
}

.price-alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
}
.price-alert-item:last-child { border-bottom: none; }

.price-alert-body { flex: 1; min-width: 0; }

.price-alert-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--noir);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-alert-detail {
  font-size: 12px;
  color: var(--gris);
  margin-top: 2px;
}

.price-alert-type {
  background: #e5e7eb;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  color: #374151;
}

.price-alert-meta {
  font-size: 11px;
  color: #f97316;
  margin-top: 3px;
  font-style: italic;
}

.price-alert-ok {
  background: #f0fdf4;
  color: #16a34a;
  border: 1.5px solid #bbf7d0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.price-alert-ok:hover { background: #dcfce7; border-color: #86efac; }

/* ══════════════════ CONSEILLER RAQUETTE ══════════════════ */

.raq-quiz-wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 8px 0 32px;
}

.raq-disclaimer {
  font-size: 13px;
  color: #6b7280;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.raq-progress-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 99px;
  margin-bottom: 10px;
  overflow: hidden;
}

.raq-progress-fill {
  height: 100%;
  background: var(--vert);
  border-radius: 99px;
  transition: width 0.35s ease;
}

.raq-step-label {
  font-size: 12px;
  color: var(--gris);
  margin-bottom: 20px;
}

.raq-question {
  font-size: 20px;
  font-weight: 700;
  color: var(--noir);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.3;
}

.raq-icon { font-size: 26px; flex-shrink: 0; }

.raq-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.raq-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}

.raq-option:hover { border-color: var(--vert-l); background: var(--vert-xs); }
.raq-option.selected { border-color: var(--vert); background: var(--vert-xs); }

.raq-option-label {
  font-weight: 600;
  font-size: 15px;
  color: var(--noir);
}

.raq-option-sub {
  font-size: 13px;
  color: var(--gris);
  margin-top: 2px;
}

.raq-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Results */
.raq-results-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 8px 0 40px;
}

.raq-results-header {
  margin-bottom: 24px;
}

.raq-profile-label {
  display: inline-block;
  background: var(--vert-xs);
  color: var(--vert-f);
  font-weight: 600;
  font-size: 13px;
  border-radius: 20px;
  padding: 3px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--vert-l);
}

.raq-results-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--noir);
  margin: 0 0 6px;
}

.raq-results-sub {
  font-size: 14px;
  color: var(--gris);
  margin: 0;
}

.raq-warning {
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #9a3412;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
}

.raq-warning svg { flex-shrink: 0; margin-top: 1px; stroke: #c2410c; }

.raq-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.raq-spec-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
}

.raq-spec-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.raq-spec-icon { font-size: 17px; }

.raq-spec-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gris);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.raq-spec-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--vert-f);
  margin-bottom: 10px;
}

.raq-spec-bar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.raq-spec-bar {
  flex: 1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 99px;
  overflow: hidden;
}

.raq-spec-bar-fill {
  height: 100%;
  background: var(--vert);
  border-radius: 99px;
}

.raq-spec-bar-low, .raq-spec-bar-high {
  font-size: 10px;
  color: var(--gris);
  white-space: pre-line;
  text-align: center;
  flex-shrink: 0;
  width: 36px;
  line-height: 1.2;
}

.raq-spec-desc {
  font-size: 12px;
  color: #4b5563;
  line-height: 1.5;
}

.raq-results-footer { text-align: center; }

.raq-tip {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 13px;
  color: #166534;
  text-align: left;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .raq-question { font-size: 17px; }
  .raq-specs-grid { grid-template-columns: 1fr; }
}

.cord-raq-banner {
  font-size: 13px;
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ── Conseiller cordage ── */
.cord-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.cord-profile-card {
  background: var(--blanc);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.cord-profile-icon { font-size: 22px; margin-bottom: 6px; }
.cord-profile-label { font-size: 11px; font-weight: 600; color: var(--gris); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.cord-profile-val { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.cord-profile-desc { font-size: 13px; color: #374151; line-height: 1.55; }
.cord-profile-bar-wrap { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; color: var(--gris); }
.cord-priorities { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.cord-priority-item { font-size: 13px; color: #374151; }
.cord-priority-top { font-weight: 600; color: var(--noir); font-size: 14px; }

.cord-stock-section { margin-top: 8px; }
.cord-stock-title { font-size: 16px; font-weight: 600; margin-bottom: 14px; color: var(--noir); }
.cord-stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.cord-stock-card {
  background: var(--blanc);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.cord-stock-card-match { border-color: var(--vert); }
.cord-stock-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.cord-stock-type-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.cord-stock-recommended { font-size: 11px; color: var(--vert); font-weight: 600; }
.cord-stock-brand { font-size: 11px; color: var(--gris); text-transform: uppercase; letter-spacing: .05em; }
.cord-stock-model { font-size: 15px; font-weight: 600; margin: 2px 0 6px; }
.cord-stock-details { font-size: 12px; color: var(--gris); }
.cord-stock-prix { font-size: 16px; font-weight: 700; color: var(--vert); margin-top: 6px; }

@media (max-width: 600px) {
  .cord-profile-grid { grid-template-columns: 1fr; }
  .cord-stock-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .cord-stock-grid { grid-template-columns: 1fr; }
}

/* ─── Page Mon stock de fournitures (client) ─── */
.mf-grid {
  padding: 16px;
  max-width: 900px;
}
.mf-card {
  background: var(--surface);
  border: 1px solid var(--gris-l);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.mf-card-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--noir);
  margin-bottom: 4px;
}
.mf-card-sub {
  font-size: 12px;
  color: var(--gris);
  margin-bottom: 6px;
}
.mf-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 3px 0;
  border-bottom: 1px solid var(--gris-ll, #f0f0f0);
}
.mf-detail-row:last-child { border-bottom: none; }
.mf-detail-row span:first-child { color: var(--gris); }
.mf-detail-row span:last-child  { font-weight: 600; }

.cfqty-val {
  text-decoration: underline dotted var(--gris);
  text-underline-offset: 2px;
}
.cfqty-val:hover { color: var(--primaire); }

/* ══ FINANCES ══ */
#page-finances { overflow-y: auto; }

.fin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 24px 0 8px;
}
.fin-kpi-card {
  background: var(--blanc);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 18px;
}
.fin-kpi-label { font-size: 12px; font-weight: 600; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.fin-kpi-value { font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 6px; }
.fin-kpi-sub   { font-size: 12px; color: var(--gris); }

.fin-section { margin-top: 32px; }
.fin-section-title { font-size: 16px; font-weight: 700; margin: 0 0 16px; }

/* Répartition */
.fin-breakdown { display: flex; flex-direction: column; gap: 16px; }
.fin-bar-wrap  { display: flex; height: 28px; border-radius: 8px; overflow: hidden; gap: 2px; background: var(--fond); }
.fin-bar-seg   { height: 100%; transition: width .3s; min-width: 4px; }
.fin-breakdown-legend { display: flex; flex-direction: column; gap: 8px; }
.fin-legend-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.fin-legend-dot  { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.fin-legend-label { flex: 1; color: var(--texte); }
.fin-legend-val  { font-weight: 600; min-width: 70px; text-align: right; }
.fin-legend-pct  { color: var(--gris); min-width: 36px; text-align: right; font-size: 12px; }

/* Tableau mensuel */
.fin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fin-table th, .fin-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.fin-table th { font-size: 12px; font-weight: 600; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; background: var(--fond); }
.fin-table tbody tr:hover { background: var(--fond); }
.fin-table tfoot td { background: var(--fond); border-top: 2px solid var(--border); }
.fin-table .num { text-align: right; }
.fin-total-col { background: rgba(45,106,79,.06); }

/* Stock cards */
.fin-stock-grid { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.fin-stock-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--blanc); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
}
.fin-stock-icon  { font-size: 22px; width: 32px; text-align: center; flex-shrink: 0; }
.fin-stock-info  { flex: 1; }
.fin-stock-name  { font-weight: 600; font-size: 14px; }
.fin-stock-detail { font-size: 12px; color: var(--gris); margin-top: 2px; }
.fin-stock-val   { font-size: 16px; font-weight: 700; color: var(--primaire); }
.fin-stock-total { border-color: var(--primaire); background: rgba(45,106,79,.05); }
.fin-stock-total .fin-stock-val { font-size: 20px; }

/* ── Finances : sélecteur année ── */
.fin-year-bar { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; align-items: center; }
.fin-year-btn { padding: 6px 18px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--fond); font-size: 14px; font-weight: 600; cursor: pointer; color: var(--texte); transition: all .15s; }
.fin-year-btn:hover { border-color: var(--primaire); color: var(--primaire); }
.fin-year-btn.active { background: var(--primaire); border-color: var(--primaire); color: #fff; }
.fin-year-title { font-size: 18px; font-weight: 700; color: var(--texte); }

/* ── Finances : indicateurs fiscaux ── */
.fin-fiscal-section { background: linear-gradient(135deg, #f0fdf4, #fefce8); border-radius: 12px; padding: 20px; border: 1px solid #d1fae5; }
.fin-regime-badge { display: inline-block; background: #dbeafe; color: #1d4ed8; border-radius: 20px; padding: 2px 12px; font-size: 12px; font-weight: 600; margin-left: 8px; vertical-align: middle; }
.fin-fiscal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.fin-fiscal-card { background: #fff; border-radius: 10px; padding: 16px; border: 1px solid var(--border); }
.fin-fiscal-label { font-size: 11px; font-weight: 600; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.fin-fiscal-value { font-size: 22px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 4px; }
.fin-fiscal-sub { font-size: 11px; color: var(--gris); margin-bottom: 8px; }
.fin-fiscal-bar { height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.fin-fiscal-bar-fill { height: 100%; border-radius: 3px; transition: width .4s; }
.fin-fiscal-note { font-size: 11px; color: var(--gris); margin: 0; font-style: italic; }

/* ── Finances : bilan annuel ── */
.fin-bilan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.fin-bilan-block { border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.fin-bilan-recettes  { border-color: #d1fae5; background: #f0fdf4; }
.fin-bilan-depenses  { border-color: #fee2e2; background: #fff5f5; }
.fin-bilan-resultat  { border-color: var(--primaire); background: rgba(45,106,79,.04); }
.fin-bilan-title { font-size: 12px; font-weight: 700; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 14px; }
.fin-bilan-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.fin-bilan-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.fin-bilan-row span { color: var(--gris); }
.fin-bilan-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1.5px solid var(--border); font-size: 14px; }
.fin-bilan-total strong { font-size: 16px; }
.fin-bilan-resultat-val { font-size: 30px; font-weight: 800; letter-spacing: -1px; }

/* ── Finances : tableau recettes ── */
.fin-table-recettes { font-size: 13px; }
.fin-row-quarter td { background: #f8fafc; color: var(--gris); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 6px 14px; border-bottom: none; }
.fin-row-override { background: #fffbeb; }
.fin-row-empty td { color: var(--gris); font-style: italic; }
.fin-badge-libre { display: inline-block; background: #fef3c7; color: #92400e; border-radius: 4px; padding: 1px 5px; font-size: 10px; font-weight: 600; margin-left: 4px; vertical-align: middle; }

/* ── Finances : badges catégorie achats ── */
.fin-cat-badge { display: inline-block; border-radius: 4px; padding: 2px 8px; font-size: 11px; font-weight: 600; }
.fin-cat-cordage          { background: #dbeafe; color: #1d4ed8; }
.fin-cat-surgrip          { background: #ede9fe; color: #6d28d9; }
.fin-cat-grip             { background: #d1fae5; color: #065f46; }
.fin-cat-bandeprotection  { background: #fee2e2; color: #991b1b; }
