/* En salle : le tableau de bord du restaurant. S'appuie sur les variables et boutons de site.css. */

body.tableau { background: var(--creme); font-size: 14px; --ticket: 0px; padding-bottom: 0; }
.tb-entete { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 12px clamp(16px, 3vw, 32px); background: var(--nuit); color: var(--creme); border-bottom: 3px solid var(--cuivre); }
.tb-marque { font-weight: 900; font-stretch: 122%; text-transform: uppercase; letter-spacing: -0.02em; font-size: 20px; text-decoration: none; display: flex; gap: 10px; align-items: baseline; }
.tb-marque span { font-size: 10px; letter-spacing: 0.18em; color: var(--cuivre-clair); font-stretch: 100%; }
.tb-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; order: 3; width: 100%; }
.tb-nav a { text-decoration: none; padding: 8px 12px; color: rgba(244, 233, 211, 0.7); white-space: nowrap; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.tb-nav a:hover { color: var(--creme); }
.tb-nav a[aria-current="page"] { background: var(--cuivre); color: #fff; }
.tb-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; background: var(--creme); color: var(--nuit); font-size: 11px; font-weight: 800; margin-left: 4px; }
.tb-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.tb-actions .bouton { --fond: var(--creme); --texte: var(--encre); --bord: var(--creme); box-shadow: 3px 3px 0 var(--cuivre); }
.tb-lien { background: none; border: 0; color: rgba(244, 233, 211, 0.6); cursor: pointer; font-size: 12px; }
.tb-lien:hover { color: var(--creme); }
.tb-principal { padding: clamp(16px, 3vw, 32px); max-width: 1600px; margin: 0 auto; display: grid; gap: 20px; }
.tb-inline { display: inline-flex; gap: 6px; align-items: center; }
.tb-inline input[type="date"], .tb-inline input[type="text"] { font: inherit; padding: 7px 10px; border: 2px solid var(--encre); background: var(--blanc); }

.tb-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.tb-titre { font-weight: 900; font-stretch: 115%; text-transform: uppercase; letter-spacing: -0.03em; font-size: clamp(30px, 4.4vw, 52px); line-height: 0.95; }
.tb-titre em { color: var(--cuivre); text-transform: none; font-size: 1.1em; }
.tb-sous { color: var(--gris); font-size: 13px; margin-top: 4px; }
.tb-attention { color: var(--cuivre-fonce); }
.tb-nav-jour { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tb-nav-jour .bouton { padding: 8px 12px; }

.tb-carte { background: var(--blanc); border: 2px solid var(--encre); padding: 18px 20px; display: grid; gap: 12px; }
.tb-carte h2 { font-weight: 800; font-stretch: 110%; text-transform: uppercase; letter-spacing: 0.04em; font-size: 15px; }
.tb-grille-2 { display: grid; gap: 16px; }
.tb-grille-4 { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }

/* ---------- le service ---------- */
.tb-service { background: var(--blanc); border: 2px solid var(--encre); display: grid; gap: 0; }
.tb-service-ferme { border-style: dashed; }
.tb-service-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 2px solid var(--encre); background: var(--creme); }
.tb-service-nom { font-weight: 900; font-stretch: 118%; text-transform: uppercase; letter-spacing: -0.02em; font-size: 24px; line-height: 1; }
.tb-service-nom small { font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--gris); font-stretch: 100%; margin-left: 8px; }
.tb-service-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.jauge { position: relative; width: 160px; height: 22px; border: 2px solid var(--encre); background: var(--blanc); overflow: hidden; }
.jauge i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w, 0%); background: var(--olive); transition: width 600ms var(--sortie); }
.jauge span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 800; mix-blend-mode: difference; color: #fff; }
.jauge-mince { width: 100%; height: 10px; }
.charge { display: flex; align-items: flex-end; gap: 3px; padding: 16px 18px 8px; height: 110px; border-bottom: 1px solid var(--ligne); overflow-x: auto; }
.charge-colonne { flex: 1 0 34px; display: grid; grid-template-rows: 1fr auto auto; align-items: end; justify-items: center; height: 100%; gap: 2px; font-size: 10px; color: var(--gris); }
.charge-colonne i { display: block; width: 100%; height: var(--h, 0%); min-height: 2px; background: var(--olive); transition: height 600ms var(--sortie); }
.charge-colonne b { font-size: 10px; color: var(--cuivre-fonce); min-height: 12px; }
.charge-passe i { background: var(--sable-2); }
.charge-colonne span { font-variant-numeric: tabular-nums; }
.tb-table-service .tb-heure { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.couverts-pastille { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; background: var(--nuit); color: var(--creme); font-weight: 800; font-size: 14px; }
.table-champ { width: 64px; font: inherit; padding: 5px 8px; border: 2px solid var(--ligne); background: var(--blanc); font-weight: 700; text-align: center; }
.table-champ:focus { border-color: var(--encre); outline: 0; }
.tb-actions-ligne { display: flex; gap: 6px; flex-wrap: wrap; }
.tb-actions-ligne form { display: contents; }
tr.ligne-arrivee td { background: rgba(91, 107, 58, 0.08); }
tr.ligne-no_show td, tr.ligne-annulee_client td, tr.ligne-annulee_restaurant td { opacity: 0.55; }
.pastille-arrivee { background: var(--olive); color: #fff; }

/* ---------- semaine ---------- */
.semaine { display: grid; gap: 10px; }
.semaine-jour { background: var(--blanc); border: 2px solid var(--encre); padding: 12px 14px; display: grid; gap: 10px; align-content: start; }
.semaine-jour.aujourd-hui { box-shadow: 6px 6px 0 var(--cuivre); }
.semaine-jour.ferme { border-style: dashed; opacity: 0.7; }
.semaine-jour h2 { font-weight: 800; font-stretch: 110%; text-transform: uppercase; font-size: 14px; letter-spacing: 0.04em; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.semaine-jour h2 a { text-decoration: none; }
.semaine-jour h2 small { font-weight: 500; color: var(--gris); text-transform: none; letter-spacing: 0; }
.semaine-jour h2 b { font-family: var(--serif); font-size: 26px; color: var(--cuivre); font-weight: 600; }
.semaine-service { display: grid; gap: 4px; font-size: 12px; }
.semaine-service-tete { display: flex; justify-content: space-between; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- tables ---------- */
.tb-filtres { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tb-filtres a { text-decoration: none; padding: 7px 12px; border: 2px solid var(--encre); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--encre); }
.tb-filtres a[aria-current="true"] { background: var(--encre); color: var(--creme); }
.tb-recherche { display: flex; gap: 6px; margin-left: auto; }
.tb-recherche input { font: inherit; padding: 8px 12px; border: 2px solid var(--encre); background: var(--blanc); min-width: 200px; }
.tb-table { width: 100%; border-collapse: collapse; background: var(--blanc); font-size: 13px; }
.tb-table th, .tb-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--ligne); vertical-align: middle; }
.tb-table th { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gris); font-weight: 800; background: var(--creme); }
.tb-table tr:last-child td { border-bottom: 0; }
.tb-table a { text-decoration: none; }
.tb-table .code { font-family: monospace; font-size: 12px; color: var(--gris); }
.tb-table-defile { overflow-x: auto; }
.tb-vide { padding: 32px; text-align: center; color: var(--gris); background: var(--blanc); border: 2px dashed var(--ligne); }

/* ---------- fiche réservation ---------- */
.fiche { display: grid; gap: 16px; }
.fiche-grand { font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fiche-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fiche-actions form { display: contents; }
.note { background: var(--creme); border-left: 4px solid var(--cuivre); padding: 10px 12px; font-size: 13px; }
.formulaire-compact { display: grid; gap: 10px; }
.formulaire-compact .champ input, .formulaire-compact .champ select, .formulaire-compact .champ textarea { padding: 9px 12px; font-size: 14px; }
.formulaire-compact .champ textarea { min-height: 80px; }
.ligne-champs { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }

/* ---------- statistiques ---------- */
.tb-chiffre { display: grid; gap: 2px; }
.tb-chiffre strong { font-weight: 900; font-stretch: 118%; letter-spacing: -0.03em; font-size: clamp(30px, 4vw, 48px); line-height: 1; color: var(--cuivre); }
.tb-chiffre span { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gris); font-weight: 700; }
.barres { display: grid; gap: 8px; }
.barre { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.barre i { display: block; height: 12px; background: var(--olive); width: var(--w); min-width: 2px; }
.barre span:last-child { text-align: right; color: var(--gris); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- connexion ---------- */
.connexion { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--nuit); }
.connexion .tb-carte { width: min(420px, 100%); padding: 32px; box-shadow: 8px 8px 0 var(--cuivre); }
.connexion .erreur { color: #7a2418; font-size: 13px; }

@media (min-width: 900px) {
    .tb-nav { order: 0; width: auto; }
    .tb-grille-2 { grid-template-columns: 1.4fr 1fr; }
    .tb-grille-4 { grid-template-columns: repeat(4, 1fr); }
    .semaine { grid-template-columns: repeat(7, 1fr); }
    .ligne-champs { grid-template-columns: repeat(4, 1fr); }
}
