/* =========================================================================
   THEME.CSS — Design system ERP SaaS Hôtels & Restaurants
   ---------------------------------------------------------------------
   Objectif : surcharger les variables natives de Bootstrap 5 (--bs-*)
   pour obtenir une identité visuelle élégante et cohérente, SANS étape
   de build (pas de SCSS à compiler), conformément à l'exigence du
   cahier des charges : "sans framework front-end lourd, JS natif ES6+".
   Il suffit de charger bootstrap.min.css PUIS ce fichier.
   Emplacement prévu dans le projet Django : static/css/theme.css

   Thème clair/sombre : piloté par l'attribut data-bs-theme="light|dark"
   posé sur <html> (voir templates/base.html et static/js/theme_toggle.js).
   Les composants n'utilisent jamais les couleurs "brand-*" directement
   pour leurs fonds/textes : ils passent par des jetons sémantiques
   (--surface-bg, --text-strong, ...) redéfinis dans le bloc
   [data-bs-theme="dark"] en fin de fichier — c'est ce qui permet à un
   seul fichier CSS, sans variante ni recompilation, de supporter les
   deux thèmes.

   Coquille applicative : la structure (sidebar + topbar + contenu) est
   construite en Flexbox pur (.app-shell / .app-sidebar / .app-topbar),
   PAS avec la grille Bootstrap (.container/.row/.col) — c'est cette
   dernière, avec ses marges négatives et ses points de rupture, qui
   était la cause du désalignement observé sur les premières versions.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. POLICES — Google Fonts + Bootstrap Icons (voir <link> dans base.html)
   - Titres : "Fraunces" (serif éditorial, chaleureux, évoque l'hôtellerie
     haut de gamme sans tomber dans le "corporate froid").
   - Corps de texte / UI dense (tableaux, formulaires) : "Inter", conçue
     pour rester lisible à petite taille dans des interfaces denses.
   ------------------------------------------------------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  /* -----------------------------------------------------------------------
     2. PALETTE DE MARQUE
     Ambiance "hôtellerie contemporaine" : le bleu nuit (ink-950 -> ink-500)
     est la couleur PORTEUSE de l'identité (confiance, sérieux, nuit
     élégante) — le site public (apps.marketing) l'utilise en fond sur
     TOUTES ses sections, avec de légères variations de profondeur
     (ink-950/ink-800/ink-700) pour créer du relief sans jamais retomber
     sur un fond blanc/ivoire. Le laiton chaud reste l'accent ponctuel
     (CTA, mise en avant), jamais un fond de section. Fond ivoire réservé
     à l'application connectée (thème clair, cf. section Coquille).
     ----------------------------------------------------------------------- */
  --brand-ink-950: #0a0f1a;      /* Bleu nuit le plus profond — fonds pleine page (site public) */
  --brand-ink-900: #101826;      /* Encre marine — quasi-noir, texte fort */
  --brand-ink-800: #141f33;      /* Bleu nuit intermédiaire — alterne avec ink-950 sur le site public */
  --brand-ink-700: #16243b;      /* Marine profond — couleur primaire */
  --brand-ink-500: #2c3e5c;      /* Marine moyen — hover / variantes */
  --brand-glow-500: #4f6fb8;     /* Bleu nuit éclairci — liens/accents sur fond sombre, halos */
  --brand-glow-300: #8ba0d9;     /* Bleu nuit très clair — texte secondaire sur fond sombre */
  --brand-brass-600: #b3862c;    /* Laiton foncé — accent, texte sur clair */
  --brand-brass-400: #c9a24b;    /* Laiton — accent principal (CTA doux) */
  --brand-brass-200: #e8d9b5;    /* Laiton pâle — fonds d'accent légers */
  --brand-ivory-100: #f7f5f1;    /* Ivoire — fond de page (thème clair) */
  --brand-ivory-050: #fbfaf7;    /* Ivoire clair — fond de carte alterné */
  --brand-sand-200: #e5e1d8;     /* Sable — bordures, séparateurs */
  --brand-slate-600: #5b6472;    /* Ardoise — texte secondaire */
  --brand-slate-400: #8a92a0;    /* Ardoise clair — texte tertiaire / icônes */

  /* -----------------------------------------------------------------------
     3. COULEURS SÉMANTIQUES MÉTIER
     Utilisées pour les statuts chambres, commandes et cuisine. Choisies
     pour rester distinguables (daltonisme) ET cohérentes avec la palette
     de marque (tons rabattus, pas de couleurs "criardes" par défaut).
     Ces teintes ne changent volontairement PAS entre thème clair et
     sombre (une puce "Occupée" reste bleue partout) ; seul le fond des
     badges est adapté en mode sombre (cf. section dédiée).
     ----------------------------------------------------------------------- */
  --status-success-600: #2f9e68;  /* Disponible propre / Servi / Encaissé */
  --status-success-100: #e1f3ea;
  --status-info-600: #3b6fd6;     /* Occupée / Prêt */
  --status-info-100: #e3ebfb;
  --status-violet-600: #7c5cbf;   /* Réservée */
  --status-violet-100: #ece6f7;
  --status-warning-600: #d98c1f;  /* Départ prévu / En préparation */
  --status-warning-100: #faecd3;
  --status-orange-600: #e0672b;   /* À nettoyer */
  --status-orange-100: #fbe4d8;
  --status-danger-600: #c94040;   /* Maintenance / Annulé */
  --status-danger-100: #f8dede;
  --status-neutral-600: #7b8290;  /* Bloquée / En attente */
  --status-neutral-100: #e9eaec;
  --status-teal-600: #0e8f8a;     /* Disponible à inspecter */
  --status-teal-100: #dcf1f0;

  /* -----------------------------------------------------------------------
     4. RAYONS, OMBRES, ESPACEMENTS
     ----------------------------------------------------------------------- */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --shadow-soft: 0 1px 2px rgba(16, 24, 38, 0.04), 0 4px 12px rgba(16, 24, 38, 0.06);
  --shadow-raised: 0 2px 4px rgba(16, 24, 38, 0.06), 0 12px 24px rgba(16, 24, 38, 0.08);

  /* -----------------------------------------------------------------------
     5. JETONS SÉMANTIQUES (thème clair par défaut)
     Toute la suite du fichier (composants) consomme CES variables plutôt
     que les couleurs de marque brutes, afin que le bloc dark mode n'ait
     qu'à les redéfinir une seule fois chacune.
     ----------------------------------------------------------------------- */
  --surface-bg: #ffffff;                    /* Fond des cartes, topbar, tuiles */
  --surface-alt-bg: var(--brand-ivory-050); /* Fond alterné (tableaux) */
  --surface-border: var(--brand-sand-200);  /* Bordures de composants */
  --text-strong: var(--brand-ink-900);      /* Titres, valeurs importantes */
  --text-muted: var(--brand-slate-600);     /* Texte secondaire */

  /* Sidebar : toujours sombre, dans les deux thèmes (c'est la couleur de
     marque, pas une "surface" qui doit s'adapter) — voir section Coquille. */
  --sidebar-bg: var(--brand-ink-900);
  --sidebar-bg-soft: var(--brand-ink-700);
  --sidebar-text: rgba(247, 245, 241, 0.75);
  --sidebar-text-strong: #ffffff;
  --sidebar-border: rgba(247, 245, 241, 0.08);
  --sidebar-icon: rgba(247, 245, 241, 0.55);

  /* -----------------------------------------------------------------------
     6. SURCHARGE DES VARIABLES BOOTSTRAP 5 (--bs-*)
     ----------------------------------------------------------------------- */
  --bs-body-font-family: "Inter", system-ui, -apple-system, sans-serif;
  --bs-body-bg: var(--brand-ivory-100);
  --bs-body-color: var(--text-strong);
  --bs-border-color: var(--surface-border);
  --bs-border-radius: var(--radius-sm);
  --bs-border-radius-lg: var(--radius-lg);
  --bs-box-shadow: var(--shadow-soft);

  --bs-primary: var(--brand-ink-700);
  --bs-primary-rgb: 22, 36, 59;
  --bs-secondary: var(--brand-slate-600);
  --bs-secondary-rgb: 91, 100, 114;
  --bs-success: var(--status-success-600);
  --bs-success-rgb: 47, 158, 104;
  --bs-info: var(--status-info-600);
  --bs-info-rgb: 59, 111, 214;
  --bs-warning: var(--status-warning-600);
  --bs-warning-rgb: 217, 140, 31;
  --bs-danger: var(--status-danger-600);
  --bs-danger-rgb: 201, 64, 64;
  --bs-light: var(--brand-ivory-050);
  --bs-dark: var(--brand-ink-900);

  --bs-link-color: var(--brand-ink-700);
  --bs-link-hover-color: var(--brand-brass-600);
}

/* -------------------------------------------------------------------------
   7. TITRAGE
   ------------------------------------------------------------------------- */
h1, h2, h3, .h1, .h2, .h3, .font-display {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

/* -------------------------------------------------------------------------
   7bis. LIENS — Bootstrap 5 souligne les <a> par défaut (reboot.css) ; on
   ne veut ce soulignement nulle part dans l'application (§ demande
   explicite : "eviter de souligner les liens"). Les boutons (.btn*) ne
   sont pas concernés (Bootstrap ne les souligne déjà pas), et un
   utilitaire Bootstrap explicite comme .text-decoration-underline reste
   prioritaire (règle !important côté Bootstrap).
   ------------------------------------------------------------------------- */
a {
  text-decoration: none;
}
a:hover,
a:focus {
  text-decoration: none;
}

/* -------------------------------------------------------------------------
   8. NAVBAR PUBLIQUE (site marketing, écran de connexion) — inchangée,
   pleine largeur, marine foncé. Ne pas confondre avec .app-topbar
   (section Coquille) qui n'habille QUE la colonne de contenu une fois
   connecté.
   ------------------------------------------------------------------------- */
.app-navbar {
  background-color: var(--brand-ink-700);
  box-shadow: var(--shadow-soft);
}
.app-navbar .navbar-brand {
  font-family: "Fraunces", serif;
  font-weight: 600;
  color: var(--brand-ivory-100);
  letter-spacing: 0.01em;
}
.app-navbar .nav-link {
  color: rgba(247, 245, 241, 0.75);
  transition: color 0.15s ease;
}
.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
  color: var(--brand-brass-400);
}

/* Bouton "fantôme" (icônes de la topbar/navbar) : mêmes proportions qu'un
   bouton Bootstrap sm, sans fond ni bordure par défaut. */
.btn-icon-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  flex-shrink: 0;
}
.btn-icon-ghost:hover {
  background: var(--surface-alt-bg);
  color: var(--text-strong);
}
/* Variante sur fond sombre (navbar publique) */
.app-navbar .btn-icon-ghost { color: rgba(247, 245, 241, 0.85); }
.app-navbar .btn-icon-ghost:hover { background: rgba(247, 245, 241, 0.12); color: var(--brand-brass-400); }

/* Un seul des deux pictogrammes (soleil/lune) est visible, selon le
   thème actif sur <html data-bs-theme="...">. */
html[data-bs-theme="light"] [data-theme-icon="dark"] { display: none; }
html[data-bs-theme="dark"]  [data-theme-icon="light"] { display: none; }

/* =========================================================================
   9. COQUILLE APPLICATIVE (pages connectées)
   ---------------------------------------------------------------------
   Structure Flexbox à deux niveaux :
     .app-shell (ligne)
       .app-sidebar   — largeur fixe, pleine hauteur, toujours sombre
       .app-content   — colonne (flex-grow) : .app-topbar puis <main>
   Aucune classe .container/.row/.col Bootstrap ici : c'est justement le
   report de marges négatives de la grille (pensée pour du contenu, pas
   pour une coquille d'application) qui produisait le désalignement.
   ========================================================================= */
.app-shell {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

.app-sidebar {
  width: 264px;
  min-width: 264px;
  flex-shrink: 0;
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  transition: width .18s ease, min-width .18s ease, padding .18s ease;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.25rem 0.5rem 1.5rem;
  text-decoration: none;
}
.app-brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand-brass-400), var(--brand-brass-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-ink-900);
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1.05rem;
}
.app-brand-text { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.05rem; color: var(--sidebar-text-strong); letter-spacing: .01em; line-height: 1.1; }
.app-brand-logo { width:2.35rem; height:2.35rem; flex:0 0 auto; object-fit:contain; padding:.22rem; border-radius:.7rem; background:#fff; }
.app-brand-sub { font-size: 0.68rem; color: var(--sidebar-icon); margin-top: 1px; }

.app-nav { display: flex; flex-direction: column; gap: 1.1rem; flex-grow: 1; overflow-y: auto; min-height: 0; }
.app-nav-group { display: flex; flex-direction: column; gap: 0.15rem; }
.app-nav-group-title {
  padding: 0 0.65rem 0.3rem;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--sidebar-icon);
}
.app-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background-color .12s ease, color .12s ease;
}
.app-nav-link i { font-size: 1.02rem; width: 1.2rem; text-align: center; color: var(--sidebar-icon); flex-shrink: 0; }
.app-nav-link:hover { background: var(--sidebar-bg-soft); color: #fff; }
.app-nav-link:hover i { color: var(--brand-brass-400); }
.app-nav-link.active { background: #ffffff; color: var(--brand-ink-900); }
.app-nav-link.active i { color: var(--brand-brass-600); }

.app-sidebar-footer {
  border-top: 1px solid var(--sidebar-border);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.7rem;
  color: var(--sidebar-icon);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.app-sidebar-footer a { color: var(--sidebar-text); text-decoration: none; }
.app-sidebar-footer a:hover { color: var(--brand-brass-400); }

/* Repli de la sidebar (mode "icônes seules") — mémorisé en localStorage,
   voir static/js/nav_controls.js. Largeur ramenée à 76px plutôt qu'à 0 :
   le menu reste utilisable même écran replié. */
.app-shell.app-sidebar-collapsed .app-sidebar { width: 76px; min-width: 76px; padding-inline: 0.75rem; }
.app-shell.app-sidebar-collapsed .app-brand { justify-content: center; padding-inline: 0; }
.app-shell.app-sidebar-collapsed .app-brand-text,
.app-shell.app-sidebar-collapsed .app-brand-sub,
.app-shell.app-sidebar-collapsed .app-nav-group-title,
.app-shell.app-sidebar-collapsed .app-nav-link span,
.app-shell.app-sidebar-collapsed .app-sidebar-footer { display: none; }
.app-shell.app-sidebar-collapsed .app-nav-link { justify-content: center; padding-inline: 0.5rem; }

.app-content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.app-topbar {
  background: var(--surface-bg);
  border-bottom: 1px solid var(--surface-border);
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.app-main { flex: 1 1 auto; padding: 1.5rem; max-width: 1440px; width: 100%; margin-inline: auto; }
@media (max-width: 767.98px) { .app-main { padding: 1rem; } .app-topbar { padding: 0.6rem 1rem; } }

/* Sélecteur d'établissement (topbar) — bouton pilule + menu déroulant.
   Le superadmin y trouve en plus "Vue globale (tous les établissements)". */
.establishment-switcher .btn {
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface-alt-bg);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-strong);
  padding: 0.4rem 0.9rem;
}

.app-avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--brand-brass-200);
  color: var(--brand-brass-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* Menu mobile (offcanvas Bootstrap) — même contenu que .app-sidebar,
   affiché uniquement sous le point de rupture lg. */
.app-mobile-nav { background: var(--sidebar-bg); color: var(--sidebar-text); border: none; --bs-offcanvas-width: min(85vw, 300px); }
.app-mobile-nav .offcanvas-header { border-bottom: 1px solid var(--sidebar-border); }
.app-mobile-nav .app-nav { overflow: visible; }

/* -------------------------------------------------------------------------
   10. EN-TÊTES DE PAGE ET LISTES
   ------------------------------------------------------------------------- */
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.25rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-header h1 { font-size: clamp(1.5rem, 2vw, 1.9rem); margin: 0.2rem 0 0.25rem; }
.page-header p { color: var(--text-muted); margin: 0; }
.page-eyebrow { color: var(--brand-brass-600); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

.list-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.list-header h1 { font-size: clamp(1.4rem, 1.8vw, 1.7rem); margin: 0 0 0.2rem; }

.empty-state { text-align: center; padding: 3.5rem 1.5rem; color: var(--text-muted); }
.empty-state i { font-size: 2.5rem; color: var(--surface-border); margin-bottom: 0.75rem; display: block; }

/* -------------------------------------------------------------------------
   11. GRILLE D'INDICATEURS (KPI) — tableau de bord
   ------------------------------------------------------------------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; margin-bottom: 1.5rem; }
@media (max-width: 1199.98px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .kpi-grid { grid-template-columns: 1fr; } }

.kpi-card { background: var(--surface-bg); border: 1px solid var(--surface-border); border-radius: var(--radius-lg); padding: 1.1rem; min-width: 0; }
.kpi-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; color: var(--text-muted); font-size: 0.82rem; font-weight: 600; }
.kpi-icon { width: 2.1rem; height: 2.1rem; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.kpi-icon.tone-primary { background: var(--brand-brass-200); color: var(--brand-brass-600); }
.kpi-icon.tone-success { background: var(--status-success-100); color: var(--status-success-600); }
.kpi-icon.tone-info { background: var(--status-info-100); color: var(--status-info-600); }
.kpi-icon.tone-warning { background: var(--status-warning-100); color: var(--status-warning-600); }
.kpi-icon.tone-danger { background: var(--status-danger-100); color: var(--status-danger-600); }
.kpi-value { margin-top: 0.85rem; font-size: clamp(1.3rem, 1.8vw, 1.7rem); font-weight: 800; color: var(--text-strong); letter-spacing: -.02em; }
.kpi-context { margin-top: 0.2rem; color: var(--text-muted); font-size: 0.78rem; }

/* Graphiques dynamiques du tableau de bord (Chart.js — apps.reporting,
   voir static/js/reporting_dashboard.js). Hauteur FIXE du conteneur du
   canvas : un <canvas> sans parent borné peut grandir sans limite avec
   Chart.js (maintainAspectRatio: false), d'où ce wrapper dédié. */
.chart-card { padding: 1.1rem 1.25rem 1.25rem; }
.chart-card-title { font-weight: 700; color: var(--text-strong); font-size: 0.95rem; margin-bottom: 0.9rem; }
.chart-canvas-wrap { position: relative; height: 280px; }

/* -------------------------------------------------------------------------
   12. CARTES — élévation douce, angles arrondis larges.
   ------------------------------------------------------------------------- */
.card {
  background-color: var(--surface-bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.card:hover {
  box-shadow: var(--shadow-raised);
}

/* -------------------------------------------------------------------------
   13. BADGES DE STATUT MÉTIER
   ------------------------------------------------------------------------- */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: currentColor;
}

/* Statuts chambre */
.badge-status--clean       { background: var(--status-success-100); color: var(--status-success-600); }
.badge-status--to-inspect  { background: var(--status-teal-100);    color: var(--status-teal-600); }
.badge-status--occupied    { background: var(--status-info-100);    color: var(--status-info-600); }
.badge-status--reserved    { background: var(--status-violet-100);  color: var(--status-violet-600); }
.badge-status--departure   { background: var(--status-warning-100); color: var(--status-warning-600); }
.badge-status--cleaning    { background: var(--status-orange-100);  color: var(--status-orange-600); }
.badge-status--maintenance { background: var(--status-danger-100);  color: var(--status-danger-600); }
.badge-status--blocked     { background: var(--status-neutral-100); color: var(--status-neutral-600); }

/* Statuts commande / cuisine (mêmes tons, sémantique différente) */
.badge-status--pending   { background: var(--status-neutral-100); color: var(--status-neutral-600); }
.badge-status--preparing { background: var(--status-warning-100); color: var(--status-warning-600); }
.badge-status--ready     { background: var(--status-info-100);    color: var(--status-info-600); }
.badge-status--served    { background: var(--status-success-100); color: var(--status-success-600); }
.badge-status--paid      { background: var(--status-success-100); color: #1f7a5c; }
.badge-status--cancelled { background: var(--status-danger-100);  color: var(--status-danger-600); }

/* Badges génériques (actif/inactif, mis en avant...) — même forme que
   badge-status, palette neutre/brass plutôt que sémantique métier. */
.badge-soft { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .7rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.badge-soft-brass { background: var(--brand-brass-200); color: var(--brand-brass-600); }
.badge-soft-success { background: var(--status-success-100); color: var(--status-success-600); }
.badge-soft-danger { background: var(--status-danger-100); color: var(--status-danger-600); }
.badge-soft-muted { background: var(--surface-alt-bg); color: var(--text-muted); border: 1px solid var(--surface-border); }

/* -------------------------------------------------------------------------
   14. CARTE CHAMBRE / TABLE — tuile compacte pour plan de salle ou grille
   de chambres (réception, gouvernante).
   ------------------------------------------------------------------------- */
.card-room {
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  padding: 0.9rem 1rem;
  background: var(--surface-bg);
  transition: box-shadow 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}
.card-room:hover {
  box-shadow: var(--shadow-raised);
  transform: translateY(-1px);
}
.card-room .room-code {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-strong);
}
.card-room .room-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* -------------------------------------------------------------------------
   15. BOUTONS
   ------------------------------------------------------------------------- */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  padding-inline: 1.1rem;
}
.btn-accent {
  background-color: var(--brand-brass-400);
  border-color: var(--brand-brass-400);
  color: var(--brand-ink-900);
}
.btn-accent:hover {
  background-color: var(--brand-brass-600);
  border-color: var(--brand-brass-600);
  color: #ffffff;
}

/* -------------------------------------------------------------------------
   16. TABLEAUX
   ------------------------------------------------------------------------- */
.table-card { background: var(--surface-bg); border: 1px solid var(--surface-border); border-radius: var(--radius-lg); overflow: hidden; }
.table-elegant thead {
  background-color: var(--surface-alt-bg);
}
.table-elegant thead th {
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border: none;
  white-space: nowrap;
}
.table-elegant tbody tr:hover { background-color: var(--surface-alt-bg); }
.table-elegant td, .table-elegant th {
  vertical-align: middle;
  color: var(--text-strong);
  padding: 0.85rem 1rem;
}

/* -------------------------------------------------------------------------
   17. FORMULAIRES
   ------------------------------------------------------------------------- */
.form-control:focus,
.form-select:focus {
  border-color: var(--brand-brass-400);
  box-shadow: 0 0 0 0.2rem rgba(201, 162, 75, 0.25);
}
.errorlist {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0.48rem 0.65rem;
  color: #a61b29;
  background: rgba(198, 48, 65, 0.1);
  border-left: 3px solid #c63041;
  border-radius: 0.45rem;
  font-size: 0.78rem;
  font-weight: 650;
}
.errorlist li + li { margin-top: 0.2rem; }
.form-control:has(+ .errorlist), .form-select:has(+ .errorlist) {
  border-color: #c63041;
  box-shadow: 0 0 0 0.15rem rgba(198, 48, 65, 0.12);
}
html[data-bs-theme="dark"] .errorlist {
  color: #ff9ca8;
  background: rgba(255, 100, 118, 0.12);
  border-left-color: #ff6476;
}
.form-shell {
  max-width: 46rem;
  margin-inline: auto;
  background-color: var(--surface-bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.75rem 2rem;
}
@media (max-width: 575.98px) { .form-shell { padding: 1.25rem 1.25rem; } }
/* Variante pour les formulaires à nombreux champs (ex. Paramètres
   généraux, plusieurs lignes de 2 colonnes) : reste centrée
   (margin-inline: auto, jamais 0 — § demande explicite "centré [...]
   occuper toute la largeur au besoin"), juste avec un plafond plus
   large que .form-shell pour ne pas comprimer inutilement les champs. */
.form-shell-wide {
  max-width: 64rem;
}

/* =========================================================================
   18. SITE PUBLIC (apps.marketing) — SECTIONS "BLEU DE NUIT"
   ---------------------------------------------------------------------
   Contrairement à l'application connectée (qui respecte le thème clair/
   sombre choisi par l'utilisateur), le site vitrine garde volontairement
   un habillage bleu nuit CONSTANT sur toute la page — même logique que
   la navbar publique (§8), simplement étendue à chaque section : c'est
   la couleur de marque assumée, pas une "surface" qui doit s'adapter.
   Les tons ink-950/ink-800/ink-700 alternent d'une section à l'autre
   pour donner du relief SANS jamais retomber sur un fond blanc/ivoire —
   c'est ce qui évite la coupure visuelle nette (fond clair en plein
   milieu d'une page par ailleurs sombre) et la "bande vide" entre deux
   sections de même couleur mais séparées par une marge.
   ========================================================================= */
.public-section {
  position: relative;
  overflow: hidden;
  padding-block: 5rem;
  color: rgba(247, 245, 241, 0.78);
}
.public-section h1, .public-section h2, .public-section h3,
.public-section .h1, .public-section .h2, .public-section .h3 {
  color: var(--brand-ivory-100);
}
.public-section > .container { position: relative; z-index: 1; }

.public-section--950 { background-color: var(--brand-ink-950); }
.public-section--800 { background-color: var(--brand-ink-800); }
.public-section--700 { background-color: var(--brand-ink-700); }

/* Libellé "kicker" au-dessus des titres de section, version fond sombre
   (pendant de .page-eyebrow qui suppose un fond clair). */
.public-eyebrow {
  display: inline-block;
  color: var(--brand-brass-400);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 0.5rem;
}

/* Halos lumineux décoratifs (dégradés radiaux flous) : posés en position
   absolute par le template, purement ornementaux (aria-hidden). Donnent
   de la profondeur au bleu nuit sans nécessiter d'image photographique. */
.public-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}
.public-glow--brass { background: radial-gradient(circle, var(--brand-brass-400), transparent 70%); }
.public-glow--blue  { background: radial-gradient(circle, var(--brand-glow-500), transparent 70%); }

/* Trame de points, discrète, pour texturer un fond de section uni
   (motif purement CSS — pas d'image à charger). */
.public-grid-pattern::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(247, 245, 241, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
  z-index: 0;
}

/* Carte "verre" sur fond sombre — remplace .card (pensée pour un fond
   clair) dans toutes les sections du site public. */
.public-card {
  position: relative;
  height: 100%;
  background: rgba(247, 245, 241, 0.045);
  border: 1px solid rgba(247, 245, 241, 0.1);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.public-card:hover {
  transform: translateY(-2px);
  border-color: rgba(247, 245, 241, 0.22);
  background: rgba(247, 245, 241, 0.07);
}
.public-card--featured {
  border-color: var(--brand-brass-400);
  box-shadow: 0 0 0 1px var(--brand-brass-400) inset, 0 20px 45px rgba(0, 0, 0, 0.35);
}
.public-card h3, .public-card h4, .public-card h6 { color: var(--brand-ivory-100); }
.public-card p, .public-card li { color: rgba(247, 245, 241, 0.68); }

/* Puce ronde en tête de carte "Fonctionnalités" / "Pourquoi Aurel ERP". */
.public-icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: rgba(201, 162, 75, 0.14);
  color: var(--brand-brass-400);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

/* Illustration héros (SVG maison, static/images/skyline-hero.svg) */
.public-hero-illustration {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.45));
}

/* Galerie de photos "métier" (section "Conçu pour vos équipes de
   terrain", marketing/home.html) : vraies photographies de personnes en
   situation (gestion, cuisine, étages, salle), pas des illustrations ni
   des photos de lieux vides — cf. .public-photo-fallback plus bas pour
   la dégradation si une image ne charge pas. Licence Pexels : aucune
   attribution requise, donc aucun lien de crédit sur les tuiles. */
.public-photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background-color: var(--brand-ink-900);
}
/* Variante "grande image" : deux tuiles par ligne (voir col-md-6 dans
   le template) plutôt que quatre — plus impactant, visages/gestes
   lisibles au lieu de vignettes trop petites. */
.public-photo-lg { aspect-ratio: 5 / 4; }
.public-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.public-photo:hover img { transform: scale(1.05); }
.public-photo figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.1rem 1.25rem 0.9rem;
  background: linear-gradient(to top, rgba(10, 15, 26, 0.92), transparent 70%);
}
.public-photo figcaption .public-photo-title {
  display: block;
  color: var(--brand-ivory-100);
  font-weight: 600;
  font-size: 0.95rem;
}
.public-photo-lg figcaption .public-photo-title { font-size: 1.1rem; }
/* Repli si la photo externe ne charge pas (voir onerror dans le
   template) : la tuile garde son ratio et son dégradé au lieu de
   montrer l'icône "image cassée" du navigateur. */
.public-photo.public-photo-fallback {
  background: linear-gradient(160deg, var(--brand-ink-800), var(--brand-ink-950));
}
.public-photo.public-photo-fallback img { display: none; }

/* Pied de page public : même ton que la dernière section (ink-950),
   simple ligne de séparation plutôt qu'une marge — c'est cette marge
   (mt-5) qui laissait apparaître le fond de page clair entre le bloc
   d'appel à l'action et le pied de page. */
.public-footer {
  background-color: var(--brand-ink-950);
  border-top: 1px solid rgba(247, 245, 241, 0.08);
  color: rgba(247, 245, 241, 0.6);
  padding-block: 1.75rem;
}
.public-footer a { color: rgba(247, 245, 241, 0.78); text-decoration: none; }
.public-footer a:hover { color: var(--brand-brass-400); }

/* Landing page Aurel — composition éditoriale, isolée du back-office. */
.public-nav { background: rgba(10,15,26,.92); border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(18px); padding: .85rem 0; }
.public-brand { display:flex; align-items:center; gap:.65rem; color:#fff; text-decoration:none; letter-spacing:-.02em; }
.public-brand-symbol { width:2.15rem; height:2.15rem; object-fit:contain; padding:.14rem; border-radius:.65rem; background:#fff; }
.public-brand-name { color:#fff; font:750 1.08rem/1 "Inter","Segoe UI",sans-serif; letter-spacing:.08em; text-transform:uppercase; }
.public-footer-brand { display:inline-flex; align-items:center; gap:.65rem; color:#fff; text-decoration:none; }
.public-footer-brand img { width:2.35rem; height:2.35rem; object-fit:contain; padding:.15rem; border-radius:.68rem; background:#fff; }
.public-footer-brand strong { color:#fff; font:750 1.15rem/1 "Inter","Segoe UI",sans-serif; letter-spacing:.07em; text-transform:uppercase; }
.public-brand-mark { display:grid; place-items:center; width:2.25rem; height:2.25rem; border-radius:.7rem; background:linear-gradient(145deg,#e0bd70,#a77b2d); color:#101827; font-family:"Fraunces",serif; font-weight:800; box-shadow:0 8px 25px rgba(201,162,75,.25); }
.public-brand strong { font-family:"Fraunces",serif; font-size:1.15rem; } .public-brand small { margin-left:.3rem; color:#d5b466; font-size:.65rem; letter-spacing:.12em; }
.public-nav .nav-link { color:rgba(255,255,255,.72); font-size:.9rem; font-weight:600; padding:.7rem .85rem!important; }
.public-nav .nav-link:hover,.public-nav .nav-link:focus { color:#fff; }
.public-nav-actions { display:flex; align-items:center; gap:.75rem; }.public-login{color:rgba(255,255,255,.78);font-weight:600;text-decoration:none;font-size:.9rem}.public-login:hover{color:#fff}
.public-nav-toggler { color:#fff; border-color:rgba(255,255,255,.18); font-size:1.5rem; }
.public-mega-menu { width:22rem; padding:.6rem; background:#fff; border:0; border-radius:1rem; box-shadow:0 22px 60px rgba(0,0,0,.25); }
.public-mega-menu .dropdown-item { display:flex; gap:.85rem; align-items:center; padding:.75rem; border-radius:.7rem; white-space:normal; }
.public-mega-menu .dropdown-item:hover { background:#f4f1ea; }.public-mega-menu i{color:#a77b2d;font-size:1.15rem}.public-mega-menu span{display:flex;flex-direction:column}.public-mega-menu strong{color:#101827;font-size:.88rem}.public-mega-menu small{color:#6b7280;font-size:.72rem}

.mk-hero { position:relative; min-height:calc(100vh - 70px); display:flex; align-items:center; overflow:hidden; background:#080d16; color:#fff; }
.mk-hero-image,.mk-hero-shade { position:absolute; inset:0; width:100%; height:100%; }.mk-hero-image{object-fit:cover;object-position:center}.mk-hero-shade{background:linear-gradient(90deg,rgba(7,11,19,.98) 0%,rgba(7,11,19,.9) 33%,rgba(7,11,19,.28) 65%,rgba(7,11,19,.12) 100%),linear-gradient(0deg,rgba(7,11,19,.6),transparent 50%)}
.mk-hero-content{position:relative;z-index:1;padding-top:5rem;padding-bottom:6rem}.mk-hero-copy{max-width:43rem}.mk-kicker{display:inline-flex;align-items:center;gap:.5rem;padding:.45rem .75rem;border:1px solid rgba(224,189,112,.35);border-radius:99px;background:rgba(201,162,75,.1);color:#e5c57d;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em}
.mk-hero h1{font-size:clamp(3.25rem,6vw,6rem);line-height:.94;letter-spacing:-.055em;margin:1.6rem 0 1.5rem;max-width:44rem}.mk-hero-copy>p{max-width:38rem;color:rgba(255,255,255,.72);font-size:clamp(1.05rem,1.7vw,1.3rem);line-height:1.65;margin-bottom:2rem}.btn-hero-ghost{color:#fff;border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.06);backdrop-filter:blur(8px)}.btn-hero-ghost:hover{color:#fff;background:rgba(255,255,255,.14)}
.mk-proof{display:flex;flex-wrap:wrap;gap:1.3rem;margin-top:2.2rem;color:rgba(255,255,255,.66);font-size:.82rem}.mk-proof i{color:#d5b466;margin-right:.3rem}.mk-scroll{position:absolute;z-index:2;right:3rem;bottom:2.5rem;color:rgba(255,255,255,.72);display:flex;align-items:center;gap:.7rem;text-decoration:none;font-size:.72rem;text-transform:uppercase;letter-spacing:.14em;writing-mode:vertical-rl}.mk-scroll i{font-size:1rem}
.mk-trust{background:#fff;color:#101827;border-bottom:1px solid #ece8df;padding:1.5rem 0}.mk-trust .container{display:flex;align-items:center;justify-content:space-between;gap:2rem}.mk-trust p{margin:0;color:#7b8190;font-size:.75rem;text-transform:uppercase;letter-spacing:.12em}.mk-trust-list{display:flex;flex-wrap:wrap;gap:clamp(1.3rem,3vw,3rem);color:#283449;font-size:.78rem;font-weight:800;letter-spacing:.07em}.mk-trust-list i{color:#b48b3c;margin-right:.35rem}
.mk-section{padding:clamp(4.5rem,6.5vw,6.5rem) 0}.mk-section-light{background:#f7f5f0;color:#152036}.mk-section-light h2,.mk-section-light h3,.mk-story h2,.mk-story h3{color:#152036!important}.mk-heading{max-width:48rem;margin-bottom:2.5rem}.mk-heading h2,.mk-story h2,.mk-final-cta h2{font-size:clamp(2.25rem,4vw,3.65rem);line-height:1.08;letter-spacing:-.04em}.mk-heading p,.mk-lead{font-size:1.05rem;line-height:1.7;color:#697083}.mk-overline{display:block;color:#a77929;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.16em;margin-bottom:.8rem}
.mk-value-card{position:relative;height:100%;padding:2rem;border-radius:1.35rem;background:#fff;border:1px solid #e8e3da;box-shadow:0 12px 40px rgba(25,33,48,.05);transition:.25s ease}.mk-value-card:hover{transform:translateY(-7px);box-shadow:0 25px 55px rgba(25,33,48,.1)}.mk-value-card-featured{background:#142137;color:#fff;border-color:#142137}.mk-card-number{position:absolute;right:1.5rem;top:1.35rem;color:#c9bda4;font-family:"Fraunces",serif;font-size:1rem}.mk-icon{display:grid;place-items:center;width:3rem;height:3rem;border-radius:.85rem;background:#f1e6ce;color:#9a6b1e;font-size:1.25rem;margin-bottom:2rem}.mk-value-card h3{font-size:1.3rem;margin-bottom:.8rem}.mk-value-card p{color:#747b88;line-height:1.7;min-height:5.1rem}.mk-value-card-featured p{color:rgba(255,255,255,.65)}.mk-value-card a{color:#9a6b1e;text-decoration:none;font-size:.82rem;font-weight:800}.mk-value-card-featured a{color:#e0bd70}
.mk-story{background:#fff;color:#172238}.mk-story .row{--bs-gutter-x:clamp(2.5rem,6vw,6rem)}.mk-story-visual{position:relative}.mk-story-visual img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:1.5rem;box-shadow:0 25px 60px rgba(20,32,55,.16)}.mk-float-card{position:absolute;right:-1rem;bottom:1.5rem;width:13rem;padding:1.1rem 1.25rem;border-radius:1rem;background:rgba(255,255,255,.96);box-shadow:0 18px 50px rgba(15,25,43,.22);backdrop-filter:blur(15px);display:flex;flex-direction:column;color:#152036}.mk-float-card small{color:#777f8e}.mk-float-card strong{font-size:1.25rem;margin:.25rem 0}.mk-float-card>span:last-child{font-size:.75rem;color:#33825f}.mk-live-dot{position:absolute;right:1rem;top:1rem;width:.55rem;height:.55rem;border-radius:50%;background:#36a873;box-shadow:0 0 0 5px rgba(54,168,115,.12)}
.mk-check-list{list-style:none;padding:0;margin:2rem 0 0;display:flex;flex-direction:column;gap:1rem}.mk-check-list li{display:flex;gap:.85rem}.mk-check-list i{display:grid;place-items:center;flex:0 0 1.7rem;height:1.7rem;border-radius:50%;background:#f1e6ce;color:#96691f;font-weight:800}.mk-check-list span{display:flex;flex-direction:column}.mk-check-list small{color:#7a8290;margin-top:.15rem}
.mk-modules{background:#0d1626;color:#fff}.mk-modules .mk-heading{max-width:58rem}.mk-module-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.1);border-radius:1.4rem;overflow:hidden}.mk-module{position:relative;min-height:15rem;padding:1.8rem;background:#101c2f;transition:.25s}.mk-module:hover{background:#172844}.mk-module-wide{grid-column:span 1}.mk-module>i{color:#d5ae5e;font-size:1.65rem}.mk-module>span{position:absolute;right:1.5rem;top:1.5rem;color:rgba(255,255,255,.25);font-family:"Fraunces",serif}.mk-module h3{margin-top:3.25rem;font-size:1.25rem}.mk-module p{color:rgba(255,255,255,.58);line-height:1.65;max-width:25rem}
.mk-pricing{background:#141f33;color:#fff}.mk-pricing .mk-heading p{color:rgba(255,255,255,.58)}.mk-currency{display:flex;align-items:center;gap:.7rem;padding:.45rem .55rem .45rem 1rem;border:1px solid rgba(255,255,255,.15);border-radius:.8rem}.mk-currency label{font-size:.75rem;color:rgba(255,255,255,.6);white-space:nowrap}.mk-currency .form-select{background-color:#0e1828;color:#fff;border:0;width:auto}.mk-price-card{position:relative;height:100%;padding:2rem;border-radius:1.3rem;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.12);display:flex;flex-direction:column}.mk-price-card.is-featured{background:#fff;color:#152036;border-color:#d5ae5e;box-shadow:0 25px 65px rgba(0,0,0,.25)}.mk-popular{position:absolute;top:1rem;right:1rem;padding:.32rem .6rem;border-radius:99px;background:#e9d09b;color:#654716;font-size:.66rem;font-weight:800;text-transform:uppercase}.mk-price-card>p{color:rgba(255,255,255,.55);min-height:3rem}.mk-price-card.is-featured>p{color:#747b88}.mk-price{display:flex;align-items:baseline;gap:.6rem;margin:1.5rem 0}.mk-price strong{font-family:"Fraunces",serif;font-size:2.6rem}.mk-price span{font-weight:700}.mk-price small{display:block;color:#8a909b;font-weight:400}.mk-price-card ul{list-style:none;padding:0;display:flex;flex-direction:column;gap:.8rem;margin-bottom:2rem;flex:1}.mk-price-card li{display:flex;gap:.55rem;color:rgba(255,255,255,.7);font-size:.88rem}.mk-price-card.is-featured li{color:#5e6675}.mk-price-card li i{color:#d5ae5e}
.mk-annual-price{margin:-.65rem 0 1.5rem!important;padding:.7rem .85rem;border-radius:.7rem;background:rgba(201,162,75,.1);color:#d9ba78!important;font-size:.8rem}.mk-price-card.is-featured .mk-annual-price{background:#f2e8d3;color:#805c1e!important}
.mk-final-cta{background:#090f1a;color:#fff;padding:5rem 0;border-top:1px solid rgba(255,255,255,.08)}.mk-final-cta .container{display:flex;justify-content:space-between;align-items:center;gap:3rem}.mk-final-cta h2{max-width:48rem;margin:0}
@media(max-width:991.98px){.public-nav .navbar-collapse{padding:1rem 0}.public-nav-actions{padding-top:1rem;border-top:1px solid rgba(255,255,255,.1);flex-wrap:wrap}.public-mega-menu{width:100%}.mk-hero{min-height:48rem}.mk-hero-image{object-position:62% center}.mk-hero-shade{background:linear-gradient(90deg,rgba(7,11,19,.96),rgba(7,11,19,.64)),linear-gradient(0deg,rgba(7,11,19,.72),transparent)}.mk-module-grid{grid-template-columns:repeat(2,1fr)}.mk-scroll{display:none}.mk-trust .container{flex-direction:column;align-items:flex-start}.mk-story-visual{margin-right:1rem}.mk-final-cta .container{align-items:flex-start;flex-direction:column}}
@media(max-width:575.98px){body{overflow-x:hidden}.mk-hero{min-height:44rem}.mk-hero-content{padding-top:4rem;padding-bottom:4rem}.mk-hero-image{object-position:66% center}.mk-hero-shade{background:rgba(7,11,19,.79)}.mk-hero h1{font-size:3rem}.mk-hero-copy>p{font-size:1rem}.mk-proof{gap:.7rem;flex-direction:column}.mk-section{padding:4.25rem 0}.mk-heading{text-align:left!important}.mk-story .row{--bs-gutter-x:1.5rem}.mk-story-visual{margin-right:0}.mk-module-grid{grid-template-columns:1fr}.mk-module-wide{grid-column:span 1}.mk-float-card{right:.75rem;bottom:.75rem}.mk-final-cta{padding:4rem 0}.mk-trust-list{display:grid;grid-template-columns:1fr 1fr}}

.contact-hero{padding:7rem 0 5rem;background:radial-gradient(circle at 70% 20%,rgba(201,162,75,.18),transparent 32%),#0d1626;color:#fff}.contact-hero h1{font-size:clamp(3rem,6vw,5rem);letter-spacing:-.05em}.contact-hero p{max-width:42rem;margin:1rem auto 0;color:rgba(255,255,255,.65);font-size:1.1rem}.contact-section{padding:6rem 0;background:#f7f5f0;color:#152036}.contact-intro h2,.contact-form-card h2{color:#152036!important}.contact-intro h2{font-size:clamp(2rem,3.5vw,3rem);letter-spacing:-.035em}.contact-intro p,.contact-form-card>p{color:#717887}.contact-methods{display:flex;flex-direction:column;gap:.75rem;margin-top:2rem}.contact-method{display:flex;align-items:center;gap:1rem;padding:1rem 1.15rem;border:1px solid #e4dfd5;background:#fff;border-radius:1rem;text-decoration:none;color:#152036;transition:.2s}.contact-method:hover{transform:translateX(5px);color:#152036;border-color:#d5ae5e}.contact-method>i:first-child{display:grid;place-items:center;width:2.6rem;height:2.6rem;border-radius:.75rem;background:#f1e6ce;color:#93691f;font-size:1.1rem}.contact-method>i:last-child{margin-left:auto;color:#9b7a3b}.contact-method span{display:flex;flex-direction:column}.contact-method small{color:#818793}.contact-form-card{padding:clamp(1.5rem,4vw,3rem);background:#fff;border:1px solid #e4dfd5;border-radius:1.4rem;box-shadow:0 22px 60px rgba(20,32,55,.08)}.contact-form-card .form-control{min-height:3rem;background:#fbfaf7;border-color:#ddd7ca}.contact-form-card textarea.form-control{min-height:9rem}
@media(max-width:575.98px){.contact-hero{padding:5rem 0 3.5rem}.contact-section{padding:4rem 0}.contact-form-card{padding:1.25rem}}

/* Cockpit Journal / Audit de la plateforme SaaS. */
.audit-header{align-items:flex-end}.audit-filters{display:flex;gap:.65rem}.audit-filters .form-select{min-width:10rem}.audit-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;margin-bottom:1.5rem}.audit-kpi{display:flex;align-items:center;gap:1rem;padding:1.35rem;background:var(--surface-bg);border:1px solid var(--surface-border);border-radius:var(--radius-lg);box-shadow:var(--shadow-soft)}.audit-kpi-icon,.audit-alert-icon{display:grid;place-items:center;flex:0 0 2.8rem;height:2.8rem;border-radius:.85rem;font-size:1.15rem}.audit-kpi>div{display:flex;flex-direction:column;min-width:0}.audit-kpi strong{font-family:"Fraunces",serif;font-size:1.8rem;line-height:1;color:var(--text-strong)}.audit-kpi span:not(.audit-kpi-icon){font-weight:700;margin-top:.35rem}.audit-kpi small{color:var(--text-muted);margin-top:.15rem}.audit-card-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1.4rem}.audit-chart-card{min-height:27rem}.audit-chart-wrap{height:21rem}.audit-alerts{display:flex;flex-direction:column;gap:.65rem}.audit-alert{display:flex;align-items:center;gap:.8rem;padding:.8rem;border:1px solid var(--surface-border);border-radius:.8rem;color:var(--text-strong);text-decoration:none;transition:.15s}.audit-alert:hover{transform:translateX(3px);border-color:var(--brand-brass-400);color:var(--text-strong)}.audit-alert>span:nth-child(2){display:flex;flex-direction:column}.audit-alert strong{font-size:1.1rem}.audit-alert small{color:var(--text-muted)}.audit-timeline{display:flex;flex-direction:column}.audit-event{position:relative;display:flex;gap:1rem;padding:0 0 1.15rem 1.2rem;border-left:1px solid var(--surface-border)}.audit-event:last-child{padding-bottom:0}.audit-event-dot{position:absolute;left:-.3rem;top:.25rem;width:.55rem;height:.55rem;border-radius:50%;background:var(--brand-brass-400);box-shadow:0 0 0 4px var(--surface-bg)}.audit-event p{margin:.15rem 0;color:var(--text-muted);font-size:.85rem}.audit-event small{color:var(--text-muted);font-size:.75rem}.tone-secondary{background:var(--status-neutral-100);color:var(--status-neutral-600)}
@media(max-width:1199.98px){.audit-kpis{grid-template-columns:repeat(2,1fr)}}
@media(max-width:767.98px){.audit-header{align-items:flex-start}.audit-filters{width:100%;flex-wrap:wrap}.audit-filters .form-select{flex:1}.audit-kpis{grid-template-columns:1fr}.audit-chart-wrap{height:18rem}}

/* Cockpit SaaS : hiérarchie visuelle et journal de contrôle */
.saas-audit{display:flex;flex-direction:column;gap:1.5rem;max-width:1600px;margin:0 auto}.saas-audit-header{display:flex;align-items:flex-end;justify-content:space-between;gap:2rem;padding:1.2rem 0 .35rem}.saas-audit-header h1{font-family:"Fraunces",serif;font-size:clamp(1.8rem,2.4vw,2.55rem);margin:.15rem 0 .3rem;color:var(--text-strong)}.saas-audit-header p{margin:0;color:var(--text-muted)}.saas-audit-filters{display:flex;align-items:flex-end;gap:.7rem;padding:.7rem;background:var(--surface-bg);border:1px solid var(--surface-border);border-radius:1rem;box-shadow:var(--shadow-soft)}.saas-audit-filters label,.saas-journal-head label{display:flex;flex-direction:column;gap:.3rem}.saas-audit-filters label>span,.saas-journal-head label>span{font-size:.68rem;text-transform:uppercase;letter-spacing:.08em;font-weight:700;color:var(--text-muted)}.saas-audit-filters .form-select{min-width:10.5rem;border:0;background-color:var(--surface-subtle);font-size:.82rem;font-weight:600}.saas-section-heading{display:flex;align-items:end;justify-content:space-between;margin-bottom:.85rem}.saas-section-heading span,.saas-panel-head span,.saas-journal-head>div>span{display:block;color:var(--brand-brass-600);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.11em}.saas-section-heading h2,.saas-panel-head h2,.saas-journal-head h2{font-family:"Fraunces",serif;font-size:1.18rem;margin:.15rem 0 0;color:var(--text-strong)}.saas-section-heading small{color:var(--text-muted)}
.saas-primary-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}.saas-primary-kpi{position:relative;overflow:hidden;min-height:12.3rem;padding:1.2rem 1.25rem;background:var(--surface-bg);border:1px solid var(--surface-border);border-radius:1rem;box-shadow:var(--shadow-soft)}.saas-primary-kpi:after{content:"";position:absolute;right:-2.2rem;bottom:-3rem;width:8rem;height:8rem;border-radius:50%;background:var(--kpi-soft)}.saas-kpi-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem}.saas-kpi-icon{display:grid;place-items:center;width:2.45rem;height:2.45rem;border-radius:.72rem;background:var(--kpi-soft);color:var(--kpi-color);font-size:1.05rem}.saas-kpi-state{padding:.28rem .55rem;border-radius:99px;background:var(--kpi-soft);color:var(--kpi-color);font-size:.65rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.saas-primary-kpi>strong{display:block;font-family:"Fraunces",serif;font-size:2.45rem;line-height:1;color:var(--text-strong)}.saas-primary-kpi h3{font:700 .9rem/1.2 "Inter",sans-serif;margin:.5rem 0 .35rem;color:var(--text-strong)}.saas-primary-kpi p{position:relative;z-index:1;margin:0;max-width:82%;font-size:.72rem;color:var(--text-muted)}.kpi-green{--kpi-color:#237a52;--kpi-soft:rgba(47,158,104,.13)}.kpi-blue{--kpi-color:#3b6fd6;--kpi-soft:rgba(59,111,214,.12)}.kpi-violet{--kpi-color:#7c5cbf;--kpi-soft:rgba(124,92,191,.12)}.kpi-orange{--kpi-color:#bd7110;--kpi-soft:rgba(217,140,31,.14)}
.saas-metric-strip{display:grid;grid-template-columns:repeat(4,1fr);margin-top:.75rem;background:var(--surface-bg);border:1px solid var(--surface-border);border-radius:1rem;overflow:hidden}.saas-metric-strip>div{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.7rem;padding:.85rem 1rem;border-right:1px solid var(--surface-border)}.saas-metric-strip>div:last-child{border:0}.saas-metric-strip i{color:var(--brand-brass-600);font-size:1rem}.saas-metric-strip span{display:flex;flex-direction:column;font-size:.68rem;color:var(--text-muted)}.saas-metric-strip b{font-size:1rem;color:var(--text-strong)}.saas-metric-strip em{font-style:normal;font-size:.65rem;color:var(--text-muted);background:var(--surface-subtle);border-radius:99px;padding:.25rem .45rem;white-space:nowrap}
.saas-analytics-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(18rem,1fr);gap:1rem}.saas-operations-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.saas-panel{min-width:0;background:var(--surface-bg);border:1px solid var(--surface-border);border-radius:1rem;box-shadow:var(--shadow-soft);padding:1.25rem}.saas-panel-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.saas-period-chip{padding:.35rem .65rem!important;border-radius:99px;background:var(--surface-subtle);color:var(--text-muted)!important;letter-spacing:0!important;text-transform:none!important}.saas-growth-chart{height:19rem}.saas-license-chart{height:12.5rem;max-width:14rem;margin:.2rem auto 1rem}.saas-license-legend{display:flex;flex-direction:column;gap:.55rem}.saas-license-legend span{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.55rem;font-size:.72rem;color:var(--text-muted)}.saas-license-legend i{width:.55rem;height:.55rem;border-radius:50%}.saas-license-legend b{color:var(--text-strong)}.legend-active{background:#2f9e68}.legend-renew{background:#d98c1f}.legend-missing{background:#c24b55}
.saas-alert-list{display:flex;flex-direction:column;gap:.55rem}.saas-alert-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:.75rem;padding:.7rem .75rem;border:1px solid var(--surface-border);border-radius:.75rem;color:var(--text-strong);text-decoration:none}.saas-alert-row:hover{border-color:var(--brand-brass-400);color:var(--text-strong);background:var(--surface-subtle)}.saas-alert-icon{display:grid;place-items:center;width:2.25rem;height:2.25rem;border-radius:.62rem}.saas-alert-row>span:nth-child(2){display:flex;min-width:0;flex-direction:column}.saas-alert-row b{font-size:.78rem}.saas-alert-row small{font-size:.65rem;color:var(--text-muted)}.saas-alert-row>strong{font:700 1.15rem "Fraunces",serif}.saas-alert-row>i{color:var(--text-muted);font-size:1.1rem}.saas-compact-table,.saas-journal-table{margin:0}.saas-compact-table th,.saas-journal-table th{padding:.55rem .65rem;background:var(--surface-subtle);border:0;color:var(--text-muted);font-size:.64rem;text-transform:uppercase;letter-spacing:.06em;white-space:nowrap}.saas-compact-table td{padding:.65rem;border-color:var(--surface-border);font-size:.76rem}.saas-compact-table td:first-child{display:flex;flex-direction:column}.saas-compact-table small{color:var(--text-muted)}
.saas-journal-panel{padding:0;overflow:hidden}.saas-journal-head{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;padding:1.25rem}.saas-journal-head p{margin:.3rem 0 0;color:var(--text-muted);font-size:.75rem}.saas-journal-head .form-select{min-width:14rem;font-size:.78rem}.saas-journal-table td{padding:.75rem .65rem;border-color:var(--surface-border);vertical-align:middle;font-size:.72rem}.saas-journal-table tbody tr:hover{background:var(--surface-subtle)}.saas-date-cell{white-space:nowrap}.saas-date-cell b,.saas-date-cell small{display:block}.saas-date-cell small{color:var(--text-muted)}.saas-action-badge{display:inline-block;max-width:14rem;padding:.32rem .52rem;border-radius:.45rem;background:rgba(79,111,184,.11);color:#3f5f9f;font-weight:700;white-space:nowrap}.saas-detail-cell{max-width:24rem;color:var(--text-muted)}.saas-empty{text-align:center!important;padding:2rem!important;color:var(--text-muted)!important}
@media(max-width:1499.98px){.saas-primary-kpis{grid-template-columns:repeat(2,1fr)}.saas-analytics-grid{grid-template-columns:1fr}.saas-license-chart{height:11rem}.saas-license-legend{max-width:22rem;margin:auto}.saas-metric-strip{grid-template-columns:repeat(2,1fr)}.saas-metric-strip>div:nth-child(2){border-right:0}.saas-metric-strip>div:nth-child(-n+2){border-bottom:1px solid var(--surface-border)}}
@media(max-width:1399.98px){.saas-operations-grid{grid-template-columns:1fr}.saas-audit-header{align-items:stretch;flex-direction:column;gap:1rem}.saas-audit-filters{align-self:flex-start}}
@media(max-width:767.98px){.saas-audit{gap:1rem}.saas-audit-header{align-items:stretch;flex-direction:column;gap:1rem}.saas-audit-filters{display:grid;grid-template-columns:1fr 1fr}.saas-audit-filters .form-select{min-width:0}.saas-primary-kpis,.saas-operations-grid{grid-template-columns:1fr}.saas-primary-kpi{min-height:11.5rem}.saas-metric-strip{grid-template-columns:1fr}.saas-metric-strip>div{border-right:0;border-bottom:1px solid var(--surface-border)!important}.saas-metric-strip>div:last-child{border-bottom:0!important}.saas-growth-chart{height:16rem}.saas-journal-head{align-items:stretch;flex-direction:column}.saas-journal-head .form-select{width:100%;min-width:0}}

/* Le réglage contient désormais l'identité ET les structures de page. */
.cms-nav a[href$="/cms/identite/"]{font-size:0}.cms-nav a[href$="/cms/identite/"] i{font-size:1rem}.cms-nav a[href$="/cms/identite/"]::after{content:"Styles et mises en page";font-size:.9rem}

/* =========================================================================
   19. THÈME SOMBRE — [data-bs-theme="dark"]
   ---------------------------------------------------------------------
   Redéfinit uniquement les jetons sémantiques et les variables Bootstrap
   nécessaires : tous les composants ci-dessus en héritent automatiquement.
   La sidebar N'EST PAS redéfinie ici : elle reste sombre en permanence
   (--sidebar-* n'a qu'une seule valeur, cf. section 5).
   ========================================================================= */
html[data-bs-theme="dark"] {
  --surface-bg: #16233a;
  --surface-alt-bg: #101a2c;
  --surface-border: #2b3a54;
  --text-strong: #f3f1ea;
  --text-muted: #a9b3c6;

  --bs-body-bg: #0b1220;
  --bs-body-color: var(--text-strong);
  --bs-border-color: var(--surface-border);
  --bs-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 14px rgba(0, 0, 0, 0.35);

  --bs-primary: var(--brand-ink-500);
  --bs-primary-rgb: 44, 62, 92;
  --bs-light: #1c2a42;
  --bs-dark: #f3f1ea;

  --bs-link-color: #9db4dd;
  --bs-link-hover-color: var(--brand-brass-400);

  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-raised: 0 2px 4px rgba(0, 0, 0, 0.35), 0 12px 24px rgba(0, 0, 0, 0.4);
}

html[data-bs-theme="dark"] .dropdown-menu {
  --bs-dropdown-bg: var(--surface-bg);
  --bs-dropdown-link-color: var(--text-strong);
  --bs-dropdown-link-hover-color: var(--text-strong);
  --bs-dropdown-link-hover-bg: var(--surface-alt-bg);
  --bs-dropdown-border-color: var(--surface-border);
}
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select {
  background-color: var(--surface-alt-bg);
  color: var(--text-strong);
  border-color: var(--surface-border);
}

/* Badges de statut : en mode sombre, un fond pastel plein devient trop
   lumineux. On le remplace par un fond translucide (color-mix). */
html[data-bs-theme="dark"] .badge-status {
  background: color-mix(in srgb, var(--badge-tint, var(--status-neutral-600)) 22%, transparent);
  color: color-mix(in srgb, var(--badge-tint, var(--status-neutral-600)) 70%, white 30%);
}
html[data-bs-theme="dark"] .badge-status--clean       { --badge-tint: var(--status-success-600); }
html[data-bs-theme="dark"] .badge-status--to-inspect  { --badge-tint: var(--status-teal-600); }
html[data-bs-theme="dark"] .badge-status--occupied    { --badge-tint: var(--status-info-600); }
html[data-bs-theme="dark"] .badge-status--reserved    { --badge-tint: var(--status-violet-600); }
html[data-bs-theme="dark"] .badge-status--departure   { --badge-tint: var(--status-warning-600); }
html[data-bs-theme="dark"] .badge-status--cleaning    { --badge-tint: var(--status-orange-600); }
html[data-bs-theme="dark"] .badge-status--maintenance { --badge-tint: var(--status-danger-600); }
html[data-bs-theme="dark"] .badge-status--blocked     { --badge-tint: var(--status-neutral-600); }
html[data-bs-theme="dark"] .badge-status--pending     { --badge-tint: var(--status-neutral-600); }
html[data-bs-theme="dark"] .badge-status--preparing   { --badge-tint: var(--status-warning-600); }
html[data-bs-theme="dark"] .badge-status--ready       { --badge-tint: var(--status-info-600); }
html[data-bs-theme="dark"] .badge-status--served      { --badge-tint: var(--status-success-600); }
html[data-bs-theme="dark"] .badge-status--paid        { --badge-tint: #1f7a5c; }
html[data-bs-theme="dark"] .badge-status--cancelled   { --badge-tint: var(--status-danger-600); }

/* Boutons pleins sur accent laiton : le texte encre passe en clair pour
   rester lisible, le laiton lui-même reste inchangé (couleur de marque). */
html[data-bs-theme="dark"] .btn-accent {
  color: var(--brand-ink-900);
}

/* -------------------------------------------------------------------------
   15. MODE POS (caisse tactile plein écran) — § demande explicite : "POS
   s'ouvre en mode POS donc toute l'interface sans les autres menus,
   vérifie sur internet pour voir comme les POS s'affichent souvent
   surtout pour les écrans tactiles". Gabarit dédié (templates/base_pos.html),
   SANS .app-sidebar ni .app-topbar — juste un bandeau minimal (nom
   d'établissement, caissier, sortie) au-dessus d'une zone plein écran.
   Cibles tactiles volontairement larges (voir --pos-tap-min) et
   contraste fort, conformément aux bonnes pratiques d'UI de caisse
   tactile (catégories en haut, grille de produits au centre, ticket
   fixe à droite) trouvées lors de la recherche menée pour cette tâche.
   ------------------------------------------------------------------------- */
:root {
  --pos-tap-min: 3.25rem; /* taille minimale d'une cible tactile (boutons, tuiles) */
}

.pos-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bs-body-bg);
  overflow: hidden;
}

.pos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--brand-ink-900);
  color: var(--brand-ivory-100);
  flex: 0 0 auto;
}
.pos-header-identity { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.pos-header-identity .pos-mark {
  width: 2.25rem; height: 2.25rem; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-brass-400), var(--brand-brass-600));
  display: flex; align-items: center; justify-content: center;
  font-family: "Fraunces", serif; font-weight: 700; color: var(--brand-ink-900);
  flex: 0 0 auto;
}
.pos-header-title { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.05rem; line-height: 1.15; }
.pos-header-sub { font-size: 0.8rem; color: var(--brand-glow-300); }
.pos-header-actions { display: flex; align-items: center; gap: 0.5rem; flex: 0 0 auto; }
.pos-header-actions .btn { min-height: var(--pos-tap-min); }
.pos-exit {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1rem; border-radius: var(--radius-md);
  background: rgba(247, 245, 241, 0.1); color: var(--brand-ivory-100);
  text-decoration: none; font-weight: 600; min-height: var(--pos-tap-min);
}
.pos-exit:hover { background: rgba(247, 245, 241, 0.18); color: var(--brand-brass-400); }

.pos-body {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.pos-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  overflow-y: auto;
}

/* Onglets de catégories — larges, défilement horizontal si besoin,
   filtrage CÔTÉ CLIENT (static/js/restaurant_pos.js) : aucun aller-retour
   serveur pour changer de catégorie, c'est le geste le plus fréquent. */
.pos-categories {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  flex: 0 0 auto;
}
.pos-category-tab {
  flex: 0 0 auto;
  padding: 0.65rem 1.1rem;
  min-height: var(--pos-tap-min);
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface-bg);
  color: var(--text-strong);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.pos-category-tab.active {
  background: var(--brand-ink-700);
  border-color: var(--brand-ink-700);
  color: var(--brand-ivory-100);
}

.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.75rem;
  align-content: start;
}

.pos-product-tile {
  border: 1px solid var(--surface-border);
  background: var(--surface-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 0;
  min-height: 6.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.pos-product-tile:active { transform: scale(0.97); }
.pos-product-tile .pos-product-name {
  padding: 0.7rem 0.75rem 0.2rem;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.25;
}
.pos-product-tile .pos-product-price {
  padding: 0 0.75rem 0.7rem;
  color: var(--brand-brass-600);
  font-weight: 700;
}
.pos-product-tile .pos-product-categorie {
  padding: 0 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Panneau ticket, toujours visible à droite (§ recherche : "receipt
   panel" / "cart" toujours affiché à côté de la grille produits). */
.pos-cart {
  flex: 0 0 22rem;
  max-width: 22rem;
  display: flex;
  flex-direction: column;
  background: var(--surface-bg);
  border-left: 1px solid var(--surface-border);
  padding: 1rem;
  overflow-y: auto;
}
.pos-cart-header { margin-bottom: 0.5rem; }
.pos-cart-lines { flex: 1 1 auto; overflow-y: auto; }
.pos-cart-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--surface-border);
}
.pos-cart-line-info { min-width: 0; }
.pos-cart-line-name { font-weight: 600; color: var(--text-strong); }
.pos-cart-line-meta { font-size: 0.8rem; color: var(--text-muted); }
.pos-cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.85rem 0;
  border-top: 2px solid var(--surface-border);
  font-family: "Fraunces", serif;
}
.pos-cart-total .amount { font-size: 1.5rem; font-weight: 700; color: var(--text-strong); }
.pos-cart-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.pos-cart-actions .btn { min-height: var(--pos-tap-min); font-weight: 600; }

/* Grille de tables du plan de salle en mode POS — mêmes tuiles que
   .card-room, mais cibles agrandies pour le tactile. */
.pos-table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1rem;
}
.pos-table-tile { min-height: 8rem; }
.pos-table-tile .btn { min-height: var(--pos-tap-min); }

@media (max-width: 900px) {
  .pos-body { flex-direction: column; }
  .pos-cart { flex: 0 0 auto; max-width: none; border-left: none; border-top: 1px solid var(--surface-border); max-height: 40vh; }
}

/* -------------------------------------------------------------------------
   16. ÉCRAN CUISINE (KDS — apps.kitchen), en mode POS plein écran comme
   la section 15 ci-dessus : une grille de "tickets" (une commande envoyée
   en cuisine par carte), FIFO — le ticket le plus ancien en premier.
   ------------------------------------------------------------------------- */
.kds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
  align-content: start;
}

.kds-ticket {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background: var(--surface-bg);
  overflow: hidden;
  align-self: start;
  min-height: 0;
}

.kds-ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--status-warning-100);
  color: var(--status-warning-600);
}
.kds-ticket-cible { font-family: "Fraunces", serif; font-weight: 600; }
.kds-ticket-minutes { font-weight: 700; white-space: nowrap; }
/* Passé un certain temps d'attente, le ticket devient plus visible sans
   avoir à ouvrir chaque carte — même principe que les alertes de retard
   des écrans cuisine du secteur. */
.kds-ticket.kds-ticket--retard .kds-ticket-header {
  background: var(--status-danger-100);
  color: var(--status-danger-600);
}

.kds-ticket-lignes {
  flex: 0 0 18rem;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 18rem;
  min-height: 0;
  max-height: 18rem !important;
  overflow-y: scroll !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.kds-ticket-ligne { display: flex; flex-direction: column; padding: .45rem; border-radius: .5rem; cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
.kds-ticket-ligne:hover { background: var(--surface-soft); }
.kds-ticket--selectionne { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-brass-600) 45%, transparent), var(--shadow-soft); }
.kds-ticket-ligne--selectionnee { background: color-mix(in srgb, var(--brand-brass-600) 16%, var(--surface-bg)); box-shadow: inset 3px 0 var(--brand-brass-600); }
.kds-ticket-ligne-principale { display: flex; gap: 0.5rem; font-weight: 600; color: var(--text-strong); }
.kds-ticket-ligne-qte { color: var(--brand-brass-600); }
.kds-ticket-ligne-note { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }
.kds-ticket-ligne-poste { font-size: 0.75rem; color: var(--text-muted); }

.kds-ticket-footer { padding: 0.75rem 1rem; border-top: 1px solid var(--surface-border); }
.kds-ticket-footer .btn { width: 100%; min-height: var(--pos-tap-min); font-weight: 600; }

/* Centre de notifications */
.notification-count { position:absolute; top:-.2rem; right:-.35rem; min-width:1.15rem; height:1.15rem; padding:0 .25rem; border-radius:1rem; background:var(--bs-danger); color:#fff; font-size:.68rem; line-height:1.15rem; text-align:center; font-weight:700; }
.notification-dropdown { width:min(24rem, calc(100vw - 1rem)); max-height:30rem; overflow-y:auto; }
.notification-preview { padding:.75rem 1rem; border-bottom:1px solid var(--surface-border); }
.notification-preview--unread { background:color-mix(in srgb, var(--bs-primary) 8%, transparent); }
.notification-row { display:flex; align-items:center; gap:1rem; padding:1rem 1.25rem; color:inherit; text-decoration:none; border-bottom:1px solid var(--surface-border); }
.notification-row:last-child { border-bottom:0; }
.notification-row:hover { background:var(--surface-soft); }
.notification-row--unread { background:color-mix(in srgb, var(--bs-primary) 7%, transparent); }
.notification-icon { display:grid; place-items:center; flex:0 0 2.5rem; height:2.5rem; border-radius:50%; background:var(--bs-secondary-bg); }
.notification-icon--succes { color:var(--bs-success); }.notification-icon--avertissement { color:var(--bs-warning); }.notification-icon--critique { color:var(--bs-danger); }.notification-icon--info { color:var(--bs-primary); }

/* =======================================================================
   17. IMPRESSION
   -----------------------------------------------------------------------
   Utilisé par templates/hotel/tarifs_imprimer.html (§ demande explicite :
   "imprimer la liste des prix") — générique, réutilisable par tout futur
   écran imprimable : `.no-print` masque un élément uniquement à
   l'impression (boutons, panneau latéral, barre supérieure), `.print-header`
   n'apparaît QUE sur la feuille imprimée (identité établissement + date,
   inutile à l'écran où la topbar joue déjà ce rôle).
   ======================================================================= */
.print-header { display: none; }

@media print {
  .app-sidebar,
  .app-topbar,
  .app-mobile-nav,
  .no-print {
    display: none !important;
  }

  .app-content { margin: 0 !important; width: 100% !important; }
  .app-main { padding: 0 !important; }

  .print-header {
    display: block;
    margin-bottom: 1rem;
  }
  .print-header h1 { font-size: 1.25rem; margin-bottom: 0.25rem; }
  .print-header p { font-size: 0.85rem; color: #555; }

  .table-card { box-shadow: none !important; border: 1px solid #ccc !important; }
}
