/* =========================================================
   Signalements camions — système de design
   Palette bordeaux / rosé, cartes arrondies, ombres douces
   ========================================================= */

:root {
  /* Bordeaux */
  --wine-900: #3f0518;
  --wine-800: #5d0828;
  --wine-700: #7d0f38;
  --wine-600: #9c1748;
  --wine-500: #bd2a60;
  --wine-400: #d9608b;

  /* Rosés */
  --rose-200: #f6cedd;
  --rose-100: #fce5ed;
  --rose-50:  #fdf3f7;

  /* Encres */
  --ink:    #26101a;
  --ink-2:  #5c3d48;
  --muted:  #8d7079;
  --line:   #f0dfe6;
  --line-2: #e6ccd7;

  /* Sémantique */
  --danger: #c01040;
  --warn:   #b45309;
  --ok:     #15803d;

  /* Surfaces */
  --card: #ffffff;
  --glass: rgba(255, 255, 255, .72);

  /* Rayons */
  --r-xl: 30px;
  --r-lg: 24px;
  --r:    18px;
  --r-sm: 13px;
  --pill: 999px;

  /* Ombres */
  --sh-sm: 0 1px 2px rgba(93, 8, 40, .05), 0 4px 12px rgba(93, 8, 40, .05);
  --sh:    0 2px 4px rgba(93, 8, 40, .04), 0 12px 30px rgba(93, 8, 40, .07);
  --sh-lg: 0 8px 20px rgba(93, 8, 40, .10), 0 24px 48px rgba(93, 8, 40, .10);
  --sh-wine: 0 6px 18px rgba(125, 15, 56, .30);

  --grad-wine: linear-gradient(135deg, #9c1748 0%, #7d0f38 45%, #5d0828 100%);
  --grad-wine-soft: linear-gradient(135deg, #fce5ed 0%, #f6cedd 100%);

  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: #fdf5f8;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background:
    radial-gradient(1100px 620px at 88% -8%, rgba(188, 42, 96, .13), transparent 62%),
    radial-gradient(760px 520px at -12% 8%, rgba(246, 206, 221, .55), transparent 60%),
    linear-gradient(168deg, #fdf7fa 0%, #fbedf3 48%, #fdf5f8 100%);
  background-attachment: fixed;
}

a { color: var(--wine-600); text-underline-offset: 2px; }

::selection { background: var(--rose-200); color: var(--wine-900); }

.wrap { max-width: 720px; margin: 0 auto; padding: 18px 16px 48px; }
.wrap-wide { max-width: 1180px; }

/* ---------- Titres ---------- */

h1 {
  font-size: 27px;
  line-height: 1.18;
  letter-spacing: -.025em;
  margin: 0 0 6px;
  font-weight: 800;
}
h2 { font-size: 19px; margin: 28px 0 10px; letter-spacing: -.015em; }
h3 {
  font-size: 12px;
  margin: 0 0 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 700;
}
.lead { color: var(--ink-2); margin: 0 0 20px; }

.accent { color: var(--wine-600); }

/* ---------- Barre admin (haut sur grand écran) ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 18px;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(240, 223, 230, .9);
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-right: auto;
  font-size: 16px;
}
.topbar .brand .mark {
  width: 30px; height: 30px;
  border-radius: 10px;
  background: var(--grad-wine);
  box-shadow: var(--sh-wine);
  display: grid; place-items: center;
  font-size: 15px;
}
.topbar a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--pill);
  transition: background .15s, color .15s;
}
.topbar a:hover { background: var(--rose-50); color: var(--wine-700); }
.topbar a.active { background: var(--rose-100); color: var(--wine-700); }
.topbar form { margin: 0; }
.topbar .logout {
  background: none;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  border-radius: var(--pill);
  padding: 7px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.topbar .logout:hover { border-color: var(--wine-400); color: var(--wine-700); }

/* ---------- Barre de navigation flottante (mobile) ---------- */

.tabbar { display: none; }

@media (max-width: 760px) {
  .topbar .nav-link, .topbar .logout { display: none; }

  .tabbar {
    position: fixed;
    left: 50%;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px;
    width: min(420px, calc(100% - 28px));
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: var(--pill);
    box-shadow: var(--sh-lg);
  }
  .tabbar form { flex: 1; display: flex; margin: 0; }
  .tabbar a, .tabbar .tabitem {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    border: 0;
    background: none;
    border-radius: var(--pill);
    text-decoration: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
  }
  .tabbar .ico { font-size: 18px; line-height: 1; }
  .tabbar a.active { color: var(--wine-700); background: var(--rose-100); }
  .tabbar .fab {
    flex: none;
    width: 54px; height: 54px;
    margin: -18px 2px 0;
    border-radius: 50%;
    background: var(--grad-wine);
    color: #fff;
    font-size: 24px;
    box-shadow: var(--sh-wine);
    border: 3px solid #fff;
    padding: 0;
  }
  .tabbar .fab.active { background: var(--grad-wine); color: #fff; }

  body.has-tabbar .wrap { padding-bottom: 104px; }
}

/* ---------- En-tête conducteur (camion) ---------- */

.truckbar {
  position: relative;
  overflow: hidden;
  background: var(--grad-wine);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--sh-wine);
  display: flex;
  align-items: center;
  gap: 16px;
}
.truckbar::before {
  content: "";
  position: absolute;
  inset: -60% -30% auto auto;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 62%);
  pointer-events: none;
}
.truckbar::after {
  content: "";
  position: absolute;
  left: -40px; bottom: -120px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .10), transparent 65%);
  pointer-events: none;
}
.truckbar .icon {
  position: relative;
  width: 54px; height: 54px;
  flex: none;
  display: grid; place-items: center;
  font-size: 27px;
  border-radius: 17px;
  background: rgba(255, 255, 255, .17);
  border: 1px solid rgba(255, 255, 255, .25);
}
.truckbar .id {
  position: relative;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.1;
}
.truckbar .meta {
  position: relative;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  margin-top: 3px;
}

/* ---------- Cartes ---------- */

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--sh);
  margin-bottom: 16px;
}
.card.pad-0 { padding: 0; overflow: hidden; }

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: var(--r);
  padding: 13px 16px;
  margin-bottom: 16px;
  font-size: 15px;
  border: 1px solid;
  box-shadow: var(--sh-sm);
}
.notice-info  { background: #fff; border-color: var(--line); color: var(--ink-2); }
.notice-warn  { background: #fffbeb; border-color: #fde9b8; color: #92400e; }
.notice-error { background: #fff1f4; border-color: #fbd0dc; color: #9f0c38; }
.notice-ok    { background: #f1fbf4; border-color: #c4ecd1; color: #166534; }

/* ---------- Formulaires ---------- */

.field { margin-bottom: 24px; }
.field > label, .field .legend {
  display: block;
  font-weight: 700;
  margin-bottom: 7px;
  letter-spacing: -.01em;
}
.hint { color: var(--muted); font-size: 14px; margin: -2px 0 10px; line-height: 1.45; }
.req { color: var(--wine-600); }

input[type=text], input[type=tel], input[type=password], input[type=search], textarea, select {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  min-height: 52px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #bda3ad; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--wine-500);
  box-shadow: 0 0 0 4px rgba(188, 42, 96, .12);
}
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--danger); }
.error-text { color: var(--danger); font-size: 14px; margin-top: 7px; font-weight: 600; }
.counter { float: right; font-weight: 600; color: var(--muted); font-size: 13px; }
.counter.over { color: var(--danger); }

fieldset { border: 0; margin: 0; padding: 0; }

/* Choix de priorité */
.choices { display: grid; gap: 11px; }
.choice {
  position: relative;
  display: flex;
  gap: 13px;
  align-items: flex-start;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 15px 16px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.choice:hover { border-color: var(--line-2); }
.choice:active { transform: scale(.995); }
.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice .dot {
  width: 22px; height: 22px;
  flex: none;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  display: grid;
  place-items: center;
  transition: border-color .15s, background .15s;
}
.choice .dot::after {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: background .15s;
}
.choice .t { font-weight: 700; display: block; letter-spacing: -.01em; }
.choice .d { color: var(--muted); font-size: 14px; display: block; margin-top: 1px; }
.choice.on {
  border-color: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 13%, transparent);
}
.choice.on .dot { border-color: currentColor; }
.choice.on .dot::after { background: currentColor; }

/* Photos */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--rose-50);
  box-shadow: var(--sh-sm);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .rm {
  position: absolute; top: 6px; right: 6px;
  width: 28px; height: 28px;
  border: 0; border-radius: 50%;
  background: rgba(63, 5, 24, .78);
  color: #fff;
  font-size: 15px; line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.thumb .sz {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(63, 5, 24, .72));
  color: #fff; font-size: 11px; font-weight: 600;
  text-align: center; padding: 10px 2px 3px;
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 22px;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font: inherit;
  font-weight: 700;
  letter-spacing: -.01em;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  background: var(--grad-wine);
  box-shadow: var(--sh-wine);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-lg { width: 100%; font-size: 17px; padding: 17px; min-height: 58px; }
.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-2);
  box-shadow: var(--sh-sm);
}
.btn-ghost:hover { background: var(--rose-50); border-color: var(--wine-400); color: var(--wine-700); }
.btn-sm { padding: 9px 16px; min-height: 42px; font-size: 14px; }
.btn .arrow {
  width: 30px; height: 30px;
  margin: -6px -10px -6px 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  display: grid; place-items: center;
  font-size: 15px;
}

.progress {
  height: 8px;
  background: var(--rose-100);
  border-radius: var(--pill);
  overflow: hidden;
  margin-top: 14px;
  display: none;
}
.progress.on { display: block; }
.progress i {
  display: block; height: 100%; width: 0;
  background: var(--grad-wine);
  border-radius: var(--pill);
  transition: width .2s;
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--pill);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: -.005em;
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.badge.plain::before { display: none; }
.ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Tuiles de statistiques ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.tile {
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--sh);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform .14s, box-shadow .18s;
}
a.tile:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.tile .n {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--ink);
}
.tile .l { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 3px; }
.tile .pin {
  float: right;
  width: 30px; height: 30px;
  border-radius: 10px;
  background: var(--rose-50);
  color: var(--wine-600);
  display: grid; place-items: center;
  font-size: 14px;
}
.tile.alert .n { color: var(--danger); }
.tile.alert .pin { background: #fff1f4; color: var(--danger); }

/* Carte de score avec anneau */
.scorecard {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--r-xl);
  padding: 20px 22px;
  box-shadow: var(--sh);
  margin-bottom: 14px;
}
.ring {
  --val: 0;
  position: relative;
  width: 108px; height: 108px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--wine-600) calc(var(--val) * 1%), var(--rose-100) 0);
  display: grid;
  place-items: center;
}
.ring::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 2px 8px rgba(93, 8, 40, .06);
}
.ring .val {
  position: relative;
  z-index: 1;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--wine-700);
}
.scorecard .txt h3 { margin-bottom: 6px; }
.scorecard .txt .big {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 4px;
}
.scorecard .txt p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Filtres ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--sh);
  margin-bottom: 16px;
}
.filters .f { display: flex; flex-direction: column; gap: 5px; }
.filters label { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .03em; }
.filters select, .filters input {
  min-width: 158px;
  min-height: 44px;
  padding: 10px 13px;
  border-radius: var(--r-sm);
}

/* ---------- Tableaux ---------- */

table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 14px 16px; vertical-align: top; }
th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 700;
  background: var(--rose-50);
  border-bottom: 1px solid var(--line);
}
td { border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .14s; }
tbody tr:hover { background: var(--rose-50); }
tbody tr.unseen { background: linear-gradient(90deg, rgba(252, 229, 237, .75), rgba(253, 243, 247, .35)); }
tbody tr.unseen td:first-child { box-shadow: inset 3px 0 0 var(--wine-600); }
td a.title {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.01em;
}
td a.title:hover { color: var(--wine-700); }
.nowrap { white-space: nowrap; }
.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty .big { font-size: 34px; display: block; margin-bottom: 8px; }

/* ---------- Fiche ticket ---------- */

.cols { display: grid; gap: 16px; }
.kv { display: grid; grid-template-columns: 128px 1fr; gap: 10px 14px; font-size: 15px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; }
.desc {
  white-space: pre-wrap;
  background: var(--rose-50);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  line-height: 1.6;
}
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shots a {
  display: block;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  transition: transform .14s;
}
.shots a:hover { transform: scale(1.02); }
.shots img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }

.timeline { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.timeline li {
  padding: 0 0 18px 20px;
  border-left: 2px solid var(--line);
  position: relative;
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -6px; top: 5px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--wine-500);
}
.timeline .when { color: var(--muted); font-size: 13px; }

.status-row { display: flex; flex-wrap: wrap; gap: 8px; }
.status-row button { flex: 1 1 auto; }

/* Liste de recommandations (fiche camion) */
.reco { list-style: none; margin: 0; padding: 0; }
.reco li { border-bottom: 1px solid var(--line); }
.reco li:last-child { border-bottom: 0; }
.reco a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  text-decoration: none;
  color: inherit;
}
.reco .ico {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 12px;
  background: var(--grad-wine-soft);
  color: var(--wine-700);
  display: grid; place-items: center;
  font-size: 16px;
}
.reco .t { font-weight: 700; font-size: 14.5px; letter-spacing: -.01em; }
.reco .d { color: var(--muted); font-size: 13px; }
.reco .chev { margin-left: auto; color: var(--line-2); font-size: 18px; }

/* ---------- Connexion ---------- */

.login-mark {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 21px;
  background: var(--grad-wine);
  box-shadow: var(--sh-wine);
  display: grid; place-items: center;
  font-size: 31px;
}

/* ---------- Page de confirmation ---------- */

.success-mark {
  width: 84px; height: 84px;
  margin: 4px auto 16px;
  border-radius: 50%;
  background: var(--grad-wine);
  box-shadow: var(--sh-wine);
  display: grid; place-items: center;
  font-size: 40px;
  color: #fff;
}
.ticket-ref {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: .02em;
  background: var(--grad-wine);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
}

/* ---------- Planche de QR codes ---------- */

.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 16px; }
.qr-card {
  background: #fff;
  border: 2px dashed var(--line-2);
  border-radius: var(--r-lg);
  padding: 18px 16px;
  text-align: center;
  break-inside: avoid;
  box-shadow: var(--sh-sm);
}
.qr-card img { width: 100%; max-width: 190px; height: auto; }
.qr-card .id { font-size: 22px; font-weight: 800; letter-spacing: .02em; color: var(--ink); }
.qr-card .plate { font-size: 13.5px; color: var(--muted); }
.qr-card .call {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--wine-700);
  background: var(--rose-100);
  border-radius: var(--pill);
  padding: 5px 13px;
  margin-bottom: 10px;
}
.qr-card .url { font-size: 9.5px; color: #bda3ad; word-break: break-all; margin-top: 6px; }

/* ---------- Impression ---------- */

@media print {
  .no-print, .tabbar, .topbar { display: none !important; }
  body { background: #fff; }
  .wrap { padding: 0; max-width: none; }
  .qr-card { border-color: #9b8089; box-shadow: none; }
}

/* ---------- Points de rupture ---------- */

@media (min-width: 780px) {
  .cols { grid-template-columns: 1fr 340px; align-items: start; }
  h1 { font-size: 30px; }
}

@media (max-width: 640px) {
  .hide-sm { display: none; }
  th, td { padding: 12px; }
  .wrap { padding: 14px 14px 44px; }
  .scorecard { gap: 16px; padding: 18px; }
  .ring { width: 92px; height: 92px; }
  .ring .val { font-size: 23px; }
  .kv { grid-template-columns: 110px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

.hidden { display: none !important; }

[hidden] { display: none !important; }

/* ---------- Logo ---------- */

.logo { display: block; height: auto; }
.topbar .brand .mark { color: #fff; }
.login-mark { color: #fff; }
.tabbar .ico .logo { margin: 1px 0; }
.qr-logo {
  display: flex;
  justify-content: center;
  color: var(--wine-700);
  margin-bottom: 12px;
}

/* Boutons d'ajout de photo */
.photo-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-actions .btn { flex: 1 1 160px; }

/* ---------- Multi-clients : bandeaux, grilles, listes éditables ---------- */

.banner {
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  background: var(--rose-100);
  color: var(--wine-700);
}
.banner-stop { background: #fff1f4; color: var(--danger); }

.brand-logo { max-height: 30px; max-width: 120px; width: auto; display: block; }
.qr-brand { max-height: 34px; max-width: 70%; margin: 0 auto 10px; display: block; }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 18px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.rows { display: grid; gap: 10px; margin-bottom: 14px; }
.row-edit {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  background: var(--rose-50);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px;
}
.row-edit.wrap { flex-wrap: wrap; }
.row-edit input[type=text], .row-edit input[type=email], .row-edit select, .row-edit textarea {
  min-height: 42px;
  padding: 8px 12px;
  flex: 1 1 120px;
  min-width: 0;
}
.row-edit input[type=color] { min-height: 42px; padding: 3px; flex: none; }
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
  flex: none;
}
.inline-check input { width: 18px; height: 18px; accent-color: var(--wine-600); }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }

details summary::-webkit-details-marker { color: var(--wine-600); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

@media (max-width: 640px) {
  .row-edit { flex-wrap: wrap; }
}
