/* ==========================================================================
   Patt'Uni — L'univers animalier uni
   Feuille de style unique, mobile-first, sans dependance externe.
   ========================================================================== */

/* ------------------------------------------------------------ Tokens ---- */
:root {
  --rose: #E8B7C8;
  --rose-clair: #F8E8EE;
  --violet: #A88BC2;
  --prune: #6B3F5B;
  --ivoire: #FFF9FA;
  --gris-mauve: #756B73;

  --prune-900: #4A2A3E;
  --prune-700: #6B3F5B;
  --violet-200: #EFE6F5;
  --rose-100: #FCF1F5;

  --ink: #3B2F38;
  --ink-soft: #756B73;
  --ink-mute: #9A9099;

  --bg: #FFF9FA;
  --surface: #FFFFFF;
  --surface-2: #FBF5F8;
  --line: #F0E2EA;
  --line-strong: #E4D2DC;

  --ok: #2E7D5B;
  --ok-bg: #E6F4ED;
  --warn: #B06A15;
  --warn-bg: #FDF2DF;
  --danger: #B3352F;
  --danger-bg: #FCEBEA;
  --info: #3A5D8F;
  --info-bg: #EAF0F9;

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  --sh-1: 0 1px 2px rgba(107, 63, 91, .06), 0 2px 8px rgba(107, 63, 91, .05);
  --sh-2: 0 2px 6px rgba(107, 63, 91, .08), 0 10px 26px rgba(107, 63, 91, .08);

  --pad: 16px;
  --maxw: 1180px;
  --nav-h: 62px;
}

/* ------------------------------------------------------------ Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }

h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; font-weight: 700; color: var(--prune-900); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.03rem; }
p { margin: 0 0 1em; }
a { color: var(--prune-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font: inherit; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
svg { flex: 0 0 auto; }

/* ------------------------------------------------------------ Layout ---- */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
}

.app-main { flex: 1 1 auto; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.container.narrow { max-width: 620px; }
.container.mid { max-width: 860px; }

.section { margin: 0 0 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.section-head h2, .section-head h3 { margin: 0; }
.section-title { font-size: 1.12rem; margin: 0 0 4px; }
.mini-title { font-size: .95rem; margin: 0 0 6px; }
.muted { color: var(--ink-soft); }
.small { font-size: .86rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.right { text-align: right; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.row-gap { display: flex; flex-wrap: wrap; gap: 10px; }
.between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1 1 auto; }

/* ---------------------------------------------------------- En-tete ----- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 249, 250, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}

.app-header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 9px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--rose) 0%, var(--violet) 100%);
  color: #fff;
  box-shadow: var(--sh-1);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; color: var(--prune-900); letter-spacing: .01em; }
.brand-text small { font-size: .72rem; color: var(--ink-mute); }
.admin-header .brand-mark { background: linear-gradient(140deg, var(--prune-700) 0%, var(--prune-900) 100%); }

.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  color: var(--prune-700);
  cursor: pointer;
}
.icon-btn:hover { background: var(--rose-100); }
.icon-btn .dot {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px;
  background: var(--prune-700);
  color: #fff;
  font-size: .68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}

/* ------------------------------------------------------ Barre du bas ---- */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav-inner {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
}
.nav-item {
  flex: 1 1 0;
  min-width: 0;
  height: var(--nav-h);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  color: var(--ink-mute);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 4px 2px;
}
.nav-item:hover { text-decoration: none; color: var(--prune-700); }
.nav-item .nav-ico { display: block; }
.nav-item .nav-lbl { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nav-item.is-active { color: var(--prune-700); }
.nav-item.is-active .nav-ico {
  background: var(--rose-clair);
  border-radius: 10px;
  padding: 3px 9px;
  margin: -3px 0 -3px;
}

/* ------------------------------------------------------- Page / hero ---- */
.page-head { padding: 20px 0 6px; }
.page-head.center { text-align: center; }
.page-title { font-size: 1.42rem; margin: 0 0 4px; }
.page-sub { color: var(--ink-soft); margin: 0; font-size: .93rem; }
.back-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .86rem; font-weight: 600; color: var(--prune-700);
  margin-bottom: 6px;
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--rose-clair) 0%, var(--ivoire) 55%, #F1E7F6 100%);
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: "";
  position: absolute;
  right: -70px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(232, 183, 200, .55), rgba(168, 139, 194, .12));
  pointer-events: none;
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px var(--pad) 30px;
  position: relative;
  z-index: 1;
}
.hero .brand-logo { margin: 0 0 12px; }
.hero h1 { font-size: 1.85rem; letter-spacing: -0.01em; }
.hero p.lead { font-size: 1.02rem; color: var(--ink-soft); max-width: 46ch; }
.hero-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

.brand-block { text-align: center; padding: 26px 0 18px; }
.brand-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 66px; height: 66px;
  border-radius: 22px;
  background: linear-gradient(140deg, var(--rose) 0%, var(--violet) 100%);
  color: #fff;
  box-shadow: var(--sh-2);
  margin: 0 auto 10px;
}
.brand-name { font-size: 1.6rem; margin: 0; letter-spacing: -0.01em; }
.brand-slogan { color: var(--ink-soft); margin: 2px 0 0; font-size: .96rem; }

.auth-wrap { max-width: 460px; margin: 0 auto; padding: 0 var(--pad) 20px; }
.legal-note { text-align: center; font-size: .8rem; color: var(--ink-mute); padding: 14px 0 4px; }

/* ------------------------------------------------------------ Cartes ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.card-pad { padding: 18px; }
.card.soft { background: var(--surface-2); box-shadow: none; }
.card.flat { box-shadow: none; }
.card + .card { margin-top: 14px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.card-head h2, .card-head h3 { margin: 0; font-size: 1rem; }
.card-body { padding: 14px 16px; }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }

.tile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  color: inherit;
  box-shadow: var(--sh-1);
}
.tile:hover { text-decoration: none; border-color: var(--rose); }
.tile-title { font-weight: 700; font-size: .95rem; margin: 8px 0 2px; color: var(--prune-900); }
.tile-sub { font-size: .82rem; color: var(--ink-soft); margin: 0; }

/* ------------------------------------------------------------ Grilles --- */
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.grid-2, .grid-3, .grid-4 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.grid-tight { gap: 8px; }

.qgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .qgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-cta { flex-direction: row; }
  .hero h1 { font-size: 2.3rem; }
}

@media (min-width: 1024px) {
  .grid-lg-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .grid-lg-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

/* ------------------------------------------------- Boutons / actions ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  text-align: center;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-busy { opacity: .62; pointer-events: none; }

.btn-primary { background: var(--prune-700); color: #fff; box-shadow: var(--sh-1); }
.btn-primary:hover { background: var(--prune-900); }
.btn-rose { background: var(--rose); color: var(--prune-900); }
.btn-rose:hover { background: #DFA2B8; }
.btn-outline { background: var(--surface); color: var(--prune-700); border-color: var(--line-strong); }
.btn-outline:hover { background: var(--rose-100); }
.btn-ghost { background: transparent; color: var(--prune-700); border-color: transparent; }
.btn-ghost:hover { background: var(--rose-100); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #972B26; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 38px; padding: 7px 13px; font-size: .87rem; border-radius: 11px; }
.btn-xs { min-height: 32px; padding: 5px 10px; font-size: .8rem; border-radius: 9px; }
.btn-lg { min-height: 54px; font-size: 1.02rem; }

.action-row { display: flex; flex-wrap: wrap; gap: 8px; }
.action-row > .btn { flex: 1 1 auto; }

/* ---------------------------------------------------------- Formulaires-- */
.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 620px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.label { display: block; font-size: .85rem; font-weight: 700; color: var(--prune-900); margin-bottom: 5px; }
.hint { font-size: .78rem; color: var(--ink-mute); margin: 5px 0 0; }

.input, .select, .textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  appearance: none;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-200);
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23756B73' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 38px;
}

.input-group { position: relative; }
.input-group .input { padding-right: 46px; }
.input-eye {
  position: absolute; top: 50%; right: 6px;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--ink-soft); cursor: pointer;
  border-radius: 10px;
}
.input-eye:hover { background: var(--rose-100); }

.check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; font-size: .88rem; color: var(--ink-soft); }
.check input[type="checkbox"], .check input[type="radio"] {
  width: 20px; height: 20px; min-width: 20px; margin: 1px 0 0;
  accent-color: var(--prune-700);
}

.search-bar { position: relative; margin: 0 0 14px; }
.search-bar .input { padding-left: 42px; }
.search-bar .search-ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--ink-mute); pointer-events: none; display: flex;
}

/* -------------------------------------------------------------- Tabs ---- */
.tabs {
  display: flex; gap: 6px;
  overflow-x: auto;
  padding: 4px 0 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: .86rem;
  font-weight: 700;
  white-space: nowrap;
}
.tab:hover { text-decoration: none; border-color: var(--rose); }
.tab.is-active { background: var(--prune-700); border-color: var(--prune-700); color: #fff; }

/* ----------------------------------------------------------- Badges ----- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: #F1EEF0; color: var(--ink-soft); }
.badge-rose { background: var(--rose-clair); color: var(--prune-700); }

.stars { display: inline-flex; align-items: center; gap: 1px; color: #D9A21B; vertical-align: -2px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--rose-clair);
  color: var(--prune-700);
  font-size: .78rem;
  font-weight: 600;
}

/* ------------------------------------------------------------ Alertes --- */
.alert {
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin: 0 0 14px;
  font-size: .89rem;
  border: 1px solid transparent;
}
.alert-ok { background: var(--ok-bg); color: var(--ok); border-color: #C9E7D9; }
.alert-danger { background: var(--danger-bg); color: var(--danger); border-color: #F3CFCD; }
.alert-warn { background: var(--warn-bg); color: var(--warn); border-color: #F2DDB6; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #CFDDF1; }

/* ------------------------------------------------------------- Stats ---- */
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px;
  box-shadow: var(--sh-1);
}
.stat-val { font-size: 1.4rem; font-weight: 800; color: var(--prune-900); line-height: 1.1; }
.stat-lbl { font-size: .78rem; color: var(--ink-soft); margin-top: 3px; }

/* -------------------------------------------------------- Listes/items -- */
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: inherit;
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--rose-100); text-decoration: none; }
.list-item .li-body { min-width: 0; flex: 1 1 auto; }
.list-item .li-title { font-weight: 700; font-size: .93rem; color: var(--prune-900); }
.list-item .li-sub { font-size: .82rem; color: var(--ink-soft); }
.list-item .li-meta { font-size: .74rem; color: var(--ink-mute); }
.list-item.is-unread { background: var(--rose-100); }

.avatar {
  width: 44px; height: 44px;
  min-width: 44px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--rose) 0%, var(--violet) 100%);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .95rem;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 66px; height: 66px; min-width: 66px; border-radius: 20px; font-size: 1.25rem; }
.avatar-sm { width: 34px; height: 34px; min-width: 34px; border-radius: 11px; font-size: .8rem; }

.media-row { display: flex; gap: 12px; align-items: flex-start; }
.media-thumb {
  width: 92px; height: 92px; min-width: 92px;
  border-radius: var(--r-md);
  object-fit: cover;
  background: var(--surface-2);
}

.photo-card { overflow: hidden; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); display: block; color: inherit; }
.photo-card:hover { text-decoration: none; border-color: var(--rose); }
.photo-card .pc-img { width: 100%; height: 168px; object-fit: cover; background: var(--surface-2); }
.photo-card .pc-body { padding: 13px 14px; }
.photo-card .pc-title { font-weight: 700; color: var(--prune-900); margin: 0 0 3px; font-size: .98rem; }
.photo-card .pc-sub { font-size: .84rem; color: var(--ink-soft); margin: 0; }
.photo-card .pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px 13px; }
.pc-price { font-weight: 800; color: var(--prune-700); }
.photo-hero { width: 100%; height: 220px; object-fit: cover; background: var(--surface-2); }

@media (min-width: 768px) { .photo-card .pc-img { height: 200px; } }

/* --------------------------------------------------------- Etats vides -- */
.empty {
  text-align: center;
  padding: 34px 18px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
}
.empty-ico { color: var(--rose); margin-bottom: 8px; }
.empty h3 { margin: 0 0 4px; }
.empty p { margin: 0 0 14px; font-size: .9rem; }

/* ------------------------------------------------------------ Tableau --- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
table.dt { width: 100%; border-collapse: collapse; font-size: .87rem; min-width: 640px; }
table.dt th, table.dt td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.dt th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
table.dt tr:last-child td { border-bottom: 0; }
table.dt td.wrap { white-space: normal; min-width: 200px; }

/* ------------------------------------------------------------ Modales --- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(59, 47, 56, .48);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
@media (min-width: 620px) { .modal-overlay { align-items: center; padding: 24px; } }

.modal {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--sh-2);
}
@media (min-width: 620px) { .modal { border-radius: var(--r-xl); } }
.modal-title { font-size: 1.12rem; margin: 0 0 6px; }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px;
  border: 0; background: transparent; color: var(--ink-soft);
  border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--rose-100); }

.install-steps { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 14px 0; }
@media (min-width: 620px) { .install-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.install-step { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.install-os { display: flex; align-items: center; gap: 8px; color: var(--prune-900); margin-bottom: 6px; }
.install-step ol { margin: 0; padding-left: 1.1em; font-size: .85rem; color: var(--ink-soft); }
.install-step li { margin-bottom: 3px; }

/* ------------------------------------------------------------ Toasts --- */
.toast-wrap {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  z-index: 300;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0 14px;
  pointer-events: none;
}
.toast {
  max-width: 520px;
  width: 100%;
  padding: 12px 15px;
  border-radius: 14px;
  background: var(--prune-900);
  color: #fff;
  font-size: .89rem;
  font-weight: 600;
  box-shadow: var(--sh-2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
}
.toast.is-in { opacity: 1; transform: translateY(0); }
.toast-error { background: var(--danger); }
.toast-ok { background: var(--prune-900); }

/* --------------------------------------------------- Barre de reserve --- */
.sticky-cta {
  position: sticky;
  bottom: calc(var(--nav-h) + 8px);
  z-index: 40;
  margin-top: 14px;
}

/* --------------------------------------------------- Role picker -------- */
.role-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.role-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px;
  cursor: pointer;
}
.role-card input { position: absolute; opacity: 0; pointer-events: none; }
.role-card:has(input:checked) { border-color: var(--violet); background: var(--rose-100); }
.role-card.is-locked { cursor: default; opacity: .92; }
.role-icon {
  width: 46px; height: 46px; min-width: 46px;
  border-radius: 14px;
  background: var(--rose-clair);
  color: var(--prune-700);
  display: inline-flex; align-items: center; justify-content: center;
}
.role-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.role-title { font-weight: 800; color: var(--prune-900); }
.role-text { font-size: .83rem; color: var(--ink-soft); }
.role-check { color: var(--violet); opacity: 0; }
.role-card:has(input:checked) .role-check { opacity: 1; }

/* --------------------------------------------------------- Divers ------ */
.divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--ink-mute); font-size: .8rem; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1 1 auto; }

.link-strong { font-weight: 700; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .89rem; color: var(--ink-soft); display: flex; gap: 8px; align-items: flex-start; }
.list-plain li:last-child { border-bottom: 0; }
.dot-ico { color: var(--violet); margin-top: 3px; }

.kv { display: flex; flex-direction: column; gap: 0; }
.kv-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .89rem; }
.kv-row:last-child { border-bottom: 0; }
.kv-row dt, .kv-row .k { color: var(--ink-soft); margin: 0; }
.kv-row dd, .kv-row .v { font-weight: 700; color: var(--prune-900); margin: 0; text-align: right; }

.note-box { background: var(--rose-clair); border-left: 3px solid var(--rose); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 10px 13px; font-size: .87rem; color: var(--prune-900); }

.step-list { list-style: none; padding: 0; margin: 0 0 16px; counter-reset: st; }
.step-list li {
  counter-increment: st;
  position: relative;
  padding: 0 0 12px 40px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
  color: var(--ink-soft);
}
.step-list li:last-child { border-bottom: 0; margin-bottom: 0; }
.step-list li::before {
  content: counter(st);
  position: absolute;
  left: 0; top: 0;
  width: 28px; height: 28px;
  border-radius: 10px;
  background: var(--rose-clair);
  color: var(--prune-700);
  font-weight: 800;
  font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
.step-list li strong { color: var(--prune-900); }

.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 379px) { .slot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 520px) { .slot-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 768px) { .slot-grid { grid-template-columns: repeat(6, 1fr); } }
.slot {
  padding: 10px 4px;
  text-align: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  font-weight: 700;
  font-size: .88rem;
  color: var(--prune-700);
}
.slot:hover { text-decoration: none; border-color: var(--violet); background: var(--rose-100); }
.slot.is-active { background: var(--prune-700); border-color: var(--prune-700); color: #fff; }
.slot[disabled], .slot.is-off { opacity: .38; pointer-events: none; text-decoration: line-through; }

.day-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.day-nav .day-label { font-weight: 800; color: var(--prune-900); }

/* Timeline agenda */
.tl { display: flex; flex-direction: column; gap: 8px; }
.tl-item { display: flex; gap: 10px; align-items: stretch; }
.tl-time { width: 58px; min-width: 58px; font-size: .8rem; font-weight: 800; color: var(--prune-700); padding-top: 2px; }
.tl-body { flex: 1 1 auto; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--violet); border-radius: 0 var(--r-md) var(--r-md) 0; padding: 10px 12px; }
.tl-body .tl-title { font-weight: 700; color: var(--prune-900); font-size: .92rem; }
.tl-body .tl-sub { font-size: .81rem; color: var(--ink-soft); }

.messages-thread { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; }
.bubble { max-width: 84%; padding: 10px 13px; border-radius: 16px; font-size: .9rem; box-shadow: var(--sh-1); }
.bubble-in { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 5px; align-self: flex-start; }
.bubble-out { background: var(--prune-700); color: #fff; border-bottom-right-radius: 5px; align-self: flex-end; }
.bubble-meta { font-size: .7rem; opacity: .7; margin-top: 4px; }
.composer { position: sticky; bottom: calc(var(--nav-h) + 8px); background: var(--bg); padding: 10px 0 0; }
.composer .composer-row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1 1 auto; min-height: 46px; max-height: 130px; }
.composer .btn { min-width: 46px; padding: 11px 14px; }

.skeleton { background: linear-gradient(90deg, #F4EDF1 25%, #FBF6F9 37%, #F4EDF1 63%); background-size: 400% 100%; animation: sk 1.2s ease infinite; border-radius: 10px; min-height: 16px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

.urgence-cta {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--danger-bg);
  border: 1px solid #F3CFCD;
  border-radius: var(--r-lg);
  padding: 16px;
}
.urgence-cta .btn { min-height: 54px; }

.filters-bar { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0 0 14px; }
@media (min-width: 620px) { .filters-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 980px) { .filters-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.table-desktop { display: none; }
@media (min-width: 860px) { .table-desktop { display: block; } .cards-mobile { display: none; } }

/* ------------------------------------------------ Zone de securite iOS -- */
@supports (padding: env(safe-area-inset-top)) {
  .app-header { padding-top: env(safe-area-inset-top, 0px); }
}
