/* =====================================================================
   Hôtel Chante Grelet — gestion du site
   Couleurs du site : basalte pour la structure, eau pour les actions,
   cuivre réservé à une seule chose, la publication. Polices du site :
   Jost pour le texte, Kalnia pour les titres.
   ===================================================================== */

@font-face {
  font-family: 'Jost';
  src: url('/admin/fonts/jost-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215;
}
@font-face {
  font-family: 'Jost';
  src: url('/admin/fonts/jost-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Kalnia';
  src: url('/admin/fonts/kalnia-latin.woff2') format('woff2');
  font-weight: 100 700;
  font-display: swap;
}

:root {
  --ground: #eef1ec;
  --surface: #ffffff;
  --surface-2: #f6f8f5;
  --ink: #1c2a2e;
  --ink-soft: #4a5a5e;
  --ink-faint: #7b8a8d;
  --line: #dfe6e2;
  --line-strong: #c5d1cc;
  --palm: #1c2a2e;
  --palm-2: #243539;
  --palm-3: #2f454a;
  --palm-text: #d3e2df;
  --palm-faint: #8fa6a5;
  --water: #0f4a52;
  --water-strong: #0a363c;
  --water-wash: #e0efed;
  --brass: #8a4a2b;
  --brass-deep: #6d3920;
  --brass-wash: #f4e7d9;
  --danger: #b0402e;
  --danger-wash: #fbe9e5;
  --ok: #2c7347;
  --ok-wash: #e4f2e8;

  --font: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Kalnia', Georgia, serif;
  --font-mono: ui-monospace, 'Cascadia Code', Consolas, monospace;

  --r-sm: 7px;
  --r: 10px;
  --r-lg: 14px;
  --shadow-pop: 0 18px 50px -18px rgba(28, 42, 46, 0.35), 0 2px 6px rgba(28, 42, 46, 0.06);
  --sidebar: 15.5rem;
  --topbar: 3.75rem;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--water);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--water-strong);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--water);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.25;
  font-weight: 700;
}

p {
  margin: 0;
}

.boot {
  display: grid;
  place-items: center;
  min-height: 100vh;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------ */
/* Shell                                                               */
/* ------------------------------------------------------------------ */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--palm);
  color: var(--palm-text);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--palm-3) transparent;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.15rem 1.2rem 1rem;
  color: #fff;
  text-decoration: none;
}
.brand:hover {
  color: #fff;
}
.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 999px 999px 0.5rem 0.5rem;
  background: var(--palm-3);
  color: var(--brass);
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.005em;
}
.brand-sub {
  display: block;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--palm-faint);
  letter-spacing: 0;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0.4rem 0.6rem 1rem;
}
.nav-group {
  margin: 0.85rem 0.65rem 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--palm-faint);
}
.nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.44rem 0.65rem;
  border-radius: var(--r-sm);
  color: var(--palm-text);
  text-decoration: none;
  font-weight: 500;
}
.nav a svg {
  flex: none;
  opacity: 0.75;
}
.nav a:hover {
  background: var(--palm-2);
  color: #fff;
}
.nav a[aria-current='page'] {
  background: var(--palm-3);
  color: #fff;
}
.nav a[aria-current='page'] svg {
  opacity: 1;
  color: var(--brass);
}
.nav-count {
  margin-inline-start: auto;
  min-width: 1.4rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--brass);
  color: var(--palm);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.4rem;
}

.sidebar-foot {
  margin-top: auto;
  padding: 0.8rem 0.6rem 1rem;
  border-top: 1px solid var(--palm-2);
}
.me-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--palm-text);
  cursor: pointer;
  text-align: start;
}
.me-button:hover {
  background: var(--palm-2);
}
.avatar {
  width: 2rem;
  height: 2rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--water);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}
.me-name {
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}
.me-role {
  font-size: 0.8rem;
  color: var(--palm-faint);
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--topbar);
  padding: 0.55rem 1.75rem;
  background: rgba(238, 242, 238, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .menu-toggle {
  display: none;
}
.topbar-status {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--ok);
  flex: none;
}
.status-dot.is-pending {
  background: var(--brass);
  box-shadow: 0 0 0 4px var(--brass-wash);
}
.status-dot.is-busy {
  background: var(--water);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
.topbar-actions {
  display: flex;
  gap: 0.5rem;
}

.content {
  width: 100%;
  max-width: 76rem;
  padding: 1.75rem 1.75rem 7rem;
}
.content--wide {
  max-width: 96rem;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.page-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.page-lead {
  margin-top: 0.35rem;
  max-width: 44rem;
  color: var(--ink-soft);
}
.page-head-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.93rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.btn:hover {
  border-color: var(--ink-faint);
  color: var(--ink);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--water);
  border-color: var(--water);
  color: #fff;
}
.btn-primary:hover {
  background: var(--water-strong);
  border-color: var(--water-strong);
  color: #fff;
}
.btn-publish {
  background: var(--brass);
  border-color: var(--brass);
  color: #fff;
}
.btn-publish:hover {
  background: var(--brass-deep);
  border-color: var(--brass-deep);
  color: #fff;
}
.btn-danger {
  color: var(--danger);
  border-color: #e3b7ae;
}
.btn-danger:hover {
  background: var(--danger-wash);
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger-solid {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.btn-danger-solid:hover {
  background: #8e3122;
  color: #fff;
}
.btn-ghost {
  border-color: transparent;
  background: transparent;
}
.btn-ghost:hover {
  background: rgba(22, 35, 28, 0.06);
  border-color: transparent;
}
.btn-sm {
  min-height: 1.95rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.86rem;
}
.btn-icon {
  width: 2.1rem;
  min-height: 2.1rem;
  padding: 0;
}
.btn-sm.btn-icon {
  width: 1.95rem;
}

/* ------------------------------------------------------------------ */
/* Panels, sections                                                    */
/* ------------------------------------------------------------------ */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.panel + .panel {
  margin-top: 1.25rem;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
}
.panel-sub {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: 0.1rem;
}
.panel-body {
  padding: 1.25rem;
}
.panel-body--flush {
  padding: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.spacer {
  flex: 1;
}
.muted {
  color: var(--ink-soft);
}
.faint {
  color: var(--ink-faint);
}
.small {
  font-size: 0.86rem;
}
.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
}
.nowrap {
  white-space: nowrap;
}
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

/* ------------------------------------------------------------------ */
/* Forms                                                               */
/* ------------------------------------------------------------------ */

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.field + .field {
  margin-top: 1.1rem;
}
.grid-2 > .field,
.grid-3 > .field {
  margin-top: 0;
}
.field-label {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.93rem;
}
.field-label .count {
  margin-inline-start: auto;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.field-label .count.is-over {
  color: var(--danger);
}
.field-label .count.is-good {
  color: var(--ok);
}
.field-help {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.field-ref {
  font-size: 0.85rem;
  color: var(--ink-faint);
  padding-inline-start: 0.6rem;
  border-inline-start: 2px solid var(--line);
}
.field-ref b {
  font-weight: 600;
  color: var(--ink-soft);
}
.field.is-changed > .field-label::after {
  content: 'modifié';
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brass-deep);
  background: var(--brass-wash);
  border-radius: 999px;
  padding: 0 0.45rem;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--ink-faint);
}
.input:focus,
.textarea:focus,
.select:focus,
.rich:focus-within {
  outline: none;
  border-color: var(--water);
  box-shadow: 0 0 0 3px var(--water-wash);
}
.textarea {
  min-height: 5.5rem;
  resize: vertical;
  line-height: 1.55;
}
.textarea.code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  min-height: 9rem;
  white-space: pre;
  tab-size: 2;
}
.input[dir='rtl'],
.textarea[dir='rtl'],
.rich[dir='rtl'] {
  text-align: right;
}
.input-sm {
  padding: 0.35rem 0.55rem;
  font-size: 0.9rem;
}
.input-num {
  max-width: 8rem;
  font-variant-numeric: tabular-nums;
}
.input-affix {
  display: flex;
  align-items: stretch;
}
.input-affix > span {
  display: grid;
  place-items: center;
  padding: 0 0.6rem;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.input-affix > span:first-child {
  border-inline-end: 0;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
}
.input-affix > span:last-child {
  border-inline-start: 0;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.input-affix > .input {
  border-radius: 0;
}
.input-affix > .input:first-child {
  border-radius: var(--r-sm) 0 0 var(--r-sm);
}
.input-affix > .input:last-child {
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}
.check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--water);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
}
.switch input {
  appearance: none;
  width: 2.5rem;
  height: 1.45rem;
  margin: 0;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex: none;
}
.switch input::after {
  content: '';
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: calc(1.45rem - 6px);
  height: calc(1.45rem - 6px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}
.switch input:checked {
  background: var(--water);
}
.switch input:checked::after {
  transform: translateX(1.05rem);
}
[dir='rtl'] .switch input:checked::after {
  transform: translateX(-1.05rem);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.86rem;
  cursor: pointer;
}
.chip[aria-pressed='true'],
.chip.is-on {
  background: var(--water-wash);
  border-color: var(--water);
  color: var(--water-strong);
  font-weight: 600;
}

/* Rich inline editor for *Html fields */
.rich {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
}
.rich-bar {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.rich-bar button {
  min-width: 2rem;
  height: 1.8rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.85rem;
}
.rich-bar button:hover {
  background: var(--line);
  color: var(--ink);
}
.rich-bar .sep {
  width: 1px;
  margin: 3px 4px;
  background: var(--line);
}
.rich-area {
  min-height: 2.6rem;
  padding: 0.55rem 0.7rem;
  outline: none;
  line-height: 1.55;
}
.rich-area em {
  font-style: normal;
  color: var(--brass-deep);
  background: var(--brass-wash);
  border-radius: 3px;
  padding: 0 2px;
}
.rich-source {
  border: 0;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.rich-source:focus {
  box-shadow: none;
}

/* Repeatable lists */
.list-items {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: start;
}
.list-item-tools {
  display: flex;
  gap: 2px;
  padding-top: 0.25rem;
}
.record {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
  padding: 0.9rem 1rem 1rem;
}
.record-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.record .field + .field {
  margin-top: 0.8rem;
}

fieldset.group {
  margin: 0;
  padding: 0;
  border: 0;
}
.group + .group {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.group-title {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.group-help {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ------------------------------------------------------------------ */
/* Tabs                                                                */
/* ------------------------------------------------------------------ */

.tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
}
.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.85rem;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.tab:hover {
  color: var(--ink);
  background: rgba(22, 35, 28, 0.04);
}
.tab[aria-selected='true'] {
  color: var(--ink);
}
.tab[aria-selected='true']::after {
  content: '';
  position: absolute;
  inset-inline: 0.5rem;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--water);
}
.tab-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--brass);
}
.tab-badge {
  font-size: 0.75rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--danger-wash);
  color: var(--danger);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px solid var(--line);
  gap: 2px;
}
.segmented button {
  border: 0;
  padding: 0.35rem 0.8rem;
  border-radius: var(--r-sm);
  background: transparent;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.segmented button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(28, 42, 46, 0.12);
}

/* ------------------------------------------------------------------ */
/* Editor layout (section list + form)                                 */
/* ------------------------------------------------------------------ */

.editor {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.section-list {
  position: sticky;
  top: calc(var(--topbar) + 1.25rem);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.section-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-sm);
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
}
.section-list a:hover {
  background: rgba(22, 35, 28, 0.05);
  color: var(--ink);
}
.section-list a[aria-current='page'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 2px 0 0 var(--water);
}

.locale-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* ------------------------------------------------------------------ */
/* Save bar                                                            */
/* ------------------------------------------------------------------ */

.savebar {
  position: fixed;
  bottom: 1.1rem;
  inset-inline-start: calc(var(--sidebar) + 1.75rem);
  inset-inline-end: 1.75rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 60rem;
  margin-inline: auto;
  padding: 0.65rem 0.75rem 0.65rem 1.1rem;
  border-radius: var(--r-lg);
  background: var(--palm);
  color: #fff;
  box-shadow: var(--shadow-pop);
  animation: rise 0.25s ease-out;
}
.savebar .btn-ghost {
  color: var(--palm-text);
}
.savebar .btn-ghost:hover {
  background: var(--palm-2);
  color: #fff;
}
@keyframes rise {
  from {
    transform: translateY(1rem);
    opacity: 0;
  }
}

/* ------------------------------------------------------------------ */
/* Tables                                                              */
/* ------------------------------------------------------------------ */

.table-wrap {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}
.table th {
  text-align: start;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.85rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  white-space: nowrap;
}
.table td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tr.is-clickable {
  cursor: pointer;
}
.table tr.is-clickable:hover td {
  background: var(--surface-2);
}
.table .num {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ */
/* Badges, notes, empty states                                         */
/* ------------------------------------------------------------------ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  white-space: nowrap;
}
.badge-ok {
  background: var(--ok-wash);
  border-color: #bcdcc6;
  color: var(--ok);
}
.badge-warn {
  background: var(--brass-wash);
  border-color: #e6d3a7;
  color: var(--brass-deep);
}
.badge-danger {
  background: var(--danger-wash);
  border-color: #ecc2b9;
  color: var(--danger);
}
.badge-info {
  background: var(--water-wash);
  border-color: #b7dcd8;
  color: var(--water-strong);
}

.note {
  display: flex;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  border-radius: var(--r);
  background: var(--water-wash);
  color: var(--water-strong);
  font-size: 0.92rem;
}
.note svg {
  flex: none;
  margin-top: 0.1rem;
}
.note-warn {
  background: var(--brass-wash);
  color: var(--brass-deep);
}
.note-danger {
  background: var(--danger-wash);
  color: var(--danger);
}
.note b {
  font-weight: 700;
}

.empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--ink-soft);
}
.empty-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}
.empty .btn {
  margin-top: 1rem;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
  flex: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 2rem;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------ */
/* Modals, drawers, toasts                                             */
/* ------------------------------------------------------------------ */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(14, 24, 19, 0.45);
  animation: fade 0.15s ease-out;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.modal {
  width: min(34rem, 100%);
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
}
.modal-wide {
  width: min(64rem, 100%);
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}
.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.drawer-overlay {
  place-items: stretch end;
  padding: 0;
}
.drawer {
  width: min(40rem, 100vw);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  animation: slide 0.22s ease-out;
}
@keyframes slide {
  from {
    transform: translateX(2rem);
    opacity: 0;
  }
}
.drawer .modal-body {
  flex: 1;
}
.drawer .modal-foot {
  border-radius: 0;
}

.toasts {
  position: fixed;
  bottom: 1.25rem;
  inset-inline-end: 1.25rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(26rem, calc(100vw - 2.5rem));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r);
  background: var(--palm);
  color: #fff;
  box-shadow: var(--shadow-pop);
  animation: rise 0.2s ease-out;
  font-size: 0.93rem;
}
.toast-error {
  background: var(--danger);
}
.toast button {
  margin-inline-start: auto;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
}

/* ------------------------------------------------------------------ */
/* Changes / diffs                                                     */
/* ------------------------------------------------------------------ */

.changes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.change-doc-title {
  font-weight: 700;
  margin-bottom: 0.4rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.change {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 0.88rem;
}
.change + .change {
  margin-top: 0.4rem;
}
.change-path {
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 0.25rem;
}
.change-before {
  color: var(--danger);
  text-decoration: line-through;
  text-decoration-color: rgba(176, 64, 46, 0.45);
  word-break: break-word;
}
.change-after {
  color: var(--ok);
  word-break: break-word;
}
.change-value {
  white-space: pre-wrap;
}

.log {
  max-height: 22rem;
  overflow: auto;
  padding: 0.75rem 0.9rem;
  border-radius: var(--r-sm);
  background: #142024;
  color: #d3e2df;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ------------------------------------------------------------------ */
/* Photos                                                              */
/* ------------------------------------------------------------------ */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.75rem;
}
.photo-grid--sm {
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.5rem;
}
.photo {
  position: relative;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  text-align: start;
}
.photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--line);
}
.photo:hover {
  border-color: var(--ink-faint);
}
.photo.is-selected {
  outline: 3px solid var(--water);
  outline-offset: -3px;
}
.photo-meta {
  padding: 0.4rem 0.55rem 0.5rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photo-flags {
  position: absolute;
  top: 0.4rem;
  inset-inline-start: 0.4rem;
  display: flex;
  gap: 0.25rem;
}
.photo-flags .badge {
  background: rgba(255, 255, 255, 0.92);
}
.photo-check {
  position: absolute;
  top: 0.45rem;
  inset-inline-end: 0.45rem;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--water);
  color: #fff;
}
.photo-order {
  position: absolute;
  bottom: 2.4rem;
  inset-inline-start: 0.4rem;
  min-width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(28, 42, 46, 0.8);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.slot {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
}
.slot img {
  width: 6.5rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-sm);
  flex: none;
}
.slot-label {
  font-weight: 600;
  font-size: 0.9rem;
}
.slot-empty {
  display: grid;
  place-items: center;
  width: 6.5rem;
  aspect-ratio: 4 / 3;
  flex: none;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--ink-faint);
  font-size: 0.75rem;
  text-align: center;
}

/* Texte en deux langues, côte à côte (données des chambres, du restaurant…) */
.bilingual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.bilingual-lang {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
@media (max-width: 720px) {
  .bilingual {
    grid-template-columns: 1fr;
  }
}
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 0.6rem;
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 0.4rem;
  padding: 1.6rem;
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink-soft);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.dropzone.is-over,
.dropzone:hover {
  border-color: var(--water);
  background: var(--water-wash);
}

.media-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 1.25rem;
  align-items: start;
}
.media-detail {
  position: sticky;
  top: calc(var(--topbar) + 1.25rem);
}
.media-detail img {
  width: 100%;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* ------------------------------------------------------------------ */
/* Dashboard                                                           */
/* ------------------------------------------------------------------ */

.welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.site-card {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  border-radius: var(--r-lg);
  background: var(--palm);
  color: var(--palm-text);
  min-height: 12rem;
  display: flex;
  flex-direction: column;
}
.site-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.55rem;
  color: #fff;
  line-height: 1.2;
  max-width: 22rem;
}
.site-card p {
  margin-top: 0.5rem;
  max-width: 28rem;
}
.site-card .row {
  margin-top: auto;
  padding-top: 1.25rem;
}
.site-card .btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.site-card .btn:hover {
  background: rgba(255, 255, 255, 0.16);
}
.site-card .btn-publish {
  background: var(--brass);
  border-color: var(--brass);
}
/* Une bulle, comme sur le site */
.site-card .arch {
  position: absolute;
  inset-inline-end: -2.5rem;
  bottom: -3.5rem;
  width: 12rem;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(142, 211, 207, 0.4);
  pointer-events: none;
}
.site-card .arch::after {
  content: '';
  position: absolute;
  inset: 1.4rem;
  border-radius: inherit;
  border: 1px solid rgba(142, 211, 207, 0.22);
}

.stat-list {
  display: flex;
  flex-direction: column;
}
.stat-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.stat-line:last-child {
  border-bottom: 0;
}
a.stat-line:hover {
  background: var(--surface-2);
  color: inherit;
}
.stat-num {
  margin-inline-start: auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.progress {
  height: 0.4rem;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--water);
}

.activity {
  display: flex;
  flex-direction: column;
}
.activity-item {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.activity-item:last-child {
  border-bottom: 0;
}
.activity-item .avatar {
  width: 1.8rem;
  height: 1.8rem;
  font-size: 0.75rem;
}
.activity-item > span:nth-child(2) {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.activity-item time {
  color: var(--ink-faint);
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Login                                                               */
/* ------------------------------------------------------------------ */

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.login-art {
  position: relative;
  overflow: hidden;
  background: var(--palm);
  color: var(--palm-text);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem;
}
.login-art h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 3.5vw, 3.1rem);
  line-height: 1.08;
  color: #fff;
  max-width: 26rem;
}
.login-art p {
  margin-top: 1rem;
  max-width: 24rem;
}
.login-arches {
  position: absolute;
  top: 3rem;
  inset-inline-end: 3rem;
  display: flex;
  gap: 1rem;
}
/* Les bulles du site (la « Bulle de détente ») */
.login-arches {
  align-items: flex-end;
}
.login-arches span {
  width: 4.5rem;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(142, 211, 207, 0.55);
}
.login-arches span:nth-child(2) {
  width: 7.5rem;
  background: rgba(142, 211, 207, 0.12);
}
.login-arches span:nth-child(3) {
  width: 2.75rem;
}
.login-form {
  display: grid;
  place-items: center;
  padding: 2rem;
}
.login-card {
  width: min(24rem, 100%);
}
.login-card h2 {
  font-size: 1.45rem;
  margin-bottom: 0.3rem;
}
.login-card form {
  margin-top: 1.5rem;
}
.login-card .btn {
  width: 100%;
  margin-top: 1.25rem;
  min-height: 2.75rem;
}
.form-error {
  margin-top: 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--r-sm);
  background: var(--danger-wash);
  color: var(--danger);
  font-size: 0.92rem;
}

/* Announcement preview (mirrors the strip at the top of the site) */
.announce-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem 2.5rem;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  font-weight: 600;
  font-size: 0.88rem;
  text-align: center;
}
.announce-preview .link {
  padding: 0.1rem 0.7rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-weight: 700;
}
.announce-preview .close {
  position: absolute;
  inset-inline-end: 0.8rem;
}
.announce-preview.brass {
  background: var(--brass);
  color: var(--palm);
}
.announce-preview.forest {
  background: var(--palm);
  color: #faf7ef;
}
.announce-preview.sand {
  background: #f4eee0;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.preview-header {
  height: 2.6rem;
  background: rgba(28, 42, 46, 0.75);
}
.preview-hero {
  height: 4.5rem;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  background: linear-gradient(160deg, #0f4a52, #2f6f73 60%, #8ed3cf);
}
.preview-stage {
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}

/* SERP preview */
.serp {
  padding: 1rem 1.1rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: #fff;
  font-family: Arial, sans-serif;
  max-width: 40rem;
}
.serp-url {
  font-size: 0.8rem;
  color: #202124;
}
.serp-title {
  margin-top: 0.15rem;
  font-size: 1.15rem;
  color: #1a0dab;
  line-height: 1.3;
}
.serp-desc {
  margin-top: 0.2rem;
  font-size: 0.86rem;
  color: #4d5156;
  line-height: 1.45;
}

.mode-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.mode-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  text-align: start;
  cursor: pointer;
}
.mode-card:hover {
  border-color: var(--ink-faint);
}
.mode-card[aria-pressed='true'] {
  border-color: var(--water);
  box-shadow: inset 0 0 0 1px var(--water);
  background: var(--water-wash);
}
.mode-card b {
  font-size: 0.98rem;
}
.mode-card span {
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.kv {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.45rem 1.25rem;
  font-size: 0.93rem;
}
.kv dt {
  color: var(--ink-soft);
}
.kv dd {
  margin: 0;
  word-break: break-word;
}

.secret {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  font-family: var(--font-mono);
  font-size: 1rem;
  word-break: break-all;
}

.qr {
  width: 11rem;
  height: 11rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 1100px) {
  .media-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .media-detail {
    position: static;
  }
  .welcome {
    grid-template-columns: minmax(0, 1fr);
  }
  .mode-cards,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: min(18rem, 85vw);
    z-index: 90;
    transform: translateX(-100%);
    transition: transform 0.25s ease-out;
  }
  .shell.is-menu-open .sidebar {
    transform: none;
    box-shadow: var(--shadow-pop);
  }
  .topbar .menu-toggle {
    display: inline-flex;
  }
  .topbar {
    padding: 0.5rem 1rem;
  }
  .topbar-status .status-text,
  .topbar .status-text {
    display: none;
  }
  .content {
    padding: 1.25rem 1rem 7rem;
  }
  .editor {
    grid-template-columns: minmax(0, 1fr);
  }
  .section-list {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.25rem;
    padding-bottom: 0.25rem;
  }
  .section-list a {
    white-space: nowrap;
  }
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .savebar {
    inset-inline: 0.75rem;
    bottom: 0.75rem;
  }
  .login {
    grid-template-columns: minmax(0, 1fr);
  }
  .login-art {
    min-height: 15rem;
    padding: 2rem 1.5rem;
  }
  .login-arches {
    top: 1.5rem;
    inset-inline-end: 1.5rem;
  }
  .page-title {
    font-size: 1.55rem;
  }
}

@media (max-width: 560px) {
  .topbar .btn-label {
    display: none;
  }
  .topbar-actions .btn {
    padding-inline: 0.6rem;
  }
  .page-head-actions .btn {
    padding-inline: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
