/*
 * Vitrine de la plateforme : l'annuaire (/) et la page des restaurateurs (/pro), aux couleurs de Carnédor
 * (charte : docs/identite-visuelle.md). Chargé après booking.css, dont il reprend les champs, le bouton d'envoi
 * et le sélecteur de thème : ses variables sont redéfinies ici avec les couleurs de la marque.
 * Ces deux pages seulement : les pages des restaurants gardent leur couleur, l'équipe et l'administration aussi.
 */
:root {
  /* Couleurs de la marque */
  --papier: #F7F4EC;
  --velin: #FFFDF8;
  --lin: #EFEADF;
  --encre: #18211D;
  --encre-2: #3A423D;
  --pierre: #66675E;
  --filet: #E2DACA;
  --filet-fort: #CFC5B1;
  --bord-champ: #8C836F;
  --sapin: #1E3A2F;
  --sapin-fonce: #142920;
  --sur-sapin: #FFFDF8;
  --panneau: #1E3A2F;
  --sur-panneau: #F3EDE0;
  --or: #C9A462;
  --or-texte: #7E5F2B;
  --succes: #2F6B4F;
  --alerte: #8A5A12;
  --focus: #7E5F2B;
  --ombre: 0 2px 6px rgba(24, 33, 29, 0.05), 0 18px 40px rgba(24, 33, 29, 0.10);
  /* Variables de booking.css (champs, bouton d'envoi, messages) */
  --bg: #F7F4EC;
  --surface: #FFFDF8;
  --surface-2: #F6F2E9;
  --ink-rgb: 24, 33, 29;
  --ink-2: #3A423D;
  --muted-rgb: 102, 103, 94;
  --line: #E2DACA;
  --line-strong: #CFC5B1;
  --accent-rgb: 30, 58, 47;
  --accent-ink: #FFFDF8;
  --accent-soft: #E5ECE6;
  --danger-rgb: 163, 54, 42;
  --wrap: 1120px;
}
:root[data-theme="dark"] {
  --papier: #0F1613;
  --velin: #16201C;
  --lin: #1C2723;
  --encre: #EEE9DE;
  --encre-2: #CFCBC0;
  --pierre: #A2A396;
  --filet: #26322C;
  --filet-fort: #34413A;
  --bord-champ: #66736B;
  --sapin: #9CC7B1;
  --sapin-fonce: #B7D8C7;
  --sur-sapin: #0F1613;
  --panneau: #183026;
  --or-texte: #D4B57A;
  --succes: #8BCDA8;
  --alerte: #E3B467;
  --focus: #D4B57A;
  --ombre: 0 2px 6px rgba(0, 0, 0, 0.4), 0 18px 40px rgba(0, 0, 0, 0.4);
  --bg: #0F1613;
  --surface: #16201C;
  --surface-2: #1C2723;
  --ink-rgb: 238, 233, 222;
  --ink-2: #CFCBC0;
  --muted-rgb: 162, 163, 150;
  --line: #26322C;
  --line-strong: #34413A;
  --accent-rgb: 156, 199, 177;
  --accent-ink: #0F1613;
  --accent-soft: #1E2F28;
  --danger-rgb: 240, 138, 122;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --papier: #0F1613;
    --velin: #16201C;
    --lin: #1C2723;
    --encre: #EEE9DE;
    --encre-2: #CFCBC0;
    --pierre: #A2A396;
    --filet: #26322C;
    --filet-fort: #34413A;
    --bord-champ: #66736B;
    --sapin: #9CC7B1;
    --sapin-fonce: #B7D8C7;
    --sur-sapin: #0F1613;
    --panneau: #183026;
    --or-texte: #D4B57A;
    --succes: #8BCDA8;
    --alerte: #E3B467;
    --focus: #D4B57A;
    --ombre: 0 2px 6px rgba(0, 0, 0, 0.4), 0 18px 40px rgba(0, 0, 0, 0.4);
    --bg: #0F1613;
    --surface: #16201C;
    --surface-2: #1C2723;
    --ink-rgb: 238, 233, 222;
    --ink-2: #CFCBC0;
    --muted-rgb: 162, 163, 150;
    --line: #26322C;
    --line-strong: #34413A;
    --accent-rgb: 156, 199, 177;
    --accent-ink: #0F1613;
    --accent-soft: #1E2F28;
    --danger-rgb: 240, 138, 122;
  }
}

/* ---------- Base ---------- */
body.vt { background: var(--papier); background-image: none; color: var(--encre); font-size: 16px; line-height: 1.55; }
.vt :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.vt-panel :focus-visible { outline-color: var(--or); }
.vt-wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* Sur-titre : petites capitales dorées, précédées d'un filet */
.vt-eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 22px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--or-texte);
}
.vt-eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.vt-panel .vt-eyebrow { color: var(--or); }

.vt-title {
  margin: 0 0 12px; font-family: var(--display); font-size: clamp(30px, 4vw, 42px); font-weight: 380; line-height: 1.1;
  letter-spacing: -0.015em; text-wrap: balance; font-variation-settings: 'opsz' 96;
}
.vt-intro { margin: 0 0 44px; max-width: 560px; color: var(--encre-2); font-size: 17px; text-wrap: pretty; }

/* ---------- Boutons ---------- */
.vt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 6px; font: 500 15px/1.2 var(--font); letter-spacing: .01em;
  text-decoration: none; cursor: pointer; transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.vt-btn--sapin { background: var(--sapin); color: var(--sur-sapin); }
.vt-btn--sapin:hover { background: var(--sapin-fonce); }
.vt-btn--or { background: var(--or); color: var(--panneau); }
.vt-btn--or:hover { background: var(--sur-panneau); }
.vt-btn--clair { border-color: rgba(243, 237, 224, 0.4); color: var(--sur-panneau); }
.vt-btn--clair:hover { border-color: var(--or); color: var(--or); }
.vt .bk-btn { border-radius: 6px; font-size: 15.5px; font-weight: 500; letter-spacing: .01em; }

/* ---------- Bandeau du haut : la couverture du carnet ---------- */
.vt-panel { position: relative; overflow: hidden; background: var(--panneau); color: var(--sur-panneau); }
/* Tranche dorée : quatre filets en bas du bandeau */
.vt-panel::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 13px; opacity: .6; pointer-events: none;
  background: repeating-linear-gradient(to bottom, var(--or) 0 1px, transparent 1px 4px);
}
/* Signet doré qui pend du haut de la page */
.vt-ribbon {
  position: absolute; top: 0; right: calc(max(20px, (100% - var(--wrap)) / 2) + 300px); width: 30px; height: 230px;
  background: var(--or); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%); pointer-events: none;
}

.vt-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.vt-brand {
  display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none;
  font-family: var(--display); font-size: 24px; font-weight: 400; letter-spacing: -0.01em; font-variation-settings: 'opsz' 48;
}
.vt-mark { flex: none; width: 34px; height: 34px; background: url(/brand/carnedor-mark-inverse.svg) center / contain no-repeat; }
.vt-accent { color: var(--or); }
.vt-nav { display: flex; align-items: center; gap: 8px 26px; flex-wrap: wrap; justify-content: flex-end; font-size: 14px; }
.vt-nav a { color: var(--sur-panneau); text-decoration: none; opacity: .85; transition: opacity .16s ease, color .16s ease, background-color .16s ease; }
.vt-nav a:hover { opacity: 1; color: var(--or); }
.vt-nav a.vt-nav-cta { opacity: 1; padding: 9px 16px; border: 1px solid var(--or); border-radius: 6px; }
.vt-nav a.vt-nav-cta:hover { background: var(--or); color: var(--panneau); }

.vt-hero { position: relative; padding-block: 64px 112px; }
.vt-hero h1 {
  margin: 0; max-width: 820px; font-family: var(--display); font-size: clamp(42px, 7.2vw, 80px); font-weight: 340; line-height: 1.02;
  letter-spacing: -0.025em; text-wrap: balance; font-variation-settings: 'opsz' 144;
}
.vt-hero h1 .vt-accent { display: block; }
.vt-lead { margin: 24px 0 0; max-width: 540px; font-size: 18px; line-height: 1.55; color: var(--sur-panneau); opacity: .8; text-wrap: pretty; }
.vt-actions { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Recherche, posée sur le bandeau */
.vt-search { position: relative; margin-top: 40px; max-width: 620px; }
.vt-search svg { position: absolute; left: 20px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--pierre); pointer-events: none; }
.vt-search input {
  width: 100%; height: 62px; padding: 0 20px 0 54px; border: 1px solid transparent; border-radius: 8px; outline: none;
  background: var(--velin); color: var(--encre); font-size: 17px; box-shadow: 0 20px 44px rgba(0, 0, 0, 0.22);
}
.vt-search input::placeholder { color: var(--pierre); }
.vt-search input:focus { border-color: var(--or); box-shadow: 0 0 0 3px rgba(201, 164, 98, 0.35), 0 20px 44px rgba(0, 0, 0, 0.22); }

/* ---------- Contenu sur le papier ---------- */
.vt-section { padding-top: 104px; }
.vt-section:first-child { padding-top: 80px; }
.vt-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap;
  margin-bottom: 32px; padding-bottom: 18px; border-bottom: 1px solid var(--filet);
}
.vt-head .vt-title { margin: 0; }
.vt-count { margin: 0; color: var(--pierre); font-size: 14px; font-variant-numeric: tabular-nums; }

/* Fiches des restaurants (écrites par js/home.js) */
.vt-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.resto-card {
  --resto: var(--sapin);
  height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 26px;
  background: var(--velin); border: 1px solid var(--filet); border-radius: 12px; color: inherit; text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
a.resto-card:hover { border-color: var(--filet-fort); box-shadow: var(--ombre); }
.resto-head { display: flex; align-items: center; gap: 16px; min-height: 56px; }
.resto-logo {
  flex: none; width: 56px; height: 56px; border-radius: 8px; display: grid; place-items: center; overflow: hidden;
  background: var(--papier); border: 1px solid var(--filet);
}
.resto-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
/* Sans logo : l'initiale, dans la couleur du restaurant */
.resto-logo.mono { border: 0; background: var(--resto); color: #fff; font-family: var(--display); font-size: 26px; font-weight: 400; }
.resto-name {
  margin: 0; font-family: var(--display); font-size: 22px; font-weight: 420; line-height: 1.15; letter-spacing: -0.01em;
  overflow-wrap: anywhere; font-variation-settings: 'opsz' 36;
}
.resto-meta { margin: 5px 0 0; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--or-texte); }
.resto-text { margin: 0; color: var(--encre-2); font-size: 15px; text-wrap: pretty; }
.resto-address { margin: 0; color: var(--pierre); font-size: 14px; }
.resto-foot {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--filet);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px;
}
.resto-go { display: inline-flex; align-items: center; gap: 8px; color: var(--sapin); font-weight: 500; font-size: 15px; }
.resto-go svg { width: 16px; height: 16px; transition: transform .16s ease; }
a.resto-card:hover .resto-go svg { transform: translateX(3px); }
.resto-closed { color: var(--pierre); font-size: 13px; }

.vt-empty { padding: 56px 24px; text-align: center; color: var(--encre-2); background: var(--velin); border: 1px solid var(--filet); border-radius: 12px; }
.vt-empty::before { content: ''; display: block; width: 32px; height: 1px; margin: 0 auto 22px; background: var(--or); }
.vt-empty b { display: block; margin-bottom: 8px; color: var(--encre); font-family: var(--display); font-size: 24px; font-weight: 400; }
.vt-empty a { color: var(--sapin); font-weight: 500; }

/* Étapes : grands chiffres dorés sous un filet */
.vt-steps { list-style: none; counter-reset: etape; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.vt-steps li { counter-increment: etape; padding-top: 24px; border-top: 1px solid var(--filet-fort); }
.vt-steps li::before {
  content: counter(etape); display: block; margin-bottom: 16px; color: var(--or-texte);
  font-family: var(--display); font-size: 48px; line-height: 1; font-weight: 300; font-variation-settings: 'opsz' 144;
}
.vt-steps b { display: block; margin-bottom: 8px; font-family: var(--display); font-size: 21px; font-weight: 430; line-height: 1.25; font-variation-settings: 'opsz' 24; }
.vt-steps span { color: var(--encre-2); font-size: 15px; }
.vt-steps code { padding: 2px 6px; border-radius: 4px; background: var(--lin); font: 500 13.5px/1.4 var(--font); }

/* Invitation des restaurateurs (accueil) */
.vt-invite {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 56px;
  padding: 52px 56px; background: var(--lin); border-radius: 12px;
}
.vt-invite .vt-title { margin-bottom: 10px; }
.vt-invite p:last-child { margin: 0; max-width: 560px; color: var(--encre-2); }

/* ---------- /pro : le carnet du service ---------- */
.vt-hero--split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: 64px; }
.vt-carnet { position: relative; }
/* La page du dessous, légèrement décalée */
.vt-carnet::before {
  content: ''; position: absolute; inset: 10px -8px -10px 8px; border-radius: 10px; background: rgba(243, 237, 224, 0.14);
}
.vt-carnet-page {
  position: relative; padding: 30px 30px 18px; border-radius: 10px; background: var(--velin); color: var(--encre);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
}
.vt-carnet-page::before {
  content: ''; position: absolute; top: 0; right: 30px; width: 22px; height: 64px; background: var(--or);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
}
.vt-carnet-date { margin: 0 0 4px; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--or-texte); }
.vt-carnet-title { margin: 0 0 18px; padding-right: 48px; font-family: var(--display); font-size: 28px; font-weight: 380; line-height: 1.15; font-variation-settings: 'opsz' 72; }
.vt-carnet-rows { list-style: none; margin: 0; padding: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.vt-carnet-rows li {
  display: grid; grid-template-columns: 50px minmax(0, 1fr) 54px 38px auto; align-items: center; gap: 10px;
  padding: 12px 0; border-top: 1px solid var(--filet);
}
.vt-carnet-rows time { font-family: var(--display); font-size: 17px; font-weight: 420; font-variation-settings: 'opsz' 24; }
.vt-carnet-rows .n { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-carnet-rows .c, .vt-carnet-rows .t { color: var(--pierre); }
.vt-statut { display: inline-flex; align-items: center; gap: 6px; justify-self: end; font-size: 12.5px; font-weight: 500; }
.vt-statut::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.vt-statut.ok { color: var(--succes); }
.vt-statut.attente { color: var(--alerte); }

/* Fonctions : grille à filets, sans cartes */
.vt-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--filet-fort); }
.vt-features li { padding: 34px 32px 38px; border-bottom: 1px solid var(--filet); border-right: 1px solid var(--filet); }
.vt-features li:nth-child(3n + 1) { padding-left: 0; }
.vt-features li:nth-child(3n) { padding-right: 0; border-right: 0; }
.vt-features svg { width: 28px; height: 28px; color: var(--or-texte); }
.vt-features h3 { margin: 18px 0 8px; font-family: var(--display); font-size: 22px; font-weight: 430; line-height: 1.2; font-variation-settings: 'opsz' 24; }
.vt-features p { margin: 0; color: var(--encre-2); font-size: 15px; text-wrap: pretty; }

/* Demande de compte */
.vt-demande { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; gap: 64px; }
.vt-assure { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; color: var(--encre-2); }
.vt-assure li { display: flex; gap: 14px; align-items: baseline; }
.vt-assure li::before { content: ''; flex: none; width: 16px; height: 1px; transform: translateY(-4px); background: var(--or); }
.vt .vt-form { padding: 34px; background: var(--velin); border: 1px solid var(--filet); border-radius: 12px; box-shadow: none; }
.vt-form .bk-btn { width: 100%; margin-top: 22px; }
.vt-form .bk-hint { text-align: center; }
.vt-form .bk-hint a { color: var(--pierre); }
.vt .bk-field { color: var(--encre-2); }
.vt .bk-field input, .vt .bk-field textarea { border-color: var(--bord-champ); border-radius: 6px; background: var(--velin); }
.vt .bk-field input:focus, .vt .bk-field textarea:focus { border-color: var(--sapin); box-shadow: 0 0 0 3px var(--accent-soft); }
.vt .bk-field input.invalid { border-color: var(--danger); }
.vt-form.bk-done h2 { font-weight: 400; }

/* ---------- Pied de page ---------- */
.vt-foot { margin-top: 120px; border-top: 1px solid var(--filet); }
.vt-foot-in {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 28px;
  padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); font-size: 13.5px; color: var(--pierre);
}
.vt-foot-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--encre); font-family: var(--display); font-size: 18px; font-weight: 400; }
.vt-foot-brand .vt-mark { width: 24px; height: 24px; background-image: url(/brand/carnedor-favicon.svg); }
.vt-foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; }
.vt-foot a { color: var(--pierre); text-decoration: none; }
.vt-foot a:hover { color: var(--encre); text-decoration: underline; text-underline-offset: 4px; }
.vt .bk-theme { color: var(--pierre); font-size: 13.5px; }
.vt .bk-theme:hover { color: var(--encre); }

/* ---------- Écrans plus étroits ---------- */
@media (max-width: 900px) {
  .vt-ribbon { display: none; }
  .vt-hero--split, .vt-demande { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .vt-carnet { max-width: 520px; }
  .vt-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vt-features li:nth-child(n) { padding: 30px 24px 34px; border-right: 1px solid var(--filet); }
  .vt-features li:nth-child(2n + 1) { padding-left: 0; }
  .vt-features li:nth-child(2n) { padding-right: 0; border-right: 0; }
}
@media (max-width: 640px) {
  .vt-top { padding-block: 16px; }
  .vt-brand { font-size: 21px; }
  .vt-mark { width: 28px; height: 28px; }
  .vt-nav a:not(.vt-nav-cta) { display: none; }
  .vt-nav a.vt-nav-cta { padding: 7px 12px; font-size: 13px; white-space: nowrap; }

  .vt-hero { padding-block: 40px 80px; }
  .vt-lead { font-size: 17px; }
  .vt-actions .vt-btn { flex: 1 1 100%; }
  .vt-section { padding-top: 72px; }
  .vt-section:first-child { padding-top: 56px; }
  .vt-steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .vt-features { grid-template-columns: minmax(0, 1fr); }
  .vt-features li:nth-child(n) { padding: 28px 0 30px; border-right: 0; }
  .vt-invite { grid-template-columns: minmax(0, 1fr); padding: 32px 24px; }
  .vt-invite .vt-btn { width: 100%; }
  .vt-carnet-page { padding: 24px 20px 14px; }
  .vt-carnet-rows li { grid-template-columns: 46px minmax(0, 1fr) 46px auto; }
  .vt-carnet-rows .t { display: none; }
  .vt .vt-form { padding: 22px 18px; }
  .vt-foot { margin-top: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  .vt-btn, .vt-nav a, .resto-card, .resto-go svg { transition: none; }
}
