/* Polices servies avec l’app plutôt que par Google Fonts : aucun visiteur ne transmet son adresse IP
   à un tiers (RGPD). Polices variables, sous-ensembles latin et latin étendu, licence OFL dans fonts/. */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/playfair-display-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/playfair-display-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --wine: #632b40;
  --wine-dark: #462030;
  --ink: #302c35;
  --muted: #77727c;
  --line: #e7e3e7;
  --paper: #fbfafb;
  --rose: #f3e7ec;
  --green: #40725f;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    16px 'DM Sans',
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 9px;
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
button:hover {
  background: #f4f0f3;
}
button.primary {
  background: var(--wine);
  color: white;
  border-color: var(--wine);
}
button.primary:hover {
  background: var(--wine-dark);
}
button.subtle {
  border: 0;
  background: transparent;
}
button.small {
  padding: 7px 10px;
  font-size: 14px;
}
button.danger {
  color: #a32638;
}
svg.icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  padding: 32px 20px 24px;
  border-right: 1px solid var(--line);
  background: white;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  font:
    500 34px 'Playfair Display',
    Georgia,
    serif;
  letter-spacing: -1.7px;
  color: var(--wine);
  padding: 0 13px;
}
.brand span {
  font-style: italic;
}
.brand small {
  display: block;
  font:
    500 10px 'DM Sans',
    sans-serif;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 7px 0 40px 2px;
}
.event-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  display: block;
  width: 100%;
  margin-bottom: 32px;
}
.event-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 5px;
}
.event-card span {
  font-size: 13px;
  color: var(--muted);
}
.nav {
  display: grid;
  gap: 7px;
}
.nav button {
  justify-content: flex-start;
  border: 0;
  padding: 13px 14px;
  background: transparent;
  color: #77707a;
  font-size: 14px;
}
.nav button.active {
  background: var(--rose);
  color: var(--wine);
  font-weight: 650;
}
.nav button .count {
  margin-left: auto;
  background: white;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 12px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 35px;
}
.local-info {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  padding: 15px 10px;
}
.local-info .feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 550;
  color: var(--wine);
  text-decoration: none;
}
.local-info .feedback:hover {
  text-decoration: underline;
}
.local-info .version,
.welcome-version {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}
/* Lien externe (formulaire d’avis) présenté comme un bouton. */
a.button {
  display: inline-flex;
  align-items: center;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  text-decoration: none;
}
a.button.primary {
  background: var(--wine);
  border-color: var(--wine);
  color: white;
}
a.button.primary:hover {
  background: var(--wine-dark);
}
.profile {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--rose);
  color: var(--wine);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 650;
  flex-shrink: 0;
}
.profile small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
main {
  min-width: 0;
}
.topbar {
  height: 77px;
  border-bottom: 1px solid var(--line);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  font-size: 14px;
}
.crumb {
  color: var(--muted);
}
.crumb b {
  font-weight: 500;
  color: var(--ink);
  margin-left: 12px;
}
.saved {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 12px;
}
.content {
  padding: 32px 36px;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
h1 {
  font:
    500 36px 'Playfair Display',
    Georgia,
    serif;
  letter-spacing: -1px;
  margin: 0 0 9px;
}
h2 {
  font:
    500 25px 'Playfair Display',
    Georgia,
    serif;
  margin: 0 0 15px;
}
h3 {
  font-size: 16px;
  margin: 0;
}
p {
  line-height: 1.6;
}
.heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 25px;
}
.stat {
  border: 1px solid var(--line);
  background: white;
  padding: 17px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.stat .stat-icon {
  padding: 10px;
  background: #f5f1f4;
  border-radius: 10px;
  color: var(--wine);
  display: flex;
}
.stat strong {
  font-size: 23px;
  font-weight: 550;
}
.stat span.label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.workspace {
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: white;
  min-height: 620px;
}
.guest-panel {
  border-right: 1px solid var(--line);
  min-width: 0;
}
.panel-head {
  padding: 19px 17px 15px;
}
.panel-head h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.badge {
  font-size: 12px;
  border-radius: 5px;
  padding: 3px 7px;
  background: #f2eff2;
  color: var(--muted);
  font-weight: 500;
}
.search {
  position: relative;
}
.search svg {
  position: absolute;
  left: 11px;
  top: 11px;
  color: var(--muted);
  width: 16px;
}
.search input {
  padding: 10px 10px 10px 34px;
  width: 100%;
  font-size: 13px;
  background: #faf9fb;
}
.tabs {
  display: flex;
  gap: 6px;
  padding: 0 17px 14px;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  border: 0;
  background: transparent;
  padding: 7px 8px;
  font-size: 12px;
}
.tabs button.active {
  color: var(--wine);
  background: var(--rose);
  font-weight: 600;
}
.guest-list {
  max-height: 490px;
  overflow: auto;
  padding: 7px 10px;
}
.guest {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 7px;
  border-radius: 8px;
  cursor: grab;
}
.guest:hover {
  background: #f8f5f7;
}
.guest .avatar {
  width: 32px;
  height: 32px;
  font-size: 11px;
  background: var(--tint, #eee9f3);
  color: var(--tone, #645281);
  border: var(--bw, 0) var(--bstyle, solid) var(--tone, transparent);
}
.guest-name {
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.guest-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.guest-text {
  min-width: 0;
  flex: 1;
}
.guest .grip {
  color: #c6c0c8;
  font-size: 16px;
}
.guest-edit {
  border: 0;
  padding: 3px;
  background: none;
  color: var(--muted);
}
.panel-footer {
  padding: 12px 17px;
  border-top: 1px solid var(--line);
}
.panel-footer button {
  width: 100%;
  font-size: 13px;
}
.plan {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.plan-toolbar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.plan-toolbar strong {
  font-size: 14px;
}
.plan-toolbar .actions button {
  font-size: 12px;
  padding: 7px 9px;
}
.canvas {
  flex: 1;
  position: relative;
  background-color: #faf9fb;
  background-image: radial-gradient(#dcd6dd 0.8px, transparent 0.8px);
  background-size: 18px 18px;
  padding: 28px 22px 22px;
  min-height: 490px;
}
.room-label {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 10px;
  color: #aaa1aa;
  margin-bottom: 22px;
}
.table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px 22px;
  max-width: 780px;
  margin: 0 auto;
}
.table-card {
  position: relative;
  min-height: 178px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 9px;
  transition: background 0.15s;
}
.table-card.honor {
  grid-column: 1/-1;
  min-height: 150px;
}
.table-card.drag-over {
  background: #eee0e9;
  border-color: var(--wine);
}
.table-shape {
  background: white;
  box-shadow: 0 4px 18px #4d344b08;
  border: 1px solid #e4dce4;
  border-radius: 50%;
  width: 124px;
  height: 124px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  margin: 12px 0;
}
.honor .table-shape,
.table-card.rectangle .table-shape {
  width: 218px;
  height: 85px;
  border-radius: 18px;
}
.honor .table-shape {
  background: #f5e8ed;
  border-color: #d7b6c4;
}
.table-shape strong {
  font:
    500 17px 'Playfair Display',
    Georgia,
    serif;
}
.table-shape small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.table-shape .crown {
  color: var(--wine);
  margin-bottom: 5px;
}
.seat {
  position: absolute;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--tint, white);
  border: 1px solid #dfd8e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--tone, #aaa1ac);
  transform: translate(-50%, -50%);
  padding: 0;
  z-index: 1;
}
.seat.filled {
  cursor: grab;
  border-color: var(--tone, #ccc);
  border-style: var(--bstyle, solid);
  border-width: var(--bw, 1px);
}
.seat:hover {
  z-index: 3;
  box-shadow: 0 0 0 3px #632b4020;
}
.table-tools {
  display: flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
}
.table-tools button {
  font-size: 11px;
  padding: 4px 7px;
  background: #ffffffd9;
  border-color: #e9e4e9;
}
.table-tools button.locked {
  color: var(--wine);
  background: var(--rose);
}
.table-names {
  font-size: 11px;
  color: var(--muted);
  max-width: 230px;
  text-align: center;
  line-height: 1.5;
  min-height: 17px;
}
.plan-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
}
.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.legend span {
  display: flex;
  gap: 5px;
  align-items: center;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tone);
}
.hint {
  display: flex;
  gap: 10px;
  padding: 15px 18px;
  border: 1px solid #e5dbe4;
  background: #f7f2f6;
  border-radius: 10px;
  margin-top: 18px;
  color: #6e5669;
  font-size: 13px;
  line-height: 1.6;
}
.hint svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.warning {
  background: #fff3e4;
  border-color: #eed6b4;
  color: #855721;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 24px;
  margin-bottom: 18px;
}
.top-banner {
  align-items: center;
  margin: 0 0 22px;
}
.top-banner > div:first-of-type {
  flex: 1;
}
.saved.error {
  color: #a32638;
}
.last-copy {
  margin-left: 8px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--muted);
}
.last-copy:hover {
  color: var(--wine);
  text-decoration: underline;
}
.welcome {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  text-align: center;
}
.welcome .brand small {
  margin-bottom: 44px;
}
.welcome .lead {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 34px;
}
.welcome-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.welcome-choice {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 22px;
  border-radius: 13px;
  text-align: left;
  background: white;
}
.welcome-choice strong {
  font-size: 18px;
  margin-top: 6px;
}
.welcome-choice span {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.welcome-choice.primary span {
  color: #f1e3e9;
}
.welcome-demo {
  margin-top: 22px;
  color: var(--wine);
  text-decoration: underline;
}
.welcome-note {
  margin-top: 30px;
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 600px) {
  .welcome {
    padding-top: 36px;
  }
  .welcome .brand {
    margin-bottom: 28px;
  }
  .welcome-choices {
    grid-template-columns: 1fr;
  }
  .top-banner {
    flex-wrap: wrap;
  }
  .last-copy {
    display: none;
  }
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
}
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f0edf0;
}
.data-table tr:last-child td {
  border: 0;
}
/* Tranche d’âge modifiable dans la liste : un menu compact, discret tant qu’il est vide. */
.data-table .age-select {
  width: auto;
  min-width: 120px;
  padding: 6px 8px;
  font-size: 13px;
}
.group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.group-card {
  border-top: 3px solid var(--tone);
  padding: 22px;
  background: white;
  border-radius: 12px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.group-card p {
  font-size: 14px;
  color: var(--muted);
}
.group-card .badge {
  display: inline-block;
  margin: 4px 0 12px;
}
/* Groupes & liens : ranger les invités (KISMEOU-57). */
.view-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
}
.view-switch button {
  border: 0;
  padding: 8px 14px;
  font-size: 14px;
  background: transparent;
}
.view-switch button.active {
  background: var(--rose);
  color: var(--wine);
  font-weight: 600;
}
.board {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.board-guests {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 24px);
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.board-guests.drag-over {
  box-shadow: 0 0 0 2px var(--wine) inset;
}
.board-progress {
  height: 6px;
  border-radius: 3px;
  background: #f0ebef;
  margin-bottom: 14px;
  overflow: hidden;
}
.board-progress span {
  display: block;
  height: 100%;
  background: var(--green);
  transition: width 0.3s;
}
.board-option {
  padding: 11px 17px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.board-list {
  flex: 1;
  min-height: 120px;
  overflow: auto;
  padding: 7px 10px;
}
.guest-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: grab;
  user-select: none;
}
.guest-chip:hover {
  background: #f8f5f7;
}
.guest-chip .avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
  background: var(--tint, #eee9f3);
  color: var(--tone, #645281);
  border: var(--bw, 0) var(--bstyle, solid) var(--tone, transparent);
}
.guest-chip.picked {
  background: var(--rose);
  border-color: var(--wine);
}
.chip-text {
  min-width: 0;
  flex: 1;
}
.chip-text .guest-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
}
.chip-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.apart-mark {
  color: #a32638;
  font-weight: 700;
  font-size: 13px;
  margin-left: 2px;
}
.board-pick {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.board-pick button {
  width: auto;
  margin-top: 4px;
  padding: 4px 8px;
}
.board-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
  align-items: start;
}
.board-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-top: 3px solid var(--tone);
  border-radius: 12px;
  transition:
    box-shadow 0.15s,
    background 0.15s;
}
.board-group header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.board-group h3 {
  flex: 1;
  margin: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.board-group header button {
  padding: 4px;
}
.board-group.focused {
  box-shadow: 0 0 0 3px var(--tone);
}
.board-mode {
  color: var(--muted);
  font-size: 12px;
  margin-top: -4px;
}
.board .drag-over,
.board-group:focus-visible,
.sub-zone:focus-visible {
  background: var(--rose);
  box-shadow: 0 0 0 2px var(--wine);
  outline: none;
}
.new-group {
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border: 2px dashed #dcd3da;
  color: var(--wine);
  font-weight: 600;
  text-align: center;
}
.new-group span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.new-group small {
  color: var(--muted);
  font-weight: 400;
}
.sub-zone,
.members-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  border-radius: 9px;
}
.sub-zone {
  padding: 8px;
  border: 1px dashed #ddd6dc;
  transition: background 0.15s;
}
.sub-name {
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: var(--tone);
}
.sub-name span {
  color: var(--muted);
  font-weight: 400;
}
.member {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 3px 3px 9px;
  border-radius: 20px;
  font-size: 12px;
  background: color-mix(in srgb, var(--tone) 10%, white);
  border: 1px solid color-mix(in srgb, var(--tone) 25%, white);
  cursor: grab;
  user-select: none;
}
.member.secondary {
  background: white;
  border-style: dashed;
}
.member em {
  color: var(--muted);
  font-size: 11px;
}
.member button {
  border: 0;
  padding: 2px;
  background: none;
  color: var(--muted);
  border-radius: 50%;
}
.member button .icon {
  width: 12px;
  height: 12px;
}
.member button:hover {
  color: #a32638;
  background: #f7e6ea;
}
.household-bundle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 2px;
  border-radius: 22px;
  border: 1px solid #d9d0d7;
  background: #faf8f9;
}
.sub-new {
  align-self: flex-start;
  border-style: dashed;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--muted);
}
.sub-new .icon {
  width: 13px;
  height: 13px;
}
/* Survol d’un invité : ses proches en vert, ceux dont il doit être séparé en rouge. */
.board.relating [data-chip] {
  opacity: 0.45;
}
.board.relating [data-chip].rel-self,
.board.relating [data-chip].rel-close,
.board.relating [data-chip].rel-apart {
  opacity: 1;
}
.board [data-chip].rel-self {
  box-shadow: 0 0 0 2px var(--ink);
}
.board [data-chip].rel-close {
  background: #e3f0eb;
  border-color: var(--green);
}
.board [data-chip].rel-apart {
  background: #f7e1e5;
  border-color: #a32638;
}
.board-legend {
  margin-top: 12px;
  min-height: 1.5em;
}
/* Vue d’ensemble « Qui connaît qui ». */
.map-card {
  padding: 18px;
}
.group-map {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}
.map-link {
  stroke-width: 4;
  stroke-opacity: 0.7;
  stroke-linecap: round;
}
/* Liens entre groupes (KISMEOU-50) : gris pour « se connaissent », vert pour « peuvent
   partager une table », sur la carte, dans la légende et dans le sélecteur de mode. */
.map-link.know {
  stroke: #8a7f88;
}
.map-link.match {
  stroke: var(--green);
}
.link-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.link-bar .view-switch {
  margin-bottom: 0;
}
.link-mode button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.link-mode button.match.active {
  background: #e3efe9;
  color: var(--green);
}
.link-help {
  margin: 10px 0 4px;
  color: var(--muted);
  min-height: 1.5em;
}
.map-node.selected circle {
  stroke-width: 6;
  stroke: #8a7f88;
}
.mode-match .map-node.selected circle {
  stroke: var(--green);
}
.map-hint {
  font-size: 12px;
  fill: var(--muted);
  paint-order: stroke;
  stroke: white;
  stroke-width: 4px;
}
.group-link .actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.group-map.focus line:not(.on) {
  opacity: 0.08;
}
.group-map.focus line.on {
  stroke-opacity: 1;
}
.map-node {
  cursor: grab;
  touch-action: none;
}
.map-node:active {
  cursor: grabbing;
}
.map-node:hover circle,
.map-node:focus circle {
  stroke-width: 4;
}
.map-node:focus {
  outline: none;
}
.map-count {
  font-size: 14px;
  font-weight: 700;
}
.map-name {
  font-size: 13px;
  fill: var(--ink);
  paint-order: stroke;
  stroke: white;
  stroke-width: 4px;
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 10px 0 6px;
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.legend-line {
  display: inline-block;
  width: 26px;
  border-top: 4px solid #8a7f88;
}
.legend-line.match {
  border-top-color: var(--green);
}
.map-title {
  margin: 18px 0 4px;
  font-size: 16px;
}
@media (max-width: 850px) {
  .board {
    grid-template-columns: 1fr;
  }
  .board-guests {
    position: static;
    max-height: 420px;
  }
}
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.settings {
  max-width: 700px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
label.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #dcd5dd;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 10px 12px;
}
textarea {
  resize: vertical;
  min-height: 84px;
}
.full {
  grid-column: 1/-1;
}
.help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
}
.check input {
  width: auto;
  accent-color: var(--wine);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  width: min(580px, calc(100% - 30px));
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 25px 100px #35233530;
}
dialog::backdrop {
  background: #2e203c60;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 24px 26px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.dialog-head h2 {
  margin: 0;
  font-size: 26px;
}
.dialog-body {
  padding: 24px 26px;
}
.dialog-footer {
  border-top: 1px solid var(--line);
  padding: 17px 26px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}
.dialog-error {
  color: #a32638;
  font-size: 14px;
  margin: 12px 0 0;
}
/* Correspondance des colonnes à l’import : titre et exemples à gauche, champ choisi à droite. */
.column-map {
  max-height: 46vh;
  overflow: auto;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.column-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.column-name,
.column-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.members {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 9px;
}
.member-search {
  margin-bottom: 8px;
}
.members label[hidden] {
  display: none;
}
/* Fiche invité : section « Groupes », un groupe et son sous-groupe par ligne. */
.groups-field {
  display: grid;
  justify-items: start;
  gap: 6px;
}
.group-rows {
  justify-self: stretch;
  display: grid;
  gap: 8px;
}
.group-row {
  justify-self: stretch;
  display: grid;
  grid-template-columns: 1fr 1fr 34px;
  gap: 8px;
  align-items: center;
}
.group-head {
  font-size: 12px;
  color: var(--muted);
}
.rule {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.rule p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: var(--wine-dark);
  color: white;
  padding: 13px 22px;
  border-radius: 10px;
  box-shadow: 0 4px 20px #0002;
  font-size: 14px;
  z-index: 20;
  transition: all 0.2s;
  max-width: 90vw;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.mobile-brand {
  display: none;
}
.print-only {
  display: none;
}
@media (min-width: 1500px) {
  .workspace {
    min-height: 700px;
  }
  .canvas {
    padding-top: 35px;
  }
  .table-grid {
    gap: 36px;
  }
  .guest-list {
    max-height: 575px;
  }
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  .sidebar {
    padding: 25px 12px;
  }
  .content {
    padding: 25px 22px;
  }
  .topbar {
    padding: 0 22px;
  }
  .heading {
    align-items: flex-start;
  }
  .heading .actions {
    max-width: 230px;
    justify-content: flex-end;
  }
  h1 {
    font-size: 31px;
  }
  .workspace {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .stat {
    padding: 13px 12px;
    gap: 9px;
  }
  .stat .stat-icon {
    padding: 7px;
  }
  .group-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .table-grid {
    gap: 18px 8px;
  }
  .canvas {
    padding: 22px 8px;
  }
  .table-names {
    max-width: 175px;
  }
  .plan-toolbar {
    padding: 13px 12px;
  }
  .plan-footer {
    flex-direction: column;
  }
}
@media (max-width: 850px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 14px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 22px;
  }
  .brand {
    font-size: 28px;
    padding: 0;
  }
  .brand small,
  .event-card,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    display: flex;
    gap: 3px;
    margin-left: auto;
  }
  .nav button {
    font-size: 0;
    padding: 10px;
  }
  .nav button .count {
    display: none;
  }
  .nav button svg {
    width: 21px;
    height: 21px;
  }
  .topbar {
    height: 54px;
  }
  .content {
    padding: 24px 18px;
  }
  .workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .stats {
    gap: 9px;
  }
  .stat .stat-icon {
    display: none;
  }
  .stat strong {
    font-size: 22px;
  }
  .heading p {
    max-width: 360px;
  }
  .group-grid {
    grid-template-columns: 1fr 1fr;
  }
  .data-wrap {
    overflow: auto;
  }
}
@media (max-width: 600px) {
  .column-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  h1 {
    font-size: 29px;
  }
  .heading {
    display: block;
  }
  .heading .actions {
    max-width: none;
    justify-content: flex-start;
    margin-top: 18px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 18px;
  }
  .stat {
    padding: 12px 15px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .guest-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .panel-head {
    padding: 15px;
  }
  .panel-head h3 {
    margin-bottom: 10px;
  }
  .guest-list {
    max-height: 175px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .guest-meta {
    font-size: 10px;
  }
  .guest {
    padding: 8px 4px;
  }
  .guest .avatar {
    width: 27px;
    height: 27px;
  }
  .guest-name {
    font-size: 12px;
  }
  .tabs {
    padding-bottom: 8px;
  }
  .panel-footer {
    padding: 8px 15px;
  }
  .canvas {
    min-height: 570px;
    padding: 20px 6px;
  }
  .table-grid {
    gap: 20px 5px;
  }
  .table-shape {
    width: 108px;
    height: 108px;
  }
  .table-names {
    max-width: 150px;
    font-size: 10px;
  }
  .table-tools button {
    font-size: 10px;
  }
  .plan-toolbar {
    flex-wrap: wrap;
  }
  .group-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  .topbar {
    padding: 0 18px;
    font-size: 12px;
  }
  .saved {
    font-size: 10px;
  }
  .content {
    padding: 22px 14px;
  }
  .members {
    grid-template-columns: 1fr;
  }
  .dialog-body {
    padding: 20px;
  }
  .dialog-head {
    padding: 20px 20px 0;
  }
  .data-table th,
  .data-table td {
    padding: 12px 8px;
  }
  .card {
    padding: 18px;
  }
  .legend {
    gap: 8px;
  }
}
@media print {
  body {
    background: white;
  }
  .shell,
  .dialog,
  #toast {
    display: none !important;
  }
  .print-only {
    display: block;
  }
  .print-only h1 {
    text-align: center;
  }
  .print-only p {
    text-align: center;
  }
  .print-only section {
    break-inside: avoid;
    padding: 16px;
    border: 1px solid #ddd;
    margin: 15px 0;
  }
  .print-only li {
    padding: 4px;
    font-size: 14px;
  }
}
.guest-name {
  font-size: 14px;
}
.guest-meta {
  font-size: 12px;
}
.stat span.label {
  font-size: 14px;
}
.tabs button {
  font-size: 14px;
}
.plan-toolbar .actions button {
  font-size: 14px;
}
.table-tools button {
  font-size: 12px;
}
.table-names {
  font-size: 12px;
}
.table-shape small {
  font-size: 12px;
}
.help {
  font-size: 13px;
}
.table-shape strong {
  max-width: 95%;
  text-align: center;
  overflow-wrap: anywhere;
}
.group-card h3 {
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .stat span.label {
    font-size: 12px;
  }
  .guest-name {
    font-size: 13px;
  }
  .table-tools button {
    font-size: 11px;
  }
  .table-names {
    font-size: 11px;
  }
  .plan-toolbar .actions button {
    font-size: 12px;
  }
}

/* Les étiquettes du plan accueillent maintenant les prénoms. */
.seat.filled {
  width: auto;
  min-width: 25px;
  max-width: 80px;
  height: 26px;
  padding: 0 7px;
  border-radius: 13px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  line-height: 24px;
}
.table-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.table-shape {
  width: 170px;
  height: 170px;
  margin: 18px 0;
}
.honor .table-shape,
.table-card.rectangle .table-shape {
  width: 250px;
  max-width: calc(100% - 24px);
  height: 85px;
}
/* Le placement manuel reste libre ; le rouge signale les points à revoir. */
.table-alert {
  font-size: 11px;
  line-height: 1.5;
  color: #78674f;
  text-align: left;
  width: 100%;
  max-width: 260px;
  margin: 10px 0 0;
  background: #f5f1e9;
  border-radius: 8px;
}
.table-alert summary {
  cursor: pointer;
  padding: 7px 10px;
  font-weight: 500;
}
.table-alert summary span {
  float: right;
  font-weight: 400;
  color: #81786b;
  margin-left: 12px;
}
.table-alert summary:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
  border-radius: 8px;
}
.table-alert-details {
  padding: 0 10px 10px;
  color: #6e665c;
  line-height: 1.7;
}
.table-alert[open] summary {
  margin-bottom: 3px;
}
.seat-instructions {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.6;
}
.seat-instructions button {
  font-size: 12px;
  padding: 4px 8px;
}
.seat.drop-target,
.seat.selected-seat {
  outline: 3px solid var(--wine);
  outline-offset: 3px;
}
.table-shape {
  margin: 30px 0 42px;
}
.honor .table-shape,
.table-card.rectangle .table-shape {
  margin: 28px 0 35px;
}
.guest:focus-visible {
  outline: 2px solid var(--wine);
}
.canvas {
  overflow: auto;
}
/* Menus du groupe et du sous-groupe dans la liste des invités : l’un sous l’autre. */
.data-table td .age-select + .age-select {
  margin-top: 4px;
}
.link-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--wine);
  text-decoration: underline;
  cursor: pointer;
}

/* Plan de salle : tables posées librement (positions dans le projet, voir layout.js). */
.table-grid.free {
  display: block;
  position: relative;
  width: auto;
  min-width: var(--room-w);
  max-width: none;
}
.table-grid.free .table-card {
  position: absolute;
  width: 250px;
  min-height: 240px;
}
.table-card.moving {
  z-index: 5;
  box-shadow: 0 10px 28px #4d344b26;
  background: #ffffffcc;
}
.table-move {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  padding: 2px 6px;
  font-size: 14px;
  line-height: 1;
  border-color: transparent;
  background: transparent;
  color: #aaa1aa;
  cursor: grab;
  touch-action: none;
}
.table-move:hover,
.table-move:focus-visible {
  color: var(--wine);
  background: #ffffffd9;
  border-color: #e9e4e9;
}
/* Écran étroit : retour à la grille (pas de glisser sur mobile). */
@media (max-width: 760px) {
  .table-grid.free {
    display: grid;
    width: auto;
    height: auto !important;
  }
  .table-grid.free .table-card {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: auto;
    height: auto;
    min-height: 178px;
  }
  .table-move {
    display: none;
  }
}

/* Une forme de table ne se comprime jamais : un cercle écrasé fausserait la place des sièges. */
.table-shape {
  flex-shrink: 0;
}

/* Le plan grandit avec ses tables au lieu de défiler dans un cadre à hauteur fixe. */
.canvas {
  flex: 1 0 auto;
}
